changeset 3244:6a0245a8f714

Merge
author jrose
date Thu, 02 Dec 2010 03:02:56 -0800
parents a451f7948ec5 bd75fc38a82a
children 7fc85363b44c
files make/common/Rules-SCCS.gmk src/share/classes/com/sun/media/sound/MidiDeviceReceiver.java src/share/classes/java/nio/channels/AsynchronousDatagramChannel.java src/share/classes/sun/java2d/pisces/LineSink.java src/share/classes/sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java src/share/classes/sun/security/krb5/KrbKdcReq.java src/share/classes/sun/security/krb5/internal/TCPClient.java src/share/classes/sun/security/krb5/internal/UDPClient.java src/share/native/sun/java2d/cmm/lcms/cmscam97.c src/share/native/sun/java2d/cmm/lcms/cmsmatsh.c src/share/native/sun/java2d/cmm/lcms/icc34.h src/share/native/sun/java2d/cmm/lcms/lcms.h src/solaris/classes/sun/net/spi/SdpProvider.java src/solaris/classes/sun/net/www/protocol/http/NTLMAuthentication.java src/solaris/native/sun/net/spi/SdpProvider.c test/java/nio/channels/AsynchronousDatagramChannel/Basic.java test/java/util/Locale/data/deflocale.exe test/java/util/Locale/data/deflocale.jds3 test/java/util/Locale/data/deflocale.rhel4 test/java/util/Locale/data/deflocale.winvista test/java/util/Locale/data/deflocale.winxp test/sun/net/www/http/ChunkedInputStream/ChunkedCharEncoding.sh test/tools/launcher/VerifyExceptions.java
diffstat 1087 files changed, 103841 insertions(+), 46560 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Dec 02 02:59:02 2010 -0800
+++ b/.hgtags	Thu Dec 02 03:02:56 2010 -0800
@@ -82,3 +82,14 @@
 3b0abcb512807bb6f6d27755bc50103211bde6ee jdk7-b105
 b91ef6b60f4e19bf4592c6dd594c9bac62487519 jdk7-b106
 882103f334bb23745d3fd70fb7928c347478b0f4 jdk7-b107
+17a5d84b75610255a3527e8ede1da19c91ba7a7e jdk7-b108
+ab0d3f54a63f2aadfcdd2e14b81f79362ce454e2 jdk7-b109
+176586cd040e4dd17a5ff6e91f72df10d7442453 jdk7-b110
+fb63a2688db807a73e2a3de7d9bab298f1bff0e8 jdk7-b111
+b53f226b1d91473ac54184afa827be07b87e0319 jdk7-b112
+61d3b9fbb26bdef56cfa41b9af5bc312a22cbeb8 jdk7-b113
+e250cef36ea05e627e7e6f7d75e5e19f529e2ba3 jdk7-b114
+449bad8d67b5808ecf0f927683acc0a5940f8c85 jdk7-b115
+1657ed4e1d86c8aa2028ab5a41f9da1ac4a369f8 jdk7-b116
+3e6726bbf80a4254ecd01051c8ed77ee19325e46 jdk7-b117
+b357910aa04aead2a16b6d6ff395a8df4b51d1dd jdk7-b118
--- a/make/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 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
@@ -75,7 +75,6 @@
 import_fastdebug  -- copy in the fastdebug components \n\
 import_debug      -- copy in the debug components \n\
 modules           -- build the jdk and jre module images (experimental) \n\
-sccs_get          -- make sure all SCCS files are up-to-date (need SCCS) \n\
 create_links      -- create softlinks in Solaris 32bit build to 64bit dirs \n\
 "
 
@@ -244,6 +243,11 @@
 SUBDIRS_tools = launchers
 SUBDIRS_misc  = org sunw jpda mkdemo mksample
 
+# Alternate classes implementation
+ifndef OPENJDK
+  SUBDIRS_misc += altclasses
+endif
+
 include $(BUILDDIR)/common/Subdirs.gmk
 
 all build::
@@ -278,21 +282,6 @@
 $(OUTPUTDIR) $(TEMPDIR):
 	$(MKDIR) -p $@
 
-# cleanup everything. If the workspace is not being built by the control
-# workspace, and if it is a Teamware workspace, then see if there are
-# any files which are not under SCCS control.
-clean clobber:: 
-ifndef EXTERNALSANITYCONTROL
-	@if [ -d $(TOPDIR)/Codemgr_wsdata ]; then \
-	  $(ECHO) '\nPerforming workspace scan for remnant files.\n' \
-		'  Any files listed below are not under SCCS control in the workspace\n' \
-		'  and you should review them and possibly remove them manually:' ; \
-	  $(FIND) $(TOPDIR)/make $(TOPDIR)/src -type f | \
-		$(SED) 's+SCCS/[ps]\.++' | $(SORT) | $(UNIQ) -c | $(NAWK) '$$1<2 {print $$2;}' ; \
-	  $(ECHO) 'End of workspace scan.' ; \
-	fi
-endif
-
 # this should be the last rule in this file:
 all::
 	@if [ -r $(WARNING_FILE) ]; then \
@@ -341,16 +330,70 @@
 include $(BUILDDIR)/common/internal/BinaryPlugs.gmk
 
 #
-# Get top level sccs_get rule
+# Test rule
 #
-include $(BUILDDIR)/common/Rules-SCCS.gmk
 
+.NOTPARALLEL: test_run
+
+test:
+	$(MAKE) test_run
+
+test_run: test_clean test_start test_summary
+
+test_start:
+	@$(ECHO) "Tests started at `$(DATE)`"
+
+test_clean:
+	$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
+
+test_summary: $(OUTPUTDIR)/test_failures.txt
+	@$(ECHO) "#################################################"
+	@$(ECHO) "Tests completed at `$(DATE)`"
+	@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \
+          || $(ECHO) "No TEST STATS seen in log" )
+	@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt"
+	@$(ECHO) "#################################################"
+	@if [ -s $< ] ; then                                           \
+          $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \
+          $(CAT) $<;                                                   \
+          exit 1;                                                      \
+        else                                                           \
+          $(ECHO) "Success! No failures detected";                     \
+        fi
+
+# Get failure list from log
+$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
+	@$(RM) $@
+	@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@
+
+# Get log file of all tests run
+JDK_TO_TEST := $(shell 							\
+  if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then 			\
+    $(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; 				\
+  elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then 				\
+    $(ECHO) "$(ABS_OUTPUTDIR)"; 					\
+  elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then 	\
+    $(ECHO) "$(PRODUCT_HOME)"; 						\
+  fi 									\
+)
+
+TEST_TARGETS=jdk_all
+$(OUTPUTDIR)/test_log.txt:
+	$(RM) $@
+	( $(CD) ../test &&                                              \
+          $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \
+        ) | tee $@
+
+#
 # JPRT rules
+#
+
 include jprt.gmk
 
 #
 # Phonies to avoid accidents.
 #
 .PHONY: all build clean clobber optimized debug fastdebug create_links \
-	import import_product import_fastdebug import_debug
+	import import_product import_fastdebug import_debug \
+	test test_run test_start test_clean test_summary
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/altclasses/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,84 @@
+#
+# 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.
+#
+
+#
+# Makefile for building alternate runtime classes (not used by default)
+#
+
+BUILDDIR = ..
+
+PRODUCT = altclasses
+
+include $(BUILDDIR)/common/Defs.gmk
+
+# Root of alternate class sources
+
+ALTCLASSES_SRCDIR = $(CLOSED_SRC)/share/altclasses
+
+# Alternate runtime classes
+
+ALTRT_JAR_FILE = $(LIBDIR)/alt-rt.jar
+ALTRT_JAR_SOURCE_FILE = $(TEMPDIR)/alt-rt.jarsrclist
+ALTRT_JAR_SOURCES = $(wildcard $(ALTCLASSES_SRCDIR)/java/*/*.java)
+
+# Use a special file suffix for the file that holds the source list
+
+.SUFFIXES: .jarsrclist
+
+# Build rules
+
+all build: 
+	@if [ -d $(ALTCLASSES_SRCDIR) ] ; then \
+	   $(MAKE) $(ALTRT_JAR_FILE); \
+	fi
+
+# Source list file creation
+
+$(ALTRT_JAR_SOURCE_FILE): $(ALTRT_JAR_SOURCES) FRC
+	$(prep-target)
+	$(ECHO) $(ALTRT_JAR_SOURCES) > $@
+
+clean clobber::
+	$(RM) $(ALTRT_JAR_FILE) $(ALTRT_JAR_SOURCE_FILE) 
+	$(RM) -r $(ALTRT_JAR_SOURCE_FILE).classes
+
+include $(BUILDDIR)/common/Classes.gmk
+
+# Pattern rule to turn a source list file into a jar file
+$(LIBDIR)/%.jar : $(TEMPDIR)/%.jarsrclist
+	$(prep-target)
+	$(RM) -r $(<).classes
+	$(MKDIR) -p $(<).classes
+	$(JAVAC_CMD) -implicit:none -d $(<).classes @$<
+	$(BOOT_JAR_CMD) cf $@ -C $(<).classes . $(BOOT_JAR_JFLAGS)
+
+# Force target
+
+FRC:
+
+# Non file targets
+
+.PHONY: all build clean clobber
+
--- a/make/com/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/com/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -31,7 +31,7 @@
 PRODUCT = com
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS = sun
+SUBDIRS = sun oracle
 include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/com/oracle/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,34 @@
+#
+# 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
+
+SUBDIRS = net
+include $(BUILDDIR)/common/Subdirs.gmk
+
+all build clean clobber::
+	$(SUBDIRS-loop)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/com/oracle/net/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,39 @@
+#
+# 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/Cscope.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/Cscope.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -76,7 +76,7 @@
 # What files should we include?  A simple rule might be just those files under
 # SCM control, however this would miss files we create like the opcodes and
 # CClassHeaders.  The following attempts to find everything that is *useful*.
-# (.del files are created by sccsrm, demo directories contain many .java files
+# (demo directories contain many .java files
 # that probably aren't useful for development, and the pkgarchive may contain
 # duplicates of files within the source hierarchy).  The ordering of the .raw
 # file is an attempt to make cscope display the most relevant files first.
--- a/make/common/Defs.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/Defs.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -334,7 +334,7 @@
 DOCSDIRSUFFIX       =
 
 # The MESSAGE, WARNING and ERROR files are used to store sanityck and 
-# SCCS check messages, warnings and errors. 
+# warnings and errors. 
 ifndef ERROR_FILE
   ERROR_FILE   = $(OUTPUTDIR)/sanityCheckErrors.txt
 endif
@@ -634,38 +634,6 @@
 
 VERSION_DEFINES = -DRELEASE='"$(RELEASE)"'
 
-# Note: As a rule, GNU Make rules should not appear in any of the 
-# Defs*.gmk files. These were added for Kestrel-Solaris and do address
-# a TeamWare bug. They should be moved elsewhere for Merlin.
-# 
-#  Override gnumake built-in rules which do sccs get operations badly.
-#  (They put the checked out code in the current directory, not in the
-#  directory of the original file.) 
-# Since this is a symptom of a teamware failure, complain and die on the spot.
-
-# This message immediately goes to stdout and the build terminates.
-define SCCS-trouble
-$(error  \
-"ERROR: File $@ referenced while building in $(CURRENT_DIRECTORY) \
- is out of date with respect to its SCCS file $<. \
- This can happen from an unresolved Teamware conflict, a file movement, or \
- a failure in which SCCS files are updated but the 'sccs get' was not done. \
- You should double check for other out of date files in your workspace. \
- Or run: cd $(TOPDIR) && $(MAKE) sccs_get")
-endef
-
-%:: s.%
-	@$(SCCS-trouble)
-%:: SCCS/s.%
-	@$(SCCS-trouble)
-	@$(ECHO) "         is out of date with respect to its SCCS file." >> $(WARNING_FILE)
-	@$(ECHO) "         This file may be from an unresolved Teamware conflict." >> $(WARNING_FILE)
-	@$(ECHO) "         This is also a symptom of a Teamware bringover/putback failure" >> $(WARNING_FILE)
-	@$(ECHO) "         in which SCCS files are updated but not checked out." >> $(WARNING_FILE)
-	@$(ECHO) "         Check for other out of date files in your workspace." >> $(WARNING_FILE)
-	@$(ECHO) "" >> $(WARNING_FILE)
-	@#exit 666
-
 ifdef INSANE
   export INSANE
 endif
--- a/make/common/Release.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/Release.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -573,13 +573,13 @@
 	$(ECHO) "sun/jvmstat/" >> $@
 	$(ECHO) "sun/nio/cs/ext/" >> $@
 	$(ECHO) "sun/awt/HKSCS.class" >> $@
-	$(ECHO) "sun/awt/motif/X11GB2312$Decoder.class" >> $@
-	$(ECHO) "sun/awt/motif/X11GB2312$Encoder.class" >> $@
+	$(ECHO) "sun/awt/motif/X11GB2312\$$Decoder.class" >> $@
+	$(ECHO) "sun/awt/motif/X11GB2312\$$Encoder.class" >> $@
 	$(ECHO) "sun/awt/motif/X11GB2312.class" >> $@
-	$(ECHO) "sun/awt/motif/X11GBK$Encoder.class" >> $@
+	$(ECHO) "sun/awt/motif/X11GBK\$$Encoder.class" >> $@
 	$(ECHO) "sun/awt/motif/X11GBK.class" >> $@
-	$(ECHO) "sun/awt/motif/X11KSC5601$Decoder.class" >> $@
-	$(ECHO) "sun/awt/motif/X11KSC5601$Encoder.class" >> $@
+	$(ECHO) "sun/awt/motif/X11KSC5601\$$Decoder.class" >> $@
+	$(ECHO) "sun/awt/motif/X11KSC5601\$$Encoder.class" >> $@
 	$(ECHO) "sun/awt/motif/X11KSC5601.class" >> $@
 	$(ECHO) "sun/rmi/rmic/" >> $@
 	$(ECHO) "sun/tools/asm/" >> $@
--- a/make/common/Rules-SCCS.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-#
-# Copyright (c) 2005, 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.
-#
-
-#
-# Only get these rules if SCCS is available
-#
-
-ifdef SCCS
-
-# SCCS command to extract out latest source
-SCCS_GET=$(SCCS) get -s
-
-#
-# Make sure all files in workspace are fresh
-#
-TEMP_ALL_FILES=$(JDK_TOPDIR)/temp_filelist
-$(TEMP_ALL_FILES): $(JDK_TOPDIR)/Codemgr_wsdata/nametable
-	$(prep-target)
-	@$(CUT) -d' ' -f1 $< \
-	    | $(GREP) -v '^VERSION' \
-	    | $(GREP) -v '^deleted_files' \
-	    | $(GREP) -v '^Codemgr_wsdata' > $@
-
-sccs_get: $(TEMP_ALL_FILES)
-	@$(PRINTF) "Workspace has %d files\n"  `$(CAT) $< | $(WC) -l`
-	@count=0; \
-	for i in `$(CAT) $<` ; do \
-	    f=$(JDK_TOPDIR)/$$i; \
-	    count=`$(EXPR) $$count '+' 1`; \
-	    if [ `$(EXPR) $$count '%' 100` = 0 ] ; then \
-		$(PRINTF) "\rChecked $$count files"; \
-	    fi; \
-	    if [ ! -f $$f ] ; then \
-		$(PRINTF) "\r$(SCCS_GET) $$f\n"; \
-		(cd `$(DIRNAME) $$f` && $(SCCS_GET) `$(BASENAME) $$f`); \
-	    elif /usr/bin/test $$f -ot `$(DIRNAME) $$f`/SCCS/s.`$(BASENAME) $$f` ; then \
-		$(PRINTF) "\r$(SCCS_GET) $$f\n"; \
-		(cd `$(DIRNAME) $$f` && $(SCCS_GET) `$(BASENAME) $$f`); \
-	    fi; \
-	done; \
-	$(PRINTF) "\rChecked $$count files\n"
-
-#
-# Phonies to avoid accidents.
-#
-.PHONY: sccs_get
-
-endif
--- a/make/common/internal/Resources.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/internal/Resources.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -251,13 +251,13 @@
 # Make sure the build rule creates all the properties
 resources:
 
-ifneq ($(PROPERTIES_FILES),)
+ifneq ($(strip $(PROPERTIES_FILES)),)
   resources: strip_prop_options_clean   strip_all_props
   clobber clean:: 
 	$(RM) $(STRIP_PROP_FILES) $(STRIP_PROP_options)
 endif
 
-ifneq ($(COMPILED_PROPERTIES),)
+ifneq ($(strip $(COMPILED_PROPERTIES)),)
   resources: compile_prop_options_clean compile_all_props
   clobber clean:: 
 	$(RM) $(COMPILE_PROP_JAVA_FILES) $(COMPILE_PROP_options)
--- a/make/common/shared/Compiler-sun.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/shared/Compiler-sun.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -61,6 +61,7 @@
 # Get compiler version
 _CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1)
 CC_VER  :=$(call GetVersion,"$(_CC_VER)")
+CC_MINORVER  :=$(call MinorVersion,$(CC_VER))
 
 # Name of compilers being used
 COMPILER_VERSION-5.7  = SS10
@@ -69,8 +70,10 @@
 COMPILER_NAME-5.8     = Sun Studio 11
 COMPILER_VERSION-5.9  = SS12
 COMPILER_NAME-5.9     = Sun Studio 12
-COMPILER_VERSION-5.10 = SS13
-COMPILER_NAME-5.10    = Sun Studio 13
+COMPILER_VERSION-5.10 = SS12u1
+COMPILER_NAME-5.10    = Sun Studio 12 Update 1
+COMPILER_VERSION-5.11 = OSS12u2
+COMPILER_NAME-5.11    = Oracle Solaris Studio 12 Update 2
 COMPILER_VERSION      = $(COMPILER_VERSION-$(CC_VER))
 COMPILER_NAME         = $(COMPILER_NAME-$(CC_VER))
 
@@ -112,8 +115,8 @@
   XARCH_OPTION_OLD/64      += -xarch=amd64
   LINT_XARCH_OPTION_OLD/64 += -Xarch=amd64
 endif
-# Pick the options we want based on the compiler being used.
-ifeq ($(shell expr $(CC_VER) \>= 5.9), 1)
+# Pick the options we want based on the compiler being used. (5.9 or newer)
+ifeq ($(shell expr $(CC_MINORVER) \>= 9), 1)
   XARCH_OPTION/32 = $(XARCH_OPTION_NEW/32)
   XARCH_OPTION/64 = $(XARCH_OPTION_NEW/64)
   LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_NEW/32)
--- a/make/common/shared/Defs-javadoc.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/shared/Defs-javadoc.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -45,7 +45,7 @@
 PLUGIN2_FIRST_COPYRIGHT_YEAR        = 2007
 
 # Oracle name
-COMPANY_NAME = Oracle and/or its affiliates
+FULL_COMPANY_NAME = Oracle and/or its affiliates
 
 # Copyright address
 COMPANY_ADDRESS = 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA.
--- a/make/common/shared/Defs-utils.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/shared/Defs-utils.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -33,7 +33,7 @@
 #            UTILS_COMMAND_PATH
 #         /usr/bin/ 
 #            UTILS_USR_BIN_PATH
-#         /usr/ccs/bin/ (sccs, m4, lex, yacc, as, ar, strip, mcs)
+#         /usr/ccs/bin/ (m4, lex, yacc, as, ar, strip, mcs)
 #            UTILS_CCS_BIN_PATH
 #         Dev Tools: zip, unzip, etc that we may have special versions of
 #            UTILS_DEVTOOL_PATH
@@ -117,7 +117,6 @@
 RMDIR          = $(UTILS_COMMAND_PATH)rmdir
 RPM            = $(UTILS_COMMAND_PATH)rpm
 RPMBUILD       = $(UTILS_COMMAND_PATH)rpmbuild
-SCCS           = $(UTILS_CCS_BIN_PATH)sccs
 SED            = $(UTILS_COMMAND_PATH)sed
 SH             = $(UTILS_COMMAND_PATH)sh
 SHOWREV        = $(UTILS_USR_BIN_PATH)showrev
@@ -183,7 +182,7 @@
   NAWK           = $(USRBIN_PATH)gawk
   # Intrinsic unix command, with backslash-escaped character interpretation
   ECHO           = /bin/echo -e
-  # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
+  # These are really in UTILS_USR_BIN_PATH on Linux
   AR             = $(UTILS_USR_BIN_PATH)ar
   AS             = $(UTILS_USR_BIN_PATH)as
   LD             = $(UTILS_USR_BIN_PATH)ld
--- a/make/common/shared/Defs-versions.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/shared/Defs-versions.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -120,10 +120,10 @@
   else
     REQUIRED_FREE_SPACE       = 1040000
   endif
-  REQUIRED_COMPILER_NAME      = Sun Studio 12
-  REQUIRED_COMPILER_VERSION   = SS12
+  REQUIRED_COMPILER_NAME      = Sun Studio 12 Update 1
+  REQUIRED_COMPILER_VERSION   = SS12u1
   ifeq ($(CC_VERSION),sun)
-    REQUIRED_CC_VER           = 5.9
+    REQUIRED_CC_VER           = 5.10
   endif
   ifeq ($(CC_VERSION),gcc)
     REQUIRED_CC_VER           = 3.4.3
@@ -145,7 +145,7 @@
     REQUIRED_CC_VER           = 4.3.0
   endif
   ifeq ($(CC_VERSION),sun)
-    REQUIRED_CC_VER           = 5.9
+    REQUIRED_CC_VER           = 5.10
   endif
 endif
 
--- a/make/common/shared/Defs.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/common/shared/Defs.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -219,7 +219,7 @@
   PRODUCT_NAME = Java(TM)
   PRODUCT_SUFFIX = SE Runtime Environment
   JDK_RC_PLATFORM_NAME = Platform SE
-  COMPANY_NAME = Oracle
+  COMPANY_NAME = Oracle Corporation
 endif
 
 RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
@@ -341,7 +341,33 @@
 include $(_PRIVATE_DEFS_FILE)
 endif
 
+# OUTPUTDIR: Location of all output for the build
+ifdef ALT_OUTPUTDIR
+  OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR))
+  # Assumes this is absolute (checks later)
+  ABS_OUTPUTDIR:=$(OUTPUTDIR)
+else
+  ifndef _OUTPUTDIR
+    # Default:  Get "build" parent directory, which should always exist
+    ifndef BUILD_PARENT_DIRECTORY
+      BUILD_PARENT_DIRECTORY=$(BUILDDIR)/..
+    endif
+    ifdef OPENJDK
+      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX)
+    else
+      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)
+    endif
+    _OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
+  endif
+  OUTPUTDIR:=$(_OUTPUTDIR)
+endif
+# Check for spaces and null value
+OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR)
+OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR)
+
 # Get platform specific settings
+# NB: OUTPUTDIR must be defined. Otherwise hotspot import detection will not work correctly
+# On other hand this must be included early as it provides platform specific defines such as FullPath
 include $(JDK_MAKE_SHARED_DIR)/Defs-$(PLATFORM).gmk
 
 # Components
@@ -478,32 +504,6 @@
 CACERTS_FILE:=$(call AltCheckSpaces,CACERTS_FILE)
 CACERTS_FILE:=$(call AltCheckValue,CACERTS_FILE)
 
-# OUTPUTDIR: Location of all output for the build
-ifdef ALT_OUTPUTDIR
-  OUTPUTDIR:=$(subst \,/,$(ALT_OUTPUTDIR))
-  # Assumes this is absolute (checks later)
-  ABS_OUTPUTDIR:=$(OUTPUTDIR)
-else
-  ifndef _OUTPUTDIR
-    # Default:  Get "build" parent directory, which should always exist
-    ifndef BUILD_PARENT_DIRECTORY
-      BUILD_PARENT_DIRECTORY=$(BUILDDIR)/..
-    endif
-    ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY))
-    ifdef OPENJDK
-      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)$(OPENJDK_SUFFIX)
-    else
-      _OUTPUTDIRNAME=$(PLATFORM)-$(ARCH)
-    endif
-    _OUTPUTDIR=$(BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
-    ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
-  endif
-  OUTPUTDIR:=$(_OUTPUTDIR)
-endif
-# Check for spaces and null value
-OUTPUTDIR:=$(call AltCheckSpaces,OUTPUTDIR)
-OUTPUTDIR:=$(call AltCheckValue,OUTPUTDIR)
-
 #
 # When signing the JCE framework and provider, we could be using built
 # bits on a read-only filesystem.  If so, this test will fail and crash
@@ -519,7 +519,13 @@
 
 # Define absolute path if needed and check for spaces and null value
 ifndef ABS_OUTPUTDIR
-  ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
+  ifdef _OUTPUTDIRNAME
+    #Could not define this at the same time as _OUTPUTDIRNAME as FullPath is not defined at that point
+    ABS_BUILD_PARENT_DIRECTORY:=$(call FullPath,$(BUILD_PARENT_DIRECTORY))
+    ABS_OUTPUTDIR:=$(ABS_BUILD_PARENT_DIRECTORY)/build/$(_OUTPUTDIRNAME)
+  else
+    ABS_OUTPUTDIR:=$(call FullPath,$(OUTPUTDIR))
+  endif
 endif
 ABS_OUTPUTDIR:=$(call AltCheckSpaces,ABS_OUTPUTDIR)
 ABS_OUTPUTDIR:=$(call AltCheckValue,ABS_OUTPUTDIR)
@@ -572,10 +578,23 @@
     ANT_HOME := $(call DirExists,$(JDK_DEVTOOLS_DIR)/share/ant/latest,,)
   endif
 endif
+
+# There are few problems with ant we need to workaround:
+#  1) ant is using temporary directory java.io.tmpdir
+#     However, this directory is not unique enough and two separate ant processes
+#     can easily end up using the exact same temp directory. This may lead to weird build failures
+#     To workaround this we will define tmp dir explicitly
+#  2) ant attempts to detect JDK location based on java.exe location
+#     This is fragile as developer may have JRE first on the PATH. 
+#     To workaround this we will specify JAVA_HOME explicitly
+
+ANT_TMPDIR = $(ABS_OUTPUTDIR)/tmp
+ANT_WORKAROUNDS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)' JAVA_HOME='$(BOOTDIR)'
+
 ifeq ($(ANT_HOME),)
-  ANT = ant
+  ANT = $(ANT_WORKAROUNDS) ant
 else
-  ANT = $(ANT_HOME)/bin/ant
+  ANT = $(ANT_WORKAROUNDS) $(ANT_HOME)/bin/ant
 endif
 
 ifdef ALT_COPYRIGHT_YEAR
--- a/make/docs/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/docs/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -57,7 +57,7 @@
 
 # Common Java trademark line
 JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \
-$(COMPANY_NAME) in the US and other countries.
+$(FULL_COMPANY_NAME) in the US and other countries.
 
 #
 # Definitions for imported components
--- a/make/docs/NON_CORE_PKGS.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/docs/NON_CORE_PKGS.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -91,6 +91,8 @@
 TRACING_PKGS     = com.sun.tracing         \
                    com.sun.tracing.dtrace
 
+ORACLENET_PKGS   = com.oracle.net
+
 # non-core packages in rt.jar
 NON_CORE_PKGS    = $(DOMAPI_PKGS) \
                    $(MGMT_PKGS) \
@@ -101,5 +103,6 @@
                    $(HTTPSERVER_PKGS) \
                    $(SMARTCARDIO_PKGS) \
                    $(TRACING_PKGS) \
-                   $(SCTPAPI_PKGS)
+                   $(SCTPAPI_PKGS) \
+                   $(ORACLENET_PKGS)
 
--- a/make/java/java/FILES_java.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/java/FILES_java.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -183,10 +183,22 @@
         java/util/MissingFormatWidthException.java \
         java/util/UnknownFormatConversionException.java \
         java/util/UnknownFormatFlagsException.java \
+    java/util/IllformedLocaleException.java \
     java/util/FormatterClosedException.java \
     java/util/ListResourceBundle.java \
         sun/util/EmptyListResourceBundle.java \
     java/util/Locale.java \
+        sun/util/locale/AsciiUtil.java \
+        sun/util/locale/BaseLocale.java \
+        sun/util/locale/Extension.java \
+        sun/util/locale/InternalLocaleBuilder.java \
+        sun/util/locale/LanguageTag.java \
+        sun/util/locale/LocaleExtensions.java \
+        sun/util/locale/LocaleObjectCache.java \
+        sun/util/locale/LocaleSyntaxException.java \
+        sun/util/locale/ParseStatus.java \
+        sun/util/locale/StringTokenIterator.java \
+        sun/util/locale/UnicodeLocaleExtension.java \
     java/util/LocaleISOData.java \
         sun/util/LocaleServiceProviderPool.java \
 	sun/util/LocaleDataMetaInfo.java \
@@ -272,6 +284,7 @@
     java/util/concurrent/CancellationException.java \
     java/util/concurrent/CompletionService.java \
     java/util/concurrent/ConcurrentHashMap.java \
+    java/util/concurrent/ConcurrentLinkedDeque.java \
     java/util/concurrent/ConcurrentLinkedQueue.java \
     java/util/concurrent/ConcurrentMap.java \
     java/util/concurrent/ConcurrentNavigableMap.java \
@@ -400,6 +413,7 @@
     java/io/FilePermission.java \
     java/io/Serializable.java \
     java/io/Externalizable.java \
+    java/io/SerialCallbackContext.java \
 	java/io/Bits.java \
 	java/io/ObjectInput.java \
 	java/io/ObjectInputStream.java \
@@ -452,14 +466,11 @@
     java/security/ProtectionDomain.java \
     java/net/URLClassLoader.java \
     java/net/URLConnection.java \
+    sun/misc/BootClassLoaderHook.java \
     sun/misc/Launcher.java \
     sun/misc/MetaIndex.java \
     sun/misc/URLClassPath.java \
     sun/misc/Version.java \
-    sun/net/www/protocol/jar/Handler.java \
-    sun/net/www/protocol/jar/JarURLConnection.java \
-    sun/net/www/protocol/file/Handler.java \
-    sun/net/www/protocol/file/FileURLConnection.java \
     sun/misc/FileURLMapper.java \
     sun/misc/MessageUtils.java \
     sun/misc/GC.java \
@@ -469,6 +480,10 @@
     sun/misc/JavaIOFileDescriptorAccess.java \
     sun/misc/JavaNioAccess.java \
     sun/misc/Perf.java \
-    sun/misc/PerfCounter.java
+    sun/misc/PerfCounter.java \
+    sun/net/www/protocol/jar/Handler.java \
+    sun/net/www/protocol/jar/JarURLConnection.java \
+    sun/net/www/protocol/file/Handler.java \
+    sun/net/www/protocol/file/FileURLConnection.java
 
 FILES_java = $(JAVA_JAVA_java)
--- a/make/java/jli/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/jli/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -148,14 +148,9 @@
 #
 ifeq ($(PLATFORM), windows)
 
-STATIC_LIBRARY_DIR = $(OBJDIR)/static
-STATIC_LIBRARY_NAME = $(LIBPREFIX)$(LIBRARY).lib
-STATIC_LIBRARY = $(STATIC_LIBRARY_DIR)/$(STATIC_LIBRARY_NAME)
+STATIC_LIBRARY = $(OBJDIR)/static/$(LIBPREFIX)$(LIBRARY).lib
 
-$(STATIC_LIBRARY_DIR): $(OBJDIR)
-	@$(MKDIR) $(STATIC_LIBRARY_DIR)
-
-$(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR)
+$(STATIC_LIBRARY): $(FILES_o)
 	@$(prep-target)
 	$(LIBEXE) -nologo -out:$@ $(FILES_o)
 
--- a/make/java/net/FILES_c.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/net/FILES_c.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -39,10 +39,6 @@
 	ResolverConfigurationImpl.c \
 	DefaultProxySelector.c
 
-ifeq ($(PLATFORM), solaris)
-    FILES_c += SdpProvider.c
-endif
-
 ifeq ($(PLATFORM), linux)
     FILES_c += linux_close.c
 endif
--- a/make/java/net/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/net/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -44,6 +44,8 @@
     endif
     FILES_c += NTLMAuthSequence.c
     FILES_c += NetworkInterface_winXP.c
+else
+    FILES_c += SdpSupport.c
 endif
 
 FILES_export = \
@@ -84,7 +86,8 @@
 #
 # Find platform specific native code
 #
-vpath %.c $(PLATFORM_SRC)/native/sun/net/dns $(PLATFORM_SRC)/native/sun/net/www/protocol/http/ntlm $(PLATFORM_SRC)/native/sun/net/spi
+vpath %.c $(PLATFORM_SRC)/native/sun/net/dns $(PLATFORM_SRC)/native/sun/net/www/protocol/http/ntlm \
+    $(PLATFORM_SRC)/native/sun/net/sdp $(PLATFORM_SRC)/native/sun/net/spi
 
 #
 # Include rules
--- a/make/java/net/mapfile-vers	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/net/mapfile-vers	Thu Dec 02 03:02:56 2010 -0800
@@ -88,9 +88,10 @@
 		Java_java_net_PlainDatagramSocketImpl_setTimeToLive;
 		Java_sun_net_dns_ResolverConfigurationImpl_localDomain0;
 		Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0;
+		Java_sun_net_sdp_SdpSupport_convert0;
+		Java_sun_net_sdp_SdpSupport_create0;
 		Java_sun_net_spi_DefaultProxySelector_init;
 		Java_sun_net_spi_DefaultProxySelector_getSystemProxy;
-		Java_sun_net_spi_SdpProvider_convert;
 		NET_AllocSockaddr;
 		NET_SockaddrToInetAddress;
                 NET_SockaddrEqualsInetAddress;
--- a/make/java/nio/FILES_java.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/nio/FILES_java.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -33,7 +33,6 @@
 	java/nio/channels/AsynchronousByteChannel.java \
 	java/nio/channels/AsynchronousChannel.java \
 	java/nio/channels/AsynchronousChannelGroup.java \
-	java/nio/channels/AsynchronousDatagramChannel.java \
 	java/nio/channels/AsynchronousFileChannel.java \
 	java/nio/channels/AsynchronousServerSocketChannel.java \
 	java/nio/channels/AsynchronousSocketChannel.java \
@@ -83,6 +82,7 @@
 	java/nio/file/ClosedFileSystemException.java \
 	java/nio/file/ClosedWatchServiceException.java \
 	java/nio/file/CopyOption.java \
+	java/nio/file/DirectoryIteratorException.java \
 	java/nio/file/DirectoryNotEmptyException.java \
 	java/nio/file/DirectoryStream.java \
 	java/nio/file/FileAlreadyExistsException.java \
@@ -199,13 +199,13 @@
 	sun/nio/ch/PipeImpl.java \
 	sun/nio/ch/PollArrayWrapper.java \
 	sun/nio/ch/Reflect.java \
+	sun/nio/ch/Secrets.java \
 	sun/nio/ch/SelectionKeyImpl.java \
 	sun/nio/ch/SelectorImpl.java \
 	sun/nio/ch/SelectorProviderImpl.java \
 	sun/nio/ch/SelChImpl.java \
 	sun/nio/ch/ServerSocketAdaptor.java \
 	sun/nio/ch/ServerSocketChannelImpl.java \
-	sun/nio/ch/SimpleAsynchronousDatagramChannelImpl.java \
         sun/nio/ch/SinkChannelImpl.java \
 	sun/nio/ch/SocketAdaptor.java \
 	sun/nio/ch/SocketChannelImpl.java \
--- a/make/java/nio/mapfile-linux	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/nio/mapfile-linux	Thu Dec 02 03:02:56 2010 -0800
@@ -89,7 +89,7 @@
                 Java_sun_nio_ch_IOUtil_drain;
                 Java_sun_nio_ch_IOUtil_fdVal;
                 Java_sun_nio_ch_IOUtil_initIDs;
-                Java_sun_nio_ch_IOUtil_initPipe;
+                Java_sun_nio_ch_IOUtil_makePipe;
                 Java_sun_nio_ch_IOUtil_randomBytes;
                 Java_sun_nio_ch_IOUtil_setfdVal;
 		Java_sun_nio_ch_NativeThread_current;
--- a/make/java/nio/mapfile-solaris	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/nio/mapfile-solaris	Thu Dec 02 03:02:56 2010 -0800
@@ -76,7 +76,7 @@
                 Java_sun_nio_ch_IOUtil_drain;
                 Java_sun_nio_ch_IOUtil_fdVal;
                 Java_sun_nio_ch_IOUtil_initIDs;
-                Java_sun_nio_ch_IOUtil_initPipe;
+                Java_sun_nio_ch_IOUtil_makePipe;
                 Java_sun_nio_ch_IOUtil_randomBytes;
                 Java_sun_nio_ch_IOUtil_setfdVal;
 		Java_sun_nio_ch_NativeThread_current;
--- a/make/java/redist/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/redist/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -43,6 +43,7 @@
 CLIENT_LOCATION = client
 
 DB_SUFFIX = _db
+DTRACE_SUFFIX = _dtrace
 
 ifeq ($(PLATFORM), windows)
   LIB_LOCATION = $(BINDIR)
@@ -56,6 +57,7 @@
 JVMPDB_NAME            = $(LIB_PREFIX)jvm.pdb
 LIBJSIG_NAME           = $(LIB_PREFIX)jsig.$(LIBRARY_SUFFIX)
 JVMDB_NAME             = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
+JVMDTRACE_NAME         = $(LIB_PREFIX)jvm$(DTRACE_SUFFIX).$(LIBRARY_SUFFIX)
 
 CLASSSHARINGDATA_DIR   = $(BUILDDIR)/tools/sharing
 
@@ -161,6 +163,12 @@
 
 ifeq ($(PLATFORM), solaris)
   IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
+# 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)
+else
+  $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!)
+endif 
 endif 
 
 ifneq ($(ZERO_BUILD), true)
@@ -171,14 +179,29 @@
 ifeq ($(PLATFORM), solaris)
 #  solaris   vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv  solaris
 
-ifeq ($(ARCH), sparc)
-  IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
+IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
+
+# 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)
+else
+  $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!)
 endif
 
-IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
+# 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)
+else
+  $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!)
+endif
 
-ifeq ($(ARCH), sparc)
-  IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME)
+# 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)
+else
+  $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!)
 endif
 
 # For backwards compatability, make a link of the 32-bit client JVM to $(LIBDIR)
@@ -224,6 +247,18 @@
 $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)
 	$(install-import-file)
 
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDTRACE_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)
+	$(install-import-file)
+
+$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)
+	$(install-import-file)
+
 $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAME)
 	$(install-import-file)
 
--- a/make/java/text/base/FILES_java.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/java/text/base/FILES_java.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
     java/text/AttributedString.java \
     java/text/BreakDictionary.java \
     java/text/BreakIterator.java \
+    java/text/CalendarBuilder.java \
     java/text/CharacterIterator.java \
     java/text/CharacterIteratorFieldDelegate.java \
     java/text/ChoiceFormat.java \
--- a/make/javax/sound/jsoundds/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/javax/sound/jsoundds/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -53,7 +53,7 @@
 #
 # Extra cc/linker flags.
 #
-LDLIBS += dsound.lib winmm.lib user32.lib
+LDLIBS += dsound.lib winmm.lib user32.lib ole32.lib
 CPPFLAGS += \
 	-DUSE_DAUDIO=TRUE \
 	-I$(SHARE_SRC)/native/com/sun/media/sound \
--- a/make/jprt.properties	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/jprt.properties	Thu Dec 02 03:02:56 2010 -0800
@@ -24,65 +24,267 @@
 #
 
 # Properties for jprt
-jprt.tools.default.release=jdk1.7.0
 
-# Specific platform list
-jprt.build.platforms=\
-solaris_sparc_5.10,\
-solaris_sparcv9_5.10,\
-solaris_i586_5.10,\
-solaris_x64_5.10,\
-linux_i586_2.6,\
-linux_x64_2.6,\
-windows_i586_5.0,\
-windows_x64_5.2
+# At submit time, the release supplied will be in jprt.submit.release
+#    and will be one of the official release names defined in jprt.
+#    jprt supports property value expansion using ${property.name} syntax.
 
-# The different build flavors we want
+# This tells jprt what default release we want to build
+jprt.tools.default.release=${jprt.submit.release}
+
+# The different build flavors we want, we override here so we just get these 2
 jprt.build.flavors=product,fastdebug
-jprt.run.flavors=c1,c2
-jprt.solaris_sparcv9.run.flavors=c2
-jprt.solaris_x64.run.flavors=c2
-jprt.windows_x64.run.flavors=c2
-jprt.linux_x64.run.flavors=c2
-jprt.run.flavor.c1.option=-client
-jprt.run.flavor.c2.option=-server
 
-# Explicitly designate what the 32bit match is for the 64bit build
-jprt.solaris_sparcv9.build.platform.match32=solaris_sparc_5.10
-jprt.solaris_x64.build.platform.match32=solaris_i586_5.10
+# Define the Windows we want (temporary)
+jprt.my.windows.i586.jdk7b107=windows_i586_5.0
+jprt.my.windows.i586.jdk7temp=windows_i586_5.0
+jprt.my.windows.i586.jdk7=windows_i586_5.1
+jprt.my.windows.i586=${jprt.my.windows.i586.${jprt.tools.default.release}}
 
-# Standard test target for everybody
-jprt.test.targets=*-*-*-jvm98
+# Standard list of jprt build targets for this source tree
+jprt.build.targets= 						\
+    solaris_sparc_5.10-{product|fastdebug}, 			\
+    solaris_sparcv9_5.10-{product|fastdebug}, 			\
+    solaris_i586_5.10-{product|fastdebug}, 			\
+    solaris_x64_5.10-{product|fastdebug}, 			\
+    linux_i586_2.6-{product|fastdebug}, 			\
+    linux_x64_2.6-{product|fastdebug}, 				\
+    ${jprt.my.windows.i586}-{product|fastdebug}, 		\
+    windows_x64_5.2-{product|fastdebug}
 
-# Test targets in test/Makefile (some longer running tests only test c2)
-jprt.make.rule.test.targets=    \
-   *-product-*-jdk_beans1,      \
-   *-product-*-jdk_beans2,      \
-   *-product-*-jdk_beans3,      \
-   *-product-*-jdk_io,          \
-   *-product-*-jdk_lang,        \
-   *-product-*-jdk_management1, \
-   *-product-*-jdk_management2, \
-   *-product-*-jdk_math,        \
-   *-product-*-jdk_misc,        \
-   *-product-*-jdk_net,         \
-   *-product-*-jdk_nio1,        \
-   *-product-*-jdk_nio2,        \
-   *-product-*-jdk_nio3,        \
-   *-product-*-jdk_security1,   \
-   *-product-*-jdk_security2,   \
-   *-product-*-jdk_security3,   \
-   *-product-*-jdk_text,        \
-   *-product-*-jdk_tools1,      \
-   *-product-*-jdk_tools2,      \
-   *-product-*-jdk_util
+# Standard vm test target
+jprt.test.targets=						\
+    solaris_sparc_5.10-product-c1-jvm98, 			\
+    solaris_sparcv9_5.10-product-c2-jvm98, 			\
+    solaris_i586_5.10-product-c1-jvm98, 			\
+    solaris_x64_5.10-product-c2-jvm98, 				\
+    linux_i586_2.6-product-{c1|c2}-jvm98, 			\
+    linux_x64_2.6-product-c2-jvm98, 				\
+    ${jprt.my.windows.i586}-product-c1-jvm98, 			\
+    windows_x64_5.2-product-c2-jvm98
 
-# Some of these are crashing Xvfb or windows manager, need dedicated DISPLAY per test batch
-jprt2.make.rule.test.targets=    \
-   *-product-*-jdk_awt,         \
-   *-product-*-jdk_rmi,         \
-   *-product-*-jdk_swing,       \
+# User can select the test set with jprt submit "-testset name" option
+jprt.my.test.set=${jprt.test.set}
 
-# Directories needed to build
-jprt.bundle.exclude.src.dirs=build
+# Default jdk test targets in test/Makefile (no fastdebug & limited c2)
+jprt.make.rule.default.test.targets=				\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_beans1, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_beans1, 		\
+    solaris_i586_5.10-product-c1-jdk_beans1, 			\
+    solaris_x64_5.10-product-c2-jdk_beans1, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_beans1, 			\
+    linux_x64_2.6-product-c2-jdk_beans1, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_beans1, 		\
+    windows_x64_5.2-product-c2-jdk_beans1, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_io, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_io, 			\
+    solaris_i586_5.10-product-c1-jdk_io, 			\
+    solaris_x64_5.10-product-c2-jdk_io, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_io, 			\
+    linux_x64_2.6-product-c2-jdk_io, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_io, 			\
+    windows_x64_5.2-product-c2-jdk_io, 				\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_lang, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_lang, 			\
+    solaris_i586_5.10-product-c1-jdk_lang, 			\
+    solaris_x64_5.10-product-c2-jdk_lang, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_lang, 			\
+    linux_x64_2.6-product-c2-jdk_lang, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_lang, 		\
+    windows_x64_5.2-product-c2-jdk_lang, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_math, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_math, 			\
+    solaris_i586_5.10-product-c1-jdk_math, 			\
+    solaris_x64_5.10-product-c2-jdk_math, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_math, 			\
+    linux_x64_2.6-product-c2-jdk_math, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_math, 		\
+    windows_x64_5.2-product-c2-jdk_math, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_misc, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_misc, 			\
+    solaris_i586_5.10-product-c1-jdk_misc, 			\
+    solaris_x64_5.10-product-c2-jdk_misc, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_misc, 			\
+    linux_x64_2.6-product-c2-jdk_misc, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_misc, 		\
+    windows_x64_5.2-product-c2-jdk_misc, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_net, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_net, 			\
+    solaris_i586_5.10-product-c1-jdk_net, 			\
+    solaris_x64_5.10-product-c2-jdk_net, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_net, 			\
+    linux_x64_2.6-product-c2-jdk_net, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_net, 		\
+    windows_x64_5.2-product-c2-jdk_net, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_nio1, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_nio1, 			\
+    solaris_i586_5.10-product-c1-jdk_nio1, 			\
+    solaris_x64_5.10-product-c2-jdk_nio1, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_nio1, 			\
+    linux_x64_2.6-product-c2-jdk_nio1, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_nio1, 		\
+    windows_x64_5.2-product-c2-jdk_nio1, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_nio2, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_nio2, 			\
+    solaris_i586_5.10-product-c1-jdk_nio2, 			\
+    solaris_x64_5.10-product-c2-jdk_nio2, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_nio2, 			\
+    linux_x64_2.6-product-c2-jdk_nio2, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_nio2, 		\
+    windows_x64_5.2-product-c2-jdk_nio2, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_nio3, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_nio3, 			\
+    solaris_i586_5.10-product-c1-jdk_nio3, 			\
+    solaris_x64_5.10-product-c2-jdk_nio3, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_nio3, 			\
+    linux_x64_2.6-product-c2-jdk_nio3, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_nio3, 		\
+    windows_x64_5.2-product-c2-jdk_nio3, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_security1, 		\
+    solaris_sparcv9_5.10-product-c2-jdk_security1, 		\
+    solaris_i586_5.10-product-c1-jdk_security1, 		\
+    solaris_x64_5.10-product-c2-jdk_security1, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_security1, 		\
+    linux_x64_2.6-product-c2-jdk_security1, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_security1, 		\
+    windows_x64_5.2-product-c2-jdk_security1, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_text, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_text, 			\
+    solaris_i586_5.10-product-c1-jdk_text, 			\
+    solaris_x64_5.10-product-c2-jdk_text, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_text, 			\
+    linux_x64_2.6-product-c2-jdk_text, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_text, 		\
+    windows_x64_5.2-product-c2-jdk_text, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_tools1, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_tools1, 		\
+    solaris_i586_5.10-product-c1-jdk_tools1, 			\
+    solaris_x64_5.10-product-c2-jdk_tools1, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_tools1, 			\
+    linux_x64_2.6-product-c2-jdk_tools1, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_tools1, 		\
+    windows_x64_5.2-product-c2-jdk_tools1, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_util, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_util, 			\
+    solaris_i586_5.10-product-c1-jdk_util, 			\
+    solaris_x64_5.10-product-c2-jdk_util, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_util, 			\
+    linux_x64_2.6-product-c2-jdk_util, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_util, 		\
+    windows_x64_5.2-product-c2-jdk_util
 
+# All jdk test targets in test/Makefile (still no fastdebug & limited c2)
+jprt.make.rule.all.test.targets=    				\
+    								\
+   ${jprt.make.rule.default.test.targets}, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_awt, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_awt, 			\
+    solaris_i586_5.10-product-c1-jdk_awt, 			\
+    solaris_x64_5.10-product-c2-jdk_awt, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_awt, 			\
+    linux_x64_2.6-product-c2-jdk_awt, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_awt, 		\
+    windows_x64_5.2-product-c2-jdk_awt, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_beans2, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_beans2, 		\
+    solaris_i586_5.10-product-c1-jdk_beans2, 			\
+    solaris_x64_5.10-product-c2-jdk_beans2, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_beans2, 			\
+    linux_x64_2.6-product-c2-jdk_beans2, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_beans2, 		\
+    windows_x64_5.2-product-c2-jdk_beans2, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_beans3, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_beans3, 		\
+    solaris_i586_5.10-product-c1-jdk_beans3, 			\
+    solaris_x64_5.10-product-c2-jdk_beans3, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_beans3, 			\
+    linux_x64_2.6-product-c2-jdk_beans3, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_beans3, 		\
+    windows_x64_5.2-product-c2-jdk_beans3, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_management1, 		\
+    solaris_sparcv9_5.10-product-c2-jdk_management1, 		\
+    solaris_i586_5.10-product-c1-jdk_management1, 		\
+    solaris_x64_5.10-product-c2-jdk_management1, 		\
+    linux_i586_2.6-product-{c1|c2}-jdk_management1, 		\
+    linux_x64_2.6-product-c2-jdk_management1, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_management1, 	\
+    windows_x64_5.2-product-c2-jdk_management1, 		\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_management2, 		\
+    solaris_sparcv9_5.10-product-c2-jdk_management2, 		\
+    solaris_i586_5.10-product-c1-jdk_management2, 		\
+    solaris_x64_5.10-product-c2-jdk_management2, 		\
+    linux_i586_2.6-product-{c1|c2}-jdk_management2, 		\
+    linux_x64_2.6-product-c2-jdk_management2, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_management2, 	\
+    windows_x64_5.2-product-c2-jdk_management2, 		\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_rmi, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_rmi, 			\
+    solaris_i586_5.10-product-c1-jdk_rmi, 			\
+    solaris_x64_5.10-product-c2-jdk_rmi, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_rmi, 			\
+    linux_x64_2.6-product-c2-jdk_rmi, 				\
+    ${jprt.my.windows.i586}-product-c1-jdk_rmi, 		\
+    windows_x64_5.2-product-c2-jdk_rmi, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_security2, 		\
+    solaris_sparcv9_5.10-product-c2-jdk_security2, 		\
+    solaris_i586_5.10-product-c1-jdk_security2, 		\
+    solaris_x64_5.10-product-c2-jdk_security2, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_security2, 		\
+    linux_x64_2.6-product-c2-jdk_security2, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_security2, 		\
+    windows_x64_5.2-product-c2-jdk_security2, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_security3, 		\
+    solaris_sparcv9_5.10-product-c2-jdk_security3, 		\
+    solaris_i586_5.10-product-c1-jdk_security3, 		\
+    solaris_x64_5.10-product-c2-jdk_security3, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_security3, 		\
+    linux_x64_2.6-product-c2-jdk_security3, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_security3, 		\
+    windows_x64_5.2-product-c2-jdk_security3, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_swing, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_swing, 			\
+    solaris_i586_5.10-product-c1-jdk_swing, 			\
+    solaris_x64_5.10-product-c2-jdk_swing, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_swing, 			\
+    linux_x64_2.6-product-c2-jdk_swing, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_swing, 		\
+    windows_x64_5.2-product-c2-jdk_swing, 			\
+    								\
+    solaris_sparc_5.10-product-c1-jdk_tools2, 			\
+    solaris_sparcv9_5.10-product-c2-jdk_tools2, 		\
+    solaris_i586_5.10-product-c1-jdk_tools2, 			\
+    solaris_x64_5.10-product-c2-jdk_tools2, 			\
+    linux_i586_2.6-product-{c1|c2}-jdk_tools2, 			\
+    linux_x64_2.6-product-c2-jdk_tools2, 			\
+    ${jprt.my.windows.i586}-product-c1-jdk_tools2, 		\
+    windows_x64_5.2-product-c2-jdk_tools2
+
+# Select list to use (allow for testset to be empty too)
+jprt.make.rule..test.targets=${jprt.make.rule.default.test.targets} 
+jprt.make.rule.test.targets=${jprt.make.rule.${jprt.my.test.set}.test.targets} 
+
+# Directories to be excluded from the source bundles
+jprt.bundle.exclude.src.dirs=build dist webrev
+
--- a/make/mkdemo/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/mkdemo/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -31,7 +31,7 @@
 PRODUCT = demos
 include $(BUILDDIR)/common/Defs.gmk
 
-SUBDIRS            = jni
+SUBDIRS            = jni nio
 SUBDIRS_desktop    = applets jfc
 SUBDIRS_management = management
 SUBDIRS_misc       = scripting
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/mkdemo/nio/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 1997, 2007, 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.
+#
+
+#
+# Makefile for building the jfc demos
+#
+
+BUILDDIR = ../..
+PRODUCT = demos
+include $(BUILDDIR)/common/Defs.gmk
+
+SUBDIRS = zipfs
+include $(BUILDDIR)/common/Subdirs.gmk
+
+all build clean clobber::
+	$(SUBDIRS-loop)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/mkdemo/nio/zipfs/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,51 @@
+#
+# Copyright (c) 1997, 2002, 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.
+#
+
+#
+# Makefile to build the ZipFileSystem demo.
+#
+
+BUILDDIR = ../../..
+PRODUCT = demo/zipfs
+DEMONAME = zipfs
+include $(BUILDDIR)/common/Defs.gmk
+
+DEMO_ROOT       = $(SHARE_SRC)/demo/nio/$(DEMONAME)
+DEMO_TOPFILES   = ./README.txt
+DEMO_SRCDIR     = $(DEMO_ROOT)
+DEMO_DESTDIR    = $(DEMODIR)/nio/$(DEMONAME)
+
+#
+# Demo jar building rules.
+#
+include $(BUILDDIR)/common/Demo.gmk
+
+#EXTJAR = $(EXTDIR)/$(DEMONAME).jar
+#
+#all : build $(EXTJAR)
+#
+#$(EXTJAR) : $(DEMO_JAR)
+#	$(prep-target)
+#	$(CP) $(DEMO_JAR) $(EXTJAR)
--- a/make/netbeans/jmx/build.properties	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/netbeans/jmx/build.properties	Thu Dec 02 03:02:56 2010 -0800
@@ -48,8 +48,8 @@
 jar.jmx.sealed				= true
 jar.jmx.spec.title			= JSR 003, 160, 255 - JMX API
 jar.jmx.spec.version			= ${project.spec.version}
-jar.jmx.spec.vendor			= Sun Microsystems, Inc.
-jar.jmx.impl.title			= JSR 003, 160, 255 - OpenJDK 7 JMX API 
+jar.jmx.spec.vendor			= Oracle Corporation
+jar.jmx.impl.title			= JSR 003, 160, 255 - OpenJDK 7 JMX API
 jar.jmx.impl.vendor			= Project OpenJDK
 
 javadoc.options=-J-Xmx256m
--- a/make/sun/cmm/lcms/FILES_c_unix.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/cmm/lcms/FILES_c_unix.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -25,7 +25,6 @@
 
 FILES_c = \
     cmscam02.c \
-    cmscam97.c \
     cmscgats.c \
     cmscnvrt.c \
     cmserr.c \
@@ -35,13 +34,17 @@
     cmsio0.c \
     cmsio1.c \
     cmslut.c \
-    cmsmatsh.c \
+    cmsmd5.c \
     cmsmtrx.c \
     cmsnamed.c \
+    cmsopt.c \
     cmspack.c \
     cmspcs.c \
+    cmsplugin.c \
     cmsps2.c \
     cmssamp.c \
+    cmssm.c \
+    cmstypes.c \
     cmsvirt.c \
     cmswtpnt.c \
     cmsxform.c \
--- a/make/sun/cmm/lcms/FILES_c_windows.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/cmm/lcms/FILES_c_windows.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -25,7 +25,6 @@
 
 FILES_c = \
     cmscam02.c \
-    cmscam97.c \
     cmscgats.c \
     cmscnvrt.c \
     cmserr.c \
@@ -35,13 +34,17 @@
     cmsio0.c \
     cmsio1.c \
     cmslut.c \
-    cmsmatsh.c \
+    cmsmd5.c \
     cmsmtrx.c \
     cmsnamed.c \
+    cmsopt.c \
     cmspack.c \
     cmspcs.c \
+    cmsplugin.c \
     cmsps2.c \
     cmssamp.c \
+    cmssm.c \
+    cmstypes.c \
     cmsvirt.c \
     cmswtpnt.c \
     cmsxform.c \
--- a/make/sun/cmm/lcms/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/cmm/lcms/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -80,8 +80,13 @@
 vpath %.c   $(SHARE_SRC)/native/sun/java2d
 
 ifeq ($(PLATFORM), windows)
+OTHER_CFLAGS += -DCMS_IS_WINDOWS_
 
-OTHER_LDLIBS = user32.lib version.lib $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib
+ifeq ($(COMPILER_VERSION), VS2003)
+OTHER_CFLAGS += -Dsqrtf=sqrt
+endif
+
+OTHER_LDLIBS = $(OBJDIR)/../../../sun.awt/awt/$(OBJDIRNAME)/awt.lib
 OTHER_INCLUDES += -I$(SHARE_SRC)/native/sun/java2d \
                   -I$(SHARE_SRC)/native/sun/awt/debug
 
--- a/make/sun/image/generic/Makefile	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/image/generic/Makefile	Thu Dec 02 03:02:56 2010 -0800
@@ -69,5 +69,8 @@
             -I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib 
 
 OTHER_CFLAGS += -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES
-OTHER_LDLIBS = $(LIBM) -ldl
 
+ifneq ($(PLATFORM), windows)
+	OTHER_LDLIBS = $(LIBM) -ldl
+endif
+
--- a/make/sun/javazic/tzdata/VERSION	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/javazic/tzdata/VERSION	Thu Dec 02 03:02:56 2010 -0800
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2010l
+tzdata2010o
--- a/make/sun/javazic/tzdata/asia	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/javazic/tzdata/asia	Thu Dec 02 03:02:56 2010 -0800
@@ -569,8 +569,8 @@
 Rule	HK	1954	1964	-	Mar	Sun>=18	3:30	1:00	S
 Rule	HK	1954	only	-	Oct	31	3:30	0	-
 Rule	HK	1955	1964	-	Nov	Sun>=1	3:30	0	-
-Rule	HK	1965	1977	-	Apr	Sun>=16	3:30	1:00	S
-Rule	HK	1965	1977	-	Oct	Sun>=16	3:30	0	-
+Rule	HK	1965	1976	-	Apr	Sun>=16	3:30	1:00	S
+Rule	HK	1965	1976	-	Oct	Sun>=16	3:30	0	-
 Rule	HK	1973	only	-	Dec	30	3:30	1:00	S
 Rule	HK	1979	only	-	May	Sun>=8	3:30	1:00	S
 Rule	HK	1979	only	-	Oct	Sun>=16	3:30	0	-
--- a/make/sun/javazic/tzdata/australasia	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/javazic/tzdata/australasia	Thu Dec 02 03:02:56 2010 -0800
@@ -306,13 +306,26 @@
 # http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html
 # </a>
 
+# From Alexander Krivenyshev (2010-10-24):
+# According to Radio Fiji and Fiji Times online, Fiji will end DST 3 
+# weeks earlier than expected - on March 6, 2011, not March 27, 2011...
+# Here is confirmation from Government of the Republic of the Fiji Islands, 
+# Ministry of Information (fiji.gov.fj) web site:
+# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155">
+# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155
+# </a>
+# or
+# <a href="http://www.worldtimezone.com/dst_news/dst_news_fiji04.html">
+# http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
+# </a>
+
 # 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	-
 Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 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	lastSun 3:00	0	-
+Rule	Fiji	2011	only	-	Mar	Sun>=1	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
@@ -509,11 +522,21 @@
 # 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):
+# Please see
+# <a href="http://www.mcil.gov.ws">
+# http://www.mcil.gov.ws
+# </a>,
+# the Ministry of Commerce, Industry and Labour (sideframe) "Last Sunday
+# September 2010 (26/09/10) - adjust clocks forward from 12:00 midnight
+# to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
+# backwards from 1:00am to 12:00am"
+
 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 3
+			-11:00	1:00	WSDT	2011 Apr 3 1:00
 			-11:00	-	WST
 
 # Solomon Is
--- a/make/sun/javazic/tzdata/zone.tab	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/javazic/tzdata/zone.tab	Thu Dec 02 03:02:56 2010 -0800
@@ -63,7 +63,7 @@
 AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
 AQ	-6835+07758	Antarctica/Davis	Davis Station, Vestfold Hills
 AQ	-6617+11031	Antarctica/Casey	Casey Station, Bailey Peninsula
-AQ	-7824+10654	Antarctica/Vostok	Vostok Station, S Magnetic Pole
+AQ	-7824+10654	Antarctica/Vostok	Vostok Station, Lake Vostok
 AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Station, Terre Adelie
 AQ	-690022+0393524	Antarctica/Syowa	Syowa Station, E Ongul I
 AQ	-5430+15857	Antarctica/Macquarie	Macquarie Island Station, Macquarie Island
--- a/make/sun/net/FILES_java.gmk	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/net/FILES_java.gmk	Thu Dec 02 03:02:56 2010 -0800
@@ -53,6 +53,7 @@
 	sun/net/ftp/FtpProtocolException.java \
 	sun/net/ftp/impl/FtpClient.java \
 	sun/net/ftp/impl/DefaultFtpClientProvider.java \
+	sun/net/sdp/SdpSupport.java \
 	sun/net/spi/DefaultProxySelector.java \
 	sun/net/spi/nameservice/NameServiceDescriptor.java \
 	sun/net/spi/nameservice/NameService.java \
@@ -136,8 +137,6 @@
 
 ifeq ($(PLATFORM), windows)
     FILES_java += sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java 
+else
+    FILES_java += sun/net/sdp/SdpProvider.java
 endif
-
-ifeq ($(PLATFORM), solaris)
-    FILES_java += sun/net/spi/SdpProvider.java
-endif
--- a/make/sun/xawt/mapfile-vers	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/sun/xawt/mapfile-vers	Thu Dec 02 03:02:56 2010 -0800
@@ -429,6 +429,7 @@
         Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
         Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
 
+        Java_sun_awt_X11_GtkFileDialogPeer_initIDs;
         Java_sun_awt_X11_GtkFileDialogPeer_run;
         Java_sun_awt_X11_GtkFileDialogPeer_quit;
 
--- a/make/templates/gpl-cp-header	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/templates/gpl-cp-header	Thu Dec 02 03:02:56 2010 -0800
@@ -17,6 +17,6 @@
 2 along with this work; if not, write to the Free Software Foundation,
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
-Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
+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.
--- a/make/templates/gpl-header	Thu Dec 02 02:59:02 2010 -0800
+++ b/make/templates/gpl-header	Thu Dec 02 03:02:56 2010 -0800
@@ -15,6 +15,6 @@
 2 along with this work; if not, write to the Free Software Foundation,
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
-Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-CA 95054 USA or visit www.sun.com if you need additional information or
-have any questions.
+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.
--- a/src/share/bin/java.c	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/bin/java.c	Thu Dec 02 03:02:56 2010 -0800
@@ -355,7 +355,6 @@
 
     JavaVM *vm = 0;
     JNIEnv *env = 0;
-    jstring mainClassName;
     jclass mainClass;
     jmethodID mainID;
     jobjectArray mainArgs;
@@ -712,19 +711,19 @@
     struct stat statbuf;
 
     /* return if jre/lib/rt.jar exists */
-    sprintf(pathname, "%s%slib%srt.jar", jrepath, separator, separator);
+    JLI_Snprintf(pathname, sizeof(pathname), "%s%slib%srt.jar", jrepath, separator, separator);
     if (stat(pathname, &statbuf) == 0) {
         return;
     }
 
     /* return if jre/classes exists */
-    sprintf(pathname, "%s%sclasses", jrepath, separator);
+    JLI_Snprintf(pathname, sizeof(pathname), "%s%sclasses", jrepath, separator);
     if (stat(pathname, &statbuf) == 0) {
         return;
     }
 
     /* modularized jre */
-    sprintf(pathname, "%s%slib%s*", jrepath, separator, separator);
+    JLI_Snprintf(pathname, sizeof(pathname), "%s%slib%s*", jrepath, separator, separator);
     s = (char *) JLI_WildcardExpandClasspath(pathname);
     def = JLI_MemAlloc(sizeof(format)
                        - 2 /* strlen("%s") */
@@ -1624,11 +1623,8 @@
     if (JLI_IsTraceLauncher()) {
         start = CounterGet();
     }
-
-    JLI_StrCpy(jvmCfgName, jrepath);
-    JLI_StrCat(jvmCfgName, FILESEP "lib" FILESEP);
-    JLI_StrCat(jvmCfgName, arch);
-    JLI_StrCat(jvmCfgName, FILESEP "jvm.cfg");
+    JLI_Snprintf(jvmCfgName, sizeof(jvmCfgName), "%s%slib%s%s%sjvm.cfg",
+        jrepath, FILESEP, FILESEP, arch, FILESEP);
 
     jvmCfg = fopen(jvmCfgName, "r");
     if (jvmCfg == NULL) {
--- a/src/share/bin/parse_manifest.c	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/bin/parse_manifest.c	Thu Dec 02 03:02:56 2010 -0800
@@ -72,7 +72,7 @@
     if (entry->how == STORED) {
         *(char *)((size_t)in + entry->csize) = '\0';
         if (size_out) {
-            *size_out = entry->csize;
+            *size_out = (int)entry->csize;
         }
         return (in);
     } else if (entry->how == DEFLATED) {
@@ -103,7 +103,7 @@
             return (NULL);
         }
         if (size_out) {
-            *size_out = entry->isize;
+            *size_out = (int)entry->isize;
         }
         return (out);
     } else
@@ -317,7 +317,7 @@
          * manifest.  If so, build the entry record from the data found in
          * the header located and return success.
          */
-        if (CENNAM(p) == JLI_StrLen(file_name) &&
+        if ((size_t)CENNAM(p) == JLI_StrLen(file_name) &&
           memcmp((p + CENHDR), file_name, JLI_StrLen(file_name)) == 0) {
             if (lseek(fd, base_offset + CENOFF(p), SEEK_SET) < (off_t)0) {
                 free(buffer);
@@ -606,8 +606,5 @@
     }
     free(mp);
     close(fd);
-    if (rc == 0)
-        return (0);
-    else
-        return (-2);
+    return (rc == 0) ? 0 : -2;
 }
--- a/src/share/bin/wildcard.c	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/bin/wildcard.c	Thu Dec 02 03:02:56 2010 -0800
@@ -290,12 +290,12 @@
     char *path;
     char *p;
     for (i = 0, size = 1; i < fl->size; i++)
-        size += JLI_StrLen(fl->files[i]) + 1;
+        size += (int)JLI_StrLen(fl->files[i]) + 1;
 
     path = JLI_MemAlloc(size);
 
     for (i = 0, p = path; i < fl->size; i++) {
-        int len = JLI_StrLen(fl->files[i]);
+        int len = (int)JLI_StrLen(fl->files[i]);
         if (i > 0) *p++ = sep;
         memcpy(p, fl->files[i], len);
         p += len;
@@ -309,7 +309,7 @@
 FileList_split(const char *path, char sep)
 {
     const char *p, *q;
-    int len = JLI_StrLen(path);
+    int len = (int)JLI_StrLen(path);
     int count;
     FileList fl;
     for (count = 1, p = path; p < path + len; p++)
@@ -330,7 +330,7 @@
 static int
 isJarFileName(const char *filename)
 {
-    int len = JLI_StrLen(filename);
+    int len = (int)JLI_StrLen(filename);
     return (len >= 4) &&
         (filename[len - 4] == '.') &&
         (equal(filename + len - 3, "jar") ||
@@ -342,8 +342,8 @@
 static char *
 wildcardConcat(const char *wildcard, const char *basename)
 {
-    int wildlen = JLI_StrLen(wildcard);
-    int baselen = JLI_StrLen(basename);
+    int wildlen = (int)JLI_StrLen(wildcard);
+    int baselen = (int)JLI_StrLen(basename);
     char *filename = (char *) JLI_MemAlloc(wildlen + baselen);
     /* Replace the trailing '*' with basename */
     memcpy(filename, wildcard, wildlen-1);
@@ -369,7 +369,7 @@
 static int
 isWildcard(const char *filename)
 {
-    int len = JLI_StrLen(filename);
+    int len = (int)JLI_StrLen(filename);
     return (len > 0) &&
         (filename[len - 1] == '*') &&
         (len == 1 || IS_FILE_SEPARATOR(filename[len - 2])) &&
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/oracle/net/Sdp.java	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,201 @@
+/*
+ * 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.
+ */
+
+package com.oracle.net;
+
+import java.net.Socket;
+import java.net.ServerSocket;
+import java.net.SocketImpl;
+import java.net.SocketImplFactory;
+import java.net.SocketException;
+import java.nio.channels.SocketChannel;
+import java.nio.channels.ServerSocketChannel;
+import java.io.IOException;
+import java.io.FileDescriptor;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.InvocationTargetException;
+
+import sun.net.sdp.SdpSupport;
+
+/**
+ * This class consists exclusively of static methods that Sockets or Channels to
+ * sockets that support the InfiniBand Sockets Direct Protocol (SDP).
+ */
+
+public final class Sdp {
+    private Sdp() { }
+
+    /**
+     * The package-privage ServerSocket(SocketImpl) constructor
+     */
+    private static final Constructor<ServerSocket> serverSocketCtor;
+    static {
+        try {
+            serverSocketCtor = (Constructor<ServerSocket>)
+                ServerSocket.class.getDeclaredConstructor(SocketImpl.class);
+            setAccessible(serverSocketCtor);
+        } catch (NoSuchMethodException e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    /**
+     * The package-private SdpSocketImpl() constructor
+     */
+    private static final Constructor<SocketImpl> socketImplCtor;
+    static {
+        try {
+            Class<?> cl = Class.forName("java.net.SdpSocketImpl", true, null);
+            socketImplCtor = (Constructor<SocketImpl>)cl.getDeclaredConstructor();
+            setAccessible(socketImplCtor);
+        } catch (ClassNotFoundException e) {
+            throw new AssertionError(e);
+        } catch (NoSuchMethodException e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    private static void setAccessible(final AccessibleObject o) {
+        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            public Void run() {
+                o.setAccessible(true);
+                return null;
+            }
+        });
+    }
+
+    /**
+     * SDP enabled Socket.
+     */
+    private static class SdpSocket extends Socket {
+        SdpSocket(SocketImpl impl) throws SocketException {
+            super(impl);
+        }
+    }
+
+    /**
+     * Creates a SDP enabled SocketImpl
+     */
+    private static SocketImpl createSocketImpl() {
+        try {
+            return socketImplCtor.newInstance();
+        } catch (InstantiationException x) {
+            throw new AssertionError(x);
+        } catch (IllegalAccessException x) {
+            throw new AssertionError(x);
+        } catch (InvocationTargetException x) {
+            throw new AssertionError(x);
+        }
+    }
+
+    /**
+     * Creates an unconnected and unbound SDP socket. The {@code Socket} is
+     * associated with a {@link java.net.SocketImpl} of the system-default type.
+     *
+     * @return  a new Socket
+     *
+     * @throws  UnsupportedOperationException
+     *          If SDP is not supported
+     * @throws  IOException
+     *          If an I/O error occurs
+     */
+    public static Socket openSocket() throws IOException {
+        SocketImpl impl = createSocketImpl();
+        return new SdpSocket(impl);
+    }
+
+    /**
+     * Creates an unbound SDP server socket. The {@code ServerSocket} is
+     * associated with a {@link java.net.SocketImpl} of the system-default type.
+     *
+     * @return  a new ServerSocket
+     *
+     * @throws  UnsupportedOperationException
+     *          If SDP is not supported
+     * @throws  IOException
+     *          If an I/O error occurs
+     */
+    public static ServerSocket openServerSocket() throws IOException {
+        // create ServerSocket via package-private constructor
+        SocketImpl impl = createSocketImpl();
+        try {
+            return serverSocketCtor.newInstance(impl);
+        } catch (IllegalAccessException x) {
+            throw new AssertionError(x);
+        } catch (InstantiationException x) {
+            throw new AssertionError(x);
+        } catch (InvocationTargetException x) {
+            Throwable cause = x.getCause();
+            if (cause instanceof IOException)
+                throw (IOException)cause;
+            if (cause instanceof RuntimeException)
+                throw (RuntimeException)cause;
+            throw new RuntimeException(x);
+        }
+    }
+
+    /**
+     * Opens a socket channel to a SDP socket.
+     *
+     * <p> The channel will be associated with the system-wide default
+     * {@link java.nio.channels.spi.SelectorProvider SelectorProvider}.
+     *
+     * @return  a new SocketChannel
+     *
+     * @throws  UnsupportedOperationException
+     *          If SDP is not supported or not supported by the default selector
+     *          provider
+     * @throws  IOException
+     *          If an I/O error occurs.
+     */
+    public static SocketChannel openSocketChannel() throws IOException {
+        FileDescriptor fd = SdpSupport.createSocket();
+        return sun.nio.ch.Secrets.newSocketChannel(fd);
+    }
+
+    /**
+     * Opens a socket channel to a SDP socket.
+     *
+     * <p> The channel will be associated with the system-wide default
+     * {@link java.nio.channels.spi.SelectorProvider SelectorProvider}.
+     *
+     * @return  a new ServerSocketChannel
+     *
+     * @throws  UnsupportedOperationException
+     *          If SDP is not supported or not supported by the default selector
+     *          provider
+     * @throws  IOException
+     *          If an I/O error occurs
+     */
+    public static ServerSocketChannel openServerSocketChannel()
+        throws IOException
+    {
+        FileDescriptor fd = SdpSupport.createSocket();
+        return sun.nio.ch.Secrets.newServerSocketChannel(fd);
+    }
+}
--- a/src/share/classes/com/sun/crypto/provider/AESCrypt.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/AESCrypt.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -253,7 +253,8 @@
             for (j = 0; j < 8; j++) {
                 if (AA[i][j] != 0) {
                     AA[i][j] = (byte)
-                        alog[(255 + log[AA[i][j] & 0xFF] - log[pivot & 0xFF]) % 255];
+                        alog[(255 + log[AA[i][j] & 0xFF] - log[pivot & 0xFF])
+                        % 255];
                 }
             }
             for (t = 0; t < 4; t++) {
--- a/src/share/classes/com/sun/crypto/provider/ARCFOURCipher.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/ARCFOURCipher.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,8 @@
     }
 
     // core crypt code. OFB style, so works for both encryption and decryption
-    private void crypt(byte[] in, int inOfs, int inLen, byte[] out, int outOfs) {
+    private void crypt(byte[] in, int inOfs, int inLen, byte[] out,
+            int outOfs) {
         if (is < 0) {
             // doFinal() was called, need to reset the cipher to initial state
             init(lastKey);
--- a/src/share/classes/com/sun/crypto/provider/DESedeCipher.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/DESedeCipher.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -31,8 +31,8 @@
 import javax.crypto.spec.*;
 
 /**
- * This class implements the DESede algorithm (DES-EDE, tripleDES) in its various
- * modes (<code>ECB</code>, <code>CFB</code>, <code>OFB</code>,
+ * This class implements the DESede algorithm (DES-EDE, tripleDES) in
+ * its various modes (<code>ECB</code>, <code>CFB</code>, <code>OFB</code>,
  * <code>CBC</code>, <code>PCBC</code>) and padding schemes
  * (<code>PKCS5Padding</code>, <code>NoPadding</code>,
  * <code>ISO10126Padding</code>).
--- a/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -190,7 +190,8 @@
             ike.initCause(e);
             throw ike;
         } catch (IOException e) {
-            InvalidKeyException ike = new InvalidKeyException("Error parsing key encoding: " + e.getMessage());
+            InvalidKeyException ike = new InvalidKeyException(
+                "Error parsing key encoding: " + e.getMessage());
             ike.initCause(e);
             throw ike;
         }
@@ -300,7 +301,8 @@
             DerInputStream in = new DerInputStream(this.key);
             this.x = in.getBigInteger();
         } catch (IOException e) {
-            InvalidKeyException ike = new InvalidKeyException("Error parsing key encoding: " + e.getMessage());
+            InvalidKeyException ike = new InvalidKeyException(
+                "Error parsing key encoding: " + e.getMessage());
             ike.initCause(e);
             throw ike;
         }
--- a/src/share/classes/com/sun/crypto/provider/DHPublicKey.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/DHPublicKey.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -180,7 +180,8 @@
             throw new InvalidKeyException("Private-value length too big");
 
         } catch (IOException e) {
-            throw new InvalidKeyException("Error parsing key encoding: " + e.toString());
+            throw new InvalidKeyException(
+                "Error parsing key encoding: " + e.toString());
         }
     }
 
@@ -281,7 +282,8 @@
             DerInputStream in = new DerInputStream(this.key);
             this.y = in.getBigInteger();
         } catch (IOException e) {
-            throw new InvalidKeyException("Error parsing key encoding: " + e.toString());
+            throw new InvalidKeyException(
+                "Error parsing key encoding: " + e.toString());
         }
     }
 
--- a/src/share/classes/com/sun/crypto/provider/JceKeyStore.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/JceKeyStore.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -764,7 +764,8 @@
                                     cf = (CertificateFactory)cfs.get(certType);
                                 } else {
                                 // create new certificate factory
-                                    cf = CertificateFactory.getInstance(certType);
+                                    cf = CertificateFactory.getInstance(
+                                        certType);
                                 // store the certificate factory so we can
                                 // reuse it later
                                     cfs.put(certType, cf);
@@ -863,8 +864,9 @@
                     dis.readFully(actual);
                     for (int i = 0; i < computed.length; i++) {
                         if (computed[i] != actual[i]) {
-                            throw new IOException("Keystore was tampered with, or "
-                                                  + "password was incorrect");
+                            throw new IOException(
+                                "Keystore was tampered with, or "
+                                + "password was incorrect");
                         }
                     }
                 }
--- a/src/share/classes/com/sun/crypto/provider/OAEPParameters.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/OAEPParameters.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -139,7 +139,8 @@
                 if (!val.getOID().equals((Object) OID_MGF1)) {
                     throw new IOException("Only MGF1 mgf is supported");
                 }
-                AlgorithmId params = AlgorithmId.parse(new DerValue(val.getEncodedParams()));
+                AlgorithmId params = AlgorithmId.parse(
+                    new DerValue(val.getEncodedParams()));
                 String mgfDigestName = convertToStandardName(params.getName());
                 if (mgfDigestName.equals("SHA-1")) {
                     mgfSpec = MGF1ParameterSpec.SHA1;
@@ -150,7 +151,8 @@
                 } else if (mgfDigestName.equals("SHA-512")) {
                     mgfSpec = MGF1ParameterSpec.SHA512;
                 } else {
-                    throw new IOException("Unrecognized message digest algorithm");
+                    throw new IOException(
+                        "Unrecognized message digest algorithm");
                 }
             } else if (data.isContextSpecific((byte) 0x02)) {
                 // pSource algid
--- a/src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -121,8 +121,8 @@
         this.key = deriveKey(prf, passwdBytes, salt, iterCount, keyLength);
     }
 
-    private static byte[] deriveKey(final Mac prf, final byte[] password, byte[] salt,
-                                    int iterCount, int keyLengthInBit) {
+    private static byte[] deriveKey(final Mac prf, final byte[] password,
+            byte[] salt, int iterCount, int keyLengthInBit) {
         int keyLength = keyLengthInBit/8;
         byte[] key = new byte[keyLength];
         try {
@@ -155,8 +155,9 @@
                     if (this == obj) return true;
                     if (this.getClass() != obj.getClass()) return false;
                     SecretKey sk = (SecretKey)obj;
-                    return prf.getAlgorithm().equalsIgnoreCase(sk.getAlgorithm()) &&
-                            Arrays.equals(password, sk.getEncoded());
+                    return prf.getAlgorithm().equalsIgnoreCase(
+                        sk.getAlgorithm()) &&
+                        Arrays.equals(password, sk.getEncoded());
                 }
             };
             prf.init(macKey);
--- a/src/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -206,7 +206,8 @@
                 (algo.equalsIgnoreCase("RC2")?"RC2_40":algo), "SunJCE");
         } catch (GeneralSecurityException gse) {
             // should never happen
-            throw new RuntimeException("SunJCE provider is not configured properly");
+            throw new RuntimeException(
+                "SunJCE provider is not configured properly");
         }
         try {
             params.init(pbeSpec);
@@ -316,7 +317,8 @@
             try {
                 paramSpec = params.getParameterSpec(PBEParameterSpec.class);
             } catch (InvalidParameterSpecException ipse) {
-                throw new InvalidAlgorithmParameterException("requires PBE parameters");
+                throw new InvalidAlgorithmParameterException(
+                    "requires PBE parameters");
             }
         }
         implInit(opmode, key, paramSpec, random);
--- a/src/share/classes/com/sun/crypto/provider/SunJCE.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/SunJCE.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -423,15 +423,31 @@
 
                 /*
                  * SSL/TLS mechanisms
+                 *
+                 * These are strictly internal implementations and may
+                 * be changed at any time.  These names were chosen
+                 * because PKCS11/SunPKCS11 does not yet have TLS1.2
+                 * mechanisms, and it will cause calls to come here.
                  */
                 put("KeyGenerator.SunTlsPrf",
-                        "com.sun.crypto.provider.TlsPrfGenerator");
+                        "com.sun.crypto.provider.TlsPrfGenerator$V10");
+                put("KeyGenerator.SunTls12Prf",
+                        "com.sun.crypto.provider.TlsPrfGenerator$V12");
+
+                put("KeyGenerator.SunTlsMasterSecret",
+                    "com.sun.crypto.provider.TlsMasterSecretGenerator");
+                put("Alg.Alias.KeyGenerator.SunTls12MasterSecret",
+                    "SunTlsMasterSecret");
+
+                put("KeyGenerator.SunTlsKeyMaterial",
+                    "com.sun.crypto.provider.TlsKeyMaterialGenerator");
+                put("Alg.Alias.KeyGenerator.SunTls12KeyMaterial",
+                    "SunTlsKeyMaterial");
+
                 put("KeyGenerator.SunTlsRsaPremasterSecret",
-                        "com.sun.crypto.provider.TlsRsaPremasterSecretGenerator");
-                put("KeyGenerator.SunTlsMasterSecret",
-                        "com.sun.crypto.provider.TlsMasterSecretGenerator");
-                put("KeyGenerator.SunTlsKeyMaterial",
-                        "com.sun.crypto.provider.TlsKeyMaterialGenerator");
+                    "com.sun.crypto.provider.TlsRsaPremasterSecretGenerator");
+                put("Alg.Alias.KeyGenerator.SunTls12RsaPremasterSecret",
+                    "SunTlsRsaPremasterSecret");
 
                 return null;
             }
--- a/src/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,12 +65,14 @@
         }
         this.spec = (TlsKeyMaterialParameterSpec)params;
         if ("RAW".equals(spec.getMasterSecret().getFormat()) == false) {
-            throw new InvalidAlgorithmParameterException("Key format must be RAW");
+            throw new InvalidAlgorithmParameterException(
+                "Key format must be RAW");
         }
-        protocolVersion = (spec.getMajorVersion() << 8) | spec.getMinorVersion();
-        if ((protocolVersion < 0x0300) || (protocolVersion > 0x0302)) {
-            throw new InvalidAlgorithmParameterException
-                ("Only SSL 3.0, TLS 1.0, and TLS 1.1 supported");
+        protocolVersion = (spec.getMajorVersion() << 8)
+            | spec.getMinorVersion();
+        if ((protocolVersion < 0x0300) || (protocolVersion > 0x0303)) {
+            throw new InvalidAlgorithmParameterException(
+                "Only SSL 3.0, TLS 1.0/1.1/1.2 supported");
         }
     }
 
@@ -80,8 +82,8 @@
 
     protected SecretKey engineGenerateKey() {
         if (spec == null) {
-            throw new IllegalStateException
-                ("TlsKeyMaterialGenerator must be initialized");
+            throw new IllegalStateException(
+                "TlsKeyMaterialGenerator must be initialized");
         }
         try {
             return engineGenerateKey0();
@@ -99,8 +101,8 @@
         SecretKey clientMacKey = null;
         SecretKey serverMacKey = null;
         SecretKey clientCipherKey = null;
+        SecretKey serverCipherKey = null;
         IvParameterSpec clientIv = null;
-        SecretKey serverCipherKey = null;
         IvParameterSpec serverIv = null;
 
         int macLength = spec.getMacKeyLength();
@@ -109,21 +111,33 @@
         int keyLength = spec.getCipherKeyLength();
         int ivLength = spec.getIvLength();
 
-        int keyBlockLen = macLength + keyLength + (isExportable ? 0 : ivLength);
+        int keyBlockLen = macLength + keyLength
+            + (isExportable ? 0 : ivLength);
         keyBlockLen <<= 1;
         byte[] keyBlock = new byte[keyBlockLen];
 
-        MessageDigest md5 = MessageDigest.getInstance("MD5");
-        MessageDigest sha = MessageDigest.getInstance("SHA1");
+        // These may be used again later for exportable suite calculations.
+        MessageDigest md5 = null;
+        MessageDigest sha = null;
 
         // generate key block
-        if (protocolVersion >= 0x0301) {
-            // TLS
+        if (protocolVersion >= 0x0303) {
+            // TLS 1.2
             byte[] seed = concat(serverRandom, clientRandom);
-            keyBlock = doPRF(masterSecret, LABEL_KEY_EXPANSION, seed,
+            keyBlock = doTLS12PRF(masterSecret, LABEL_KEY_EXPANSION, seed,
+                        keyBlockLen, spec.getPRFHashAlg(),
+                        spec.getPRFHashLength(), spec.getPRFBlockSize());
+        } else if (protocolVersion >= 0x0301) {
+            // TLS 1.0/1.1
+            md5 = MessageDigest.getInstance("MD5");
+            sha = MessageDigest.getInstance("SHA1");
+            byte[] seed = concat(serverRandom, clientRandom);
+            keyBlock = doTLS10PRF(masterSecret, LABEL_KEY_EXPANSION, seed,
                         keyBlockLen, md5, sha);
         } else {
             // SSL
+            md5 = MessageDigest.getInstance("MD5");
+            sha = MessageDigest.getInstance("SHA1");
             keyBlock = new byte[keyBlockLen];
 
             byte[] tmp = new byte[20];
@@ -169,6 +183,7 @@
 
         String alg = spec.getCipherAlgorithm();
 
+        // cipher keys
         byte[] clientKeyBytes = new byte[keyLength];
         System.arraycopy(keyBlock, ofs, clientKeyBytes, 0, keyLength);
         ofs += keyLength;
@@ -182,6 +197,7 @@
             clientCipherKey = new SecretKeySpec(clientKeyBytes, alg);
             serverCipherKey = new SecretKeySpec(serverKeyBytes, alg);
 
+            // IV keys if needed.
             if (ivLength != 0) {
                 tmp = new byte[ivLength];
 
@@ -194,21 +210,28 @@
                 serverIv = new IvParameterSpec(tmp);
             }
         } else {
+            // if exportable suites, calculate the alternate
             // cipher key expansion and IV generation
-            if (protocolVersion >= 0x0301) {
+            if (protocolVersion >= 0x0302) {
+                // TLS 1.1+
+                throw new RuntimeException(
+                    "Internal Error:  TLS 1.1+ should not be negotiating" +
+                    "exportable ciphersuites");
+            } else if (protocolVersion == 0x0301) {
+                // TLS 1.0
                 byte[] seed = concat(clientRandom, serverRandom);
 
-                tmp = doPRF(clientKeyBytes, LABEL_CLIENT_WRITE_KEY, seed,
+                tmp = doTLS10PRF(clientKeyBytes, LABEL_CLIENT_WRITE_KEY, seed,
                             expandedKeyLength, md5, sha);
                 clientCipherKey = new SecretKeySpec(tmp, alg);
 
-                tmp = doPRF(serverKeyBytes, LABEL_SERVER_WRITE_KEY, seed,
+                tmp = doTLS10PRF(serverKeyBytes, LABEL_SERVER_WRITE_KEY, seed,
                             expandedKeyLength, md5, sha);
                 serverCipherKey = new SecretKeySpec(tmp, alg);
 
                 if (ivLength != 0) {
                     tmp = new byte[ivLength];
-                    byte[] block = doPRF(null, LABEL_IV_BLOCK, seed,
+                    byte[] block = doTLS10PRF(null, LABEL_IV_BLOCK, seed,
                                 ivLength << 1, md5, sha);
                     System.arraycopy(block, 0, tmp, 0, ivLength);
                     clientIv = new IvParameterSpec(tmp);
@@ -216,6 +239,7 @@
                     serverIv = new IvParameterSpec(tmp);
                 }
             } else {
+                // SSLv3
                 tmp = new byte[expandedKeyLength];
 
                 md5.update(clientKeyBytes);
--- a/src/share/classes/com/sun/crypto/provider/TlsMasterSecretGenerator.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/TlsMasterSecretGenerator.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,12 +64,14 @@
         }
         this.spec = (TlsMasterSecretParameterSpec)params;
         if ("RAW".equals(spec.getPremasterSecret().getFormat()) == false) {
-            throw new InvalidAlgorithmParameterException("Key format must be RAW");
+            throw new InvalidAlgorithmParameterException(
+                "Key format must be RAW");
         }
-        protocolVersion = (spec.getMajorVersion() << 8) | spec.getMinorVersion();
-        if ((protocolVersion < 0x0300) || (protocolVersion > 0x0302)) {
-            throw new InvalidAlgorithmParameterException
-                ("Only SSL 3.0, TLS 1.0, and TLS 1.1 supported");
+        protocolVersion = (spec.getMajorVersion() << 8)
+            | spec.getMinorVersion();
+        if ((protocolVersion < 0x0300) || (protocolVersion > 0x0303)) {
+            throw new InvalidAlgorithmParameterException(
+                "Only SSL 3.0, TLS 1.0/1.1/1.2 supported");
         }
     }
 
@@ -79,8 +81,8 @@
 
     protected SecretKey engineGenerateKey() {
         if (spec == null) {
-            throw new IllegalStateException
-                ("TlsMasterSecretGenerator must be initialized");
+            throw new IllegalStateException(
+                "TlsMasterSecretGenerator must be initialized");
         }
         SecretKey premasterKey = spec.getPremasterSecret();
         byte[] premaster = premasterKey.getEncoded();
@@ -103,7 +105,11 @@
 
             if (protocolVersion >= 0x0301) {
                 byte[] seed = concat(clientRandom, serverRandom);
-                master = doPRF(premaster, LABEL_MASTER_SECRET, seed, 48);
+                master = ((protocolVersion >= 0x0303) ?
+                    doTLS12PRF(premaster, LABEL_MASTER_SECRET, seed, 48,
+                        spec.getPRFHashAlg(), spec.getPRFHashLength(),
+                        spec.getPRFBlockSize()) :
+                    doTLS10PRF(premaster, LABEL_MASTER_SECRET, seed, 48));
             } else {
                 master = new byte[48];
                 MessageDigest md5 = MessageDigest.getInstance("MD5");
@@ -124,7 +130,8 @@
 
             }
 
-            return new TlsMasterSecretKey(master, premasterMajor, premasterMinor);
+            return new TlsMasterSecretKey(master, premasterMajor,
+                premasterMinor);
         } catch (NoSuchAlgorithmException e) {
             throw new ProviderException(e);
         } catch (DigestException e) {
--- a/src/share/classes/com/sun/crypto/provider/TlsPrfGenerator.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/TlsPrfGenerator.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,11 +37,15 @@
 
 /**
  * KeyGenerator implementation for the TLS PRF function.
+ * <p>
+ * This class duplicates the HMAC functionality (RFC 2104) with
+ * performance optimizations (e.g. XOR'ing keys with padding doesn't
+ * need to be redone for each HMAC operation).
  *
  * @author  Andreas Sterbenz
  * @since   1.6
  */
-public final class TlsPrfGenerator extends KeyGeneratorSpi {
+abstract class TlsPrfGenerator extends KeyGeneratorSpi {
 
     // magic constants and utility functions, also used by other files
     // in this package
@@ -69,8 +73,10 @@
      * TLS HMAC "inner" and "outer" padding.  This isn't a function
      * of the digest algorithm.
      */
-    private static final byte[] HMAC_ipad = genPad((byte)0x36, 64);
-    private static final byte[] HMAC_opad = genPad((byte)0x5c, 64);
+    private static final byte[] HMAC_ipad64  = genPad((byte)0x36, 64);
+    private static final byte[] HMAC_ipad128 = genPad((byte)0x36, 128);
+    private static final byte[] HMAC_opad64  = genPad((byte)0x5c, 64);
+    private static final byte[] HMAC_opad128 = genPad((byte)0x5c, 128);
 
     // SSL3 magic mix constants ("A", "BB", "CCC", ...)
     final static byte[][] SSL3_CONST = genConst();
@@ -123,8 +129,8 @@
         this.spec = (TlsPrfParameterSpec)params;
         SecretKey key = spec.getSecret();
         if ((key != null) && ("RAW".equals(key.getFormat()) == false)) {
-            throw new InvalidAlgorithmParameterException
-                ("Key encoding format must be RAW");
+            throw new InvalidAlgorithmParameterException(
+                "Key encoding format must be RAW");
         }
     }
 
@@ -132,17 +138,21 @@
         throw new InvalidParameterException(MSG);
     }
 
-    protected SecretKey engineGenerateKey() {
+    SecretKey engineGenerateKey0(boolean tls12) {
         if (spec == null) {
-            throw new IllegalStateException
-                ("TlsPrfGenerator must be initialized");
+            throw new IllegalStateException(
+                "TlsPrfGenerator must be initialized");
         }
         SecretKey key = spec.getSecret();
         byte[] secret = (key == null) ? null : key.getEncoded();
         try {
             byte[] labelBytes = spec.getLabel().getBytes("UTF8");
             int n = spec.getOutputLength();
-            byte[] prfBytes = doPRF(secret, labelBytes, spec.getSeed(), n);
+            byte[] prfBytes = (tls12 ?
+                doTLS12PRF(secret, labelBytes, spec.getSeed(), n,
+                    spec.getPRFHashAlg(), spec.getPRFHashLength(),
+                    spec.getPRFBlockSize()) :
+                doTLS10PRF(secret, labelBytes, spec.getSeed(), n));
             return new SecretKeySpec(prfBytes, "TlsPrf");
         } catch (GeneralSecurityException e) {
             throw new ProviderException("Could not generate PRF", e);
@@ -151,16 +161,67 @@
         }
     }
 
-    static final byte[] doPRF(byte[] secret, byte[] labelBytes, byte[] seed,
-            int outputLength) throws NoSuchAlgorithmException, DigestException {
+    static byte[] doTLS12PRF(byte[] secret, byte[] labelBytes,
+            byte[] seed, int outputLength,
+            String prfHash, int prfHashLength, int prfBlockSize)
+            throws NoSuchAlgorithmException, DigestException {
+        if (prfHash == null) {
+            throw new NoSuchAlgorithmException("Unspecified PRF algorithm");
+        }
+        MessageDigest prfMD = MessageDigest.getInstance(prfHash);
+        return doTLS12PRF(secret, labelBytes, seed, outputLength,
+            prfMD, prfHashLength, prfBlockSize);
+    }
+
+    static byte[] doTLS12PRF(byte[] secret, byte[] labelBytes,
+            byte[] seed, int outputLength,
+            MessageDigest mdPRF, int mdPRFLen, int mdPRFBlockSize)
+            throws DigestException {
+
+        if (secret == null) {
+            secret = B0;
+        }
+
+        // If we have a long secret, digest it first.
+        if (secret.length > mdPRFBlockSize) {
+            secret = mdPRF.digest(secret);
+        }
+
+        byte[] output = new byte[outputLength];
+        byte [] ipad;
+        byte [] opad;
+
+        switch (mdPRFBlockSize) {
+        case 64:
+            ipad = HMAC_ipad64.clone();
+            opad = HMAC_opad64.clone();
+            break;
+        case 128:
+            ipad = HMAC_ipad128.clone();
+            opad = HMAC_opad128.clone();
+            break;
+        default:
+            throw new DigestException("Unexpected block size.");
+        }
+
+        // P_HASH(Secret, label + seed)
+        expand(mdPRF, mdPRFLen, secret, 0, secret.length, labelBytes,
+            seed, output, ipad, opad);
+
+        return output;
+    }
+
+    static byte[] doTLS10PRF(byte[] secret, byte[] labelBytes,
+            byte[] seed, int outputLength) throws NoSuchAlgorithmException,
+            DigestException {
         MessageDigest md5 = MessageDigest.getInstance("MD5");
         MessageDigest sha = MessageDigest.getInstance("SHA1");
-        return doPRF(secret, labelBytes, seed, outputLength, md5, sha);
+        return doTLS10PRF(secret, labelBytes, seed, outputLength, md5, sha);
     }
 
-    static final byte[] doPRF(byte[] secret, byte[] labelBytes, byte[] seed,
-            int outputLength, MessageDigest md5, MessageDigest sha)
-            throws DigestException {
+    static byte[] doTLS10PRF(byte[] secret, byte[] labelBytes,
+            byte[] seed, int outputLength, MessageDigest md5,
+            MessageDigest sha) throws DigestException {
         /*
          * Split the secret into two halves S1 and S2 of same length.
          * S1 is taken from the first half of the secret, S2 from the
@@ -183,10 +244,12 @@
         byte[] output = new byte[outputLength];
 
         // P_MD5(S1, label + seed)
-        expand(md5, 16, secret, 0, seclen, labelBytes, seed, output);
+        expand(md5, 16, secret, 0, seclen, labelBytes, seed, output,
+            HMAC_ipad64.clone(), HMAC_opad64.clone());
 
         // P_SHA-1(S2, label + seed)
-        expand(sha, 20, secret, off, seclen, labelBytes, seed, output);
+        expand(sha, 20, secret, off, seclen, labelBytes, seed, output,
+            HMAC_ipad64.clone(), HMAC_opad64.clone());
 
         return output;
     }
@@ -201,16 +264,13 @@
      * @param seed the seed
      * @param output the output array
      */
-    private static final void expand(MessageDigest digest, int hmacSize,
+    private static void expand(MessageDigest digest, int hmacSize,
             byte[] secret, int secOff, int secLen, byte[] label, byte[] seed,
-            byte[] output) throws DigestException {
+            byte[] output, byte[] pad1, byte[] pad2) throws DigestException {
         /*
          * modify the padding used, by XORing the key into our copy of that
          * padding.  That's to avoid doing that for each HMAC computation.
          */
-        byte[] pad1 = HMAC_ipad.clone();
-        byte[] pad2 = HMAC_opad.clone();
-
         for (int i = 0; i < secLen; i++) {
             pad1[i] ^= secret[i + secOff];
             pad2[i] ^= secret[i + secOff];
@@ -275,7 +335,34 @@
             }
             remaining -= k;
         }
-
     }
 
+    /**
+     * A KeyGenerator implementation that supports TLS 1.2.
+     * <p>
+     * TLS 1.2 uses a different hash algorithm than 1.0/1.1 for the PRF
+     * calculations.  As of 2010, there is no PKCS11-level support for TLS
+     * 1.2 PRF calculations, and no known OS's have an internal variant
+     * we could use.  Therefore for TLS 1.2, we are updating JSSE to request
+     * a different provider algorithm:  "SunTls12Prf".  If we reused the
+     * name "SunTlsPrf", the PKCS11 provider would need be updated to
+     * fail correctly when presented with the wrong version number
+     * (via Provider.Service.supportsParameters()), and add the
+     * appropriate supportsParamters() checks into KeyGenerators (not
+     * currently there).
+     */
+    static public class V12 extends TlsPrfGenerator {
+        protected SecretKey engineGenerateKey() {
+            return engineGenerateKey0(true);
+        }
+    }
+
+    /**
+     * A KeyGenerator implementation that supports TLS 1.0/1.1.
+     */
+    static public class V10 extends TlsPrfGenerator {
+        protected SecretKey engineGenerateKey() {
+            return engineGenerateKey0(false);
+        }
+    }
 }
--- a/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,8 +69,8 @@
 
     protected SecretKey engineGenerateKey() {
         if (spec == null) {
-            throw new IllegalStateException
-                    ("TlsRsaPremasterSecretGenerator must be initialized");
+            throw new IllegalStateException(
+                "TlsRsaPremasterSecretGenerator must be initialized");
         }
         if (random == null) {
             random = new SecureRandom();
--- a/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReaderSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -45,7 +45,7 @@
     private boolean registered = false;
 
     public BMPImageReaderSpi() {
-        super("Sun Microsystems, Inc.",
+        super("Oracle Corporation",
               "1.0",
               formatNames,
               entensions,
--- a/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriterSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -50,7 +50,7 @@
     private boolean registered = false;
 
     public BMPImageWriterSpi() {
-        super("Sun Microsystems, Inc.",
+        super("Oracle Corporation",
               "1.0",
               formatNames,
               entensions,
--- a/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReaderSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -36,7 +36,7 @@
 
 public class GIFImageReaderSpi extends ImageReaderSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/gif/GIFImageWriterSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -36,7 +36,7 @@
 
 public class GIFImageWriterSpi extends ImageWriterSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java	Thu Dec 02 03:02:56 2010 -0800
@@ -169,7 +169,7 @@
     public static final int ADOBE_YCCK = 2;
 
     // Spi initialization stuff
-    public static final String vendor = "Sun Microsystems, Inc.";
+    public static final String vendor = "Oracle Corporation";
     public static final String version = "0.5";
     // Names of the formats we can read or write
     public static final String [] names = {"JPEG", "jpeg", "JPG", "jpg"};
--- a/src/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/png/PNGImageReaderSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -36,7 +36,7 @@
 
 public class PNGImageReaderSpi extends ImageReaderSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/png/PNGImageWriterSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -38,7 +38,7 @@
 
 public class PNGImageWriterSpi extends ImageWriterSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -49,7 +49,7 @@
     private boolean registered = false;
 
     public WBMPImageReaderSpi() {
-        super("Sun Microsystems, Inc.",
+        super("Oracle Corporation",
               "1.0",
               formatNames,
               entensions,
--- a/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -49,7 +49,7 @@
     private boolean registered = false;
 
     public WBMPImageWriterSpi() {
-        super("Sun Microsystems, Inc.",
+        super("Oracle Corporation",
               "1.0",
               formatNames,
               entensions,
--- a/src/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/spi/FileImageInputStreamSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -33,7 +33,7 @@
 
 public class FileImageInputStreamSpi extends ImageInputStreamSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/spi/FileImageOutputStreamSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -33,7 +33,7 @@
 
 public class FileImageOutputStreamSpi extends ImageOutputStreamSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/spi/InputStreamImageInputStreamSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -36,7 +36,7 @@
 
 public class InputStreamImageInputStreamSpi extends ImageInputStreamSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/spi/OutputStreamImageOutputStreamSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -36,7 +36,7 @@
 
 public class OutputStreamImageOutputStreamSpi extends ImageOutputStreamSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/spi/RAFImageInputStreamSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -34,7 +34,7 @@
 
 public class RAFImageInputStreamSpi extends ImageInputStreamSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/imageio/spi/RAFImageOutputStreamSpi.java	Thu Dec 02 03:02:56 2010 -0800
@@ -34,7 +34,7 @@
 
 public class RAFImageOutputStreamSpi extends ImageOutputStreamSpi {
 
-    private static final String vendorName = "Sun Microsystems, Inc.";
+    private static final String vendorName = "Oracle Corporation";
 
     private static final String version = "1.0";
 
--- a/src/share/classes/com/sun/java/swing/SwingUtilities3.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/SwingUtilities3.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,13 +31,14 @@
 import java.util.Map;
 import java.util.WeakHashMap;
 import java.util.concurrent.Callable;
+import java.applet.Applet;
 import java.awt.AWTEvent;
 import java.awt.EventQueue;
 import java.awt.Component;
 import java.awt.Container;
+import java.awt.Window;
 import javax.swing.JComponent;
 import javax.swing.RepaintManager;
-import javax.swing.SwingUtilities;
 
 /**
  * A collection of utility methods for Swing.
@@ -91,7 +92,7 @@
      */
     public static void setVsyncRequested(Container rootContainer,
                                          boolean isRequested) {
-        assert SwingUtilities.getRoot(rootContainer) == rootContainer;
+        assert (rootContainer instanceof Applet) || (rootContainer instanceof Window);
         if (isRequested) {
             vsyncedMap.put(rootContainer, Boolean.TRUE);
         } else {
@@ -106,7 +107,7 @@
      * @return {@code true} if vsync painting is requested for {@code rootContainer}
      */
     public static boolean isVsyncRequested(Container rootContainer) {
-        assert SwingUtilities.getRoot(rootContainer) == rootContainer;
+        assert (rootContainer instanceof Applet) || (rootContainer instanceof Window);
         return Boolean.TRUE == vsyncedMap.get(rootContainer);
     }
 
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -399,7 +399,7 @@
         }
 
         String detail = "arrow";
-        if (name == "ScrollBar.button") {
+        if ((name == "ScrollBar.button") || (name == "TabbedPane.button")) {
             if (arrowType == ArrowType.UP || arrowType == ArrowType.DOWN) {
                 detail = "vscrollbar";
             } else {
@@ -409,7 +409,7 @@
                    name == "Spinner.previousButton") {
             detail = "spinbutton";
         } else if (name != "ComboBox.arrowButton") {
-            assert false;
+            assert false : "unexpected name: " + name;
         }
 
         int gtkState = GTKLookAndFeel.synthStateToGTKState(
@@ -436,7 +436,7 @@
         String name = button.getName();
         String detail = "button";
         int direction = SwingConstants.CENTER;
-        if (name == "ScrollBar.button") {
+        if ((name == "ScrollBar.button") || (name == "TabbedPane.button")) {
             Integer prop = (Integer)
                 button.getClientProperty("__arrow_direction__");
             direction = (prop != null) ?
@@ -457,7 +457,7 @@
         } else if (name == "Spinner.nextButton") {
             detail = "spinbutton_up";
         } else if (name != "ComboBox.arrowButton") {
-            assert false;
+            assert false : "unexpected name: " + name;
         }
 
         int state = context.getComponentState();
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/PangoFonts.java	Thu Dec 02 03:02:56 2010 -0800
@@ -150,11 +150,6 @@
          * case for it to be a problem the values would have to be different.
          * It also seems unlikely to arise except when a user explicitly
          * deletes the X resource database entry.
-         * 3) Because of rounding errors sizes may differ very slightly
-         * between JDK and GTK. To fix that would at the very least require
-         * Swing to specify floating pt font sizes.
-         * Eg "10 pts" for GTK at 96 dpi to get the same size at Java 2D's
-         * 72 dpi you'd need to specify exactly 13.33.
          * There also some other issues to be aware of for the future:
          * GTK specifies the Xft.dpi value as server-wide which when used
          * on systems with 2 distinct X screens with different physical DPI
@@ -197,11 +192,16 @@
         String fcFamilyLC = family.toLowerCase();
         if (FontUtilities.mapFcName(fcFamilyLC) != null) {
             /* family is a Fc/Pango logical font which we need to expand. */
-           return FontUtilities.getFontConfigFUIR(fcFamilyLC, style, size);
+            Font font =  FontUtilities.getFontConfigFUIR(fcFamilyLC, style, size);
+            font = font.deriveFont(style, (float)dsize);
+            return new FontUIResource(font);
         } else {
             /* It's a physical font which we will create with a fallback */
-            Font font = new FontUIResource(family, style, size);
-            return FontUtilities.getCompositeFontUIResource(font);
+            Font font = new Font(family, style, size);
+            /* a roundabout way to set the font size in floating points */
+            font = font.deriveFont(style, (float)dsize);
+            FontUIResource fuir = new FontUIResource(font);
+            return FontUtilities.getCompositeFontUIResource(fuir);
         }
     }
 
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -40,8 +40,6 @@
 import java.awt.Point;
 import java.awt.Rectangle;
 
-import java.io.Serializable;
-
 /**
  * Factory object that can vend Icons appropriate for the basic L & F.
  * <p>
@@ -99,7 +97,7 @@
         }
 
         public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
-            if (((JComponent)c).hasFocus()) {
+            if (c.hasFocus()) {
                 g.setColor(focus);
                 g.drawRect(x, y, w-1, h-1);
             } else {
@@ -233,6 +231,9 @@
         }
 
         public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
+            if (!(c instanceof JMenuBar)) {
+                return;
+            }
             JMenuBar menuBar = (JMenuBar)c;
             if (menuBar.isBorderPainted() == true) {
                 // this draws the MenuBar border
@@ -658,6 +659,9 @@
          * @param height the height of the painted border
          */
         public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
+            if (!(c instanceof JPopupMenu)) {
+                return;
+            }
 
             Font origFont = g.getFont();
             Color origColor = g.getColor();
@@ -701,6 +705,9 @@
          * @param insets the object to be reinitialized
          */
         public Insets getBorderInsets(Component c, Insets insets) {
+            if (!(c instanceof JPopupMenu)) {
+                return insets;
+            }
             FontMetrics fm;
             int         descent = 0;
             int         ascent = 16;
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsBorders.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsBorders.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -32,12 +32,8 @@
 
 import java.awt.Component;
 import java.awt.Insets;
-import java.awt.Dimension;
-import java.awt.Image;
-import java.awt.Rectangle;
 import java.awt.Color;
 import java.awt.Graphics;
-import java.io.Serializable;
 
 import static com.sun.java.swing.plaf.windows.TMSchema.*;
 import static com.sun.java.swing.plaf.windows.XPStyle.Skin;
@@ -159,6 +155,9 @@
 
         public void paintBorder(Component c, Graphics g, int x, int y,
                                 int width, int height) {
+            if (!(c instanceof JToolBar)) {
+                return;
+            }
             g.translate(x, y);
 
             XPStyle xp = XPStyle.getXP();
@@ -190,33 +189,33 @@
 
                 } else {
 
-                if (!vertical) {
-                    if (c.getComponentOrientation().isLeftToRight()) {
+                    if (!vertical) {
+                        if (c.getComponentOrientation().isLeftToRight()) {
+                            g.setColor(shadow);
+                            g.drawLine(4, 3, 4, height - 4);
+                            g.drawLine(4, height - 4, 2, height - 4);
+
+                            g.setColor(highlight);
+                            g.drawLine(2, 3, 3, 3);
+                            g.drawLine(2, 3, 2, height - 5);
+                        } else {
+                            g.setColor(shadow);
+                            g.drawLine(width - 3, 3, width - 3, height - 4);
+                            g.drawLine(width - 4, height - 4, width - 4, height - 4);
+
+                            g.setColor(highlight);
+                            g.drawLine(width - 5, 3, width - 4, 3);
+                            g.drawLine(width - 5, 3, width - 5, height - 5);
+                        }
+                    } else { // Vertical
                         g.setColor(shadow);
-                        g.drawLine(4, 3, 4, height - 4);
-                        g.drawLine(4, height - 4, 2, height - 4);
+                        g.drawLine(3, 4, width - 4, 4);
+                        g.drawLine(width - 4, 2, width - 4, 4);
 
                         g.setColor(highlight);
-                        g.drawLine(2, 3, 3, 3);
-                        g.drawLine(2, 3, 2, height - 5);
-                    } else {
-                        g.setColor(shadow);
-                        g.drawLine(width - 3, 3, width - 3, height - 4);
-                        g.drawLine(width - 4, height - 4, width - 4, height - 4);
-
-                        g.setColor(highlight);
-                        g.drawLine(width - 5, 3, width - 4, 3);
-                        g.drawLine(width - 5, 3, width - 5, height - 5);
+                        g.drawLine(3, 2, width - 4, 2);
+                        g.drawLine(3, 2, 3, 3);
                     }
-                } else { // Vertical
-                    g.setColor(shadow);
-                    g.drawLine(3, 4, width - 4, 4);
-                    g.drawLine(width - 4, 2, width - 4, 4);
-
-                    g.setColor(highlight);
-                    g.drawLine(3, 2, width - 4, 2);
-                    g.drawLine(3, 2, 3, 3);
-                }
                 }
             }
 
@@ -225,6 +224,9 @@
 
         public Insets getBorderInsets(Component c, Insets insets) {
             insets.set(1,1,1,1);
+            if (!(c instanceof JToolBar)) {
+                return insets;
+            }
             if (((JToolBar)c).isFloatable()) {
                 int gripInset = (XPStyle.getXP() != null) ? 12 : 9;
                 if (((JToolBar)c).getOrientation() == HORIZONTAL) {
--- a/src/share/classes/com/sun/java/util/jar/pack/Attribute.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/util/jar/pack/Attribute.java	Thu Dec 02 03:02:56 2010 -0800
@@ -654,8 +654,8 @@
         String layout;
         public FormatException(String message,
                                int ctype, String name, String layout) {
-            super(ATTR_CONTEXT_NAME[ctype]+"."+name
-                  +(message == null? "": (": "+message)));
+            super(ATTR_CONTEXT_NAME[ctype]+ " attribute \"" + name + "\"" +
+                  (message == null? "" : (": " + message)));
             this.ctype = ctype;
             this.name = name;
             this.layout = layout;
--- a/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -246,7 +246,9 @@
                     fixups[fptr++] = in.readUnsignedShort();
                     break;
                 default:
-                    throw new IOException("Bad constant pool tag "+tag);
+                    throw new ClassFormatException("Bad constant pool tag " +
+                            tag + " in File: " + cls.file.nameString +
+                            " at pos: " + inPos);
             }
         }
 
@@ -403,7 +405,7 @@
                     skip(length, "unknown "+name+" attribute in "+h);
                     continue;
                 } else {
-                    String message = "unknown in "+h;
+                    String message = " is unknown attribute in class " + h;
                     throw new Attribute.FormatException(message, ctype, name,
                                                         unknownAttrCommand);
                 }
@@ -415,7 +417,12 @@
                 if (a.name() == "Code") {
                     Class.Method m = (Class.Method) h;
                     m.code = new Code(m);
-                    readCode(m.code);
+                    try {
+                        readCode(m.code);
+                    } catch (Instruction.FormatException iie) {
+                        String message = iie.getMessage() + " in " + h;
+                        throw new ClassReader.ClassFormatException(message, iie);
+                    }
                 } else {
                     assert(h == cls);
                     readInnerClasses(cls);
@@ -427,6 +434,10 @@
                 in.readFully(bytes);
                 a = a.addContent(bytes);
             }
+            if (a.size() == 0 && !a.layout().isEmpty()) {
+                throw new ClassFormatException(name +
+                        ": attribute length cannot be zero, in " + h);
+            }
             h.addAttribute(a);
             if (verbose > 2)
                 Utils.log.fine("read "+a);
@@ -438,6 +449,7 @@
         code.max_locals = readUnsignedShort();
         code.bytes = new byte[readInt()];
         in.readFully(code.bytes);
+        Instruction.opcodeChecker(code.bytes);
         int nh = readUnsignedShort();
         code.setHandlerCount(nh);
         for (int i = 0; i < nh; i++) {
@@ -463,4 +475,14 @@
         cls.innerClasses = ics;  // set directly; do not use setInnerClasses.
         // (Later, ics may be transferred to the pkg.)
     }
+
+    static class ClassFormatException extends IOException {
+        public ClassFormatException(String message) {
+            super(message);
+        }
+
+        public ClassFormatException(String message, Throwable cause) {
+            super(message, cause);
+        }
+    }
 }
--- a/src/share/classes/com/sun/java/util/jar/pack/Instruction.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/util/jar/pack/Instruction.java	Thu Dec 02 03:02:56 2010 -0800
@@ -25,6 +25,8 @@
 
 package com.sun.java.util.jar.pack;
 
+import java.io.IOException;
+
 /**
  * A parsed bytecode instruction.
  * Provides accessors to various relevant bits.
@@ -628,4 +630,21 @@
             }
         }
     }
+
+    public static void opcodeChecker(byte[] code) throws FormatException {
+        Instruction i = at(code, 0);
+        while (i != null) {
+            int opcode = i.getBC();
+            if (opcode == _xxxunusedxxx || opcode < _nop || opcode > _jsr_w) {
+                String message = "illegal opcode: " + opcode + " " + i;
+                throw new FormatException(message);
+            }
+            i = i.next();
+        }
+    }
+    static class FormatException extends IOException {
+        FormatException(String message) {
+            super(message);
+        }
+    }
 }
--- a/src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java	Thu Dec 02 03:02:56 2010 -0800
@@ -496,15 +496,29 @@
             reader.unknownAttrCommand = unknownAttrCommand;
             try {
                 reader.read();
-            } catch (Attribute.FormatException ee) {
-                // He passed up the category to us in layout.
-                if (ee.layout.equals(Pack200.Packer.PASS)) {
-                    Utils.log.warning("Passing class file uncompressed due to unrecognized attribute: "+fname);
-                    Utils.log.info(ee.toString());
-                    return null;
+            } catch (IOException ioe) {
+                String message = "Passing class file uncompressed due to";
+                if (ioe instanceof Attribute.FormatException) {
+                    Attribute.FormatException ee = (Attribute.FormatException) ioe;
+                    // He passed up the category to us in layout.
+                    if (ee.layout.equals(Pack200.Packer.PASS)) {
+                        Utils.log.info(ee.toString());
+                        Utils.log.warning(message + " unrecognized attribute: " +
+                                fname);
+                        return null;
+                    }
+                } else if (ioe instanceof ClassReader.ClassFormatException) {
+                    ClassReader.ClassFormatException ce = (ClassReader.ClassFormatException) ioe;
+                    // %% TODO: Do we invent a new property for this or reuse %%
+                    if (unknownAttrCommand.equals(Pack200.Packer.PASS)) {
+                        Utils.log.info(ce.toString());
+                        Utils.log.warning(message + " unknown class format: " +
+                                fname);
+                        return null;
+                    }
                 }
                 // Otherwise, it must be an error.
-                throw ee;
+                throw ioe;
             }
             pkg.addClass(cls);
             return cls.file;
@@ -600,10 +614,14 @@
         List<InFile> scanJar(JarFile jf) throws IOException {
             // Collect jar entries, preserving order.
             List<InFile> inFiles = new ArrayList<>();
-            for (JarEntry je : Collections.list(jf.entries())) {
-                InFile inFile = new InFile(jf, je);
-                assert(je.isDirectory() == inFile.name.endsWith("/"));
-                inFiles.add(inFile);
+            try {
+                for (JarEntry je : Collections.list(jf.entries())) {
+                    InFile inFile = new InFile(jf, je);
+                    assert(je.isDirectory() == inFile.name.endsWith("/"));
+                    inFiles.add(inFile);
+                }
+            } catch (IllegalStateException ise) {
+                throw new IOException(ise.getLocalizedMessage(), ise);
             }
             return inFiles;
         }
--- a/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Thu Dec 02 03:02:56 2010 -0800
@@ -92,7 +92,13 @@
      * @param out a JarOutputStream.
      * @exception IOException if an error is encountered.
      */
-    public void unpack(InputStream in0, JarOutputStream out) throws IOException {
+    public void unpack(InputStream in, JarOutputStream out) throws IOException {
+        if (in == null) {
+            throw new NullPointerException("null input");
+        }
+        if (out == null) {
+            throw new NullPointerException("null output");
+        }
         assert(Utils.currentInstance.get() == null);
         TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
                       ? null
@@ -102,18 +108,18 @@
             Utils.currentInstance.set(this);
             if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
             final int verbose = props.getInteger(Utils.DEBUG_VERBOSE);
-            BufferedInputStream in = new BufferedInputStream(in0);
-            if (Utils.isJarMagic(Utils.readMagic(in))) {
+            BufferedInputStream in0 = new BufferedInputStream(in);
+            if (Utils.isJarMagic(Utils.readMagic(in0))) {
                 if (verbose > 0)
                     Utils.log.info("Copying unpacked JAR file...");
-                Utils.copyJarFile(new JarInputStream(in), out);
+                Utils.copyJarFile(new JarInputStream(in0), out);
             } else if (props.getBoolean(Utils.DEBUG_DISABLE_NATIVE)) {
-                (new DoUnpack()).run(in, out);
-                in.close();
+                (new DoUnpack()).run(in0, out);
+                in0.close();
                 Utils.markJarFile(out);
             } else {
-                (new NativeUnpack(this)).run(in, out);
-                in.close();
+                (new NativeUnpack(this)).run(in0, out);
+                in0.close();
                 Utils.markJarFile(out);
             }
         } finally {
@@ -132,6 +138,12 @@
      * @exception IOException if an error is encountered.
      */
     public void unpack(File in, JarOutputStream out) throws IOException {
+        if (in == null) {
+            throw new NullPointerException("null input");
+        }
+        if (out == null) {
+            throw new NullPointerException("null output");
+        }
         // Use the stream-based implementation.
         // %%% Reconsider if native unpacker learns to memory-map the file.
         FileInputStream instr = new FileInputStream(in);
--- a/src/share/classes/com/sun/java/util/jar/pack/Utils.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/java/util/jar/pack/Utils.java	Thu Dec 02 03:02:56 2010 -0800
@@ -182,11 +182,8 @@
         }
 
         public void warning(String msg, Object param) {
-            int verbose = currentPropMap().getInteger(DEBUG_VERBOSE);
-            if (verbose > 0) {
                 getLogger().warning(msg, param);
             }
-        }
 
         public void warning(String msg) {
             warning(msg, null);
@@ -216,7 +213,9 @@
 
     // Returns the Max Version String of this implementation
     static String getVersionString() {
-        return "Pack200, Vendor: Sun Microsystems, Version: " +
+        return "Pack200, Vendor: " +
+            System.getProperty("java.vendor") +
+            ", Version: " +
             Constants.JAVA6_PACKAGE_MAJOR_VERSION + "." +
             Constants.JAVA6_PACKAGE_MINOR_VERSION;
     }
--- a/src/share/classes/com/sun/jmx/defaults/ServiceName.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/jmx/defaults/ServiceName.java	Thu Dec 02 03:02:56 2010 -0800
@@ -76,9 +76,9 @@
     /**
      * The vendor of the JMX specification implemented by this product.
      * <BR>
-     * The value is <CODE>Sun Microsystems</CODE>.
+     * The value is <CODE>Oracle Corporation</CODE>.
      */
-    public static final String JMX_SPEC_VENDOR = "Sun Microsystems";
+    public static final String JMX_SPEC_VENDOR = "Oracle Corporation";
 
     /**
      * The name of this product implementing the  JMX specification.
@@ -91,7 +91,7 @@
      * The name of the vendor of this product implementing the
      * JMX specification.
      * <BR>
-     * The value is <CODE>Sun Microsystems</CODE>.
+     * The value is <CODE>Oracle Corporation</CODE>.
      */
-    public static final String JMX_IMPL_VENDOR = "Sun Microsystems";
+    public static final String JMX_IMPL_VENDOR = "Oracle Corporation";
 }
--- a/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,8 @@
 import javax.management.ListenerNotFoundException;
 import javax.management.MBeanPermission;
 import javax.management.MBeanServer;
+import javax.management.MBeanServerDelegate;
+import javax.management.MBeanServerNotification;
 import javax.management.Notification;
 import javax.management.NotificationBroadcaster;
 import javax.management.NotificationFilter;
@@ -272,6 +274,7 @@
             nr = notifBuffer.fetchNotifications(bufferFilter,
                 startSequenceNumber,
                 t, maxNotifications);
+            snoopOnUnregister(nr);
         } catch (InterruptedException ire) {
             nr = new NotificationResult(0L, 0L, new TargetedNotification[0]);
         }
@@ -283,6 +286,34 @@
         return nr;
     }
 
+    // The standard RMI connector client will register a listener on the MBeanServerDelegate
+    // in order to be told when MBeans are unregistered.  We snoop on fetched notifications
+    // so that we can know too, and remove the corresponding entry from the listenerMap.
+    // See 6957378.
+    private void snoopOnUnregister(NotificationResult nr) {
+        Set<IdAndFilter> delegateSet = listenerMap.get(MBeanServerDelegate.DELEGATE_NAME);
+        if (delegateSet == null || delegateSet.isEmpty()) {
+            return;
+        }
+        for (TargetedNotification tn : nr.getTargetedNotifications()) {
+            Integer id = tn.getListenerID();
+            for (IdAndFilter idaf : delegateSet) {
+                if (idaf.id == id) {
+                    // This is a notification from the MBeanServerDelegate.
+                    Notification n = tn.getNotification();
+                    if (n instanceof MBeanServerNotification &&
+                            n.getType().equals(MBeanServerNotification.UNREGISTRATION_NOTIFICATION)) {
+                        MBeanServerNotification mbsn = (MBeanServerNotification) n;
+                        ObjectName gone = mbsn.getMBeanName();
+                        synchronized (listenerMap) {
+                            listenerMap.remove(gone);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
     public void terminate() {
         if (logger.traceOn()) {
             logger.trace("terminate", "Be called.");
@@ -418,10 +449,12 @@
             return this.filter;
         }
 
+        @Override
         public int hashCode() {
             return id.hashCode();
         }
 
+        @Override
         public boolean equals(Object o) {
             return ((o instanceof IdAndFilter) &&
                     ((IdAndFilter) o).getId().equals(getId()));
--- a/src/share/classes/com/sun/jmx/snmp/ServiceName.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/jmx/snmp/ServiceName.java	Thu Dec 02 03:02:56 2010 -0800
@@ -27,7 +27,7 @@
 
 /**
  * Used for storing default values used by SNMP Runtime services.
- * <p><b>This API is a Sun Microsystems internal API  and is subject
+ * <p><b>This API is an Oracle Corporation internal API  and is subject
  * to change without notice.</b></p>
  */
 public class ServiceName {
@@ -144,16 +144,16 @@
     /**
      * The vendor of the JMX specification implemented by this product.
      * <BR>
-     * The value is <CODE>Sun Microsystems</CODE>.
+     * The value is <CODE>Oracle Corporation</CODE>.
      */
-    public static final String JMX_SPEC_VENDOR = "Sun Microsystems";
+    public static final String JMX_SPEC_VENDOR = "Oracle Corporation";
 
     /**
      * The name of the vendor of this product implementing the  JMX specification.
      * <BR>
-     * The value is <CODE>Sun Microsystems</CODE>.
+     * The value is <CODE>Oracle Corporation</CODE>.
      */
-    public static final String JMX_IMPL_VENDOR = "Sun Microsystems";
+    public static final String JMX_IMPL_VENDOR = "Oracle Corporation";
 
     /**
       * The build number of the current product version, of the form <CODE>rXX</CODE>.
--- a/src/share/classes/com/sun/jndi/dns/DnsContextFactory.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/jndi/dns/DnsContextFactory.java	Thu Dec 02 03:02:56 2010 -0800
@@ -54,6 +54,7 @@
 public class DnsContextFactory implements InitialContextFactory {
 
     private static final String DEFAULT_URL = "dns:";
+    private static final int DEFAULT_PORT = 53;
 
 
     public Context getInitialContext(Hashtable<?,?> env) throws NamingException {
@@ -89,7 +90,9 @@
      * Public for use by product test suite.
      */
     public static boolean platformServersAvailable() {
-        return !ResolverConfiguration.open().nameservers().isEmpty();
+        return !filterNameServers(
+                    ResolverConfiguration.open().nameservers(), true
+                ).isEmpty();
     }
 
     private static Context urlToContext(String url, Hashtable env)
@@ -142,8 +145,8 @@
                 // No server or port given, so look to underlying platform.
                 // ResolverConfiguration does some limited caching, so the
                 // following is reasonably efficient even if called rapid-fire.
-                List<String> platformServers =
-                    ResolverConfiguration.open().nameservers();
+                List<String> platformServers = filterNameServers(
+                    ResolverConfiguration.open().nameservers(), false);
                 if (!platformServers.isEmpty()) {
                     servers.addAll(platformServers);
                     continue;  // on to next URL (if any, which is unlikely)
@@ -213,4 +216,44 @@
         String url = (String) env.get(Context.PROVIDER_URL);
         return ((url != null) ? url : DEFAULT_URL);
     }
+
+    /**
+     * Removes any DNS server that's not permitted to access
+     * @param input the input server[:port] list, must not be null
+     * @param oneIsEnough return output once there exists one ok
+     * @return the filtered list, all non-permitted input removed
+     */
+    private static List filterNameServers(List input, boolean oneIsEnough) {
+        SecurityManager security = System.getSecurityManager();
+        if (security == null || input == null || input.isEmpty()) {
+            return input;
+        } else {
+            List output = new ArrayList();
+            for (Object o: input) {
+                if (o instanceof String) {
+                    String platformServer = (String)o;
+                    int colon = platformServer.indexOf(':',
+                            platformServer.indexOf(']') + 1);
+
+                    int p = (colon < 0)
+                        ? DEFAULT_PORT
+                        : Integer.parseInt(
+                            platformServer.substring(colon + 1));
+                    String s = (colon < 0)
+                        ? platformServer
+                        : platformServer.substring(0, colon);
+                    try {
+                        security.checkConnect(s, p);
+                        output.add(platformServer);
+                        if (oneIsEnough) {
+                            return output;
+                        }
+                    } catch (SecurityException se) {
+                        continue;
+                    }
+                }
+            }
+            return output;
+        }
+    }
 }
--- a/src/share/classes/com/sun/management/package.html	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/management/package.html	Thu Dec 02 03:02:56 2010 -0800
@@ -30,7 +30,7 @@
 </head>
 <body bgcolor="white">
 
-This package contains Sun Microsystem's platform extension to
+This package contains Oracle Corporation's platform extension to
 the implementation of the
 <a href="{@docRoot}/../../../../api/java/lang/management/package-summary.html">
 java.lang.management</a> API and also defines the management
--- a/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java	Thu Dec 02 03:02:56 2010 -0800
@@ -474,7 +474,7 @@
         This is necessary for Receivers retrieved via MidiSystem.getReceiver()
         (which opens the device implicitely).
      */
-    protected abstract class AbstractReceiver implements Receiver {
+    protected abstract class AbstractReceiver implements MidiDeviceReceiver {
         private boolean open = true;
 
 
@@ -508,6 +508,10 @@
             AbstractMidiDevice.this.closeInternal(this);
         }
 
+        public MidiDevice getMidiDevice() {
+            return AbstractMidiDevice.this;
+        }
+
         protected boolean isOpen() {
             return open;
         }
@@ -529,7 +533,7 @@
      * Also, it has some optimizations regarding sending to the Receivers,
      * for known Receivers, and managing itself in the TransmitterList.
      */
-    protected class BasicTransmitter implements Transmitter {
+    protected class BasicTransmitter implements MidiDeviceTransmitter {
 
         private Receiver receiver = null;
         TransmitterList tlist = null;
@@ -568,6 +572,9 @@
             }
         }
 
+        public MidiDevice getMidiDevice() {
+            return AbstractMidiDevice.this;
+        }
 
     } // class BasicTransmitter
 
--- a/src/share/classes/com/sun/media/sound/AudioFloatConverter.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/AudioFloatConverter.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -40,8 +40,6 @@
  */
 public abstract class AudioFloatConverter {
 
-    public static final Encoding PCM_FLOAT = new Encoding("PCM_FLOAT");
-
     /***************************************************************************
      *
      * LSB Filter, used filter least significant byte in samples arrays.
@@ -982,7 +980,7 @@
                             format.getSampleSizeInBits() + 7) / 8) - 4);
                 }
             }
-        } else if (format.getEncoding().equals(PCM_FLOAT)) {
+        } else if (format.getEncoding().equals(Encoding.PCM_FLOAT)) {
             if (format.getSampleSizeInBits() == 32) {
                 if (format.isBigEndian())
                     conv = new AudioFloatConversion32B();
--- a/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -175,7 +175,6 @@
                 for (int c = 0; c < targetChannels; c++) {
                     for (int i = 0, ix = off + c; i < len2; i++, ix += cs) {
                         b[ix] = conversion_buffer[i];
-                        ;
                     }
                 }
             } else if (targetChannels == 1) {
@@ -186,7 +185,6 @@
                 for (int c = 1; c < sourceChannels; c++) {
                     for (int i = c, ix = off; i < len2; i += cs, ix++) {
                         b[ix] += conversion_buffer[i];
-                        ;
                     }
                 }
                 float vol = 1f / ((float) sourceChannels);
@@ -390,6 +388,7 @@
                 return -1;
             if (len < 0)
                 return 0;
+            int offlen = off + len;
             int remain = len / nrofchannels;
             int destPos = 0;
             int in_end = ibuffer_len;
@@ -423,7 +422,7 @@
             for (int c = 0; c < nrofchannels; c++) {
                 int ix = 0;
                 float[] buff = cbuffer[c];
-                for (int i = c; i < b.length; i += nrofchannels) {
+                for (int i = c + off; i < offlen; i += nrofchannels) {
                     b[i] = buff[ix++];
                 }
             }
@@ -447,7 +446,7 @@
         }
 
         public long skip(long len) throws IOException {
-            if (len > 0)
+            if (len < 0)
                 return 0;
             if (skipbuffer == null)
                 skipbuffer = new float[1024 * targetFormat.getFrameSize()];
@@ -470,7 +469,7 @@
     }
 
     private Encoding[] formats = { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
-            AudioFloatConverter.PCM_FLOAT };
+            Encoding.PCM_FLOAT };
 
     public AudioInputStream getAudioInputStream(Encoding targetEncoding,
             AudioInputStream sourceStream) {
@@ -482,7 +481,7 @@
         float samplerate = format.getSampleRate();
         int bits = format.getSampleSizeInBits();
         boolean bigendian = format.isBigEndian();
-        if (targetEncoding.equals(AudioFloatConverter.PCM_FLOAT))
+        if (targetEncoding.equals(Encoding.PCM_FLOAT))
             bits = 32;
         AudioFormat targetFormat = new AudioFormat(encoding, samplerate, bits,
                 channels, channels * bits / 8, samplerate, bigendian);
@@ -521,19 +520,19 @@
 
     public Encoding[] getSourceEncodings() {
         return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
-                AudioFloatConverter.PCM_FLOAT };
+                Encoding.PCM_FLOAT };
     }
 
     public Encoding[] getTargetEncodings() {
         return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
-                AudioFloatConverter.PCM_FLOAT };
+                Encoding.PCM_FLOAT };
     }
 
     public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
         if (AudioFloatConverter.getConverter(sourceFormat) == null)
             return new Encoding[0];
         return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
-                AudioFloatConverter.PCM_FLOAT };
+                Encoding.PCM_FLOAT };
     }
 
     public AudioFormat[] getTargetFormats(Encoding targetEncoding,
@@ -572,17 +571,17 @@
             }
         }
 
-        if (targetEncoding.equals(AudioFloatConverter.PCM_FLOAT)) {
-            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+        if (targetEncoding.equals(Encoding.PCM_FLOAT)) {
+            formats.add(new AudioFormat(Encoding.PCM_FLOAT,
                     AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4,
                     AudioSystem.NOT_SPECIFIED, false));
-            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+            formats.add(new AudioFormat(Encoding.PCM_FLOAT,
                     AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4,
                     AudioSystem.NOT_SPECIFIED, true));
-            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+            formats.add(new AudioFormat(Encoding.PCM_FLOAT,
                     AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8,
                     AudioSystem.NOT_SPECIFIED, false));
-            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+            formats.add(new AudioFormat(Encoding.PCM_FLOAT,
                     AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8,
                     AudioSystem.NOT_SPECIFIED, true));
         }
--- a/src/share/classes/com/sun/media/sound/AudioSynthesizerPropertyInfo.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/AudioSynthesizerPropertyInfo.java	Thu Dec 02 03:02:56 2010 -0800
@@ -42,11 +42,14 @@
      */
     public AudioSynthesizerPropertyInfo(String name, Object value) {
         this.name = name;
-        this.value = value;
         if (value instanceof Class)
             valueClass = (Class)value;
-        else if (value != null)
-            valueClass = value.getClass();
+        else
+        {
+            this.value = value;
+            if (value != null)
+                valueClass = value.getClass();
+        }
     }
     /**
      * The name of the property.
--- a/src/share/classes/com/sun/media/sound/DLSSoundbank.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/DLSSoundbank.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -781,7 +781,7 @@
                     }
                     if (sampleformat == 3) {
                         audioformat = new AudioFormat(
-                                AudioFloatConverter.PCM_FLOAT, samplerate, bits,
+                                Encoding.PCM_FLOAT, samplerate, bits,
                                 channels, framesize, samplerate, false);
                     }
 
@@ -965,7 +965,7 @@
             sampleformat = 1;
         else if (audioformat.getEncoding().equals(Encoding.PCM_SIGNED))
             sampleformat = 1;
-        else if (audioformat.getEncoding().equals(AudioFloatConverter.PCM_FLOAT))
+        else if (audioformat.getEncoding().equals(Encoding.PCM_FLOAT))
             sampleformat = 3;
 
         fmt_chunk.writeUnsignedShort(sampleformat);
--- a/src/share/classes/com/sun/media/sound/MidiDeviceReceiver.java	Thu Dec 02 02:59:02 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2009, 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 com.sun.media.sound;
-
-import javax.sound.midi.MidiDevice;
-import javax.sound.midi.Receiver;
-
-/**
- * A Receiver with reference to it's MidiDevice object.
- *
- * @author Karl Helgason
- */
-public interface MidiDeviceReceiver extends Receiver {
-
-    /** Obtains the MidiDevice object associated with this Receiver.
-     */
-    public MidiDevice getMidiDevice();
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/media/sound/MidiDeviceReceiverEnvelope.java	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+package com.sun.media.sound;
+
+import javax.sound.midi.*;
+
+
+/**
+ * Helper class which allows to convert {@code Receiver}
+ * to {@code MidiDeviceReceiver}.
+ *
+ * @author Alex Menkov
+ */
+public class MidiDeviceReceiverEnvelope implements MidiDeviceReceiver {
+
+    private final MidiDevice device;
+    private final Receiver receiver;
+
+    /**
+     * Creates a new {@code MidiDeviceReceiverEnvelope} object which
+     * envelops the specified {@code Receiver}
+     * and is owned by the specified {@code MidiDevice}.
+     *
+     * @param device the owner {@code MidiDevice}
+     * @param receiver the {@code Receiver} to be enveloped
+     */
+    public MidiDeviceReceiverEnvelope(MidiDevice device, Receiver receiver) {
+        if (device == null || receiver == null) {
+            throw new NullPointerException();
+        }
+        this.device = device;
+        this.receiver = receiver;
+    }
+
+    // Receiver implementation
+    public void close() {
+        receiver.close();
+    }
+
+    public void send(MidiMessage message, long timeStamp) {
+        receiver.send(message, timeStamp);
+    }
+
+    // MidiDeviceReceiver implementation
+    public MidiDevice getMidiDevice() {
+        return device;
+    }
+
+    /**
+     * Obtains the receiver enveloped
+     * by this {@code MidiDeviceReceiverEnvelope} object.
+     *
+     * @return the enveloped receiver
+     */
+    public Receiver getReceiver() {
+        return receiver;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/media/sound/MidiDeviceTransmitterEnvelope.java	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+package com.sun.media.sound;
+
+import javax.sound.midi.*;
+
+
+/**
+ * Helper class which allows to convert {@code Transmitter}
+ * to {@code MidiDeviceTransmitter}.
+ *
+ * @author Alex Menkov
+ */
+public class MidiDeviceTransmitterEnvelope implements MidiDeviceTransmitter {
+
+    private final MidiDevice device;
+    private final Transmitter transmitter;
+
+    /**
+     * Creates a new {@code MidiDeviceTransmitterEnvelope} object which
+     * envelops the specified {@code Transmitter}
+     * and is owned by the specified {@code MidiDevice}.
+     *
+     * @param device the owner {@code MidiDevice}
+     * @param transmitter the {@code Transmitter} to be enveloped
+     */
+    public MidiDeviceTransmitterEnvelope(MidiDevice device, Transmitter transmitter) {
+        if (device == null || transmitter == null) {
+            throw new NullPointerException();
+        }
+        this.device = device;
+        this.transmitter = transmitter;
+    }
+
+    // Transmitter implementation
+    public void setReceiver(Receiver receiver) {
+        transmitter.setReceiver(receiver);
+    }
+
+    public Receiver getReceiver() {
+        return transmitter.getReceiver();
+    }
+
+    public void close() {
+        transmitter.close();
+    }
+
+
+    // MidiDeviceReceiver implementation
+    public MidiDevice getMidiDevice() {
+        return device;
+    }
+
+    /**
+     * Obtains the transmitter enveloped
+     * by this {@code MidiDeviceTransmitterEnvelope} object.
+     *
+     * @return the enveloped transmitter
+     */
+    public Transmitter getTransmitter() {
+        return transmitter;
+    }
+}
--- a/src/share/classes/com/sun/media/sound/ModelByteBufferWavetable.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/ModelByteBufferWavetable.java	Thu Dec 02 03:02:56 2010 -0800
@@ -205,7 +205,8 @@
         }
         if (buffer.array() == null) {
             return AudioFloatInputStream.getInputStream(new AudioInputStream(
-                    buffer.getInputStream(), format, buffer.capacity()));
+                    buffer.getInputStream(), format,
+                    buffer.capacity() / format.getFrameSize()));
         }
         if (buffer8 != null) {
             if (format.getEncoding().equals(Encoding.PCM_SIGNED)
--- a/src/share/classes/com/sun/media/sound/ModelInstrument.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/ModelInstrument.java	Thu Dec 02 03:02:56 2010 -0800
@@ -56,7 +56,7 @@
 
     public ModelDirector getDirector(ModelPerformer[] performers,
             MidiChannel channel, ModelDirectedPlayer player) {
-        return new ModelStandardDirector(performers, player);
+        return new ModelStandardIndexedDirector(performers, player);
     }
 
     public ModelPerformer[] getPerformers() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/media/sound/ModelStandardIndexedDirector.java	Thu Dec 02 03:02:56 2010 -0800
@@ -0,0 +1,186 @@
+/*
+ * 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.
+ */
+package com.sun.media.sound;
+
+/**
+ * A standard indexed director who chooses performers
+ * by there keyfrom,keyto,velfrom,velto properties.
+ *
+ * @author Karl Helgason
+ */
+public class ModelStandardIndexedDirector implements ModelDirector {
+
+    ModelPerformer[] performers;
+    ModelDirectedPlayer player;
+    boolean noteOnUsed = false;
+    boolean noteOffUsed = false;
+
+    // Variables needed for index
+    byte[][] trantables;
+    int[] counters;
+    int[][] mat;
+
+    public ModelStandardIndexedDirector(ModelPerformer[] performers,
+            ModelDirectedPlayer player) {
+        this.performers = performers;
+        this.player = player;
+        for (int i = 0; i < performers.length; i++) {
+            ModelPerformer p = performers[i];
+            if (p.isReleaseTriggered()) {
+                noteOffUsed = true;
+            } else {
+                noteOnUsed = true;
+            }
+        }
+        buildindex();
+    }
+
+    private int[] lookupIndex(int x, int y) {
+        if ((x >= 0) && (x < 128) && (y >= 0) && (y < 128)) {
+            int xt = trantables[0][x];
+            int yt = trantables[1][y];
+            if (xt != -1 && yt != -1) {
+                return mat[xt + yt * counters[0]];
+            }
+        }
+        return null;
+    }
+
+    private int restrict(int value) {
+        if(value < 0) return 0;
+        if(value > 127) return 127;
+        return value;
+    }
+
+    private void buildindex() {
+        trantables = new byte[2][129];
+        counters = new int[trantables.length];
+        for (ModelPerformer performer : performers) {
+            int keyFrom = performer.getKeyFrom();
+            int keyTo = performer.getKeyTo();
+            int velFrom = performer.getVelFrom();
+            int velTo = performer.getVelTo();
+            if (keyFrom > keyTo) continue;
+            if (velFrom > velTo) continue;
+            keyFrom = restrict(keyFrom);
+            keyTo = restrict(keyTo);
+            velFrom = restrict(velFrom);
+            velTo = restrict(velTo);
+            trantables[0][keyFrom] = 1;
+            trantables[0][keyTo + 1] = 1;
+            trantables[1][velFrom] = 1;
+            trantables[1][velTo + 1] = 1;
+        }
+        for (int d = 0; d < trantables.length; d++) {
+            byte[] trantable = trantables[d];
+            int transize = trantable.length;
+            for (int i = transize - 1; i >= 0; i--) {
+                if (trantable[i] == 1) {
+                    trantable[i] = -1;
+                    break;
+                }
+                trantable[i] = -1;
+            }
+            int counter = -1;
+            for (int i = 0; i < transize; i++) {
+                if (trantable[i] != 0) {
+                    counter++;
+                    if (trantable[i] == -1)
+                        break;
+                }
+                trantable[i] = (byte) counter;
+            }
+            counters[d] = counter;
+        }
+        mat = new int[counters[0] * counters[1]][];
+        int ix = 0;
+        for (ModelPerformer performer : performers) {
+            int keyFrom = performer.getKeyFrom();
+            int keyTo = performer.getKeyTo();
+            int velFrom = performer.getVelFrom();
+            int velTo = performer.getVelTo();
+            if (keyFrom > keyTo) continue;
+            if (velFrom > velTo) continue;
+            keyFrom = restrict(keyFrom);
+            keyTo = restrict(keyTo);
+            velFrom = restrict(velFrom);
+            velTo = restrict(velTo);
+            int x_from = trantables[0][keyFrom];
+            int x_to = trantables[0][keyTo + 1];
+            int y_from = trantables[1][velFrom];
+            int y_to = trantables[1][velTo + 1];
+            if (x_to == -1)
+                x_to = counters[0];
+            if (y_to == -1)
+                y_to = counters[1];
+            for (int y = y_from; y < y_to; y++) {
+                int i = x_from + y * counters[0];
+                for (int x = x_from; x < x_to; x++) {
+                    int[] mprev = mat[i];
+                    if (mprev == null) {
+                        mat[i] = new int[] { ix };
+                    } else {
+                        int[] mnew = new int[mprev.length + 1];
+                        mnew[mnew.length - 1] = ix;
+                        for (int k = 0; k < mprev.length; k++)
+                            mnew[k] = mprev[k];
+                        mat[i] = mnew;
+                    }
+                    i++;
+                }
+            }
+            ix++;
+        }
+    }
+
+    public void close() {
+    }
+
+    public void noteOff(int noteNumber, int velocity) {
+        if (!noteOffUsed)
+            return;
+        int[] plist = lookupIndex(noteNumber, velocity);
+        if(plist == null) return;
+        for (int i : plist) {
+            ModelPerformer p = performers[i];
+            if (p.isReleaseTriggered()) {
+                player.play(i, null);
+            }
+        }
+    }
+
+    public void noteOn(int noteNumber, int velocity) {
+        if (!noteOnUsed)
+            return;
+        int[] plist = lookupIndex(noteNumber, velocity);
+        if(plist == null) return;
+        for (int i : plist) {
+            ModelPerformer p = performers[i];
+            if (!p.isReleaseTriggered()) {
+                player.play(i, null);
+            }
+        }
+    }
+}
--- a/src/share/classes/com/sun/media/sound/RealTimeSequencer.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/RealTimeSequencer.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1069,7 +1069,7 @@
     private static class RealTimeSequencerInfo extends MidiDevice.Info {
 
         private static final String name = "Real Time Sequencer";
-        private static final String vendor = "Sun Microsystems";
+        private static final String vendor = "Oracle Corporation";
         private static final String description = "Software sequencer";
         private static final String version = "Version 1.0";
 
--- a/src/share/classes/com/sun/media/sound/SoftChannel.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/SoftChannel.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -116,7 +116,7 @@
     protected int tuning_program = 0;
     protected SoftInstrument current_instrument = null;
     protected ModelChannelMixer current_mixer = null;
-    private ModelDirector current_director = null;
+    protected ModelDirector current_director = null;
 
     // Controller Destination Settings
     protected int cds_control_number = -1;
@@ -1264,13 +1264,16 @@
     }
 
     public void programChange(int bank, int program) {
-        bank = restrict7Bit(bank);
+        bank = restrict14Bit(bank);
         program = restrict7Bit(program);
         synchronized (control_mutex) {
             mainmixer.activity();
-            this.bank = bank;
-            this.program = program;
-            current_instrument = null;
+            if(this.bank != bank || this.program != program)
+            {
+                this.bank = bank;
+                this.program = program;
+                current_instrument = null;
+            }
         }
     }
 
--- a/src/share/classes/com/sun/media/sound/SoftMixingMixer.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/SoftMixingMixer.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -118,16 +118,16 @@
                         AudioSystem.NOT_SPECIFIED, bits, channels, channels
                                 * bits / 8, AudioSystem.NOT_SPECIFIED, true));
             }
-            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+            formats.add(new AudioFormat(Encoding.PCM_FLOAT,
                     AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4,
                     AudioSystem.NOT_SPECIFIED, false));
-            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+            formats.add(new AudioFormat(Encoding.PCM_FLOAT,
                     AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4,
                     AudioSystem.NOT_SPECIFIED, true));
-            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+            formats.add(new AudioFormat(Encoding.PCM_FLOAT,
                     AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8,
                     AudioSystem.NOT_SPECIFIED, false));
-            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+            formats.add(new AudioFormat(Encoding.PCM_FLOAT,
                     AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8,
                     AudioSystem.NOT_SPECIFIED, true));
         }
--- a/src/share/classes/com/sun/media/sound/SoftReceiver.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/SoftReceiver.java	Thu Dec 02 03:02:56 2010 -0800
@@ -27,6 +27,7 @@
 import java.util.TreeMap;
 
 import javax.sound.midi.MidiDevice;
+import javax.sound.midi.MidiDeviceReceiver;
 import javax.sound.midi.MidiMessage;
 import javax.sound.midi.ShortMessage;
 
--- a/src/share/classes/com/sun/media/sound/SoftSynthesizer.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/SoftSynthesizer.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -25,16 +25,25 @@
 
 package com.sun.media.sound;
 
+import java.io.BufferedInputStream;
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 import java.lang.ref.WeakReference;
-import java.security.AccessControlException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.prefs.BackingStoreException;
+import java.util.prefs.Preferences;
 
 import javax.sound.midi.Instrument;
 import javax.sound.midi.MidiChannel;
@@ -182,6 +191,7 @@
     // 1: DLS Voice Allocation
     protected int voice_allocation_mode = 0;
 
+    protected boolean load_default_soundbank = false;
     protected boolean reverb_light = true;
     protected boolean reverb_on = true;
     protected boolean chorus_on = true;
@@ -226,8 +236,6 @@
             = new HashMap<String, SoftTuning>();
     private Map<String, SoftInstrument> inslist
             = new HashMap<String, SoftInstrument>();
-    private Map<String, ModelInstrument> availlist
-            = new HashMap<String, ModelInstrument>();
     private Map<String, ModelInstrument> loadedlist
             = new HashMap<String, ModelInstrument>();
 
@@ -275,10 +283,12 @@
         synchronized (control_mutex) {
             if (channels != null)
                 for (SoftChannel c : channels)
+                {
                     c.current_instrument = null;
+                    c.current_director = null;
+                }
             for (Instrument instrument : instruments) {
                 String pat = patchToString(instrument.getPatch());
-                availlist.remove(pat);
                 SoftInstrument softins
                         = new SoftInstrument((ModelInstrument) instrument);
                 inslist.put(pat, softins);
@@ -341,6 +351,7 @@
         number_of_midi_channels = (Integer)items[10].value;
         jitter_correction = (Boolean)items[11].value;
         reverb_light = (Boolean)items[12].value;
+        load_default_soundbank = (Boolean)items[13].value;
     }
 
     private String patchToString(Patch patch) {
@@ -578,7 +589,9 @@
                 c.current_instrument = null;
             inslist.remove(pat);
             loadedlist.remove(pat);
-            availlist.remove(pat);
+            for (int i = 0; i < channels.length; i++) {
+                channels[i].allSoundOff();
+            }
         }
     }
 
@@ -600,7 +613,7 @@
             return false;
 
         synchronized (control_mutex) {
-            if (!loadedlist.containsValue(to) && !availlist.containsValue(to))
+            if (!loadedlist.containsValue(to))
                 throw new IllegalArgumentException("Instrument to is not loaded.");
             unloadInstrument(from);
             ModelMappedInstrument mfrom = new ModelMappedInstrument(
@@ -609,118 +622,155 @@
         }
     }
 
-    public synchronized Soundbank getDefaultSoundbank() {
-        if (defaultSoundBank == null) {
-            try {
-                File javahome = new File(System.getProperties().getProperty(
-                        "java.home"));
-                File libaudio = new File(new File(javahome, "lib"), "audio");
+    public Soundbank getDefaultSoundbank() {
+        synchronized (SoftSynthesizer.class) {
+            if (defaultSoundBank != null)
+                return defaultSoundBank;
 
-                if (libaudio.exists()) {
-                    File foundfile = null;
-                    File[] files = libaudio.listFiles();
-                    if (files != null) {
-                        for (int i = 0; i < files.length; i++) {
-                            File file = files[i];
-                            if (file.isFile()) {
-                                String lname = file.getName().toLowerCase();
-                                if (lname.endsWith(".sf2") ||
-                                        lname.endsWith(".dls")) {
-                                    if (foundfile == null || (file.length() >
-                                            foundfile.length())) {
-                                        foundfile = file;
+            List<PrivilegedAction<InputStream>> actions =
+                new ArrayList<PrivilegedAction<InputStream>>();
+
+            actions.add(new PrivilegedAction<InputStream>() {
+                public InputStream run() {
+                    File javahome = new File(System.getProperties()
+                            .getProperty("java.home"));
+                    File libaudio = new File(new File(javahome, "lib"), "audio");
+                    if (libaudio.exists()) {
+                        File foundfile = null;
+                        File[] files = libaudio.listFiles();
+                        if (files != null) {
+                            for (int i = 0; i < files.length; i++) {
+                                File file = files[i];
+                                if (file.isFile()) {
+                                    String lname = file.getName().toLowerCase();
+                                    if (lname.endsWith(".sf2")
+                                            || lname.endsWith(".dls")) {
+                                        if (foundfile == null
+                                                || (file.length() > foundfile
+                                                        .length())) {
+                                            foundfile = file;
+                                        }
                                     }
                                 }
                             }
                         }
-                    }
-                    if (foundfile != null) {
-                        try {
-                            Soundbank sbk = MidiSystem.getSoundbank(foundfile);
-                            defaultSoundBank = sbk;
-                            return defaultSoundBank;
-                        } catch (Exception e) {
-                            //e.printStackTrace();
+                        if (foundfile != null) {
+                            try {
+                                return new FileInputStream(foundfile);
+                            } catch (IOException e) {
+                            }
                         }
                     }
+                    return null;
                 }
+            });
 
-                if (System.getProperties().getProperty("os.name")
-                        .startsWith("Windows")) {
-                    File gm_dls = new File(System.getenv("SystemRoot")
-                            + "\\system32\\drivers\\gm.dls");
-                    if (gm_dls.exists()) {
-                        try {
-                            Soundbank sbk = MidiSystem.getSoundbank(gm_dls);
-                            defaultSoundBank = sbk;
-                            return defaultSoundBank;
-                        } catch (Exception e) {
-                            //e.printStackTrace();
+            actions.add(new PrivilegedAction<InputStream>() {
+                public InputStream run() {
+                    if (System.getProperties().getProperty("os.name")
+                            .startsWith("Windows")) {
+                        File gm_dls = new File(System.getenv("SystemRoot")
+                                + "\\system32\\drivers\\gm.dls");
+                        if (gm_dls.exists()) {
+                            try {
+                                return new FileInputStream(gm_dls);
+                            } catch (IOException e) {
+                            }
                         }
                     }
+                    return null;
                 }
-            } catch (AccessControlException e) {
-            } catch (Exception e) {
-                //e.printStackTrace();
-            }
+            });
 
-            File userhome = null;
-            File emg_soundbank_file = null;
+            actions.add(new PrivilegedAction<InputStream>() {
+                public InputStream run() {
+                    /*
+                     * Try to load saved generated soundbank
+                     */
+                    File userhome = new File(System.getProperty("user.home"),
+                            ".gervill");
+                    File emg_soundbank_file = new File(userhome,
+                            "soundbank-emg.sf2");
+                    if (emg_soundbank_file.exists()) {
+                        try {
+                            return new FileInputStream(emg_soundbank_file);
+                        } catch (IOException e) {
+                        }
+                    }
+                    return null;
+                }
+            });
 
-            /*
-             *  Try to load saved generated soundbank
-             */
-            try {
-                userhome = new File(System.getProperty("user.home"),
-                     ".gervill");
-                emg_soundbank_file = new File(userhome, "soundbank-emg.sf2");
-                Soundbank sbk = MidiSystem.getSoundbank(emg_soundbank_file);
-                defaultSoundBank = sbk;
-                return defaultSoundBank;
-            } catch (AccessControlException e) {
-            } catch (Exception e) {
-                //e.printStackTrace();
+            for (PrivilegedAction<InputStream> action : actions) {
+                try {
+                    InputStream is = AccessController.doPrivileged(action);
+                    if(is == null) continue;
+                    Soundbank sbk;
+                    try {
+                        sbk = MidiSystem.getSoundbank(new BufferedInputStream(is));
+                    } finally {
+                        is.close();
+                    }
+                    if (sbk != null) {
+                        defaultSoundBank = sbk;
+                        return defaultSoundBank;
+                    }
+                } catch (Exception e) {
+                }
             }
 
             try {
-
                 /*
-                 *  Generate emergency soundbank
+                 * Generate emergency soundbank
                  */
                 defaultSoundBank = EmergencySoundbank.createSoundbank();
-
-                /*
-                 *  Save generated soundbank to disk for faster future use.
-                 */
-                if(defaultSoundBank != null)
-                {
-                    if(!userhome.exists()) userhome.mkdirs();
-                    if(!emg_soundbank_file.exists())
-                        ((SF2Soundbank)defaultSoundBank).save(emg_soundbank_file);
-                }
             } catch (Exception e) {
-                //e.printStackTrace();
             }
 
+            if (defaultSoundBank != null) {
+                /*
+                 * Save generated soundbank to disk for faster future use.
+                 */
+                OutputStream out = AccessController
+                        .doPrivileged(new PrivilegedAction<OutputStream>() {
+                            public OutputStream run() {
+                                try {
+                                    File userhome = new File(System
+                                            .getProperty("user.home"),
+                                            ".gervill");
+                                    if (!userhome.exists())
+                                        userhome.mkdirs();
+                                    File emg_soundbank_file = new File(
+                                            userhome, "soundbank-emg.sf2");
+                                    if (emg_soundbank_file.exists())
+                                        return null;
+                                    return new FileOutputStream(
+                                            emg_soundbank_file);
+                                } catch (IOException e) {
+                                } catch (SecurityException e) {
+                                }
+                                return null;
+                            }
+                        });
+                if (out != null) {
+                    try {
+                        ((SF2Soundbank) defaultSoundBank).save(out);
+                        out.close();
+                    } catch (IOException e) {
+                    }
+                }
+            }
         }
         return defaultSoundBank;
     }
 
     public Instrument[] getAvailableInstruments() {
-        if (!isOpen()) {
-            Soundbank defsbk = getDefaultSoundbank();
-            if (defsbk == null)
-                return new Instrument[0];
-            return defsbk.getInstruments();
-        }
-
-        synchronized (control_mutex) {
-            ModelInstrument[] inslist_array =
-                    new ModelInstrument[availlist.values().size()];
-            availlist.values().toArray(inslist_array);
-            Arrays.sort(inslist_array, new ModelInstrumentComparator());
-            return inslist_array;
-        }
+        Soundbank defsbk = getDefaultSoundbank();
+        if (defsbk == null)
+            return new Instrument[0];
+        Instrument[] inslist_array = defsbk.getInstruments();
+        Arrays.sort(inslist_array, new ModelInstrumentComparator());
+        return inslist_array;
     }
 
     public Instrument[] getLoadedInstruments() {
@@ -794,6 +844,31 @@
         return info;
     }
 
+    private Properties getStoredProperties() {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<Properties>() {
+                    public Properties run() {
+                        Properties p = new Properties();
+                        String notePath = "/com/sun/media/sound/softsynthesizer";
+                        try {
+                            Preferences prefroot = Preferences.userRoot();
+                            if (prefroot.nodeExists(notePath)) {
+                                Preferences prefs = prefroot.node(notePath);
+                                String[] prefs_keys = prefs.keys();
+                                for (String prefs_key : prefs_keys) {
+                                    String val = prefs.get(prefs_key, null);
+                                    if (val != null)
+                                        p.setProperty(prefs_key, val);
+                                }
+                            }
+                        } catch (BackingStoreException e) {
+                        } catch (SecurityException e) {
+                        }
+                        return p;
+                    }
+                });
+    }
+
     public AudioSynthesizerPropertyInfo[] getPropertyInfo(Map<String, Object> info) {
         List<AudioSynthesizerPropertyInfo> list =
                 new ArrayList<AudioSynthesizerPropertyInfo>();
@@ -861,17 +936,92 @@
         item.description = "Turn light reverb mode on or off";
         list.add(item);
 
+        item = new AudioSynthesizerPropertyInfo("load default soundbank", o?load_default_soundbank:true);
+        item.description = "Enabled/disable loading default soundbank";
+        list.add(item);
+
         AudioSynthesizerPropertyInfo[] items;
         items = list.toArray(new AudioSynthesizerPropertyInfo[list.size()]);
 
-        if (info != null)
-            for (AudioSynthesizerPropertyInfo item2: items) {
-                Object v = info.get(item2.name);
+        Properties storedProperties = getStoredProperties();
+
+        for (AudioSynthesizerPropertyInfo item2 : items) {
+            Object v = (info == null) ? null : info.get(item2.name);
+            v = (v != null) ? v : storedProperties.getProperty(item2.name);
+            if (v != null) {
                 Class c = (item2.valueClass);
-                if (v != null)
-                    if (c.isInstance(v))
-                        item2.value = v;
+                if (c.isInstance(v))
+                    item2.value = v;
+                else if (v instanceof String) {
+                    String s = (String) v;
+                    if (c == Boolean.class) {
+                        if (s.equalsIgnoreCase("true"))
+                            item2.value = Boolean.TRUE;
+                        if (s.equalsIgnoreCase("false"))
+                            item2.value = Boolean.FALSE;
+                    } else if (c == AudioFormat.class) {
+                        int channels = 2;
+                        boolean signed = true;
+                        boolean bigendian = false;
+                        int bits = 16;
+                        float sampleRate = 44100f;
+                        try {
+                            StringTokenizer st = new StringTokenizer(s, ", ");
+                            String prevToken = "";
+                            while (st.hasMoreTokens()) {
+                                String token = st.nextToken().toLowerCase();
+                                if (token.equals("mono"))
+                                    channels = 1;
+                                if (token.startsWith("channel"))
+                                    channels = Integer.parseInt(prevToken);
+                                if (token.contains("unsigned"))
+                                    signed = false;
+                                if (token.equals("big-endian"))
+                                    bigendian = true;
+                                if (token.equals("bit"))
+                                    bits = Integer.parseInt(prevToken);
+                                if (token.equals("hz"))
+                                    sampleRate = Float.parseFloat(prevToken);
+                                prevToken = token;
+                            }
+                            item2.value = new AudioFormat(sampleRate, bits,
+                                    channels, signed, bigendian);
+                        } catch (NumberFormatException e) {
+                        }
+
+                    } else
+                        try {
+                            if (c == Byte.class)
+                                item2.value = Byte.valueOf(s);
+                            else if (c == Short.class)
+                                item2.value = Short.valueOf(s);
+                            else if (c == Integer.class)
+                                item2.value = Integer.valueOf(s);
+                            else if (c == Long.class)
+                                item2.value = Long.valueOf(s);
+                            else if (c == Float.class)
+                                item2.value = Float.valueOf(s);
+                            else if (c == Double.class)
+                                item2.value = Double.valueOf(s);
+                        } catch (NumberFormatException e) {
+                        }
+                } else if (v instanceof Number) {
+                    Number n = (Number) v;
+                    if (c == Byte.class)
+                        item2.value = Byte.valueOf(n.byteValue());
+                    if (c == Short.class)
+                        item2.value = Short.valueOf(n.shortValue());
+                    if (c == Integer.class)
+                        item2.value = Integer.valueOf(n.intValue());
+                    if (c == Long.class)
+                        item2.value = Long.valueOf(n.longValue());
+                    if (c == Float.class)
+                        item2.value = Float.valueOf(n.floatValue());
+                    if (c == Double.class)
+                        item2.value = Double.valueOf(n.doubleValue());
+                }
             }
+        }
 
         return items;
     }
@@ -1007,11 +1157,12 @@
             if (targetFormat != null)
                 setFormat(targetFormat);
 
-            Soundbank defbank = getDefaultSoundbank();
-            if (defbank != null) {
-                loadAllInstruments(defbank);
-                availlist.putAll(loadedlist);
-                loadedlist.clear();
+            if (load_default_soundbank)
+            {
+                Soundbank defbank = getDefaultSoundbank();
+                if (defbank != null) {
+                    loadAllInstruments(defbank);
+                }
             }
 
             voices = new SoftVoice[maxpoly];
@@ -1117,7 +1268,6 @@
             }
 
             inslist.clear();
-            availlist.clear();
             loadedlist.clear();
             tunings.clear();
 
--- a/src/share/classes/com/sun/media/sound/SoftVoice.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/SoftVoice.java	Thu Dec 02 03:02:56 2010 -0800
@@ -279,9 +279,12 @@
     }
 
     protected void updateTuning(SoftTuning newtuning) {
+        tuning = newtuning;
         tunedKey = tuning.getTuning(note) / 100.0;
         if (!portamento) {
             co_noteon_keynumber[0] = tunedKey * (1.0 / 128.0);
+            if(performer == null)
+                return;
             int[] c = performer.midi_connections[4];
             if (c == null)
                 return;
@@ -433,6 +436,8 @@
     }
 
     protected void setPolyPressure(int pressure) {
+        if(performer == null)
+            return;
         int[] c = performer.midi_connections[2];
         if (c == null)
             return;
@@ -441,6 +446,8 @@
     }
 
     protected void setChannelPressure(int pressure) {
+        if(performer == null)
+            return;
         int[] c = performer.midi_connections[1];
         if (c == null)
             return;
@@ -449,6 +456,8 @@
     }
 
     protected void controlChange(int controller, int value) {
+        if(performer == null)
+            return;
         int[] c = performer.midi_ctrl_connections[controller];
         if (c == null)
             return;
@@ -457,6 +466,8 @@
     }
 
     protected void nrpnChange(int controller, int value) {
+        if(performer == null)
+            return;
         int[] c = performer.midi_nrpn_connections.get(controller);
         if (c == null)
             return;
@@ -465,6 +476,8 @@
     }
 
     protected void rpnChange(int controller, int value) {
+        if(performer == null)
+            return;
         int[] c = performer.midi_rpn_connections.get(controller);
         if (c == null)
             return;
@@ -473,6 +486,8 @@
     }
 
     protected void setPitchBend(int bend) {
+        if(performer == null)
+            return;
         int[] c = performer.midi_connections[0];
         if (c == null)
             return;
@@ -499,6 +514,8 @@
 
         co_noteon_on[0] = -1;
 
+        if(performer == null)
+            return;
         int[] c = performer.midi_connections[3];
         if (c == null)
             return;
@@ -527,6 +544,8 @@
 
         co_noteon_on[0] = 0;
 
+        if(performer == null)
+            return;
         int[] c = performer.midi_connections[3];
         if (c == null)
             return;
@@ -543,6 +562,8 @@
         sustain = true;
         co_noteon_on[0] = 1;
 
+        if(performer == null)
+            return;
         int[] c = performer.midi_connections[3];
         if (c == null)
             return;
@@ -555,6 +576,11 @@
             active = false;
             stopping = false;
             audiostarted = false;
+            instrument = null;
+            performer = null;
+            connections = null;
+            extendedConnectionBlocks = null;
+            channelmixer = null;
             if (osc_stream != null)
                 try {
                     osc_stream.close();
--- a/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -271,7 +271,7 @@
                         bits, channels, framesize, samplerate, false, p);
             }
         } else if (subFormat.equals(SUBTYPE_IEEE_FLOAT)) {
-            audioformat = new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+            audioformat = new AudioFormat(Encoding.PCM_FLOAT,
                     samplerate, bits, channels, framesize, samplerate, false, p);
         } else
             throw new UnsupportedAudioFileException();
--- a/src/share/classes/com/sun/media/sound/WaveFloatFileReader.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/WaveFloatFileReader.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -33,6 +33,7 @@
 
 import javax.sound.sampled.AudioFileFormat;
 import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioFormat.Encoding;
 import javax.sound.sampled.AudioInputStream;
 import javax.sound.sampled.AudioSystem;
 import javax.sound.sampled.UnsupportedAudioFileException;
@@ -102,7 +103,7 @@
             throw new UnsupportedAudioFileException();
 
         AudioFormat audioformat = new AudioFormat(
-                AudioFloatConverter.PCM_FLOAT, samplerate, bits, channels,
+                Encoding.PCM_FLOAT, samplerate, bits, channels,
                 framesize, samplerate, false);
         AudioFileFormat fileformat = new AudioFileFormat(
                 AudioFileFormat.Type.WAVE, audioformat,
--- a/src/share/classes/com/sun/media/sound/WaveFloatFileWriter.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/media/sound/WaveFloatFileWriter.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -30,6 +30,7 @@
 
 import javax.sound.sampled.AudioFileFormat;
 import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioFormat.Encoding;
 import javax.sound.sampled.AudioInputStream;
 import javax.sound.sampled.AudioSystem;
 import javax.sound.sampled.AudioFileFormat.Type;
@@ -48,8 +49,7 @@
 
     public Type[] getAudioFileTypes(AudioInputStream stream) {
 
-        if (!stream.getFormat().getEncoding().equals(
-                AudioFloatConverter.PCM_FLOAT))
+        if (!stream.getFormat().getEncoding().equals(Encoding.PCM_FLOAT))
             return new Type[0];
         return new Type[] { Type.WAVE };
     }
@@ -58,8 +58,7 @@
         if (!Type.WAVE.equals(type))
             throw new IllegalArgumentException("File type " + type
                     + " not supported.");
-        if (!stream.getFormat().getEncoding().equals(
-                AudioFloatConverter.PCM_FLOAT))
+        if (!stream.getFormat().getEncoding().equals(Encoding.PCM_FLOAT))
             throw new IllegalArgumentException("File format "
                     + stream.getFormat() + " not supported.");
     }
--- a/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java	Thu Dec 02 03:02:56 2010 -0800
@@ -24,9 +24,6 @@
  */
 
 package com.sun.net.httpserver;
-import java.net.*;
-import java.io.*;
-import java.util.*;
 
 /**
  * BasicAuthenticator provides an implementation of HTTP Basic
@@ -57,7 +54,6 @@
 
     public Result authenticate (HttpExchange t)
     {
-        HttpContext context = t.getHttpContext();
         Headers rmap = (Headers) t.getRequestHeaders();
         /*
          * look for auth token
--- a/src/share/classes/com/sun/net/httpserver/Filter.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/net/httpserver/Filter.java	Thu Dec 02 03:02:56 2010 -0800
@@ -25,11 +25,7 @@
 
 package com.sun.net.httpserver;
 
-import java.net.*;
-import java.io.*;
-import java.nio.*;
-import java.nio.channels.*;
-import sun.net.www.MessageHeader;
+import java.io.IOException;
 import java.util.*;
 
 /**
@@ -56,12 +52,10 @@
         /* the last element in the chain must invoke the users
          * handler
          */
-        private List<Filter> filters;
         private ListIterator<Filter> iter;
         private HttpHandler handler;
 
         public Chain (List<Filter> filters, HttpHandler handler) {
-            this.filters = filters;
             iter = filters.listIterator();
             this.handler = handler;
         }
--- a/src/share/classes/com/sun/net/httpserver/Headers.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/net/httpserver/Headers.java	Thu Dec 02 03:02:56 2010 -0800
@@ -26,7 +26,6 @@
 package com.sun.net.httpserver;
 
 import java.util.*;
-import java.io.*;
 
 /**
  * HTTP request and response headers are represented by this class which implements
@@ -77,19 +76,16 @@
             if (len == 0) {
                 return key;
             }
-            char[] b = new char [len];
-            String s = null;
-                b = key.toCharArray();
-                if (b[0] >= 'a' && b[0] <= 'z') {
-                    b[0] = (char)(b[0] - ('a' - 'A'));
+            char[] b = key.toCharArray();
+            if (b[0] >= 'a' && b[0] <= 'z') {
+                b[0] = (char)(b[0] - ('a' - 'A'));
+            }
+            for (int i=1; i<len; i++) {
+                if (b[i] >= 'A' && b[i] <= 'Z') {
+                    b[i] = (char) (b[i] + ('a' - 'A'));
                 }
-                for (int i=1; i<len; i++) {
-                    if (b[i] >= 'A' && b[i] <= 'Z') {
-                        b[i] = (char) (b[i] + ('a' - 'A'));
-                    }
-                }
-                s = new String (b);
-            return s;
+            }
+            return new String(b);
         }
 
         public int size() {return map.size();}
--- a/src/share/classes/com/sun/net/httpserver/HttpsParameters.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/net/httpserver/HttpsParameters.java	Thu Dec 02 03:02:56 2010 -0800
@@ -24,9 +24,7 @@
  */
 
 package com.sun.net.httpserver;
-import java.net.*;
-import java.io.*;
-import java.util.*;
+import java.net.InetSocketAddress;
 import javax.net.ssl.SSLParameters;
 
 /**
@@ -90,7 +88,7 @@
      * have been set.
      */
     public String[] getCipherSuites() {
-        return cipherSuites;
+        return cipherSuites != null ? cipherSuites.clone() : null;
     }
 
     /**
@@ -99,7 +97,7 @@
      * @param cipherSuites the array of ciphersuites (or null)
      */
     public void setCipherSuites(String[] cipherSuites) {
-        this.cipherSuites = cipherSuites;
+        this.cipherSuites = cipherSuites != null ? cipherSuites.clone() : null;
     }
 
     /**
@@ -110,7 +108,7 @@
      * have been set.
      */
     public String[] getProtocols() {
-        return protocols;
+        return protocols != null ? protocols.clone() : null;
     }
 
     /**
@@ -119,7 +117,7 @@
      * @param protocols the array of protocols (or null)
      */
     public void setProtocols(String[] protocols) {
-        this.protocols = protocols;
+        this.protocols = protocols != null ? protocols.clone() : null;
     }
 
     /**
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java	Thu Dec 02 03:02:56 2010 -0800
@@ -3,7 +3,7 @@
  * DO NOT REMOVE OR ALTER!
  */
 /*
- * Copyright  1999-2005 The Apache Software Foundation.
+ * Copyright 1999-2010 The Apache Software Foundation.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -23,66 +23,70 @@
 import java.io.OutputStream;
 
 /**
- * A simple Unsynced ByteArryOutputStream
+ * A simple Unsynced ByteArrayOutputStream
  * @author raul
  *
  */
 public class UnsyncByteArrayOutputStream extends OutputStream  {
-        private static ThreadLocal bufCahce = new ThreadLocal() {
+    private static final int INITIAL_SIZE = 8192;
+    private static ThreadLocal bufCache = new ThreadLocal() {
         protected synchronized Object initialValue() {
-            return new byte[8*1024];
+            return new byte[INITIAL_SIZE];
         }
     };
-    byte[] buf;
-        int size=8*1024;//buf.length;
-        int pos=0;
-        public UnsyncByteArrayOutputStream() {
-                buf=(byte[])bufCahce.get();
+
+    private byte[] buf;
+    private int size = INITIAL_SIZE;
+    private int pos = 0;
+
+    public UnsyncByteArrayOutputStream() {
+        buf = (byte[])bufCache.get();
+    }
+
+    public void write(byte[] arg0) {
+        int newPos = pos + arg0.length;
+        if (newPos > size) {
+            expandSize(newPos);
         }
-        /** @inheritDoc */
-        public void write(byte[] arg0) {
-                int newPos=pos+arg0.length;
-                if (newPos>size) {
-                        expandSize();
-                }
-                System.arraycopy(arg0,0,buf,pos,arg0.length);
-                pos=newPos;
+        System.arraycopy(arg0, 0, buf, pos, arg0.length);
+        pos = newPos;
+    }
+
+    public void write(byte[] arg0, int arg1, int arg2) {
+        int newPos = pos + arg2;
+        if (newPos > size) {
+            expandSize(newPos);
         }
-        /** @inheritDoc */
-        public void write(byte[] arg0, int arg1, int arg2) {
-                int newPos=pos+arg2;
-                if (newPos>size) {
-                        expandSize();
-                }
-                System.arraycopy(arg0,arg1,buf,pos,arg2);
-                pos=newPos;
+        System.arraycopy(arg0, arg1, buf, pos, arg2);
+        pos = newPos;
+    }
+
+    public void write(int arg0) {
+        int newPos = pos + 1;
+        if (newPos > size) {
+            expandSize(newPos);
         }
-        /** @inheritDoc */
-        public void write(int arg0) {
-                if (pos>=size) {
-                        expandSize();
-                }
-                buf[pos++]=(byte)arg0;
+        buf[pos++] = (byte)arg0;
+    }
+
+    public byte[] toByteArray() {
+        byte result[] = new byte[pos];
+        System.arraycopy(buf, 0, result, 0, pos);
+        return result;
+    }
+
+    public void reset() {
+        pos = 0;
+    }
+
+    private void expandSize(int newPos) {
+        int newSize = size;
+        while (newPos > newSize) {
+            newSize = newSize<<2;
         }
-        /** @inheritDoc */
-        public byte[] toByteArray() {
-                byte result[]=new byte[pos];
-                System.arraycopy(buf,0,result,0,pos);
-                return result;
-        }
-
-        /** @inheritDoc */
-        public void reset() {
-                pos=0;
-        }
-
-        /** @inheritDoc */
-        void expandSize() {
-                int newSize=size<<2;
-                byte newBuf[]=new byte[newSize];
-                System.arraycopy(buf,0,newBuf,0,pos);
-                buf=newBuf;
-                size=newSize;
-
-        }
+        byte newBuf[] = new byte[newSize];
+        System.arraycopy(buf, 0, newBuf, 0, pos);
+        buf = newBuf;
+        size = newSize;
+    }
 }
--- a/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -518,14 +518,14 @@
             setReadOnly(true);
         setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
         setEscapeProcessing(true);
-        setTypeMap(null);
+        //setTypeMap(null);
         checkTransactionalWriter();
 
         //Instantiating the vector for MatchColumns
 
         iMatchColumns = new Vector(10);
         for(int i = 0; i < 10 ; i++) {
-           iMatchColumns.add(i,new Integer(-1));
+           iMatchColumns.add(i,Integer.valueOf(-1));
         }
 
         strMatchColumns = new Vector(10);
@@ -679,7 +679,10 @@
                 } else if (obj instanceof Clob) {
                     obj = new SerialClob((Clob)obj);
                 } else if (obj instanceof java.sql.Array) {
-                    obj = new SerialArray((java.sql.Array)obj, map);
+                    if(map != null)
+                        obj = new SerialArray((java.sql.Array)obj, map);
+                    else
+                        obj = new SerialArray((java.sql.Array)obj);
                 }
 
                 ((Row)currentRow).initColumnObject(i, obj);
@@ -762,7 +765,7 @@
         if( conn != null){
            // JDBC 4.0 mandates as does the Java EE spec that all DataBaseMetaData methods
            // must be implemented, therefore, the previous fix for 5055528 is being backed out
-           dbmslocatorsUpdateCopy = conn.getMetaData().locatorsUpdateCopy();
+            dbmslocatorsUpdateCopy = conn.getMetaData().locatorsUpdateCopy();
         }
     }
 
@@ -886,7 +889,12 @@
                     success = false;
                 } else {
                     tWriter = (TransactionalWriter)rowSetWriter;
-                    ((CachedRowSetWriter)tWriter).commit(this, updateOnInsert);
+                    if (tWriter instanceof CachedRowSetWriter) {
+                        ((CachedRowSetWriter)tWriter).commit(this, updateOnInsert);
+                    } else {
+                        tWriter.commit();
+                    }
+
                     success = true;
                 }
             }
@@ -1291,7 +1299,7 @@
         tMap = new TreeMap();
 
         for (int i = 0; i<numRows; i++) {
-            tMap.put(new Integer(i), rvh.get(i));
+            tMap.put(Integer.valueOf(i), rvh.get(i));
         }
 
         return (tMap.values());
@@ -1803,7 +1811,7 @@
             return (byte)0;
         }
         try {
-            return ((new Byte(value.toString())).byteValue());
+            return ((Byte.valueOf(value.toString())).byteValue());
         } catch (NumberFormatException ex) {
             throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.bytefail").toString(),
                   new Object[] {value.toString().trim(), columnIndex}));
@@ -1847,7 +1855,7 @@
         }
 
         try {
-            return ((new Short(value.toString().trim())).shortValue());
+            return ((Short.valueOf(value.toString().trim())).shortValue());
         } catch (NumberFormatException ex) {
             throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.shortfail").toString(),
                   new Object[] {value.toString().trim(), columnIndex}));
@@ -1890,7 +1898,7 @@
         }
 
         try {
-            return ((new Integer(value.toString().trim())).intValue());
+            return ((Integer.valueOf(value.toString().trim())).intValue());
         } catch (NumberFormatException ex) {
             throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.intfail").toString(),
                   new Object[] {value.toString().trim(), columnIndex}));
@@ -1933,7 +1941,7 @@
             return (long)0;
         }
         try {
-            return ((new Long(value.toString().trim())).longValue());
+            return ((Long.valueOf(value.toString().trim())).longValue());
         } catch (NumberFormatException ex) {
             throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.longfail").toString(),
                   new Object[] {value.toString().trim(), columnIndex}));
@@ -4011,18 +4019,18 @@
         try {
             switch (trgType) {
                 case java.sql.Types.BIT:
-                    Integer i = new Integer(srcObj.toString().trim());
-                    return i.equals(new Integer((int)0)) ?
-                    new Boolean(false) :
-                        new Boolean(true);
+                    Integer i = Integer.valueOf(srcObj.toString().trim());
+                    return i.equals(Integer.valueOf((int)0)) ?
+                    Boolean.valueOf(false) :
+                        Boolean.valueOf(true);
                 case java.sql.Types.TINYINT:
-                    return new Byte(srcObj.toString().trim());
+                    return Byte.valueOf(srcObj.toString().trim());
                 case java.sql.Types.SMALLINT:
-                    return new Short(srcObj.toString().trim());
+                    return Short.valueOf(srcObj.toString().trim());
                 case java.sql.Types.INTEGER:
-                    return new Integer(srcObj.toString().trim());
+                    return Integer.valueOf(srcObj.toString().trim());
                 case java.sql.Types.BIGINT:
-                    return new Long(srcObj.toString().trim());
+                    return Long.valueOf(srcObj.toString().trim());
                 case java.sql.Types.NUMERIC:
                 case java.sql.Types.DECIMAL:
                     return new BigDecimal(srcObj.toString().trim());
@@ -4034,7 +4042,7 @@
                 case java.sql.Types.CHAR:
                 case java.sql.Types.VARCHAR:
                 case java.sql.Types.LONGVARCHAR:
-                    return new String(srcObj.toString());
+                    return srcObj.toString();
                 default:
                     throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.dtypemismt").toString()+ trgType);
             }
@@ -4131,7 +4139,7 @@
                 case java.sql.Types.CHAR:
                 case java.sql.Types.VARCHAR:
                 case java.sql.Types.LONGVARCHAR:
-                    return new String(srcObj.toString());
+                    return srcObj.toString();
                 default:
                     throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.dtypemismt").toString());
             }
@@ -4178,12 +4186,12 @@
         try {
             switch (trgType) {
                 case java.sql.Types.BIT:
-                    Integer i = new Integer(srcObj.toString().trim());
-                    return i.equals(new Integer((int)0)) ?
-                    new Boolean(false) :
-                        new Boolean(true);
+                    Integer i = Integer.valueOf(srcObj.toString().trim());
+                    return i.equals(Integer.valueOf((int)0)) ?
+                    Boolean.valueOf(false) :
+                        Boolean.valueOf(true);
                 case java.sql.Types.BOOLEAN:
-                    return new Boolean(srcObj.toString().trim());
+                    return Boolean.valueOf(srcObj.toString().trim());
                 default:
                     throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.dtypemismt").toString()+ trgType);
             }
@@ -4257,7 +4265,7 @@
         checkIndex(columnIndex);
         // make sure the cursor is on a valid row
         checkCursor();
-        Object obj = convertBoolean(new Boolean(x),
+        Object obj = convertBoolean(Boolean.valueOf(x),
         java.sql.Types.BIT,
         RowSetMD.getColumnType(columnIndex));
 
@@ -4293,7 +4301,7 @@
         // make sure the cursor is on a valid row
         checkCursor();
 
-        Object obj = convertNumeric(new Byte(x),
+        Object obj = convertNumeric(Byte.valueOf(x),
         java.sql.Types.TINYINT,
         RowSetMD.getColumnType(columnIndex));
 
@@ -4329,7 +4337,7 @@
         // make sure the cursor is on a valid row
         checkCursor();
 
-        Object obj = convertNumeric(new Short(x),
+        Object obj = convertNumeric(Short.valueOf(x),
         java.sql.Types.SMALLINT,
         RowSetMD.getColumnType(columnIndex));
 
@@ -4364,7 +4372,7 @@
         checkIndex(columnIndex);
         // make sure the cursor is on a valid row
         checkCursor();
-        Object obj = convertNumeric(new Integer(x),
+        Object obj = convertNumeric(Integer.valueOf(x),
         java.sql.Types.INTEGER,
         RowSetMD.getColumnType(columnIndex));
 
@@ -4400,7 +4408,7 @@
         // make sure the cursor is on a valid row
         checkCursor();
 
-        Object obj = convertNumeric(new Long(x),
+        Object obj = convertNumeric(Long.valueOf(x),
         java.sql.Types.BIGINT,
         RowSetMD.getColumnType(columnIndex));
 
@@ -6322,6 +6330,7 @@
         crs.RowSetMD = RowSetMD;
         crs.numRows = 1;
         crs.cursorPos = 0;
+        crs.setTypeMap(this.getTypeMap());
 
         // make sure we don't get someone playing with these
         // %%% is this now necessary ???
@@ -6425,7 +6434,7 @@
         if (tabName == null)
             throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.tablename").toString());
         else
-            tableName = new String(tabName);
+            tableName = tabName;
     }
 
     /**
@@ -6936,7 +6945,7 @@
          }
 
          for( int i = 0;i < columnIdxes.length ;i++) {
-            iMatchColumns.set(i,new Integer(-1));
+            iMatchColumns.set(i,Integer.valueOf(-1));
          }
     }
 
@@ -7045,7 +7054,7 @@
            }
         }
         for(int i = 0 ;i < columnIdxes.length; i++) {
-           iMatchColumns.add(i,new Integer(columnIdxes[i]));
+           iMatchColumns.add(i,Integer.valueOf(columnIdxes[i]));
         }
     }
 
@@ -7100,7 +7109,7 @@
             throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols1").toString());
         } else {
             // set iMatchColumn
-            iMatchColumns.set(0, new Integer(columnIdx));
+            iMatchColumns.set(0, Integer.valueOf(columnIdx));
             //strMatchColumn = null;
         }
     }
@@ -7122,7 +7131,7 @@
      */
     public void setMatchColumn(String columnName) throws SQLException {
         // validate, if col is ok to be set
-        if(columnName.equals(null) || ((columnName = columnName.trim()) == "" )) {
+        if(columnName == null || (columnName= columnName.trim()).equals("") ) {
             throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString());
         } else {
             // set strMatchColumn
@@ -7147,13 +7156,13 @@
      */
     public void unsetMatchColumn(int columnIdx) throws SQLException {
         // check if we are unsetting the SAME column
-        if(! iMatchColumns.get(0).equals(new Integer(columnIdx) )  ) {
+        if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) )  ) {
             throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.unsetmatch").toString());
         } else if(strMatchColumns.get(0) != null) {
             throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.unsetmatch1").toString());
         } else {
                 // that is, we are unsetting it.
-               iMatchColumns.set(0, new Integer(-1));
+               iMatchColumns.set(0, Integer.valueOf(-1));
         }
     }
 
@@ -10114,7 +10123,7 @@
      * during the deserialization process
      *
      */
-    protected void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
+    private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
         // Default state initialization happens here
         ois.defaultReadObject();
         // Initialization of transient Res Bundle happens here .
@@ -10125,5 +10134,15 @@
         }
 
     }
-        static final long serialVersionUID =1884577171200622428L;
+
+    //------------------------- JDBC 4.1 -----------------------------------
+    public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
+        throw new SQLFeatureNotSupportedException("Not supported yet.");
+    }
+
+    public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
+        throw new SQLFeatureNotSupportedException("Not supported yet.");
+    }
+
+    static final long serialVersionUID =1884577171200622428L;
 }
--- a/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -499,7 +499,7 @@
 
      if(onInsertRow) {
         if(p != null) {
-           bool = p.evaluate(new Integer(x),columnIndex);
+           bool = p.evaluate(Integer.valueOf(x),columnIndex);
 
            if(!bool) {
               throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
@@ -566,7 +566,7 @@
 
       if(onInsertRow) {
          if(p != null) {
-            bool = p.evaluate(new Boolean(x) , columnIndex);
+            bool = p.evaluate(Boolean.valueOf(x) , columnIndex);
 
             if(!bool) {
                throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
@@ -634,7 +634,7 @@
 
       if(onInsertRow) {
          if(p != null) {
-            bool = p.evaluate(new Byte(x),columnIndex);
+            bool = p.evaluate(Byte.valueOf(x),columnIndex);
 
             if(!bool) {
                 throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
@@ -703,7 +703,7 @@
 
       if(onInsertRow) {
          if(p != null) {
-            bool = p.evaluate(new Short(x), columnIndex);
+            bool = p.evaluate(Short.valueOf(x), columnIndex);
 
             if(!bool) {
                throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
@@ -771,7 +771,7 @@
 
       if(onInsertRow) {
          if(p != null) {
-            bool = p.evaluate(new Long(x), columnIndex);
+            bool = p.evaluate(Long.valueOf(x), columnIndex);
 
             if(!bool) {
                throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
@@ -1106,12 +1106,12 @@
    public void updateBytes(int columnIndex , byte []x) throws SQLException {
 
       boolean bool;
-      String val = new String();
+      String val = "";
 
       Byte [] obj_arr = new Byte[x.length];
 
       for(int i = 0; i < x.length; i++) {
-         obj_arr[i] = new Byte(x[i]);
+         obj_arr[i] = Byte.valueOf(x[i]);
          val = val.concat(obj_arr[i].toString());
      }
 
@@ -1746,5 +1746,23 @@
       onInsertRow = false;
       super.insertRow();
    }
-  static final long serialVersionUID = 6178454588413509360L;
+
+   /**
+    * This method re populates the resBundle
+    * during the deserialization process
+    *
+    */
+   private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
+       // Default state initialization happens here
+       ois.defaultReadObject();
+       // Initialization of transient Res Bundle happens here .
+       try {
+          resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+       } catch(IOException ioe) {
+           throw new RuntimeException(ioe);
+       }
+
+   }
+
+   static final long serialVersionUID = 6178454588413509360L;
 } // end FilteredRowSetImpl class
--- a/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java	Thu Dec 02 02:59:02 2010 -0800
+++ b/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java	Thu Dec 02 03:02:56 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -101,7 +101,7 @@
     private Vector strMatchColumns;
 
 
-    protected transient JdbcRowSetResourceBundle jdbcResBundle;
+    protected transient JdbcRowSetResourceBundle resBundle;
 
     /**
      * Constructs a default <code>JdbcRowSet</code> object.
@@ -140,7 +140,7 @@
         rs   = null;
 
         try {
-           jdbcResBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
         } catch(IOException ioe) {
             throw new RuntimeException(ioe);
         }
@@ -154,42 +154,42 @@
         try {
             setShowDeleted(false);
         } catch(SQLException sqle) {
-             System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setshowdeleted").toString() +
+             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setshowdeleted").toString() +
                                 sqle.getLocalizedMessage());
         }
 
         try {
             setQueryTimeout(0);
         } catch(SQLException sqle) {
-            System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +
+            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +
                                 sqle.getLocalizedMessage());
         }
 
         try {
             setMaxRows(0);
         } catch(SQLException sqle) {
-            System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +
+            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +
                                 sqle.getLocalizedMessage());
         }
 
         try {
             setMaxFieldSize(0);
         } catch(SQLException sqle) {
-             System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +
+             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +
                                 sqle.getLocalizedMessage());
         }
 
         try {
             setEscapeProcessing(true);
         } catch(SQLException sqle) {
-             System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +
+             System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +
                                 sqle.getLocalizedMessage());
         }
 
         try {
             setConcurrency(ResultSet.CONCUR_UPDATABLE);
         } catch (SQLException sqle) {
-            System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setconcurrency").toString() +
+            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setconcurrency").toString() +
                                 sqle.getLocalizedMessage());
         }
 
@@ -198,7 +198,7 @@
         try {
             setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
         } catch(SQLException sqle){
-          System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.settype").toString() +
+          System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settype").toString() +
                                 sqle.getLocalizedMessage());
         }
 
@@ -207,7 +207,7 @@
         try {
             setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
         } catch(SQLException sqle){
-            System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.settransactionisolation").toString() +
+            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.settransactionisolation").toString() +
                                 sqle.getLocalizedMessage());
         }
 
@@ -215,7 +215,7 @@
 
         iMatchColumns = new Vector(10);
         for(int i = 0; i < 10 ; i++) {
-           iMatchColumns.add(i,new Integer(-1));
+           iMatchColumns.add(i,Integer.valueOf(-1));
         }
 
         strMatchColumns = new Vector(10);
@@ -263,7 +263,7 @@
         rs = null;
 
         try {
-           jdbcResBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
         } catch(IOException ioe) {
             throw new RuntimeException(ioe);
         }
@@ -288,7 +288,7 @@
 
         iMatchColumns = new Vector(10);
         for(int i = 0; i < 10 ; i++) {
-           iMatchColumns.add(i,new Integer(-1));
+           iMatchColumns.add(i,Integer.valueOf(-1));
         }
 
         strMatchColumns = new Vector(10);
@@ -338,7 +338,7 @@
         rs = null;
 
         try {
-           jdbcResBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
         } catch(IOException ioe) {
             throw new RuntimeException(ioe);
         }
@@ -375,7 +375,7 @@
 
         iMatchColumns = new Vector(10);
         for(int i = 0; i < 10 ; i++) {
-           iMatchColumns.add(i,new Integer(-1));
+           iMatchColumns.add(i,Integer.valueOf(-1));
         }
 
         strMatchColumns = new Vector(10);
@@ -430,7 +430,7 @@
         rs = res;
 
         try {
-           jdbcResBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
+           resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
         } catch(IOException ioe) {
             throw new RuntimeException(ioe);
         }
@@ -465,7 +465,7 @@
 
         iMatchColumns = new Vector(10);
         for(int i = 0; i < 10 ; i++) {
-           iMatchColumns.add(i,new Integer(-1));
+           iMatchColumns.add(i,Integer.valueOf(-1));
         }
 
         strMatchColumns = new Vector(10);
@@ -517,7 +517,7 @@
         // to the db, implies undesirable state so throw exception
 
         if (conn == null && ps == null && rs == null ) {
-            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.invalstate").toString());
+            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.invalstate").toString());
         }
     }
 
@@ -593,28 +593,28 @@
         try {
             ps.setEscapeProcessing(getEscapeProcessing());
         } catch (SQLException ex) {
-            System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +
+            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setescapeprocessing").toString() +
                                 ex.getLocalizedMessage());
         }
 
         try {
             ps.setMaxFieldSize(getMaxFieldSize());
         } catch (SQLException ex) {
-            System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +
+            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxfieldsize").toString() +
                                 ex.getLocalizedMessage());
         }
 
         try {
             ps.setMaxRows(getMaxRows());
         } catch (SQLException ex) {
-           System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +
+           System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setmaxrows").toString() +
                                 ex.getLocalizedMessage());
         }
 
         try {
             ps.setQueryTimeout(getQueryTimeout());
         } catch (SQLException ex) {
-           System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +
+           System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.setquerytimeout").toString() +
                                 ex.getLocalizedMessage());
         }
 
@@ -651,7 +651,7 @@
                 }
             }
             catch (javax.naming.NamingException ex) {
-                throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.connect").toString());
+                throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.connect").toString());
             }
 
         } else if (getUrl() != null) {
@@ -681,7 +681,7 @@
             }
             ps = conn.prepareStatement(getCommand(),ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
         } catch (SQLException ex) {
-            System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.prepare").toString() +
+            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.prepare").toString() +
                                 ex.getLocalizedMessage());
 
             if (ps != null)
@@ -721,15 +721,15 @@
                     if (param[0] instanceof java.sql.Date ||
                         param[0] instanceof java.sql.Time ||
                         param[0] instanceof java.sql.Timestamp) {
-                        System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.detecteddate"));
+                        System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detecteddate"));
                         if (param[1] instanceof java.util.Calendar) {
-                            System.err.println(jdbcResBundle.handleGetObject("jdbcrowsetimpl.detectedcalendar"));
+                            System.err.println(resBundle.handleGetObject("jdbcrowsetimpl.detectedcalendar"));
                             ps.setDate(i + 1, (java.sql.Date)param[0],
                                        (java.util.Calendar)param[1]);
                             continue;
                         }
                         else {
-                            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
+                            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
                         }
                     }
 
@@ -770,7 +770,7 @@
                                               (java.io.InputStream)param[0],
                                               ((Integer)param[1]).intValue());
                         default:
-                            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
+                            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
                         }
                     }
 
@@ -784,7 +784,7 @@
                         continue;
                     }
 
-                    throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
+                    throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.paramtype").toString());
 
                 } else {
                     // common case - this catches all SQL92 types
@@ -3749,12 +3749,12 @@
          for( int j= 0 ;j < columnIdxes.length; j++) {
             i_val = (Integer.parseInt(iMatchColumns.get(j).toString()));
             if(columnIdxes[j] != i_val) {
-               throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());
+               throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());
             }
          }
 
          for( int i = 0;i < columnIdxes.length ;i++) {
-            iMatchColumns.set(i,new Integer(-1));
+            iMatchColumns.set(i,Integer.valueOf(-1));
          }
     }
 
@@ -3776,7 +3776,7 @@
 
         for(int j = 0 ;j < columnIdxes.length; j++) {
            if( !columnIdxes[j].equals(strMatchColumns.get(j)) ){
-              throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());
+              throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString());
            }
         }
 
@@ -3800,7 +3800,7 @@
         String []str_temp = new String[strMatchColumns.size()];
 
         if( strMatchColumns.get(0) == null) {
-           throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());
+           throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());
         }
 
         strMatchColumns.copyInto(str_temp);
@@ -3825,7 +3825,7 @@
         i_val = ((Integer)iMatchColumns.get(0)).intValue();
 
         if( i_val == -1 ) {
-           throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());
+           throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString());
         }
 
 
@@ -3859,11 +3859,11 @@
 
         for(int j = 0 ; j < columnIdxes.length; j++) {
            if( columnIdxes[j] < 0 ) {
-              throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
+              throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
            }
         }
         for(int i = 0 ;i < columnIdxes.length; i++) {
-           iMatchColumns.add(i,new Integer(columnIdxes[i]));
+           iMatchColumns.add(i,Integer.valueOf(columnIdxes[i]));
         }
     }
 
@@ -3886,7 +3886,7 @@
 
         for(int j = 0; j < columnNames.length; j++) {
            if( columnNames[j] == null || columnNames[j].equals("")) {
-              throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
+              throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
            }
         }
         for( int i = 0; i < columnNames.length; i++) {
@@ -3915,10 +3915,10 @@
     public void setMatchColumn(int columnIdx) throws SQLException {
         // validate, if col is ok to be set
         if(columnIdx < 0) {
-            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
+            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
         } else {
             // set iMatchColumn
-            iMatchColumns.set(0, new Integer(columnIdx));
+            iMatchColumns.set(0, Integer.valueOf(columnIdx));
             //strMatchColumn = null;
         }
     }
@@ -3940,8 +3940,8 @@
      */
     public void setMatchColumn(String columnName) throws SQLException {
         // validate, if col is ok to be set
-        if(columnName.equals(null) || ((columnName = columnName.trim()) == "" )) {
-            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
+        if(columnName == null || (columnName= columnName.trim()).equals("")) {
+            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
         } else {
             // set strMatchColumn
             strMatchColumns.set(0, columnName);
@@ -3965,13 +3965,13 @@
      */
     public void unsetMatchColumn(int columnIdx) throws SQLException {
         // check if we are unsetting the SAME column
-        if(! iMatchColumns.get(0).equals(new Integer(columnIdx) )  ) {
-            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
+        if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) )  ) {
+            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
         } else if(strMatchColumns.get(0) != null) {
-            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString());
+            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString());
         } else {
                 // that is, we are unsetting it.
-               iMatchColumns.set(0, new Integer(-1));
+               iMatchColumns.set(0, Integer.valueOf(-1));
         }
     }
 
@@ -3995,9 +3995,9 @@
         columnName = columnName.trim();
 
         if(!((strMatchColumns.get(0)).equals(columnName))) {
-            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
+            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
         } else if( ((Integer)(iMatchColumns.get(0))).intValue() > 0) {
-            throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.usecolid").toString());
+            throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolid").toString());
         } else {
             strMatchColumns.set(0, null);   // that is, we are unsetting it.
         }
@@ -4152,7 +4152,7 @@
     private void checkTypeConcurrency() throws SQLException {
         if(rs.getType() == TYPE_FORWARD_ONLY ||
            rs.getConcurrency() == CONCUR_READ_ONLY) {
-              throw new SQLException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.resnotupd").toString());
+              throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.resnotupd").toString());
          }
     }
 
@@ -4642,7 +4642,7 @@
      * @since 6.0
      */
     public SQLXML getSQLXML(int columnIndex) throws SQLException {
-        throw new SQLFeatureNotSupportedException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
+        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
     }
 
     /**
@@ -4653,7 +4653,7 @@
      * @throws SQLException if a database access error occurs
      */
     public SQLXML getSQLXML(String colName) throws SQLException {
-        throw new SQLFeatureNotSupportedException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
+        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
     }
 
     /**
@@ -4668,7 +4668,7 @@
      * @since 6.0
      */
     public RowId getRowId(int columnIndex) throws SQLException {
-        throw new SQLFeatureNotSupportedException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
+        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
     }
 
     /**
@@ -4683,7 +4683,7 @@
      * @since 6.0
      */
     public RowId getRowId(String columnName) throws SQLException {
-        throw new SQLFeatureNotSupportedException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
+        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
     }
 
     /**
@@ -4699,7 +4699,7 @@
      * @since 6.0
      */
     public void updateRowId(int columnIndex, RowId x) throws SQLException {
-        throw new SQLFeatureNotSupportedException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
+        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
     }
 
     /**
@@ -4715,7 +4715,7 @@
      * @since 6.0
      */
     public void updateRowId(String columnName, RowId x) throws SQLException {
-        throw new SQLFeatureNotSupportedException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
+        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
     }
 
     /**
@@ -4725,7 +4725,7 @@
      * @since 6.0
      */
     public int getHoldability() throws SQLException {
-        throw new SQLFeatureNotSupportedException(jdbcResBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
+        throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toS