changeset 3273:cb3c0ffb27bb

Merge
author lana
date Thu, 23 Dec 2010 00:03:46 -0800
parents 1513ccf103a9 83480217896c
children 155d91257957
files src/share/classes/java/dyn/BootstrapMethod.java src/share/classes/java/dyn/LinkagePermission.java src/share/classes/java/dyn/MethodHandleProvider.java src/share/classes/sun/dyn/JavaMethodHandle.java src/share/demo/nio/zipfs/META-INF/services/java.nio.file.spi.FileSystemProvider src/share/demo/nio/zipfs/com/sun/nio/zipfs/JarFileSystemProvider.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipCoder.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipConstants.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipDirectoryStream.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipFileAttributeView.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipFileAttributes.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipFileStore.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipFileSystem.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipFileSystemProvider.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipInfo.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipPath.java src/share/demo/nio/zipfs/com/sun/nio/zipfs/ZipUtils.java test/java/dyn/JavaDocExamples.java
diffstat 313 files changed, 18385 insertions(+), 8812 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Dec 22 13:49:23 2010 -0800
+++ b/.hgtags	Thu Dec 23 00:03:46 2010 -0800
@@ -96,3 +96,5 @@
 ecab7eefb8f2326fd90fb632f47f1b6f81e928f8 jdk7-b119
 37d74e29687cf07c2bf9411af58c7e42440855c3 jdk7-b120
 a661d8587b5d8986aacae086f5df66af9e1a96b1 jdk7-b121
+ac311eb325bfc763698219252bf3cee9e091f3af jdk7-b122
+869190935eedee7750d955019ab2a1b80f0a13a8 jdk7-b123
--- a/make/common/Defs.gmk	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/common/Defs.gmk	Thu Dec 23 00:03:46 2010 -0800
@@ -251,8 +251,8 @@
 # Localizations for the different parts of the product beyond English
 #
 
-JRE_LOCALES   = de es fr it ja ko sv zh_CN zh_TW zh_HK
-PLUGIN_LOCALES = de es fr it ja ko sv zh_CN zh_TW zh_HK
+JRE_LOCALES   = de es fr it ja ko pt_BR sv zh_CN zh_TW zh_HK
+PLUGIN_LOCALES = de es fr it ja ko pt_BR sv zh_CN zh_TW zh_HK
 JDK_LOCALES  = ja zh_CN
 
 #
--- a/make/common/shared/Defs-linux.gmk	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/common/shared/Defs-linux.gmk	Thu Dec 23 00:03:46 2010 -0800
@@ -123,7 +123,7 @@
 
 # GCC29_COMPILER_PATH: is the path to where the gcc 2.9 compiler is installed
 #  NOTE: Must end with / so that it could be empty, allowing PATH usage.
-ifneq "$(origin ALT_GCC29_COMPILER_PATH)" "undefined"
+ifdef ALT_GCC29_COMPILER_PATH
   GCC29_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC29_COMPILER_PATH))
 else
   GCC29_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(PLATFORM)/gcc29/usr/
--- a/make/common/shared/Defs-versions.gmk	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/common/shared/Defs-versions.gmk	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 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,7 +65,7 @@
 #   If we are using freetype, the freetype version expected.
 #
 # REQUIRED_GCC_VER
-#   Solaris and Linux only. The required version of gcc/g++ for the plugin.
+#   Solaris and Linux only. The required version of gcc/g++ for the legacy OJI plugin.
 #
 # REQUIRED_LINK_VER
 #   Windows only: The version of link.exe expected.
@@ -193,7 +193,7 @@
 REQUIRED_ANT_VER          = 1.6.3
 REQUIRED_BOOT_VER         = 1.6
 REQUIRED_FREETYPE_VERSION = 2.3.0
-REQUIRED_MAKE_VER         = 3.78
+REQUIRED_MAKE_VER         = 3.81
 REQUIRED_UNZIP_VER        = 5.12
 REQUIRED_ZIP_VER          = 2.2
 
--- a/make/common/shared/Defs.gmk	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/common/shared/Defs.gmk	Thu Dec 23 00:03:46 2010 -0800
@@ -287,9 +287,12 @@
   FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
 else
   BUILD_NUMBER = b00
-  BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
-  CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]')
-  USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' )
+  ifndef USER_RELEASE_SUFFIX
+    BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M')
+    CLEAN_USERNAME := $(shell $(ECHO) "$(USER)" | $(TR) -d -c '[:alnum:]')
+    USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' )
+  endif
+  export USER_RELEASE_SUFFIX
   FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
 endif
 
@@ -335,7 +338,9 @@
 
 # Include any private definitions for this set of workspaces
 _PRIVATE_DEFS_FILE=$(JDK_MAKE_SHARED_DIR)/PrivateDefs.gmk
-USING_PRIVATE_DEFS:=$(shell if [ -f $(_PRIVATE_DEFS_FILE) ]; then echo true; else echo false; fi)
+ifeq ($(USING_PRIVATE_DEFS),)
+  USING_PRIVATE_DEFS:=$(shell if [ -f $(_PRIVATE_DEFS_FILE) ]; then echo true; else echo false; fi)
+endif
 ifeq ($(USING_PRIVATE_DEFS),true)
 dummy:=$(warning "WARNING: Using definitions from $(_PRIVATE_DEFS_FILE)")
 include $(_PRIVATE_DEFS_FILE)
--- a/make/common/shared/Sanity.gmk	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/common/shared/Sanity.gmk	Thu Dec 23 00:03:46 2010 -0800
@@ -99,12 +99,16 @@
       echo "RedHat"; \
     elif [ -f /etc/SuSE-release ] ; then \
       echo "SuSE"; \
+    elif [ -f /etc/lsb-release ] ; then \
+      $(EGREP) DISTRIB_ID /etc/lsb-release | $(SED) -e 's@.*DISTRIB_ID=\(.*\)@\1@'; \
     else \
       echo "Unknown"; \
     fi)
   OS_VARIANT_VERSION := $(shell \
     if [ "$(OS_VARIANT_NAME)" = "Fedora" ] ; then \
       $(CAT) /etc/fedora-release | $(HEAD) -1 | $(NAWK) '{ print $$3; }' ; \
+    elif [ -f /etc/lsb-release ] ; then \
+      $(EGREP) DISTRIB_RELEASE /etc/lsb-release | $(SED) -e 's@.*DISTRIB_RELEASE=\(.*\)@\1@'; \
     fi)
   ALSA_INCLUDE=/usr/include/alsa/version.h
   ALSA_LIBRARY=/usr/lib/libasound.so
@@ -279,7 +283,7 @@
 	fi
 
 ######################################################
-# Check the OS version (windows and linus have release name checks)
+# Check the OS version (windows and linux have release name checks)
 #   NOTE: OPENJDK explicitly does not check for OS release information.
 #         Unless we know for sure that it will not build somewhere, we cannot
 #         generate a fatal sanity error, and a warning about the official
@@ -1389,20 +1393,21 @@
 endif
 sane-alsa-headers:
 ifdef REQUIRED_ALSA_VERSION
-        if [ "$(ALSA_CHECK)" != "same" -a "$(ALSA_CHECK)" != "newer"  ] ; then \
-	    $(ECHO) "ERROR: The ALSA version must be $(REQUIRED_ALSA_VERSION) or higher. \n" \
-	      "      You have the following ALSA version installed: $${alsa_version) \n" \
-	      "      Please reinstall ALSA (drivers and lib). You can download \n" \
-	      "      the source distribution from http://www.alsa-project.org \n" \
-	      "      or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
-	      "" >> $(ERROR_FILE) ; \
-	  fi \
+	@if [ "$(ALSA_CHECK)" != "missing" ] ; then \
+	    if [ "$(ALSA_CHECK)" != "same" -a "$(ALSA_CHECK)" != "newer"  ] ; then \
+		$(ECHO) "ERROR: The ALSA version must be $(REQUIRED_ALSA_VERSION) or higher. \n" \
+		"      You have the following ALSA version installed: $${alsa_version} \n" \
+		"      Please reinstall ALSA (drivers and lib). You can download \n" \
+		"      the source distribution from http://www.alsa-project.org \n" \
+		"      or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
+		"" >> $(ERROR_FILE) ; \
+	    fi ; \
 	else \
-	  $(ECHO) "ERROR: You seem to not have installed ALSA $(REQUIRED_ALSA_VERSION) or higher. \n" \
-	  "      Please install ALSA (drivers and lib). You can download the \n" \
-	  "      source distribution from http://www.alsa-project.org or go to \n" \
-	  "      http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
-	  "" >> $(ERROR_FILE) ; \
+	    $(ECHO) "ERROR: You seem to not have installed ALSA $(REQUIRED_ALSA_VERSION) or higher. \n" \
+	    "      Please install ALSA (drivers and lib). You can download the \n" \
+	    "      source distribution from http://www.alsa-project.org or go to \n" \
+	    "      http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
+	    "" >> $(ERROR_FILE) ; \
 	fi
 endif
 
@@ -1476,20 +1481,20 @@
 endif
 
 ######################################################
-# Check the Solaris GNU c++ compiler for solaris plugin
+# Check the GNU C++ compiler for OJI plugin
 ######################################################
 sane-gcc-compiler:
-ifeq ($(PLATFORM), solaris)
-  ifndef OPENJDK
-    @if [ -r $(GCC_COMPILER_PATH) ]; then \
-	  if [ ! "$(GCC_VER)" = $(REQUIRED_GCC_VERSION) ]; then \
-	    $(ECHO) "ERROR: The Solaris GCC compiler version must be $(REQUIRED_GCC_VERSION). \n" \
+ifndef OPENJDK
+  ifeq ($(PLATFORM), solaris)
+	@if [ -r $(GCC_COMPILER_PATH) ]; then \
+	  if [ ! "$(GCC_VER)" = $(REQUIRED_GCC_VER) ]; then \
+	    $(ECHO) "ERROR: The Solaris GCC compiler version must be $(REQUIRED_GCC_VER). \n" \
 	      "      You are using the following compiler version: $(GCC_VER) \n" \
 	      "      The compiler was obtained from the following location: \n" \
 	      "          $(GCC_COMPILER_PATH) \n" \
 	      "      Please change your compiler. \n" \
 	      "" >> $(ERROR_FILE) ; \
-    fi \
+	fi \
 	else \
 	  $(ECHO) "ERROR: You do not have a valid GCC_COMPILER_PATH setting. \n" \
 	    "      Please check your access to \n" \
@@ -1501,15 +1506,16 @@
   endif
 
   ifeq ($(PLATFORM), linux)
+    ifeq ($(ARCH_DATA_MODEL), 32)
     ifdef ALT_GCC29_COMPILER_PATH
 	@if [ ! -x $(ALT_GCC29_COMPILER_PATH)/bin/gcc ]; then \
- 	    $(ECHO) "ERROR: You do not have a valid ALT_GCC29_COMPILER_PATH setting. \n" \
+	    $(ECHO) "ERROR: You do not have a valid ALT_GCC29_COMPILER_PATH setting. \n" \
 	         "      Please check your access to \n" \
 	         "      $(ALT_GCC29_COMPILER_PATH)/bin/gcc \n" \
 	         "      This will affect you if you build the plugin target. \n" \
 	         "" >> $(ERROR_FILE) ; \
     fi
-    endif
+      else
     ifdef ALT_GCC29_PLUGIN_LIB_PATH
 	@if [ ! -r $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so ]; then \
 	    $(ECHO) "Error: You do not have a valid ALT_GCC29_PLUGIN_LIB_PATH setting. \n" \
@@ -1523,13 +1529,15 @@
 	    $(ECHO) "ERROR: You do not have a valid GCC29_COMPILER_PATH setting. \n" \
 	    	    " Please check your access to \n" \
 	    	    " $(GCC29_COMPILER_PATH) \n" \
-	    	    " and/or check your value of ALT_GCC29_COMPILER_PATH. \n" \
+	      " and/or check your value of ALT_GCC29_COMPILER_PATH or ALT_GCC29_PLUGIN_LIB_PATH \n" \
 	    	    " This will affect you if you build the plugin target. \n" \
 	    	    "" >> $(ERROR_FILE) ; \
 	fi
-    endif
-  endif
-endif
+        endif # ALT_GCC29_PLUGIN_LIB_PATH
+      endif # ALT_GCC29_COMPILER_PATH 
+    endif # ARCH_DATA_MODEL, 32
+  endif # LINUX
+endif  # OPEN_JDK
 
 
 ######################################################
--- a/make/docs/Makefile	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/docs/Makefile	Thu Dec 23 00:03:46 2010 -0800
@@ -190,7 +190,6 @@
 # Common javadoc options used by all
 COMMON_JAVADOCFLAGS =					\
                 $(NO_PROPRIETARY_API_WARNINGS)          \
-		-source 1.5				\
 		-quiet					\
                 -use					\
                 -keywords				\
--- a/make/java/dyn/Makefile	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/java/dyn/Makefile	Thu Dec 23 00:03:46 2010 -0800
@@ -36,9 +36,7 @@
 LANGUAGE_VERSION = -source 7
 CLASS_VERSION = -target 7
 
-# Actually, it will be less disruptive to compile with the same
-# -target option as the rest of the system, and just turn on
-# the specific compiler option we need here:
-OTHER_JAVACFLAGS = -XDinvokedynamic
+# Tell the compiler not to accept transitional forms.
+OTHER_JAVACFLAGS = -XDallowTransitionalJSR292=no
 
 include $(BUILDDIR)/common/Classes.gmk
--- a/make/java/java/FILES_java.gmk	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/java/java/FILES_java.gmk	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2008, 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
@@ -137,6 +137,7 @@
     java/lang/Comparable.java \
     java/lang/Readable.java \
     java/lang/Override.java \
+    java/lang/SafeVarargs.java \
     java/lang/SuppressWarnings.java \
     java/lang/ref/Reference.java \
         java/lang/ref/SoftReference.java \
--- a/make/java/util/FILES_java.gmk	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/java/util/FILES_java.gmk	Thu Dec 23 00:03:46 2010 -0800
@@ -37,4 +37,5 @@
         sun/util/resources/TimeZoneNames_es.java \
         sun/util/resources/TimeZoneNames_fr.java \
         sun/util/resources/TimeZoneNames_it.java \
+        sun/util/resources/TimeZoneNames_pt_BR.java \
         sun/util/resources/TimeZoneNames_sv.java
--- a/make/jprt.gmk	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/jprt.gmk	Thu Dec 23 00:03:46 2010 -0800
@@ -26,9 +26,6 @@
 # JPRT rule to build this workspace
 
 JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
-ifdef JPRT_BUILD_VERSION
-  MILESTONE=$(JPRT_BUILD_VERSION)
-endif
 
 jprt_build_product:  all images
 	( $(CD) $(OUTPUTDIR)/j2sdk-image && \
--- a/make/mkdemo/nio/zipfs/Makefile	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/mkdemo/nio/zipfs/Makefile	Thu Dec 23 00:03:46 2010 -0800
@@ -33,8 +33,8 @@
 include $(BUILDDIR)/common/Defs.gmk
 
 DEMO_ROOT       = $(SHARE_SRC)/demo/nio/$(DEMONAME)
-DEMO_TOPFILES   = ./README.txt
-DEMO_SRCDIR     = $(DEMO_ROOT)
+DEMO_TOPFILES   = README.txt Demo.java
+DEMO_SRCDIR     = $(DEMO_ROOT)/src
 DEMO_DESTDIR    = $(DEMODIR)/nio/$(DEMONAME)
 
 #
@@ -42,10 +42,10 @@
 #
 include $(BUILDDIR)/common/Demo.gmk
 
-#EXTJAR = $(EXTDIR)/$(DEMONAME).jar
-#
-#all : build $(EXTJAR)
-#
-#$(EXTJAR) : $(DEMO_JAR)
-#	$(prep-target)
-#	$(CP) $(DEMO_JAR) $(EXTJAR)
+EXTJAR = $(EXTDIR)/$(DEMONAME).jar
+
+all : build $(EXTJAR)
+
+$(EXTJAR) : $(DEMO_JAR)
+	$(prep-target)
+	$(CP) $(DEMO_JAR) $(EXTJAR)
--- a/make/sun/awt/Makefile	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/sun/awt/Makefile	Thu Dec 23 00:03:46 2010 -0800
@@ -366,11 +366,12 @@
 	fontconfig.properties				\
 	fontconfig.RedHat.properties			\
 	fontconfig.RedHat.2.1.properties		\
-	fontconfig.RedHat.3.properties		\
+	fontconfig.RedHat.3.properties		        \
 	fontconfig.RedHat.4.properties			\
 	fontconfig.Sun.properties			\
 	fontconfig.Turbo.properties			\
-	fontconfig.SuSE.properties
+	fontconfig.SuSE.10.properties                   \
+	fontconfig.SuSE.11.properties
 endif
 
 FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
--- a/make/templates/bsd-header	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/templates/bsd-header	Thu Dec 23 00:03:46 2010 -0800
@@ -1,4 +1,4 @@
-Copyright %YEARS% Sun Microsystems, Inc.  All Rights Reserved.
+Copyright (c) %YEARS% Oracle and/or its affiliates. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
@@ -26,3 +26,4 @@
 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
--- a/make/templates/gpl-cp-header	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/templates/gpl-cp-header	Thu Dec 23 00:03:46 2010 -0800
@@ -1,4 +1,4 @@
-Copyright %YEARS% Sun Microsystems, Inc.  All Rights Reserved.
+Copyright (c) %YEARS% 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
@@ -20,3 +20,4 @@
 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	Wed Dec 22 13:49:23 2010 -0800
+++ b/make/templates/gpl-header	Thu Dec 23 00:03:46 2010 -0800
@@ -1,4 +1,4 @@
-Copyright %YEARS% Sun Microsystems, Inc.  All Rights Reserved.
+Copyright (c) %YEARS% 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
@@ -18,3 +18,4 @@
 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.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,146 @@
+#
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used be the Accessibility package.
+#
+# When this file is read in, the strings are put into the 
+# defaults table.  This is an implementation detail of the current
+# workings of Accessibility.  DO NOT DEPEND ON THIS.  
+# This may change in future versions of Accessibility as we improve 
+# localization support.
+#
+# @author  Lynn Monsanto
+
+#
+# accessible roles
+#
+alert=alerta
+awtcomponent=componente AWT
+checkbox=caixa de sele\u00e7\u00e3o
+colorchooser=seletor de cores
+columnheader=cabe\u00e7alho da coluna
+combobox=caixa de combina\u00e7\u00e3o
+canvas=tela
+desktopicon=\u00edcone da \u00e1rea de trabalho
+desktoppane=painel da \u00e1rea de trabalho
+dialog=caixa de di\u00e1logo
+directorypane=painel do diret\u00f3rio
+glasspane=painel transparente
+filechooser=seletor de arquivos
+filler=preenchimento
+frame=quadro
+internalframe=quadro interno
+label=r\u00f3tulo
+layeredpane=painel em camadas
+list=lista
+listitem=item da lista
+menubar=barra de menus
+menu=menu
+menuitem=item do menu
+optionpane=painel de op\u00e7\u00f5es
+pagetab=aba da p\u00e1gina
+pagetablist=lista de abas da p\u00e1gina
+panel=painel
+passwordtext=texto da senha
+popupmenu=menu pop-up
+progressbar=barra de progresso
+pushbutton=bot\u00e3o de a\u00e7\u00e3o
+radiobutton=bot\u00e3o de op\u00e7\u00e3o
+rootpane=painel base
+rowheader=cabe\u00e7alho da linha
+scrollbar=barra de rolagem
+scrollpane=painel de rolagem
+separator=separador
+slider=controle deslizante
+splitpane=painel dividido
+swingcomponent=componente swing
+table=tabela
+text=texto
+tree=\u00e1rvore
+togglebutton=bot\u00e3o de altern\u00e2ncia
+toolbar=barra de ferramentas
+tooltip=dica de ferramenta
+unknown=desconhecido
+viewport=janela de visualiza\u00e7\u00e3o
+window=janela
+#
+# accessible relations
+#
+labelFor=r\u00f3tulo de
+labeledBy=rotulado por
+memberOf=membro de 
+controlledBy=controlledBy
+controllerFor=controllerFor
+#
+# accessible states
+#
+active=ativo
+armed=armado
+busy=ocupado
+checked=selecionado
+collapsed=recolhido
+editable=edit\u00e1vel
+expandable=expans\u00edvel
+expanded=expandido
+enabled=habilitado
+focusable=focaliz\u00e1vel
+focused=focalizado
+iconified=iconizado
+modal=modal
+multiline=v\u00e1rias linhas
+multiselectable=m\u00faltipla escolha
+opaque=opaco
+pressed=pressionado
+resizable=redimension\u00e1vel
+selectable=selecion\u00e1vel
+selected=selecionado
+showing=exibindo
+singleline=linha \u00fanica
+transient=transit\u00f3rio
+visible=vis\u00edvel
+vertical=vertical
+horizontal=horizontal
+#
+# accessible actions
+#
+toggle expandir=alternar expandir
+
+# new relations, roles and states for J2SE 1.5.0
+
+# 
+# accessible relations
+#
+flowsTo=fluxos para
+flowsFrom=fluxos de
+subwindowOf=subjanela de
+parentWindowOf=janela pai de
+embeds=integra
+embeddedBy=integrado por
+childNodeOf=n\u00f3 filho de
+
+#
+# accessible roles
+#
+header=cabe\u00e7alho
+footer=rodap\u00e9
+paragraph=par\u00e1grafo
+ruler=r\u00e9gua
+editbar=barra de edi\u00e7\u00e3o
+progressMonitor=monitor de progresso
+
+#
+# accessible states
+#
+managesDescendants=gerencia descendentes
+indeterminate=indeterminado
+truncated=truncado
+
+# new for J2SE 1.6.0
+
+#
+# accessible roles
+#
+htmlcontainer=cont\u00eainer HTML
+
+#
+# END OF MATERIAL TO LOCALIZE
+#
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_pt_BR.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,81 @@
+# Refer to the note in basic.properties for a description as to what
+# the mnemonics correspond to and how to calculate them.
+
+
+
+# GTK specific properties
+
+# GTK color chooser properties:
+GTKColorChooserPanel.nameText=Seletor de cores do GTK
+# mnemonic as a VK_ constant
+GTKColorChooserPanel.mnemonic=71
+# Can also define GTKColorChooserPanel.dispalyedMnemonicIndex if you
+# want an index other than would normally be underlined by
+# GTKColorChooserPanel.mnemonic to be underlined. This is only useful
+# if GTKColorChooserPanel.nameText defines the mnemonic character more
+# than once and you want a character other than the first underlined.
+
+# Text and mnemonics for the spinner. You can also defined a different
+# index for the mnemonic via xxxMnemonicIndex, for example
+# GTKColorChooserPanel.hueMnemonicIndex=1 would indicate the second
+# character of GTKColorChooserPanel.hueText should be underlined to
+# represent the mnemonic.
+GTKColorChooserPanel.hueText=Matiz:
+GTKColorChooserPanel.hueMnemonic=72
+
+GTKColorChooserPanel.redText=Vermelho:
+GTKColorChooserPanel.redMnemonic=69
+
+GTKColorChooserPanel.saturationText=Satura\u00e7\u00e3o:
+GTKColorChooserPanel.saturationMnemonic=83
+
+GTKColorChooserPanel.greenText=Verde:
+GTKColorChooserPanel.greenMnemonic=71
+
+GTKColorChooserPanel.valueText=Valor:
+GTKColorChooserPanel.valueMnemonic=86
+
+GTKColorChooserPanel.blueText=Azul:
+GTKColorChooserPanel.blueMnemonic=66
+
+GTKColorChooserPanel.colorNameText=Nome da cor:
+GTKColorChooserPanel.colorNameMnemonic=78
+
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.acceptAllFileFilterText=Todos os arquivos
+FileChooser.newFolderButtonText=Nova pasta
+FileChooser.newFolderButtonMnemonic=78
+FileChooser.newFolderDialogText=Nome da pasta:
+FileChooser.deleteFileButtonText=Excluir arquivo
+FileChooser.deleteFileButtonMnemonic=76
+FileChooser.renameFileButtonText=Renomear arquivo
+FileChooser.renameFileButtonMnemonic=82
+FileChooser.cancelButtonText=Cancelar
+FileChooser.cancelButtonMnemonic=67
+FileChooser.saveButtonText=OK
+FileChooser.saveButtonMnemonic=79
+FileChooser.openButtonText=OK
+FileChooser.openButtonMnemonic=79
+FileChooser.saveDialogTitleText=Salvar
+FileChooser.openDialogTitleText=Abrir
+FileChooser.pathLabelText=Sele\u00e7\u00e3o:
+FileChooser.filterLabelText=Filtro:
+FileChooser.pathLabelMnemonic=83
+FileChooser.foldersLabelText=Pastas
+FileChooser.foldersLabelMnemonic=68
+FileChooser.filesLabelText=Arquivos
+FileChooser.filesLabelMnemonic=70
+
+FileChooser.cancelButtonToolTipText=Anular caixa de di\u00e1logo do seletor de arquivos.
+FileChooser.saveButtonToolTipText=Salvar arquivo selecionado.
+FileChooser.openButtonToolTipText=Abrir arquivo selecionado.
+
+FileChooser.renameFileDialogText=Renomear arquivo "{0}" por
+FileChooser.renameFileErrorTitle=Erro 
+FileChooser.renameFileErrorText=Erro ao renomear o arquivo "{0}" por "{1}"
+
+OptionPane.okButtonMnemonic=79
+OptionPane.cancelButtonMnemonic=67
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_pt_BR.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,39 @@
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used be the Motif Look and Feel.
+# Currently, the following components need this for support:
+#
+#    FileChooser
+#
+# When this file is read in, the strings are put into the 
+# defaults table.  This is an implementation detail of the current
+# workings of Swing.  DO NOT DEPEND ON THIS.  
+# This may change in future versions of Swing as we improve localization 
+# support.
+#
+# Refer to the note in basic.properties for a description as to what
+# the mnemonics correspond to and how to calculate them.
+#
+# @author Steve Wilson
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.acceptAllFileFilterText=*
+FileChooser.cancelButtonText=Cancelar
+FileChooser.saveButtonText=Salvar
+FileChooser.openButtonText=OK
+FileChooser.saveDialogTitleText=Salvar
+FileChooser.openDialogTitleText=Abrir
+FileChooser.updateButtonText=Atualizar
+FileChooser.helpButtonText=Ajuda
+FileChooser.pathLabelText=Inserir caminho ou nome da pasta:
+FileChooser.filterLabelText=Filtro
+FileChooser.foldersLabelText=Pastas
+FileChooser.filesLabelText=Arquivos
+FileChooser.enterFileNameLabelText=Inserir nome de arquivo:
+
+FileChooser.cancelButtonToolTipText=Anular caixa de di\u00e1logo do seletor de arquivos.
+FileChooser.saveButtonToolTipText=Salvar arquivo selecionado.
+FileChooser.openButtonToolTipText=Abrir arquivo selecionado.
+FileChooser.updateButtonToolTipText=Atualizar lista de diret\u00f3rios.
+FileChooser.helpButtonToolTipText=Ajuda do FileChooser.
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_de.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_de.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -33,11 +33,11 @@
 FileChooser.listViewButtonToolTipText=Liste
 FileChooser.listViewButtonAccessibleName=Liste
 FileChooser.listViewActionLabelText=Liste
-FileChooser.detailsViewButtonToolTipText=Einzelheiten
-FileChooser.detailsViewButtonAccessibleName=Einzelheiten
+FileChooser.detailsViewButtonToolTipText=Details
+FileChooser.detailsViewButtonAccessibleName=Details
 FileChooser.viewMenuButtonToolTipText = View Menu
 FileChooser.viewMenuButtonAccessibleName = View Menu
-FileChooser.detailsViewActionLabelText=Einzelheiten
+FileChooser.detailsViewActionLabelText=Details
 FileChooser.refreshActionLabelText=Aktualisieren
 FileChooser.viewMenuLabelText=Ansicht
 FileChooser.fileNameHeaderText=Dateiname
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ja.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ja.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -45,3 +45,6 @@
 FileChooser.fileTypeHeaderText=\u30bf\u30a4\u30d7
 FileChooser.fileDateHeaderText=\u66f4\u65b0\u65e5
 FileChooser.fileAttrHeaderText=\u5c5e\u6027
+FileChooser.directoryOpenButtonText=\u958b\u304f(O)
+FileChooser.openButtonText=\u958b\u304f(O)
+FileChooser.saveButtonText=\u4fdd\u5b58(S)
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ko.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ko.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -45,3 +45,6 @@
 FileChooser.fileTypeHeaderText=\uc885\ub958
 FileChooser.fileDateHeaderText=\uc218\uc815
 FileChooser.fileAttrHeaderText=\uc18d\uc131
+FileChooser.directoryOpenButtonText=\uc5f4\uae30(O)
+FileChooser.openButtonText=\uc5f4\uae30(O)
+FileChooser.saveButtonText=\uc800\uc7a5(S)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_pt_BR.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,44 @@
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used be the Windows Look and Feel.
+# Currently, the following components need this for support:
+#
+#    FileChooser
+#
+# When this file is read in, the strings are put into the 
+# defaults table.  This is an implementation detail of the current
+# workings of Swing.  DO NOT DEPEND ON THIS.  
+# This may change in future versions of Swing as we improve localization 
+# support.
+#
+# Refer to the note in basic.properties for a description as to what
+# the mnemonics correspond to and how to calculate them.
+#
+# @author Steve Wilson
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.lookInLabelText=Consultar em:
+FileChooser.saveInLabelText=Salvar em:
+FileChooser.fileNameLabelText=Nome de arquivo:
+FileChooser.filesOfTypeLabelText=Arquivos de tipo:
+FileChooser.upFolderToolTipText=Um n\u00edvel acima
+FileChooser.upFolderAccessibleName=Acima
+FileChooser.homeFolderToolTipText=In\u00edcio
+FileChooser.homeFolderAccessibleName=In\u00edcio
+FileChooser.newFolderToolTipText=Criar nova pasta
+FileChooser.newFolderAccessibleName=Nova pasta
+FileChooser.newFolderActionLabelText=Nova pasta
+FileChooser.listViewButtonToolTipText=Lista
+FileChooser.listViewButtonAccessibleName=Lista
+FileChooser.listViewActionLabelText=Lista
+FileChooser.detailsViewButtonToolTipText=Detalhes
+FileChooser.detailsViewButtonAccessibleName=Detalhes
+FileChooser.detailsViewActionLabelText=Detalhes
+FileChooser.refreshActionLabelText=Atualizar
+FileChooser.viewMenuLabelText=Exibir
+FileChooser.fileNameHeaderText=Nome
+FileChooser.fileSizeHeaderText=Tamanho
+FileChooser.fileTypeHeaderText=Tipo
+FileChooser.fileDateHeaderText=Modificado
+FileChooser.fileAttrHeaderText=Atributos
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_zh_CN.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_zh_CN.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -45,3 +45,6 @@
 FileChooser.fileTypeHeaderText=\u7c7b\u578b
 FileChooser.fileDateHeaderText=\u4fee\u8ba2\u7248
 FileChooser.fileAttrHeaderText=\u5c5e\u6027
+FileChooser.directoryOpenButtonText=\u6253\u5f00(O)
+FileChooser.openButtonText=\u6253\u5f00(O)
+FileChooser.saveButtonText=\u4fdd\u5b58(S)
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_zh_TW.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_zh_TW.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -45,3 +45,6 @@
 FileChooser.fileTypeHeaderText=\u985e\u578b
 FileChooser.fileDateHeaderText=\u4fee\u6539
 FileChooser.fileAttrHeaderText=\u5c6c\u6027
+FileChooser.directoryOpenButtonText=\u958b\u555f(O)
+FileChooser.openButtonText=\u958b\u555f(O)
+FileChooser.saveButtonText=\u5132\u5b58(S)
--- a/src/share/classes/com/sun/jndi/ldap/BasicControl.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/jndi/ldap/BasicControl.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -113,6 +113,6 @@
       *         ASN.1 BER encoded value.
       */
     public byte[] getEncodedValue() {
-        return value;
+        return value == null ? null : value.clone();
     }
 }
--- a/src/share/classes/com/sun/jndi/ldap/Filter.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/jndi/ldap/Filter.java	Thu Dec 23 00:03:46 2010 -0800
@@ -427,7 +427,10 @@
                     }
                 } else {
                     // descriptor
-                    if (filter[i] != '-' &&
+                    // The underscore ("_") character is not allowed by
+                    // the LDAP specification. We allow it here to
+                    // tolerate the incorrect use in practice.
+                    if (filter[i] != '-' && filter[i] != '_' &&
                         !(filter[i] >= '0' && filter[i] <= '9') &&
                         !(filter[i] >= 'A' && filter[i] <= 'Z') &&
                         !(filter[i] >= 'a' && filter[i] <= 'z')) {
@@ -467,7 +470,10 @@
                     break;
                 }
 
-                if (filter[i] != '-' &&
+                // The underscore ("_") character is not allowed by
+                // the LDAP specification. We allow it here to
+                // tolerate the incorrect use in practice.
+                if (filter[i] != '-' && filter[i] != '_' &&
                         !(filter[i] >= '0' && filter[i] <= '9') &&
                         !(filter[i] >= 'A' && filter[i] <= 'Z') &&
                         !(filter[i] >= 'a' && filter[i] <= 'z')) {
@@ -515,7 +521,10 @@
                             }
                         } else {
                             // descriptor
-                            if (filter[j] != '-' &&
+                            // The underscore ("_") character is not allowed by
+                            // the LDAP specification. We allow it here to
+                            // tolerate the incorrect use in practice.
+                            if (filter[j] != '-' && filter[j] != '_' &&
                                 !(filter[j] >= '0' && filter[j] <= '9') &&
                                 !(filter[j] >= 'A' && filter[j] <= 'Z') &&
                                 !(filter[j] >= 'a' && filter[j] <= 'z')) {
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow: ung\u00fcltige Spaltenanzahl
 cachedrowsetimpl.tablename = Tabellenname darf nicht Null sein
 cachedrowsetimpl.keycols = Ung\u00fcltige Schl\u00fcsselspalten
-cachedrowsetimpl.invalidcol = Ung\u00fcltiger Spaltenindex
 cachedrowsetimpl.opnotsupp = Datenbank unterst\u00fctzt Vorgang nicht
 cachedrowsetimpl.matchcols = \u00dcbereinstimmende Spalten entsprechen nicht den definierten Spalten
 cachedrowsetimpl.setmatchcols = \u00dcbereinstimmende Spalten m\u00fcssen vor dem Abrufen definiert werden
@@ -97,7 +96,7 @@
 joinrowsetimpl.notsupported = Verkn\u00fcpfungstyp wird nicht unterst\u00fctzt
 joinrowsetimpl.initerror = Initialisierungsfehler bei JoinRowSet
 joinrowsetimpl.genericerr = Generischer Anfangsfehler bei joinrowset
-joinrowsetimpl.emptyrowset = Leeres Rowset kann nicht zu JoinRowSet hinzugef\u00fcgt werden
+joinrowsetimpl.emptyrowset = Leeres rowset kann nicht zu diesem JoinRowSet hinzugef\u00fcgt werden
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = Ung\u00fcltiger Status
@@ -117,16 +116,16 @@
 #CachedRowSetReader exceptions
 crsreader.connect = (JNDI) Verbindung nicht m\u00f6glich
 crsreader.paramtype = Parametertyp konnte nicht abgeleitet werden
-crsreader.connecterr = Interner Fehler im RowSetReader: keine Verbindung oder kein Befehl
-crsreader.datedetected = Datum gefunden
-crsreader.caldetected = Kalender gefunden
+crsreader.connecterr = Interner Fehler in RowSetReader: Keine Verbindung oder kein Befehl
+crsreader.datedetected = Datum festgestellt
+crsreader.caldetected = Kalender festgestellt
 
 #CachedRowSetWriter exceptions
 crswriter.connect = Verbindung konnte nicht hergestellt werden
 crswriter.tname = writeData kann Tabellennamen nicht feststellen
 crswriter.params1 = Wert f\u00fcr params1: {0} 
 crswriter.params2 = Wert f\u00fcr params2: {0} 
-crswriter.conflictsno =  Konflikte w\u00e4hrend der Synchronisation 
+crswriter.conflictsno =  Konflikt beim Synchronisieren 
 
 #InsertRow exceptions
 insertrow.novalue = Es wurde kein Wert eingef\u00fcgt
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = Ende von RowSet wurde erreicht. Ung\u00fcltige Cursorposition
 wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** Parsing-Fehler
+wrsxmlreader.parseerr = ** Parsing-Fehler: {0}, Zeile: {1} , uri: {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException: {0}
@@ -151,17 +150,16 @@
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = Fehler beim Definieren der Zuordnung: {0}
 xmlrch.errmetadata = Fehler beim Definieren der Metadaten: {0}
-xmlrch.errinsert = Fehler beim Einf\u00fcgen der Werte: {0}
+xmlrch.errinsertval = Fehler beim Einf\u00fcgen der Werte: {0}
 xmlrch.errconstr = Fehler beim Erstellen der Zeile: {0}
 xmlrch.errdel = Fehler beim L\u00f6schen der Zeile: {0}
-xmlrch.errinsert = Fehler beim Erstellen der Einf\u00fcgezeile: {0}
 xmlrch.errinsdel = Fehler beim Erstellen der Einf\u00fcge- oder L\u00f6schzeile: {0}
 xmlrch.errupdate = Fehler beim Erstellen der Aktualisierungszeile: {0}
-xmlrch.errupdrow = Fehler beim Aktualisieren der Zeile : {0}
+xmlrch.errupdrow = Fehler beim Aktualisieren der Zeile: {0}
 xmlrch.chars = Zeichen:
 xmlrch.badvalue = Fehlerhafter Wert; Eigenschaft darf nicht Null sein.
 xmlrch.badvalue1 = Fehlerhafter Wert; Metadaten d\u00fcrfen nicht Null sein.
-xmlrch.warning =  ** Warnung
+xmlrch.warning =  ** Warnung: {0}, Zeile: {1} , uri: {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = Sperren der Klassifizierung wird nicht unterst\u00fctzt
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_es.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_es.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow: n\u00famero de columnas no v\u00e1lido
 cachedrowsetimpl.tablename = El nombre de la tabla no puede ser nulo
 cachedrowsetimpl.keycols = Columnas clave no v\u00e1lidas
-cachedrowsetimpl.invalidcol = \u00cdndice de columnas no v\u00e1lido
 cachedrowsetimpl.opnotsupp = La base de datos no admite esta operaci\u00f3n
 cachedrowsetimpl.matchcols = Las columnas emparejadas no concuerdan con las definidas
 cachedrowsetimpl.setmatchcols = Configurar emparejamiento de columnas antes de obtenerlas
@@ -76,7 +75,7 @@
 cachedrowsetimpl.pagesize1 = El tama\u00f1o de p\u00e1gina no puede ser mayor que maxRows
 cachedrowsetimpl.fwdonly = ResultSet s\u00f3lo se reenv\u00eda
 cachedrowsetimpl.type = El tipo es: {0}
-cachedrowsetimpl.opnotysupp = Operaci\u00f3n a\u00fan no admitida
+cachedrowsetimpl.opnotysupp = Operaci\u00f3n no admitida todav\u00eda
 cachedrowsetimpl.featnotsupp = Funci\u00f3n no admitida
 
 # WebRowSetImpl exceptions
@@ -111,13 +110,13 @@
 jdbcrowsetimpl.usecolname = Usar nombre de columna como argumento en unsetMatchColumn
 jdbcrowsetimpl.usecolid = Usar ID de columna como argumento en unsetMatchColumn
 jdbcrowsetimpl.resnotupd = ResultSet no se puede actualizar
-jdbcrowsetimpl.opnotysupp = Operaci\u00f3n a\u00fan no admitida
+jdbcrowsetimpl.opnotysupp = Operaci\u00f3n no admitida todav\u00eda
 jdbcrowsetimpl.featnotsupp = Funci\u00f3n no admitida
 
 #CachedRowSetReader exceptions
 crsreader.connect = (JNDI) No se puede conectar
 crsreader.paramtype = No se puede deducir tipo de par\u00e1metro
-crsreader.connecterr = Error interno en RowSetReader: no hay conexi\u00f3n ni comando
+crsreader.connecterr = Error interno en RowSetReader: no hay conexi\u00f3n o comando
 crsreader.datedetected = Fecha detectada
 crsreader.caldetected = Calendario detectado
 
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = Se ha llegado al final de RowSet. Posici\u00f3n de cursor no v\u00e1lida
 wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** Error de an\u00e1lisis
+wrsxmlreader.parseerr = ** Error de an\u00e1lisis: {0} , l\u00ednea: {1} , uri: {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException: {0}
@@ -151,17 +150,16 @@
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = Error al configurar la asignaci\u00f3n: {0}
 xmlrch.errmetadata = Error al configurar metadatos: {0}
-xmlrch.errinsert = Error al insertar los valores: {0}
+xmlrch.errinsertval = Error al insertar los valores: {0}
 xmlrch.errconstr = Error al construir fila: {0}
 xmlrch.errdel = Error al borrar fila: {0}
-xmlrch.errinsert = Error al construir insertar fila: {0}
 xmlrch.errinsdel = Error al construir insertar o suprimir fila: {0}
 xmlrch.errupdate = Error al construir actualizar fila: {0}
 xmlrch.errupdrow = Error al actualizar la fila: {0}
 xmlrch.chars = caracteres:
 xmlrch.badvalue = Valor incorrecto; la propiedad no puede ser nula
 xmlrch.badvalue1 = Valor incorrecto; los metadatos no pueden ser nulos
-xmlrch.warning =  ** Advertencia
+xmlrch.warning =  ** Advertencia: {0} , l\u00ednea: {1} , uri: {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = No se permite bloquear la clasificaci\u00f3n
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_fr.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_fr.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow : Nombre de colonnes non valide
 cachedrowsetimpl.tablename = Le nom du tableau ne peut pas \u00eatre null
 cachedrowsetimpl.keycols = Colonnes de cl\u00e9 non valides
-cachedrowsetimpl.invalidcol = Index de colonne non valide
 cachedrowsetimpl.opnotsupp = Op\u00e9ration non prise en charge par la base de donn\u00e9es
 cachedrowsetimpl.matchcols = Les colonnes correspondantes ne sont pas les m\u00eames que les colonnes d\u00e9finies
 cachedrowsetimpl.setmatchcols = D\u00e9finissez les colonnes correspondantes avant de les prendre
@@ -76,7 +75,7 @@
 cachedrowsetimpl.pagesize1 = La taille de la page ne peut pas \u00eatre sup\u00e9rieure \u00e0 maxRows
 cachedrowsetimpl.fwdonly = ResultSet est en avant seulement
 cachedrowsetimpl.type = Le type est : {0}
-cachedrowsetimpl.opnotysupp = Op\u00e9ration encore non prise en charge
+cachedrowsetimpl.opnotysupp = Op\u00e9ration non encore prise en charge
 cachedrowsetimpl.featnotsupp = Fonction non prise en charge
 
 # WebRowSetImpl exceptions
@@ -97,7 +96,7 @@
 joinrowsetimpl.notsupported = Ce type de jointure n'est pas pris en charge
 joinrowsetimpl.initerror = Erreur d'initialisation de JoinRowSet
 joinrowsetimpl.genericerr = Erreur initiale g\u00e9n\u00e9rique de JoinRowSet
-joinrowsetimpl.emptyrowset = Impossible d'ajouter un ensemble de lignes vide \u00e0 ce JoinRowSet
+joinrowsetimpl.emptyrowset = Impossible d'ajouter un objet RowSet vide \u00e0 ce JoinRowSet
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = \u00c9tat non valide
@@ -111,22 +110,22 @@
 jdbcrowsetimpl.usecolname = Utilisez le nom de la colonne en argument de unsetMatchColumn
 jdbcrowsetimpl.usecolid = Utilisez l'ID de la colonne en argument de unsetMatchColumn
 jdbcrowsetimpl.resnotupd = La mise \u00e0 jour de ResultSet est interdite
-jdbcrowsetimpl.opnotysupp = Op\u00e9ration encore non prise en charge
+jdbcrowsetimpl.opnotysupp = Op\u00e9ration non encore prise en charge
 jdbcrowsetimpl.featnotsupp = Fonction non prise en charge
 
 #CachedRowSetReader exceptions
 crsreader.connect = Impossible de connecter (JNDI)
 crsreader.paramtype = Impossible de d\u00e9duire le type de param\u00e8tre
-crsreader.connecterr = Erreur interne dans RowSetReader\u00a0: aucune connexion ou commande
-crsreader.datedetected = Date d\u00e9tect\u00e9e
-crsreader.caldetected = Calendrier d\u00e9tect\u00e9
+crsreader.connecterr = Erreur interne dans RowSetReader\u00a0: pas de connexion ni de commande
+crsreader.datedetected = Une date a \u00e9t\u00e9 d\u00e9tect\u00e9e
+crsreader.caldetected = Un calendrier a \u00e9t\u00e9 d\u00e9tect\u00e9
 
 #CachedRowSetWriter exceptions
 crswriter.connect = Impossible d'obtenir la connexion
 crswriter.tname = writeData ne peut pas d\u00e9terminer le nom du tableau
 crswriter.params1 = Valeur de params1 : {0} 
 crswriter.params2 = Valeur de params2 : {0} 
-crswriter.conflictsno =  Conflits au cours de la synchronisation 
+crswriter.conflictsno =  conflits lors de la synchronisation 
 
 #InsertRow exceptions
 insertrow.novalue = Aucune valeur n'a \u00e9t\u00e9 ins\u00e9r\u00e9e
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = Fin de RowSet atteinte. Position de curseur non valide
 wrsxmlreader.readxml = readXML : {0}
-wrsxmlreader.parseerr = ** Erreur d'analyse
+wrsxmlreader.parseerr = ** Erreur d''analyse : {0} , ligne : {1} , URI : {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException : {0}
@@ -151,17 +150,16 @@
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = Erreur lors de la d\u00e9finition de Map : {0}
 xmlrch.errmetadata = Erreur lors de la d\u00e9finition des m\u00e9tadonn\u00e9es : {0}
-xmlrch.errinsert = Erreur lors de l''insertion des valeurs : {0}
+xmlrch.errinsertval = Erreur lors de l''insertion des valeurs\u00a0: {0}
 xmlrch.errconstr = Erreur lors de la construction de la ligne : {0}
 xmlrch.errdel = Erreur lors de la suppression de la ligne : {0}
-xmlrch.errinsert = Erreur lors de la construction de la ligne \u00e0 ins\u00e9rer : {0}
 xmlrch.errinsdel = Erreur lors de la construction de la ligne insdel : {0}
 xmlrch.errupdate = Erreur lors de la construction de la ligne \u00e0 mettre \u00e0 jour : {0}
 xmlrch.errupdrow = Erreur lors de la mise \u00e0 jour de la ligne\u00a0: {0}
 xmlrch.chars = caract\u00e8res :
 xmlrch.badvalue = Valeur incorrecte ; null impossible pour cette propri\u00e9t\u00e9
 xmlrch.badvalue1 = Valeur incorrecte ; null impossible pour ces m\u00e9tadonn\u00e9es
-xmlrch.warning =  ** Avertissement
+xmlrch.warning =  ** Avertissement : {0} , ligne : {1} , URI : {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = Le verrouillage de la classification n'est pas pris en charge
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_it.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_it.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow: numero di colonne non valido
 cachedrowsetimpl.tablename = Il nome di tabella non pu\u00f2 essere nullo
 cachedrowsetimpl.keycols = Colonne chiave non valide
-cachedrowsetimpl.invalidcol = Indice di colonna non valido
 cachedrowsetimpl.opnotsupp = Operazione non supportata dal database
 cachedrowsetimpl.matchcols = Le colonne di corrispondenza non coincidono con le colonne impostate
 cachedrowsetimpl.setmatchcols = Impostare le colonne di corrispondenza prima di recuperarle
@@ -76,7 +75,7 @@
 cachedrowsetimpl.pagesize1 = La dimensione della pagina non pu\u00f2 essere superiore a maxRows
 cachedrowsetimpl.fwdonly = ResultSet \u00e8 a solo inoltro
 cachedrowsetimpl.type = Il tipo \u00e8: {0}
-cachedrowsetimpl.opnotysupp = Operazione non ancora supportata
+cachedrowsetimpl.opnotysupp = Operazione attualmente non supportata
 cachedrowsetimpl.featnotsupp = Funzionalit\u00e0 non supportata
 
 # WebRowSetImpl exceptions
@@ -97,7 +96,7 @@
 joinrowsetimpl.notsupported = Questo tipo di unione non \u00e8 supportato
 joinrowsetimpl.initerror = Errore di inizializzazione di JoinRowSet
 joinrowsetimpl.genericerr = Errore iniziale di joinrowset generico
-joinrowsetimpl.emptyrowset = Impossibile aggiungere un rowset al JoinRowSet corrente
+joinrowsetimpl.emptyrowset = Impossibile aggiungere un set di righe vuoto al JoinRowSet corrente
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = Stato non valido
@@ -111,22 +110,22 @@
 jdbcrowsetimpl.usecolname = Utilizzare il nome di colonna come argomento per unsetMatchColumn
 jdbcrowsetimpl.usecolid = Utilizzare l'ID di colonna come argomento per unsetMatchColumn
 jdbcrowsetimpl.resnotupd = ResultSet non \u00e8 aggiornabile
-jdbcrowsetimpl.opnotysupp = Operazione non ancora supportata
+jdbcrowsetimpl.opnotysupp = Operazione attualmente non supportata
 jdbcrowsetimpl.featnotsupp = Funzionalit\u00e0 non supportata
 
 #CachedRowSetReader exceptions
 crsreader.connect = (JNDI) Impossibile stabilire una connessione
 crsreader.paramtype = Impossibile dedurre il tipo di parametro
-crsreader.connecterr = Errore interno in RowSetReader: nessuna connessione o comando disponibile
-crsreader.datedetected = Data rilevata
-crsreader.caldetected = Calendario rilevato
+crsreader.connecterr = Errore interno in RowSetReader: nessuna connessione o comando
+crsreader.datedetected = \u00c8 stata rilevata una data
+crsreader.caldetected = \u00c8 stato rilevato un calendario
 
 #CachedRowSetWriter exceptions
 crswriter.connect = Impossibile stabilire una connessione
 crswriter.tname = writeData non riesce a determinare il nome di tabella
 crswriter.params1 = Valore dei parametri 1: {0} 
 crswriter.params2 = Valore dei parametri 2: {0} 
-crswriter.conflictsno =  conflitti durante la sincronizzazione 
+crswriter.conflictsno =  Conflitti durante la sincronizzazione 
 
 #InsertRow exceptions
 insertrow.novalue = Non \u00e8 stato inserito alcun valore
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = Raggiunta la fine di RowSet. Posizione cursore non valida
 wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** Errore di analisi
+wrsxmlreader.parseerr = **Errore di analisi: {0}, riga: {1}, URI: {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException: {0}
@@ -150,18 +149,17 @@
 
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = Errore durante l''impostazione della mappa: {0}
-xmlrch.errmetadata = Errore durante l'impostazione dei metadati: {0}
-xmlrch.errinsert = Errore durante l''inserimento dei valori: {0}
+xmlrch.errmetadata = Errore durante l''impostazione dei metadati: {0}
+xmlrch.errinsertval = Errore durante l''inserimento dei valori: {0}
 xmlrch.errconstr = Errore durante la costruzione della riga: {0}
 xmlrch.errdel = Errore durante l''eliminazione della riga: {0}
-xmlrch.errinsert = Errore durante la costruzione della riga di inserimento: {0}
 xmlrch.errinsdel = Errore durante la costruzione della riga insdel: {0}
 xmlrch.errupdate = Errore durante la costruzione della riga di aggiornamento: {0}
 xmlrch.errupdrow = Errore durante l''aggiornamento della riga: {0}
 xmlrch.chars = caratteri:
 xmlrch.badvalue = valore non valido; propriet\u00e0 non annullabile
 xmlrch.badvalue1 = valore non valido; metadati non annullabili
-xmlrch.warning =  ** Avviso
+xmlrch.warning =  **Avviso: {0}, riga: {1}, URI: {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = La classificazione di blocco non \u00e8 supportata
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow : \u7121\u52b9\u306a\u5217\u6570
 cachedrowsetimpl.tablename = \u8868\u540d\u306b null \u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002
 cachedrowsetimpl.keycols = \u7121\u52b9\u306a\u30ad\u30fc\u5217
-cachedrowsetimpl.invalidcol = \u7121\u52b9\u306a\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9
 cachedrowsetimpl.opnotsupp = \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u3044\u64cd\u4f5c
 cachedrowsetimpl.matchcols = \u4e00\u81f4\u5217\u304c\u5217\u306e\u30bb\u30c3\u30c8\u3068\u540c\u3058\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
 cachedrowsetimpl.setmatchcols = \u4e00\u81f4\u5217\u3092\u53d6\u5f97\u3059\u308b\u524d\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002
@@ -76,8 +75,8 @@
 cachedrowsetimpl.pagesize1 = \u30da\u30fc\u30b8\u30b5\u30a4\u30ba\u306f maxRows \u3088\u308a\u5927\u304d\u304f\u3066\u306f\u306a\u308a\u307e\u305b\u3093\u3002
 cachedrowsetimpl.fwdonly = ResultSet \u306f\u9806\u65b9\u5411\u306e\u307f\u3067\u3059\u3002
 cachedrowsetimpl.type = \u578b : {0}
-cachedrowsetimpl.opnotysupp = \u3053\u306e\u64cd\u4f5c\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
-cachedrowsetimpl.featnotsupp = \u3053\u306e\u6a5f\u80fd\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
+cachedrowsetimpl.opnotysupp = \u307e\u3060\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u64cd\u4f5c
+cachedrowsetimpl.featnotsupp = \u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u6a5f\u80fd
 
 # WebRowSetImpl exceptions
 webrowsetimpl.nullhash = WebRowSetImpl \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3067\u304d\u307e\u305b\u3093\u3002\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b null \u306e Hashtable \u304c\u4f7f\u7528\u3055\u308c\u307e\u3057\u305f\u3002
@@ -97,7 +96,7 @@
 joinrowsetimpl.notsupported = \u3053\u306e\u578b\u306e\u7d50\u5408\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
 joinrowsetimpl.initerror = JoinRowSet \u521d\u671f\u5316\u30a8\u30e9\u30fc
 joinrowsetimpl.genericerr = \u6c4e\u7528 joinrowset \u306e\u521d\u671f\u30a8\u30e9\u30fc
-joinrowsetimpl.emptyrowset = \u3053\u306e JoinRowSet \u306b\u306f\u7a7a\u306e\u884c\u30bb\u30c3\u30c8\u3092\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3002
+joinrowsetimpl.emptyrowset = \u3053\u306e JoinRowSet \u306b\u7a7a\u306e\u884c\u30bb\u30c3\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = \u7121\u52b9\u306a\u72b6\u614b
@@ -111,13 +110,13 @@
 jdbcrowsetimpl.usecolname = unsetMatchColumn \u3078\u306e\u5f15\u6570\u3068\u3057\u3066\u5217\u540d\u3092\u4f7f\u7528\u3066\u304f\u3060\u3055\u3044\u3002
 jdbcrowsetimpl.usecolid = unsetMatchColumn \u3078\u306e\u5f15\u6570\u3068\u3057\u3066\u5217 ID \u3092\u4f7f\u7528\u3066\u304f\u3060\u3055\u3044\u3002
 jdbcrowsetimpl.resnotupd = ResultSet \u306f\u66f4\u65b0\u3067\u304d\u307e\u305b\u3093\u3002
-jdbcrowsetimpl.opnotysupp = \u3053\u306e\u64cd\u4f5c\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
-jdbcrowsetimpl.featnotsupp = \u3053\u306e\u6a5f\u80fd\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
+jdbcrowsetimpl.opnotysupp = \u307e\u3060\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u64cd\u4f5c
+jdbcrowsetimpl.featnotsupp = \u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u6a5f\u80fd
 
 #CachedRowSetReader exceptions
 crsreader.connect = (JNDI) \u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3002
 crsreader.paramtype = \u30d1\u30e9\u30e1\u30fc\u30bf\u578b\u3092\u63a8\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002
-crsreader.connecterr = RowSetReader \u306e\u5185\u90e8\u30a8\u30e9\u30fc: \u5207\u65ad\u3055\u308c\u3066\u3044\u308b\u304b\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u304c\u5b58\u5728\u3057\u307e\u305b\u3093\u3002
+crsreader.connecterr = RowSetReader \u306e\u5185\u90e8\u30a8\u30e9\u30fc: \u63a5\u7d9a\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u306a\u3057
 crsreader.datedetected = \u65e5\u4ed8\u3092\u691c\u51fa\u3057\u307e\u3057\u305f\u3002
 crsreader.caldetected = \u30ab\u30ec\u30f3\u30c0\u3092\u691c\u51fa\u3057\u307e\u3057\u305f\u3002
 
@@ -126,7 +125,7 @@
 crswriter.tname = writeData \u304c\u8868\u540d\u3092\u5224\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002
 crswriter.params1 = params1 \u306e\u5024 : {0} 
 crswriter.params2 = params2 \u306e\u5024 : {0} 
-crswriter.conflictsno =  \u540c\u671f\u4e2d\u306b\u885d\u7a81\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 
+crswriter.conflictsno =  \u540c\u671f\u4e2d\u306b\u7af6\u5408\u304c\u767a\u751f\u3057\u307e\u3059\u3002 
 
 #InsertRow exceptions
 insertrow.novalue = \u5024\u306f\u633f\u5165\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = RowSet \u306e\u6700\u5f8c\u306b\u5230\u9054\u3057\u307e\u3057\u305f\u3002\u7121\u52b9\u306a\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e
 wrsxmlreader.readxml = readXML : {0}
-wrsxmlreader.parseerr = ** \u69cb\u6587\u89e3\u6790\u30a8\u30e9\u30fc
+wrsxmlreader.parseerr = ** \u89e3\u6790\u30a8\u30e9\u30fc : {0} , \u884c : {1} , URI : {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException : {0}
@@ -151,17 +150,16 @@
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = Map \u8a2d\u5b9a\u30a8\u30e9\u30fc : {0}
 xmlrch.errmetadata = \u30e1\u30bf\u30c7\u30fc\u30bf\u8a2d\u5b9a\u30a8\u30e9\u30fc : {0}
-xmlrch.errinsert = \u5024\u306e\u633f\u5165\u30a8\u30e9\u30fc : {0}
+xmlrch.errinsertval = \u5024\u306e\u633f\u5165\u30a8\u30e9\u30fc : {0}
 xmlrch.errconstr = \u884c\u306e\u751f\u6210\u30a8\u30e9\u30fc : {0}
 xmlrch.errdel = \u884c\u306e\u524a\u9664\u30a8\u30e9\u30fc : {0}
-xmlrch.errinsert = \u633f\u5165\u884c\u306e\u751f\u6210\u30a8\u30e9\u30fc : {0}
 xmlrch.errinsdel = insdel \u884c\u306e\u751f\u6210\u30a8\u30e9\u30fc : {0}
 xmlrch.errupdate = \u66f4\u65b0\u884c\u306e\u751f\u6210\u30a8\u30e9\u30fc : {0}
-xmlrch.errupdrow = \u884c\u306e\u66f4\u65b0\u30a8\u30e9\u30fc: {0}
+xmlrch.errupdrow = \u884c\u306e\u66f4\u65b0\u30a8\u30e9\u30fc : {0}
 xmlrch.chars = \u6587\u5b57 :
-xmlrch.badvalue = \u4e0d\u6b63\u306a\u5024 ; null \u306b\u3067\u304d\u306a\u3044\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc
+xmlrch.badvalue = \u4e0d\u6b63\u306a\u5024 ; null \u306b\u3067\u304d\u306a\u3044\u30d7\u30ed\u30d1\u30c6\u30a3
 xmlrch.badvalue1 = \u4e0d\u6b63\u306a\u5024 ; null \u306b\u3067\u304d\u306a\u3044\u30e1\u30bf\u30c7\u30fc\u30bf
-xmlrch.warning =  ** \u8b66\u544a
+xmlrch.warning =  ** \u8b66\u544a : {0} , \u884c : {1} , URI : {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = \u30ed\u30c3\u30af\u306e\u5206\u985e\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow: \uc798\ubabb\ub41c \uc5f4 \uac1c\uc218\uc785\ub2c8\ub2e4.
 cachedrowsetimpl.tablename = \ud14c\uc774\ube14 \uc774\ub984\uc740 \ub110\uc77c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
 cachedrowsetimpl.keycols = \uc798\ubabb\ub41c \ud0a4 \uc5f4\uc785\ub2c8\ub2e4.
-cachedrowsetimpl.invalidcol = \uc798\ubabb\ub41c \uc5f4 \uc0c9\uc778\uc785\ub2c8\ub2e4.
 cachedrowsetimpl.opnotsupp = \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uc791\uc5c5\uc785\ub2c8\ub2e4.
 cachedrowsetimpl.matchcols = \uc77c\uce58 \uc5f4\uc774 \uc124\uc815\ub41c \uc5f4\uacfc \uac19\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
 cachedrowsetimpl.setmatchcols = \uc77c\uce58 \uc5f4\uc744 \uc124\uc815\ud55c \ub2e4\uc74c\uc5d0 \uac00\uc838\uc624\uc2ed\uc2dc\uc624.
@@ -76,8 +75,8 @@
 cachedrowsetimpl.pagesize1 = \ud398\uc774\uc9c0 \ud06c\uae30\ub294 maxRows\ubcf4\ub2e4 \ud074 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
 cachedrowsetimpl.fwdonly = ResultSet\ub294 \uc804\ub2ec \uc804\uc6a9\uc785\ub2c8\ub2e4.
 cachedrowsetimpl.type = \uc720\ud615: {0}
-cachedrowsetimpl.opnotysupp = \uc791\uc5c5\uc774 \uc544\uc9c1 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-cachedrowsetimpl.featnotsupp = \uae30\ub2a5\uc774 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
+cachedrowsetimpl.opnotysupp = \uc791\uc5c5\uc774 \uc544\uc9c1 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c
+cachedrowsetimpl.featnotsupp = \uae30\ub2a5\uc774 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c
 
 # WebRowSetImpl exceptions
 webrowsetimpl.nullhash = WebRowSetImpl \uc778\uc2a4\ud134\uc2a4\ub97c \uc778\uc2a4\ud134\uc2a4\ud654\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uad6c\uc131\uc790\uc5d0 \ub110 Hashtable\uc774 \uc81c\uacf5\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
@@ -97,7 +96,7 @@
 joinrowsetimpl.notsupported = \uc774 \uacb0\ud569 \uc720\ud615\uc740 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
 joinrowsetimpl.initerror = JoinRowSet \ucd08\uae30\ud654 \uc624\ub958
 joinrowsetimpl.genericerr = \uc77c\ubc18 joinrowset \ucd08\uae30 \uc624\ub958
-joinrowsetimpl.emptyrowset = \uc774 JoinRowSet\uc5d0 \ube48 rowset\uc744 \ucd94\uac00\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
+joinrowsetimpl.emptyrowset = \ube48 rowset\uc744 \uc774 JoinRowSet\uc5d0 \ucd94\uac00\ud560 \uc218 \uc5c6\uc74c
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = \uc798\ubabb\ub41c \uc0c1\ud0dc\uc785\ub2c8\ub2e4.
@@ -111,22 +110,22 @@
 jdbcrowsetimpl.usecolname = \uc5f4 \uc774\ub984\uc744 unsetMatchColumn\uc758 \uc778\uc218\ub85c \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624.
 jdbcrowsetimpl.usecolid = \uc5f4 ID\ub97c unsetMatchColumn\uc758 \uc778\uc218\ub85c \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624.
 jdbcrowsetimpl.resnotupd = ResultSet\uc740 \uc5c5\ub370\uc774\ud2b8\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-jdbcrowsetimpl.opnotysupp = \uc791\uc5c5\uc774 \uc544\uc9c1 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-jdbcrowsetimpl.featnotsupp = \uae30\ub2a5\uc774 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
+jdbcrowsetimpl.opnotysupp = \uc791\uc5c5\uc774 \uc544\uc9c1 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c
+jdbcrowsetimpl.featnotsupp = \uae30\ub2a5\uc774 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c
 
 #CachedRowSetReader exceptions
 crsreader.connect = (JNDI) \uc5f0\uacb0\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
 crsreader.paramtype = \ub9e4\uac1c \ubcc0\uc218 \uc720\ud615\uc744 \ucd94\ub860\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-crsreader.connecterr = RowSetReader \ub0b4\ubd80 \uc624\ub958: \uc5f0\uacb0 \ub610\ub294 \uba85\ub839\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.
-crsreader.datedetected = \ub0a0\uc9dc\uac00 \uac10\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-crsreader.caldetected = \ub2ec\ub825\uc774 \uac10\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
+crsreader.connecterr = RowSetReader\uc758 \ub0b4\ubd80 \uc624\ub958: \uc5f0\uacb0 \ub610\ub294 \uba85\ub839\uc774 \uc5c6\uc74c
+crsreader.datedetected = \ub0a0\uc9dc\uac00 \uac10\uc9c0\ub428
+crsreader.caldetected = \ub2ec\ub825\uc774 \uac10\uc9c0\ub428
 
 #CachedRowSetWriter exceptions
 crswriter.connect = \uc5f0\uacb0\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
 crswriter.tname = writeData\uc5d0\uc11c \ud14c\uc774\ube14 \uc774\ub984\uc744 \ud655\uc778\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
 crswriter.params1 = params1\uc758 \uac12: {0} 
 crswriter.params2 = params2\uc758 \uac12: {0} 
-crswriter.conflictsno =  \ub3d9\uae30\ud654\ud558\ub294 \ub3d9\uc548 \ucda9\ub3cc\ud569\ub2c8\ub2e4. 
+crswriter.conflictsno =  \ub3d9\uae30\ud654\ud558\ub294 \ub3d9\uc548 \ucda9\ub3cc\ud568 
 
 #InsertRow exceptions
 insertrow.novalue = \uac12\uc774 \uc0bd\uc785\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = RowSet\uc758 \ub05d\uc5d0 \ub3c4\ub2ec\ud588\uc2b5\ub2c8\ub2e4. \uc798\ubabb\ub41c \ucee4\uc11c \uc704\uce58\uc785\ub2c8\ub2e4.
 wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** \uad6c\ubb38 \ubd84\uc11d \uc624\ub958
+wrsxmlreader.parseerr = ** \uad6c\ubb38 \ubd84\uc11d \uc624\ub958 : {0} , \ud589 : {1} , uri : {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException: {0}
@@ -151,17 +150,16 @@
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = \ub9e4\ud551\uc744 \uc124\uc815\ud558\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd: {0}
 xmlrch.errmetadata = \uba54\ud0c0\ub370\uc774\ud130\ub97c \uc124\uc815\ud558\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd: {0}
-xmlrch.errinsert = \ub2e4\uc74c \uac12\uc744 \uc0bd\uc785\ud558\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd : {0}
+xmlrch.errinsertval = \ub2e4\uc74c \uac12\uc744 \uc0bd\uc785\ud558\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd : {0}
 xmlrch.errconstr = \ud589\uc744 \ub9cc\ub4dc\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd: {0}
 xmlrch.errdel = \ud589\uc744 \uc81c\uac70\ud558\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd: {0}
-xmlrch.errinsert = insert \ud589\uc744 \ub9cc\ub4dc\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd: {0}
 xmlrch.errinsdel = insdel \ud589\uc744 \ub9cc\ub4dc\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd: {0}
 xmlrch.errupdate = update \ud589\uc744 \ub9cc\ub4dc\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd: {0}
-xmlrch.errupdrow = \ud589 \uc5c5\ub370\uc774\ud2b8 \uc624\ub958: {0}
+xmlrch.errupdrow = \ub2e4\uc74c \ud589\uc744 \uc5c5\ub370\uc774\ud2b8\ud558\ub294 \uc911 \uc624\ub958 \ubc1c\uc0dd : {0}
 xmlrch.chars = \ubb38\uc790:
 xmlrch.badvalue = \uc798\ubabb\ub41c \uac12; \ub110\uc77c \uc218 \uc5c6\ub294 \ub4f1\ub85d \uc815\ubcf4
 xmlrch.badvalue1 = \uc798\ubabb\ub41c \uac12; \ub110\uc77c \uc218 \uc5c6\ub294 \uba54\ud0c0\ub370\uc774\ud130
-xmlrch.warning =  ** \uacbd\uace0
+xmlrch.warning =  ** \uacbd\uace0 : {0} , \ud589 : {1} , uri : {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = \ub4f1\uae09 \uc7a0\uae08\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_pt_BR.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,170 @@
+#
+# 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
+# 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.
+#
+
+# CacheRowSetImpl exceptions
+cachedrowsetimpl.populate = Objeto ResultSet inv\u00e1lido fornecido para preencher o m\u00e9todo
+cachedrowsetimpl.invalidp = Fornecedor de persist\u00eancias inv\u00e1lido gerado
+cachedrowsetimpl.nullhash = N\u00e3o \u00e9 poss\u00edvel instanciar a inst\u00e2ncia CachedRowSetImpl. Hashtable nulo fornecido ao construtor
+cachedrowsetimpl.invalidop = Opera\u00e7\u00e3o inv\u00e1lida durante a inser\u00e7\u00e3o de linha
+cachedrowsetimpl.accfailed = acceptChanges falho
+cachedrowsetimpl.invalidcp = Posi\u00e7\u00e3o inv\u00e1lida do cursor
+cachedrowsetimpl.illegalop = Opera\u00e7\u00e3o ilegal em linha n\u00e3o inserida
+cachedrowsetimpl.clonefail = Clone falho: {0}
+cachedrowsetimpl.invalidcol = \u00cdndice de coluna inv\u00e1lido
+cachedrowsetimpl.invalcolnm = Nome de coluna inv\u00e1lido
+cachedrowsetimpl.boolfail = getBoolen falhou no valor ( {0} ) na coluna {1}
+cachedrowsetimpl.bytefail = getByte falhou no valor ( {0} ) na coluna {1}
+cachedrowsetimpl.shortfail = getShort falhou no valor ( {0} ) na coluna {1}
+cachedrowsetimpl.intfail = getInt falhou no valor ( {0} ) na coluna {1}
+cachedrowsetimpl.longfail = getLong falhou no valor ( {0} ) na coluna {1}
+cachedrowsetimpl.floatfail = getFloat falhou no valor ( {0} ) na coluna {1}
+cachedrowsetimpl.doublefail = getDouble falhou no valor ( {0} ) na coluna {1}
+cachedrowsetimpl.dtypemismt = Tipo de dados incompat\u00edvel 
+cachedrowsetimpl.datefail = getDate falhou no valor ( {0} ) na coluna {1} sem convers\u00e3o dispon\u00edvel
+cachedrowsetimpl.timefail = getTime falhou no valor ( {0} ) na coluna {1} sem convers\u00e3o dispon\u00edvel
+cachedrowsetimpl.posupdate = Atualiza\u00e7\u00f5es posicionadas n\u00e3o suportadas
+cachedrowsetimpl.unableins = N\u00e3o \u00e9 poss\u00edvel instanciar: {0}
+cachedrowsetimpl.beforefirst = beforeFirst : posi\u00e7\u00e3o inv\u00e1lida do cursor
+cachedrowsetimpl.first = First : opera\u00e7\u00e3o inv\u00e1lida do cursor
+cachedrowsetimpl.last = last : TYPE_FORWARD_ONLY
+cachedrowsetimpl.absolute = absolute : posi\u00e7\u00e3o inv\u00e1lida do cursor
+cachedrowsetimpl.relative = relative : posi\u00e7\u00e3o inv\u00e1lida do cursor
+cachedrowsetimpl.asciistream = leitura falha do fluxo ascii
+cachedrowsetimpl.binstream = leitura falha em fluxo bin\u00e1rio
+cachedrowsetimpl.failedins = Falha ao inserir linha
+cachedrowsetimpl.updateins = updateRow chamado durante a inser\u00e7\u00e3o de linha
+cachedrowsetimpl.movetoins = moveToInsertRow : CONCUR_READ_ONLY
+cachedrowsetimpl.movetoins1 = moveToInsertRow : sem metadados
+cachedrowsetimpl.movetoins2 = moveToInsertRow : n\u00famero de colunas inv\u00e1lido
+cachedrowsetimpl.tablename = O nome da tabela n\u00e3o pode ser nulo
+cachedrowsetimpl.keycols = Colunas de chaves inv\u00e1lidas
+cachedrowsetimpl.invalidcol = \u00cdndice de coluna inv\u00e1lido
+cachedrowsetimpl.opnotsupp = Opera\u00e7\u00e3o n\u00e3o suportada pelo banco de dados
+cachedrowsetimpl.matchcols = As colunas correspondentes n\u00e3o s\u00e3o iguais \u00e0s colunas definidas
+cachedrowsetimpl.setmatchcols = Definir colunas correspondentes antes de obt\u00ea-las
+cachedrowsetimpl.matchcols1 = As colunas correspondentes devem ser maior do que 0
+cachedrowsetimpl.matchcols2 = As colunas correspondentes devem ser sequ\u00eancias vazias ou nulas
+cachedrowsetimpl.unsetmatch = As colunas n\u00e3o definidas n\u00e3o s\u00e3o iguais \u00e0s colunas definidas
+cachedrowsetimpl.unsetmatch1 = Usar o nome da coluna como argumento para unsetMatchColumn
+cachedrowsetimpl.unsetmatch2 = Usar o ID da coluna como argumento para unsetMatchColumn
+cachedrowsetimpl.numrows = O n\u00famero de linhas \u00e9 menor do que zero ou menor do que o tamanho obtido
+cachedrowsetimpl.startpos = A posi\u00e7\u00e3o de in\u00edcio n\u00e3o pode ser negativa
+cachedrowsetimpl.nextpage = Preencher dados antes de chamar 
+cachedrowsetimpl.pagesize = O tamanho da p\u00e1gina n\u00e3o pode ser menor do que zero
+cachedrowsetimpl.pagesize1 = O tamanho da p\u00e1gina n\u00e3o pode ser maior do que maxRows
+cachedrowsetimpl.fwdonly = ResultSet \u00e9 somente para frente
+cachedrowsetimpl.type = O tipo \u00e9 : {0}
+cachedrowsetimpl.opnotysupp = Opera\u00e7\u00e3o ainda n\u00e3o suportada
+cachedrowsetimpl.featnotsupp = Recurso n\u00e3o suportado
+
+# WebRowSetImpl exceptions
+webrowsetimpl.nullhash = N\u00e3o \u00e9 poss\u00edvel instanciar a inst\u00e2ncia WebRowSetImpl. Hashtable nulo fornecido ao construtor
+webrowsetimpl.invalidwr = Gravador inv\u00e1lido
+webrowsetimpl.invalidrd = Leitor inv\u00e1lido
+
+#FilteredRowSetImpl exceptions
+filteredrowsetimpl.relative = relative : opera\u00e7\u00e3o inv\u00e1lida do cursor 
+filteredrowsetimpl.absolute = absolute : opera\u00e7\u00e3o inv\u00e1lida do cursor
+filteredrowsetimpl.notallowed = Este valor n\u00e3o \u00e9 permitido no filtro
+
+#JoinRowSetImpl exceptions
+joinrowsetimpl.notinstance = N\u00e3o \u00e9 uma inst\u00e2ncia do conjunto de linhas
+joinrowsetimpl.matchnotset = Coluna correspondente n\u00e3o definida para jun\u00e7\u00e3o
+joinrowsetimpl.numnotequal = N\u00famero de elementos no conjunto de linhas diferente da coluna correspondente
+joinrowsetimpl.notdefined = N\u00e3o \u00e9 um tipo definido de jun\u00e7\u00e3o
+joinrowsetimpl.notsupported = Este tipo de jun\u00e7\u00e3o n\u00e3o \u00e9 suportada
+joinrowsetimpl.initerror = Erro de inicializa\u00e7\u00e3o do JoinRowSet
+joinrowsetimpl.genericerr = Erro inicial de joinrowset gen\u00e9rico
+joinrowsetimpl.emptyrowset = O conjunto de linha vazio n\u00e3o pode ser adicionado a este JoinRowSet
+
+#JdbcRowSetImpl exceptions
+jdbcrowsetimpl.invalstate = Estado inv\u00e1lido
+jdbcrowsetimpl.connect = N\u00e3o \u00e9 poss\u00edvel conectar JdbcRowSet (connect) a JNDI
+jdbcrowsetimpl.paramtype = N\u00e3o \u00e9 poss\u00edvel deduzir o tipo de par\u00e2metro
+jdbcrowsetimpl.matchcols = As colunas correspondentes n\u00e3o s\u00e3o iguais \u00e0s colunas definidas
+jdbcrowsetimpl.setmatchcols = Definir as colunas correspondentes antes de obt\u00ea-las
+jdbcrowsetimpl.matchcols1 = As colunas correspondentes devem ser maior do que 0
+jdbcrowsetimpl.matchcols2 = As colunas correspondentes n\u00e3o podem ser sequ\u00eancias vazias ou nulas
+jdbcrowsetimpl.unsetmatch = As colunas n\u00e3o definidas n\u00e3o s\u00e3o iguais \u00e0s colunas definidas
+jdbcrowsetimpl.usecolname = Usar o nome da coluna como argumento para unsetMatchColumn
+jdbcrowsetimpl.usecolid = Usar o ID da coluna como argumento para unsetMatchColumn
+jdbcrowsetimpl.resnotupd = ResultSet n\u00e3o \u00e9 atualiz\u00e1vel
+jdbcrowsetimpl.opnotysupp = Opera\u00e7\u00e3o ainda n\u00e3o suportada
+jdbcrowsetimpl.featnotsupp = Recurso n\u00e3o suportado
+
+#CachedRowSetReader exceptions
+crsreader.connect = (JNDI) N\u00e3o \u00e9 poss\u00edvel conectar
+crsreader.paramtype = N\u00e3o \u00e9 poss\u00edvel deduzir o tipo de par\u00e2metro
+crsreader.connecterr = Erro interno no RowSetReader: sem conex\u00e3o ou comando
+crsreader.datedetected = Data detectada
+crsreader.caldetected = Calend\u00e1rio detectado
+
+#CachedRowSetWriter exceptions
+crswriter.connect = N\u00e3o \u00e9 poss\u00edvel obter a conex\u00e3o
+crswriter.tname = writeData n\u00e3o pode determinar o nome da tabela
+crswriter.params1 = Valor de params1 : {0} 
+crswriter.params2 = Valor de params2 : {0} 
+crswriter.conflictsno =  conflitos durante a sincroniza\u00e7\u00e3o 
+
+#InsertRow exceptions
+insertrow.novalue = Nenhum valor foi inserido
+
+#SyncResolverImpl exceptions
+syncrsimpl.indexval = Valor de \u00edndice fora do intervalo  
+syncrsimpl.noconflict = Est\u00e1 coluna n\u00e3o est\u00e1 em conflito
+syncrsimpl.syncnotpos = A sincroniza\u00e7\u00e3o n\u00e3o \u00e9 poss\u00edvel
+syncrsimpl.valtores = O valor a ser decidido pode estar no banco de dados ou no conjunto de linhas armazenado em cache
+
+#WebRowSetXmlReader exception
+wrsxmlreader.invalidcp = Fim de RowSet atingido. Posi\u00e7\u00e3o inv\u00e1lida do cursor
+wrsxmlreader.readxml = readXML : {0}
+wrsxmlreader.parseerr = ** Analisando erro : {0} , linha : {1} , uri : {2}
+
+#WebRowSetXmlWriter exceptions
+wrsxmlwriter.ioex = IOException : {0}
+wrsxmlwriter.sqlex = SQLException : {0}
+wrsxmlwriter.failedwrite = Falha ao gravar valor
+wsrxmlwriter.notproper = N\u00e3o \u00e9 um tipo adequado
+
+#XmlReaderContentHandler exceptions
+xmlrch.errmap = Erro ao definir mapa : {0}
+xmlrch.errmetadata = Erro ao definir metadados : {0}
+xmlrch.errinsertval = Erro ao inserir valores : {0}
+xmlrch.errconstr = Erro ao construir linha : {0}
+xmlrch.errdel = Erro ao excluir linha : {0}
+xmlrch.errinsert = Erro ao construir linha de inser\u00e7\u00e3o : {0}
+xmlrch.errinsdel = Erro ao construir linha insdel : {0}
+xmlrch.errupdate = Erro ao construir linha de atualiza\u00e7\u00e3o : {0}
+xmlrch.errupdrow = Erro ao atualizar linha : {0}
+xmlrch.chars = caracteres :
+xmlrch.badvalue = Valor incorreto ; propriedade n\u00e3o anul\u00e1vel
+xmlrch.badvalue1 = Valor incorreto ; metadado n\u00e3o anul\u00e1vel
+xmlrch.warning =  ** Aviso : {0} , linha : {1} , uri : {2}
+
+#RIOptimisticProvider Exceptions
+riop.locking = O bloqueio de classifica\u00e7\u00e3o n\u00e3o \u00e9 suportado
+
+#RIXMLProvider exceptions
+rixml.unsupp = N\u00e3o suportado com RIXMLProvider
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow: ogiltigt antal kolumner
 cachedrowsetimpl.tablename = Tabellnamnet kan inte vara tomt
 cachedrowsetimpl.keycols = Ogiltiga nyckelkolumner
-cachedrowsetimpl.invalidcol = Kolumnindexet \u00e4r ogiltigt
 cachedrowsetimpl.opnotsupp = Databasen har inte st\u00f6d f\u00f6r denna \u00e5tg\u00e4rd
 cachedrowsetimpl.matchcols = Matchningskolumnerna \u00e4r inte samma som de som st\u00e4llts in
 cachedrowsetimpl.setmatchcols = St\u00e4ll in matchningskolumnerna innan du h\u00e4mtar dem
@@ -76,8 +75,8 @@
 cachedrowsetimpl.pagesize1 = Sidstorleken f\u00e5r inte \u00f6verstiga maxRows
 cachedrowsetimpl.fwdonly = ResultSet kan endast g\u00e5 fram\u00e5t
 cachedrowsetimpl.type = Typ: {0}
-cachedrowsetimpl.opnotysupp = Det finns \u00e4nnu inte st\u00f6d f\u00f6r \u00e5tg\u00e4rden
-cachedrowsetimpl.featnotsupp = Funktionen st\u00f6ds inte
+cachedrowsetimpl.opnotysupp = Det finns \u00e4nnu inget st\u00f6d f\u00f6r denna \u00e5tg\u00e4rd
+cachedrowsetimpl.featnotsupp = Det finns inget st\u00f6d f\u00f6r denna funktion
 
 # WebRowSetImpl exceptions
 webrowsetimpl.nullhash = Det g\u00e5r inte att skapa instansen WebRowSetImpl. Tom hashtabell skickades till konstrukt\u00f6r.
@@ -97,7 +96,7 @@
 joinrowsetimpl.notsupported = Det finns inget st\u00f6d f\u00f6r denna kopplingstyp
 joinrowsetimpl.initerror = Initieringsfel f\u00f6r JoinRowSet
 joinrowsetimpl.genericerr = Allm\u00e4nt initieringsfel f\u00f6r JoinRowSet
-joinrowsetimpl.emptyrowset = Det g\u00e5r inte att l\u00e4gga till tom rowset i denna JoinRowSet
+joinrowsetimpl.emptyrowset = Tomma radupps\u00e4ttningar kan inte l\u00e4ggas till i denna JoinRowSet
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = Ogiltig status
@@ -111,22 +110,22 @@
 jdbcrowsetimpl.usecolname = Anv\u00e4nd kolumnnamn som argument f\u00f6r unsetMatchColumn
 jdbcrowsetimpl.usecolid = Anv\u00e4nd kolumnn-id som argument f\u00f6r unsetMatchColumn
 jdbcrowsetimpl.resnotupd = ResultSet \u00e4r inte uppdateringsbart
-jdbcrowsetimpl.opnotysupp = Det finns \u00e4nnu inte st\u00f6d f\u00f6r \u00e5tg\u00e4rden
-jdbcrowsetimpl.featnotsupp = Funktionen st\u00f6ds inte
+jdbcrowsetimpl.opnotysupp = Det finns \u00e4nnu inget st\u00f6d f\u00f6r denna \u00e5tg\u00e4rd
+jdbcrowsetimpl.featnotsupp = Det finns inget st\u00f6d f\u00f6r denna funktion
 
 #CachedRowSetReader exceptions
 crsreader.connect = (JNDI) kan inte anslutas
 crsreader.paramtype = Det g\u00e5r inte att fastst\u00e4lla parametertypen
-crsreader.connecterr = Internfel i RowSetReader: ingen anslutning eller inget kommando
-crsreader.datedetected = Ett datum uppt\u00e4cktes
-crsreader.caldetected = En kalender uppt\u00e4cktes
+crsreader.connecterr = Internt fel i RowSetReader: ingen anslutning eller inget kommando
+crsreader.datedetected = Ett datum har identifierats
+crsreader.caldetected = En kalender har identifierats
 
 #CachedRowSetWriter exceptions
 crswriter.connect = Det g\u00e5r inte att uppr\u00e4tta n\u00e5gon anslutning
 crswriter.tname = writeData kan inte fastst\u00e4lla tabellnamnet
 crswriter.params1 = Parameterv\u00e4rde1: {0} 
 crswriter.params2 = Parameterv\u00e4rde2: {0} 
-crswriter.conflictsno =  konflikter uppstod vid synkronisering 
+crswriter.conflictsno =  konflikter under synkronisering 
 
 #InsertRow exceptions
 insertrow.novalue = Inget v\u00e4rde har infogats
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = Slutet p\u00e5 RowSet har n\u00e5tts. Mark\u00f6rpositionen \u00e4r ogiltig.
 wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** Tolkningsfel
+wrsxmlreader.parseerr = ** Tolkningsfel: {0}, rad: {1}, URI: {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException: {0}
@@ -151,17 +150,16 @@
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = Ett fel uppstod vid inst\u00e4llningen av f\u00f6ljande bild: {0}
 xmlrch.errmetadata = Ett fel uppstod vid inst\u00e4llningen av f\u00f6ljande metadata: {0}
-xmlrch.errinsert = Ett fel uppstod n\u00e4r f\u00f6ljande v\u00e4rden skulle infogas: {0}
+xmlrch.errinsertval = Ett fel uppstod n\u00e4r f\u00f6ljande v\u00e4rden skulle infogas: {0}
 xmlrch.errconstr = Ett fel uppstod n\u00e4r f\u00f6ljande rad skulle skapas: {0}
 xmlrch.errdel = Ett fel uppstod n\u00e4r f\u00f6ljande rad skulle raderas: {0}
-xmlrch.errinsert = Ett fel uppstod n\u00e4r f\u00f6ljande infogningsrad skulle skapas: {0}
 xmlrch.errinsdel = Ett fel uppstod n\u00e4r raden insdel skulle skapas: {0}
 xmlrch.errupdate = Ett fel uppstod n\u00e4r f\u00f6ljande uppdateringsrad skulle skapas: {0}
-xmlrch.errupdrow = Det gick inte att uppdatera raden:  {0}
+xmlrch.errupdrow = Ett fel uppstod n\u00e4r f\u00f6ljande rad skulle uppdateras: {0}
 xmlrch.chars = tecken:
 xmlrch.badvalue = Felaktigt v\u00e4rde; egenskapen kan inte ha ett tomt v\u00e4rde
 xmlrch.badvalue1 = Felaktigt v\u00e4rde; metadatan kan inte ha ett tomt v\u00e4rde
-xmlrch.warning =  ** Varning!
+xmlrch.warning =  ** Varning! {0}, rad: {1}, URI: {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = Det finns inte st\u00f6d f\u00f6r denna l\u00e5sningsklassifikation
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_zh_CN.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_zh_CN.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow: \u5217\u6570\u65e0\u6548
 cachedrowsetimpl.tablename = \u8868\u540d\u4e0d\u80fd\u4e3a Null
 cachedrowsetimpl.keycols = \u952e\u5217\u65e0\u6548
-cachedrowsetimpl.invalidcol = \u5217\u7d22\u5f15\u65e0\u6548
 cachedrowsetimpl.opnotsupp = \u64cd\u4f5c\u4e0d\u53d7\u6570\u636e\u5e93\u652f\u6301
 cachedrowsetimpl.matchcols = \u5339\u914d\u5217\u4e0e\u8bbe\u7f6e\u7684\u90a3\u4e9b\u5339\u914d\u5217\u4e0d\u540c
 cachedrowsetimpl.setmatchcols = \u5728\u83b7\u53d6\u5339\u914d\u5217\u4e4b\u524d\u5148\u8bbe\u7f6e\u5339\u914d\u5217
@@ -76,8 +75,8 @@
 cachedrowsetimpl.pagesize1 = \u9875\u9762\u5927\u5c0f\u4e0d\u80fd\u5927\u4e8e maxRows
 cachedrowsetimpl.fwdonly = ResultSet \u7684\u7c7b\u578b\u4e3a\u4ec5\u5411\u524d\u7c7b\u578b
 cachedrowsetimpl.type = \u7c7b\u578b\u4e3a: {0}
-cachedrowsetimpl.opnotysupp = \u5c1a\u4e0d\u652f\u6301\u64cd\u4f5c
-cachedrowsetimpl.featnotsupp = \u4e0d\u652f\u6301\u529f\u80fd
+cachedrowsetimpl.opnotysupp = \u5c1a\u4e0d\u652f\u6301\u7684\u64cd\u4f5c
+cachedrowsetimpl.featnotsupp = \u5c1a\u4e0d\u652f\u6301\u7684\u529f\u80fd
 
 # WebRowSetImpl exceptions
 webrowsetimpl.nullhash = \u65e0\u6cd5\u5b9e\u4f8b\u5316 WebRowSetImpl \u5b9e\u4f8b\u3002\u63d0\u4f9b\u7ed9\u6784\u9020\u51fd\u6570\u7684 Hashtable \u4e3a Null
@@ -97,7 +96,7 @@
 joinrowsetimpl.notsupported = \u4e0d\u652f\u6301\u6b64\u8fde\u63a5\u7c7b\u578b
 joinrowsetimpl.initerror = JoinRowSet \u521d\u59cb\u5316\u9519\u8bef
 joinrowsetimpl.genericerr = \u4e00\u822c JoinRowSet \u521d\u59cb\u5316\u9519\u8bef
-joinrowsetimpl.emptyrowset = \u65e0\u6cd5\u5c06\u7a7a\u7684 rowset \u6dfb\u52a0\u5230\u6b64 JoinRowSet
+joinrowsetimpl.emptyrowset = \u65e0\u6cd5\u5c06\u7a7a RowSet \u6dfb\u52a0\u5230\u6b64 JoinRowSet
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = \u72b6\u6001\u65e0\u6548
@@ -111,13 +110,13 @@
 jdbcrowsetimpl.usecolname = \u4f7f\u7528\u5217\u540d\u4f5c\u4e3a unsetMatchColumn \u7684\u53c2\u6570
 jdbcrowsetimpl.usecolid = \u4f7f\u7528\u5217 ID \u4f5c\u4e3a unsetMatchColumn \u7684\u53c2\u6570
 jdbcrowsetimpl.resnotupd = ResultSet \u4e0d\u53ef\u66f4\u65b0
-jdbcrowsetimpl.opnotysupp = \u5c1a\u4e0d\u652f\u6301\u64cd\u4f5c
-jdbcrowsetimpl.featnotsupp = \u4e0d\u652f\u6301\u529f\u80fd
+jdbcrowsetimpl.opnotysupp = \u5c1a\u4e0d\u652f\u6301\u7684\u64cd\u4f5c
+jdbcrowsetimpl.featnotsupp = \u5c1a\u4e0d\u652f\u6301\u7684\u529f\u80fd
 
 #CachedRowSetReader exceptions
 crsreader.connect = (JNDI) \u65e0\u6cd5\u8fde\u63a5
 crsreader.paramtype = \u65e0\u6cd5\u63a8\u65ad\u53c2\u6570\u7c7b\u578b
-crsreader.connecterr = RowSetReader \u53d1\u751f\u5185\u90e8\u9519\u8bef\uff1a\u6ca1\u6709\u8fde\u63a5\u6216\u547d\u4ee4
+crsreader.connecterr = RowSetReader \u4e2d\u51fa\u73b0\u5185\u90e8\u9519\u8bef\uff1a\u65e0\u8fde\u63a5\u6216\u547d\u4ee4
 crsreader.datedetected = \u68c0\u6d4b\u5230\u65e5\u671f
 crsreader.caldetected = \u68c0\u6d4b\u5230\u65e5\u5386
 
@@ -126,7 +125,7 @@
 crswriter.tname = writeData \u65e0\u6cd5\u786e\u5b9a\u8868\u540d
 crswriter.params1 = params1 \u7684\u503c: {0} 
 crswriter.params2 = params2 \u7684\u503c: {0} 
-crswriter.conflictsno =  \u540c\u6b65\u65f6\u53d1\u751f\u51b2\u7a81 
+crswriter.conflictsno =  \u540c\u6b65\u5316\u65f6\u53d1\u751f\u51b2\u7a81 
 
 #InsertRow exceptions
 insertrow.novalue = \u5c1a\u672a\u63d2\u5165\u4efb\u4f55\u503c
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = \u5df2\u5230\u8fbe RowSet \u7684\u7ed3\u5c3e\u3002\u5149\u6807\u4f4d\u7f6e\u65e0\u6548
 wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** \u8bed\u6cd5\u89e3\u6790\u9519\u8bef
+wrsxmlreader.parseerr = ** \u8bed\u6cd5\u89e3\u6790\u9519\u8bef: {0}\uff0c\u884c: {1}\uff0cURI: {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException: {0}
@@ -151,17 +150,16 @@
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = \u8bbe\u7f6e\u6620\u5c04\u65f6\u51fa\u9519: {0}
 xmlrch.errmetadata = \u8bbe\u7f6e\u5143\u6570\u636e\u65f6\u51fa\u9519: {0}
-xmlrch.errinsert = \u63d2\u5165\u503c\u65f6\u51fa\u9519: {0}
+xmlrch.errinsertval = \u63d2\u5165\u503c\u65f6\u51fa\u9519: {0}
 xmlrch.errconstr = \u6784\u9020\u884c\u65f6\u51fa\u9519: {0}
 xmlrch.errdel = \u5220\u9664\u884c\u65f6\u51fa\u9519: {0}
-xmlrch.errinsert = \u6784\u9020\u63d2\u5165\u884c\u65f6\u51fa\u9519: {0}
 xmlrch.errinsdel = \u6784\u9020 insdel \u884c\u65f6\u51fa\u9519: {0}
 xmlrch.errupdate = \u6784\u9020\u66f4\u65b0\u884c\u65f6\u51fa\u9519: {0}
-xmlrch.errupdrow = \u66f4\u65b0\u884c\u65f6\u51fa\u9519\uff1a{0}
+xmlrch.errupdrow = \u66f4\u65b0\u884c\u65f6\u51fa\u9519: {0}
 xmlrch.chars = \u5b57\u7b26:
 xmlrch.badvalue = \u503c\u9519\u8bef\uff1b\u5c5e\u6027\u4e0d\u53ef\u4e3a Null
 xmlrch.badvalue1 = \u503c\u9519\u8bef\uff1b\u5143\u6570\u636e\u4e0d\u53ef\u4e3a Null
-xmlrch.warning =  ** \u8b66\u544a
+xmlrch.warning =  ** \u8b66\u544a: {0}\uff0c\u884c: {1}\uff0cURI: {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = \u4e0d\u652f\u6301\u9501\u5b9a\u5206\u7c7b
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_zh_TW.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_zh_TW.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2006, 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
@@ -60,7 +60,6 @@
 cachedrowsetimpl.movetoins2 = moveToInsertRow\uff1a\u6b04\u6578\u7121\u6548
 cachedrowsetimpl.tablename = \u8868\u540d\u7a31\u4e0d\u80fd\u70ba\u7a7a
 cachedrowsetimpl.keycols = \u95dc\u9375\u6b04\u7121\u6548
-cachedrowsetimpl.invalidcol = \u6b04\u7d22\u5f15\u7121\u6548
 cachedrowsetimpl.opnotsupp = \u8cc7\u6599\u5eab\u4e0d\u652f\u63f4\u4f5c\u696d
 cachedrowsetimpl.matchcols = \u5339\u914d\u6b04\u548c\u8a2d\u5b9a\u7684\u6b04\u4e0d\u540c
 cachedrowsetimpl.setmatchcols = \u5728\u53d6\u5f97\u5339\u914d\u6b04\u4e4b\u524d\u8a2d\u5b9a\u5b83\u5011
@@ -76,8 +75,8 @@
 cachedrowsetimpl.pagesize1 = \u9801\u9762\u5927\u5c0f\u4e0d\u80fd\u5927\u65bc maxRows
 cachedrowsetimpl.fwdonly = ResultSet \u53ea\u80fd\u5411\u524d\u9032\u884c
 cachedrowsetimpl.type = \u985e\u578b\u662f\uff1a{0}
-cachedrowsetimpl.opnotysupp = \u5c1a\u672a\u652f\u63f4\u6b64\u4f5c\u696d
-cachedrowsetimpl.featnotsupp = \u4e0d\u652f\u63f4\u6b64\u529f\u80fd
+cachedrowsetimpl.opnotysupp = \u5c1a\u4e0d\u652f\u63f4\u8a72\u4f5c\u696d
+cachedrowsetimpl.featnotsupp = \u4e0d\u652f\u63f4\u8a72\u529f\u80fd
 
 # WebRowSetImpl exceptions
 webrowsetimpl.nullhash = \u7121\u6cd5\u5275\u8a2d WebRowSetImpl \u5be6\u4f8b\u3002\u70ba\u5efa\u69cb\u5b50\u63d0\u4f9b\u7684 Hashtable \u70ba\u7a7a
@@ -97,7 +96,7 @@
 joinrowsetimpl.notsupported = \u4e0d\u652f\u63f4\u6b64\u985e\u9023\u7d50
 joinrowsetimpl.initerror = JoinRowSet \u521d\u59cb\u5316\u932f\u8aa4
 joinrowsetimpl.genericerr = \u5e38\u898f\u7684 joinrowset \u521d\u59cb\u5316\u932f\u8aa4
-joinrowsetimpl.emptyrowset = \u4e0d\u53ef\u5c07\u7a7a\u767d\u7684 rowset \u589e\u52a0\u81f3\u6b64 JoinRowSet
+joinrowsetimpl.emptyrowset = \u7121\u6cd5\u5c07\u7a7a rowset \u65b0\u589e\u81f3\u6b64 JoinRowSet
 
 #JdbcRowSetImpl exceptions
 jdbcrowsetimpl.invalstate = \u72c0\u614b\u7121\u6548
@@ -111,13 +110,13 @@
 jdbcrowsetimpl.usecolname = \u4f7f\u7528\u6b04\u540d\u505a\u70ba unsetMatchColumn \u7684\u5f15\u6578
 jdbcrowsetimpl.usecolid = \u4f7f\u7528\u6b04 ID \u505a\u70ba unsetMatchColumn \u7684\u5f15\u6578
 jdbcrowsetimpl.resnotupd = ResultSet \u4e0d\u53ef\u66f4\u65b0
-jdbcrowsetimpl.opnotysupp = \u5c1a\u672a\u652f\u63f4\u6b64\u4f5c\u696d
-jdbcrowsetimpl.featnotsupp = \u4e0d\u652f\u63f4\u6b64\u529f\u80fd
+jdbcrowsetimpl.opnotysupp = \u5c1a\u4e0d\u652f\u63f4\u8a72\u4f5c\u696d
+jdbcrowsetimpl.featnotsupp = \u4e0d\u652f\u63f4\u8a72\u529f\u80fd
 
 #CachedRowSetReader exceptions
 crsreader.connect = (JNDI) \u7121\u6cd5\u9023\u7dda
 crsreader.paramtype = \u7121\u6cd5\u63a8\u65b7\u53c3\u6578\u985e\u578b
-crsreader.connecterr = RowSetReader \u767c\u751f\u5167\u90e8\u932f\u8aa4\uff1a\u6c92\u6709\u9023\u7dda\u6216\u6307\u4ee4
+crsreader.connecterr = RowSetReader \u4e2d\u51fa\u73fe\u5167\u90e8\u932f\u8aa4\ufe30\u7121\u9023\u7dda\u6216\u6307\u4ee4
 crsreader.datedetected = \u5075\u6e2c\u5230\u65e5\u671f
 crsreader.caldetected = \u5075\u6e2c\u5230\u884c\u4e8b\u66c6
 
@@ -140,7 +139,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = \u5df2\u5230\u9054 RowSet \u672b\u5c3e\u3002\u6e38\u6a19\u4f4d\u7f6e\u7121\u6548
 wrsxmlreader.readxml = readXML\uff1a{0}
-wrsxmlreader.parseerr = ** \u5256\u6790\u932f\u8aa4
+wrsxmlreader.parseerr = ** \u5256\u6790\u932f\u8aa4: {0}\uff0c\u884c: {1}\uff0curi: {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException\uff1a{0}
@@ -151,17 +150,16 @@
 #XmlReaderContentHandler exceptions
 xmlrch.errmap = \u8a2d\u5b9a\u5c0d\u6620\u6642\u767c\u751f\u932f\u8aa4\uff1a{0}
 xmlrch.errmetadata = \u8a2d\u5b9a\u5143\u8cc7\u6599\u6642\u767c\u751f\u932f\u8aa4\uff1a{0}
-xmlrch.errinsert = \u63d2\u5165\u503c\u6642\u767c\u751f\u932f\u8aa4: {0}
+xmlrch.errinsertval = \u63d2\u5165\u503c\u6642\u767c\u751f\u932f\u8aa4: {0}
 xmlrch.errconstr = \u5efa\u69cb\u5217\u6642\u767c\u751f\u932f\u8aa4\uff1a{0}
 xmlrch.errdel = \u522a\u9664\u5217\u6642\u767c\u751f\u932f\u8aa4\uff1a{0}
-xmlrch.errinsert = \u5efa\u69cb\u63d2\u5165\u5217\u6642\u767c\u751f\u932f\u8aa4\uff1a{0}
 xmlrch.errinsdel = \u5efa\u69cb insdel \u5217\u6642\u767c\u751f\u932f\u8aa4\uff1a{0}
 xmlrch.errupdate = \u5efa\u69cb\u66f4\u65b0\u5217\u6642\u767c\u751f\u932f\u8aa4\uff1a{0}
 xmlrch.errupdrow = \u66f4\u65b0\u5217\u6642\u767c\u751f\u932f\u8aa4: {0}
 xmlrch.chars = \u5b57\u5143\uff1a
 xmlrch.badvalue = \u932f\u8aa4\u7684\u503c\uff1b\u7279\u6027\u4e0d\u80fd\u70ba\u7a7a
 xmlrch.badvalue1 = \u932f\u8aa4\u7684\u503c\uff1b\u5143\u8cc7\u6599\u4e0d\u80fd\u70ba\u7a7a
-xmlrch.warning =  ** \u8b66\u544a
+xmlrch.warning =  ** \u8b66\u544a: {0}\uff0c\u884c: {1}\uff0curi: {2}
 
 #RIOptimisticProvider Exceptions
 riop.locking = \u4e0d\u652f\u63f4\u9396\u5b9a\u5206\u985e
--- a/src/share/classes/com/sun/security/auth/module/NTSystem.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/security/auth/module/NTSystem.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
 
 package com.sun.security.auth.module;
 
-import javax.security.auth.login.LoginException;
-
 /**
  * <p> This class implementation retrieves and makes available NT
  * security information for the current user.
@@ -124,7 +122,7 @@
      * @return the group SIDs for the current NT user.
      */
     public String[] getGroupIDs() {
-        return groupIDs;
+        return groupIDs == null ? null : groupIDs.clone();
     }
 
     /**
--- a/src/share/classes/com/sun/security/auth/module/SolarisSystem.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/security/auth/module/SolarisSystem.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,6 @@
 
 package com.sun.security.auth.module;
 
-import javax.security.auth.*;
-import javax.security.auth.login.*;
-
 /**
  * <p> This class implementation retrieves and makes available Solaris
  * UID/GID/groups information for the current user.
@@ -92,6 +89,6 @@
      * @return the supplementary groups for the current Solaris user.
      */
     public long[] getGroups() {
-        return groups;
+        return groups == null ? null : groups.clone();
     }
 }
--- a/src/share/classes/com/sun/security/auth/module/UnixSystem.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/security/auth/module/UnixSystem.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,6 @@
 
 package com.sun.security.auth.module;
 
-import javax.security.auth.*;
-import javax.security.auth.login.*;
-
 /**
  * <p> This class implementation retrieves and makes available Unix
  * UID/GID/groups information for the current user.
@@ -92,6 +89,6 @@
      * @return the supplementary groups for the current Unix user.
      */
     public long[] getGroups() {
-        return groups;
+        return groups == null ? null : groups.clone();
     }
 }
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -67,7 +67,7 @@
 FileChooser.updateButtonMnemonic=85
 FileChooser.helpButtonText=\u30d8\u30eb\u30d7(H)
 FileChooser.helpButtonMnemonic=72
-FileChooser.directoryOpenButtonText=\u958b\u304f(O)
+FileChooser.directoryOpenButtonText=\u958b\u304f
 FileChooser.directoryOpenButtonMnemonic=79
 
 # File Size Units
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -67,7 +67,7 @@
 FileChooser.updateButtonMnemonic=85
 FileChooser.helpButtonText=\ub3c4\uc6c0\ub9d0(H)
 FileChooser.helpButtonMnemonic=72
-FileChooser.directoryOpenButtonText=\uc5f4\uae30(O)
+FileChooser.directoryOpenButtonText=\uc5f4\uae30
 FileChooser.directoryOpenButtonMnemonic=79
 
 # File Size Units
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,209 @@
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used in Swing
+# Currently, the following components need this for support:
+#
+#    ColorChooser
+#    FileChooser
+#    OptionPane
+#
+# When this file is read in, the strings are put into the 
+# defaults table.  This is an implementation detail of the current
+# workings of Swing.  DO NOT DEPEND ON THIS.  
+# This may change in future versions of Swing as we improve localization 
+# support.
+#
+#                        MNEMONIC NOTE:
+# Many of strings in this file are used by widgets that have a
+# mnemonic, for example:
+#   ColorChooser.rgbNameText=RGB
+#   ColorChooser.rgbMnemonic=71
+#   ColorChooser.rgbDisplayedMnemonicIndex=1
+# Indicates that the tab in the ColorChooser for RGB colors will have
+# the text 'RGB', further the mnemonic character will be 'g' and that
+# a decoration will be provided under the 'G'. This will typically
+# look like:  RGB
+#              -
+# 71 corresponds to the decimal value of the VK constant defined
+# in java/awt/KeyEvent.java. VK_G is defined as:
+#
+#    public static final int VK_G              = 0x47;
+#
+# 0x47 is a hex number and needs to be converted to decimal.
+# A simple way to calculate this for a-z is to add 64 to the index of
+# the letter in the alphabet. As 'a' is in the 1st letter the mnemonic
+# for 'a' is 65, 'b' is 66...
+#
+# The xxDisplayedMnemonicIndex is used to indicate the index of the
+# character that should be underlined in the String, with 0
+# corresponding to the first character in the String.
+#
+# One important thing to remember is that the mnemonic MUST exist in
+# the String, if it does not exist you should add text that makes it
+# exist. This will typically take the form 'XXXX (M)' where M is the
+# character for the mnemonic.
+# 
+# @author Steve Wilson
+
+############ FILE CHOOSER STRINGS #############
+FileChooser.fileDescriptionText=Arquivo gen\u00e9rico
+FileChooser.directoryDescriptionText=Diret\u00f3rio
+FileChooser.newFolderErrorText=Erro ao criar nova pasta
+FileChooser.newFolderErrorSeparator= : 
+FileChooser.acceptAllFileFilterText=Todos os arquivos
+FileChooser.cancelButtonText=Cancelar
+FileChooser.cancelButtonMnemonic=67
+FileChooser.saveButtonText=Salvar
+FileChooser.saveButtonMnemonic=83
+FileChooser.openButtonText=Abrir
+FileChooser.openButtonMnemonic=79
+FileChooser.saveDialogTitleText=Salvar
+FileChooser.openDialogTitleText=Abrir
+FileChooser.updateButtonText=Atualizar
+FileChooser.updateButtonMnemonic=85
+FileChooser.helpButtonText=Ajuda
+FileChooser.helpButtonMnemonic=72
+FileChooser.directoryOpenButtonText=Abrir
+FileChooser.directoryOpenButtonMnemonic=79
+
+# File Size Units
+FileChooser.fileSizeKiloBytes={0} KB
+FileChooser.fileSizeMegaBytes={0} MB
+FileChooser.fileSizeGigaBytes={0} GB
+
+# These strings are platform dependent not look and feel dependent.
+FileChooser.win32.newFolder=Nova pasta
+FileChooser.win32.newFolder.subsequent=Nova pasta ({0})
+FileChooser.other.newFolder=NewFolder
+FileChooser.other.newFolder.subsequent=NewFolder.{0}
+
+
+## file chooser tooltips ###
+FileChooser.cancelButtonToolTipText=Anular caixa de di\u00e1logo do seletor de arquivos
+FileChooser.saveButtonToolTipText=Salvar arquivo selecionado
+FileChooser.openButtonToolTipText=Abrir arquivo selecionado
+FileChooser.updateButtonToolTipText=Atualizar lista de diret\u00f3rios
+FileChooser.helpButtonToolTipText=Ajuda do FileChooser
+FileChooser.directoryOpenButtonToolTipText=Abrir diret\u00f3rio selecionado
+
+############ COLOR CHOOSER STRINGS #############
+ColorChooser.previewText=Visualizar
+ColorChooser.okText=OK
+ColorChooser.cancelText=Cancelar
+ColorChooser.resetText=Redefinir
+# VK_XXX constant for 'ColorChooser.resetText' button to make mnemonic
+ColorChooser.resetMnemonic=82
+ColorChooser.sampleText=Texto de amostra  Texto de amostra
+ColorChooser.swatchesNameText=Amostras
+ColorChooser.swatchesMnemonic=83
+ColorChooser.swatchesDisplayedMnemonicIndex=0
+ColorChooser.swatchesRecentText=Recente:
+ColorChooser.hsbNameText=HSB
+# Each of the ColorChooser types can define a mnemonic, as a KeyEvent.VK_XXX
+# constant, and an index into the text to render the mnemonic as. The
+# mnemonic is xxxMnemonic and the index of the character to underline is
+# xxxDisplayedMnemonicIndex.
+ColorChooser.hsbMnemonic=72
+ColorChooser.hsbDisplayedMnemonicIndex=0
+ColorChooser.hsbHueText=H
+ColorChooser.hsbSaturationText=S
+ColorChooser.hsbBrightnessText=B
+ColorChooser.hsbRedText=R
+ColorChooser.hsbGreenText=G
+ColorChooser.hsbBlueText=B
+ColorChooser.rgbNameText=RGB
+ColorChooser.rgbMnemonic=71
+ColorChooser.rgbDisplayedMnemonicIndex=1
+ColorChooser.rgbRedText=Vermelho
+ColorChooser.rgbRedMnemonic=68
+ColorChooser.rgbGreenText=Verde
+ColorChooser.rgbGreenMnemonic=78
+ColorChooser.rgbBlueText=Azul
+ColorChooser.rgbBlueMnemonic=66
+
+############ OPTION PANE STRINGS #############
+# Mnemonic keys correspond to KeyEvent.VK_XXX constant
+# We only define mnemonics for YES/NO, but for completeness you can
+# define mnemonics for any of the buttons.
+OptionPane.yesButtonText=Sim
+OptionPane.yesButtonMnemonic=89
+OptionPane.noButtonText=N\u00e3o
+OptionPane.noButtonMnemonic=78
+OptionPane.okButtonText=OK
+OptionPane.okButtonMnemonic=0
+OptionPane.cancelButtonText=Cancelar
+OptionPane.cancelButtonMnemonic=0
+OptionPane.titleText=Selecionar uma op\u00e7\u00e3o
+# Title for the dialog for the showInputDialog methods. Only used if
+# the developer uses one of the variants that doesn't take a title.
+OptionPane.inputDialogTitle=Entrada
+# Title for the dialog for the showMessageDialog methods. Only used if
+# the developer uses one of the variants that doesn't take a title.
+OptionPane.messageDialogTitle=Mensagem
+
+############ Printing Dialog Strings ############
+PrintingDialog.titleProgressText=Impress\u00e3o
+PrintingDialog.titleAbortingText=Impress\u00e3o (Anulando)
+
+PrintingDialog.contentInitialText=Impress\u00e3o em andamento...
+
+# The following string will be formatted by a MessageFormat
+# and {0} will be replaced by page number being printed
+PrintingDialog.contentProgressText=P\u00e1gina imprimida {0}...
+
+PrintingDialog.contentAbortingText=Anulando impress\u00e3o...
+
+PrintingDialog.abortButtonText=Anular
+PrintingDialog.abortButtonMnemonic=65
+PrintingDialog.abortButtonDisplayedMnemonicIndex=0
+PrintingDialog.abortButtonToolTipText=Anular impress\u00e3o
+
+############ Internal Frame Strings ############
+InternalFrame.iconButtonToolTip=Minimizar
+InternalFrame.maxButtonToolTip=Maximizar
+InternalFrame.restoreButtonToolTip=Restaurar
+InternalFrame.closeButtonToolTip=Fechar
+
+############ Internal Frame Title Pane Strings ############
+InternalFrameTitlePane.restoreButtonText=Restaurar
+InternalFrameTitlePane.moveButtonText=Mover
+InternalFrameTitlePane.sizeButtonText=Tamanho
+InternalFrameTitlePane.minimizeButtonText=Minimizar
+InternalFrameTitlePane.maximizeButtonText=Maximizar
+InternalFrameTitlePane.closeButtonText=Fechar
+
+############ Text strings #############
+# Used for html forms
+FormView.submitButtonText=Enviar consulta
+FormView.resetButtonText=Redefinir
+FormView.browseFileButtonText=Explorar...
+
+############ Abstract Document Strings ############
+AbstractDocument.styleChangeText=altera\u00e7\u00e3o de estilo
+AbstractDocument.additionText=adi\u00e7\u00e3o
+AbstractDocument.deletionText=exclus\u00e3o
+AbstractDocument.undoText=Desfazer
+AbstractDocument.redoText=Refazer
+
+############ Abstract Button Strings ############
+AbstractButton.clickText=clicar
+
+############ Abstract Undoable Edit Strings ############
+AbstractUndoableEdit.undoText=Desfazer
+AbstractUndoableEdit.redoText=Refazer
+
+############ Combo Box Strings ############
+ComboBox.togglePopupText=togglePopup
+
+############ Progress Monitor Strings ############
+ProgressMonitor.progressText=Progresso...
+
+############ Split Pane Strings ############
+SplitPane.leftButtonText=bot\u00e3o esquerdo
+SplitPane.rightButtonText=bot\u00e3o direito
+# Used for Isindex
+IsindexView.prompt=Trata-se de um \u00edndice pesquis\u00e1vel.  Insira as palavras-chave de pesquisa:
+
+############ InternalFrameTitlePane Strings ############
+InternalFrameTitlePane.iconifyButtonAccessibleName=Iconificar
+InternalFrameTitlePane.maximizeButtonAccessibleName=Maximizar
+InternalFrameTitlePane.closeButtonAccessibleName=Fechar
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -67,7 +67,7 @@
 FileChooser.updateButtonMnemonic=85
 FileChooser.helpButtonText=\u5e2e\u52a9(H)
 FileChooser.helpButtonMnemonic=72
-FileChooser.directoryOpenButtonText=\u6253\u5f00(O)
+FileChooser.directoryOpenButtonText=\u6253\u5f00
 FileChooser.directoryOpenButtonMnemonic=79
 
 # File Size Units
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -67,7 +67,7 @@
 FileChooser.updateButtonMnemonic=85
 FileChooser.helpButtonText=\u8aaa\u660e(H)
 FileChooser.helpButtonMnemonic=72
-FileChooser.directoryOpenButtonText=\u958b\u555f(O)
+FileChooser.directoryOpenButtonText=\u958b\u555f
 FileChooser.directoryOpenButtonMnemonic=79
 
 # File Size Units
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_de.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_de.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -33,9 +33,9 @@
 FileChooser.listViewButtonToolTipText=Liste
 FileChooser.listViewButtonAccessibleName=Liste
 FileChooser.listViewActionLabelText=Liste
-FileChooser.detailsViewButtonToolTipText=Einzelheiten
-FileChooser.detailsViewButtonAccessibleName=Einzelheiten
-FileChooser.detailsViewActionLabelText=Einzelheiten
+FileChooser.detailsViewButtonToolTipText=Details
+FileChooser.detailsViewButtonAccessibleName=Details
+FileChooser.detailsViewActionLabelText=Details
 FileChooser.refreshActionLabelText=Aktualisieren
 FileChooser.viewMenuLabelText=Ansicht
 FileChooser.fileNameHeaderText=Dateiname
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_pt_BR.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,55 @@
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used be the Metal Look and Feel.
+# Currently, the following components need this for support:
+#
+#    FileChooser
+#
+# When this file is read in, the strings are put into the 
+# defaults table.  This is an implementation detail of the current
+# workings of Swing.  DO NOT DEPEND ON THIS.  
+# This may change in future versions of Swing as we improve localization 
+# support.
+#
+# Refer to the note in basic.properties for a description as to what
+# the mnemonics correspond to and how to calculate them.
+#
+# @author Steve Wilson
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.lookInLabelText=Consultar em:
+FileChooser.saveInLabelText=Salvar em:
+FileChooser.fileNameLabelText=Nome de arquivo:
+FileChooser.filesOfTypeLabelText=Arquivos de tipo:
+FileChooser.upFolderToolTipText=Um n\u00edvel acima
+FileChooser.upFolderAccessibleName=Acima
+FileChooser.homeFolderToolTipText=In\u00edcio
+FileChooser.homeFolderAccessibleName=In\u00edcio
+FileChooser.newFolderToolTipText=Criar nova pasta
+FileChooser.newFolderAccessibleName=Nova pasta
+FileChooser.newFolderActionLabelText=Nova pasta
+FileChooser.listViewButtonToolTipText=Lista
+FileChooser.listViewButtonAccessibleName=Lista
+FileChooser.listViewActionLabelText=Lista
+FileChooser.detailsViewButtonToolTipText=Detalhes
+FileChooser.detailsViewButtonAccessibleName=Detalhes
+FileChooser.detailsViewActionLabelText=Detalhes
+FileChooser.refreshActionLabelText=Atualizar
+FileChooser.viewMenuLabelText=Exibir
+FileChooser.fileNameHeaderText=Nome
+FileChooser.fileSizeHeaderText=Tamanho
+FileChooser.fileTypeHeaderText=Tipo
+FileChooser.fileDateHeaderText=Modificado
+FileChooser.fileAttrHeaderText=Atributos
+
+############ Used by MetalTitlePane if rendering window decorations############
+# All mnemonics are KeyEvent.VK_XXX as integers
+MetalTitlePane.restoreTitle=Restaurar
+MetalTitlePane.restoreMnemonic=82
+MetalTitlePane.iconifyTitle=Minimizar
+MetalTitlePane.iconifyMnemonic=69
+MetalTitlePane.maximizeTitle=Maximizar
+MetalTitlePane.maximizeMnemonic=88
+MetalTitlePane.closeTitle=Fechar
+MetalTitlePane.closeMnemonic=67
--- a/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_de.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_de.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -28,8 +28,8 @@
 FileChooser.newFolderAccessibleName=Neuer Ordner
 FileChooser.listViewButtonToolTipText=Liste
 FileChooser.listViewButtonAccessibleName=Liste
-FileChooser.detailsViewButtonToolTipText=Einzelheiten
-FileChooser.detailsViewButtonAccessibleName=Einzelheiten
+FileChooser.detailsViewButtonToolTipText=Details
+FileChooser.detailsViewButtonAccessibleName=Details
 FileChooser.fileNameHeaderText=Dateiname
 FileChooser.fileSizeHeaderText=Gr\u00f6\u00dfe
 FileChooser.fileTypeHeaderText=Typ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_pt_BR.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,41 @@
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used be the Synth Look and Feel.
+# Currently, the following components need this for support:
+#
+#    FileChooser
+#
+# When this file is read in, the strings are put into the 
+# defaults table.  This is an implementation detail of the current
+# workings of Swing.  DO NOT DEPEND ON THIS.  
+# This may change in future versions of Swing as we improve localization 
+# support.
+#
+# @author Steve Wilson
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.lookInLabelText=Consultar em:
+FileChooser.saveInLabelText=Salvar em:
+FileChooser.fileNameLabelText=Nome de arquivo:
+FileChooser.filesOfTypeLabelText=Arquivos de tipo:
+FileChooser.upFolderToolTipText=Um n\u00edvel acima
+FileChooser.upFolderAccessibleName=Acima
+FileChooser.homeFolderToolTipText=In\u00edcio
+FileChooser.homeFolderAccessibleName=In\u00edcio
+FileChooser.newFolderToolTipText=Criar nova pasta
+FileChooser.newFolderAccessibleName=Nova pasta
+FileChooser.newFolderActionLabelText=Nova pasta
+FileChooser.listViewButtonToolTipText=Lista
+FileChooser.listViewButtonAccessibleName=Lista
+FileChooser.listViewActionLabelText=Lista
+FileChooser.detailsViewButtonToolTipText=Detalhes
+FileChooser.detailsViewButtonAccessibleName=Detalhes
+FileChooser.detailsViewActionLabelText=Detalhes
+FileChooser.refreshActionLabelText=Atualizar
+FileChooser.viewMenuLabelText=Exibir
+FileChooser.fileNameHeaderText=Nome
+FileChooser.fileSizeHeaderText=Tamanho
+FileChooser.fileTypeHeaderText=Tipo
+FileChooser.fileDateHeaderText=Modificado
+FileChooser.fileAttrHeaderText=Atributos
--- a/src/share/classes/com/sun/tools/jdi/resources/jdi_ja.properties	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/com/sun/tools/jdi/resources/jdi_ja.properties	Thu Dec 23 00:03:46 2010 -0800
@@ -35,18 +35,18 @@
 socket_attaching.host.label = \u30db\u30b9\u30c8
 socket_attaching.port = VM \u306b\u63a5\u7d9a\u3059\u308b\u30dd\u30fc\u30c8\u756a\u53f7
 socket_attaching.port.label = \u30dd\u30fc\u30c8
-socket_attaching.description = \u30bd\u30b1\u30c3\u30c8\u3067\u305d\u306e\u4ed6\u306e VM \u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002
+socket_attaching.description = \u30bd\u30b1\u30c3\u30c8\u3067\u305d\u306e\u4ed6\u306e VM \u306b\u63a5\u7d9a\u3057\u307e\u3059
 socket_listening.localaddr = \u30ea\u30b9\u30ca\u30fc\u306e\u30d0\u30a4\u30f3\u30c9\u5148\u30ed\u30fc\u30ab\u30eb\u30a2\u30c9\u30ec\u30b9
 socket_listening.localaddr.label = \u30ed\u30fc\u30ab\u30eb\u30a2\u30c9\u30ec\u30b9
 socket_listening.port = VM \u3078\u306e\u63a5\u7d9a\u3092\u5f85\u6a5f\u3059\u308b\u30dd\u30fc\u30c8\u756a\u53f7
 socket_listening.port.label = \u30dd\u30fc\u30c8
-socket_listening.description = \u305d\u306e\u4ed6\u306e VM \u306b\u3088\u308a\u958b\u59cb\u3055\u308c\u308b\u30bd\u30b1\u30c3\u30c8\u63a5\u7d9a\u3092\u53d7\u3051\u5165\u308c\u307e\u3059\u3002
+socket_listening.description = \u305d\u306e\u4ed6\u306e VM \u306b\u3088\u308a\u958b\u59cb\u3055\u308c\u308b\u30bd\u30b1\u30c3\u30c8\u63a5\u7d9a\u3092\u53d7\u3051\u5165\u308c\u307e\u3059
 memory_attaching.name = VM \u3078\u306e\u63a5\u7d9a\u306b\u4f7f\u7528\u3055\u308c\u308b\u5171\u6709\u30e1\u30e2\u30ea\u9818\u57df\u540d
 memory_attaching.name.label = \u540d\u524d
-memory_attaching.description = \u5171\u6709\u30e1\u30e2\u30ea\u3067\u305d\u306e\u4ed6\u306e VM \u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002
+memory_attaching.description = \u5171\u6709\u30e1\u30e2\u30ea\u3067\u305d\u306e\u4ed6\u306e VM \u306b\u63a5\u7d9a\u3057\u307e\u3059
 memory_listening.name = VM \u3078\u306e\u63a5\u7d9a\u3092\u5f85\u6a5f\u3059\u308b\u305f\u3081\u306e\u5171\u6709\u30e1\u30e2\u30ea\u9818\u57df\u540d
 memory_listening.name.label = \u540d\u524d
-memory_listening.description = \u305d\u306e\u4ed6\u306e VM \u306b\u3088\u308a\u958b\u59cb\u3055\u308c\u308b\u5171\u6709\u30e1\u30e2\u30ea\u63a5\u7d9a\u3092\u53d7\u3051\u5165\u308c\u307e\u3059\u3002
+memory_listening.description = \u305d\u306e\u4ed6\u306e VM \u306b\u3088\u308a\u958b\u59cb\u3055\u308c\u308b\u5171\u6709\u30e1\u30e2\u30ea\u63a5\u7d9a\u3092\u53d7\u3051\u5165\u308c\u307e\u3059
 process_attaching.description = \u30c7\u30d0\u30c3\u30b0\u3059\u308b\u30d7\u30ed\u30bb\u30b9\u306b\u30d7\u30ed\u30bb\u30b9 ID (pid) \u3092\u4f7f\u3063\u3066\u63a5\u7d9a\u3057\u307e\u3059
 process_attaching.pid = pid
 process_attaching.pid.label = \u30c7\u30d0\u30c3\u30b0\u3059\u308b\u30d7\u30ed\u30bb\u30b9 ID (pid)
--- a/src/share/classes/java/awt/Dialog.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/awt/Dialog.java	Thu Dec 23 00:03:46 2010 -0800
@@ -565,7 +565,7 @@
      * @since 1.6
      */
     public Dialog(Window owner) {
-        this(owner, null, ModalityType.MODELESS);
+        this(owner, "", ModalityType.MODELESS);
     }
 
     /**
@@ -624,7 +624,7 @@
      * @since 1.6
      */
     public Dialog(Window owner, ModalityType modalityType) {
-        this(owner, null, modalityType);
+        this(owner, "", modalityType);
     }
 
     /**
--- a/src/share/classes/java/awt/SecondaryLoop.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/awt/SecondaryLoop.java	Thu Dec 23 00:03:46 2010 -0800
@@ -30,15 +30,15 @@
  * <p>
  * Objects that implement this interface are created with the
  * {@link EventQueue#createSecondaryLoop} method. The interface
- * provides two methods, {@link enter} and {@link exit},
+ * provides two methods, {@link #enter} and {@link #exit},
  * which can be used to start and stop the event loop.
  * <p>
- * When the {@link enter} method is called, the current
+ * When the {@link #enter} method is called, the current
  * thread is blocked until the loop is terminated by the
- * {@link exit} method. Also, a new event loop is started
+ * {@link #exit} method. Also, a new event loop is started
  * on the event dispatch thread, which may or may not be
  * the current thread. The loop can be terminated on any
- * thread by calling its {@link exit} method. After the
+ * thread by calling its {@link #exit} method. After the
  * loop is terminated, the {@code SecondaryLoop} object can
  * be reused to run a new nested event loop.
  * <p>
@@ -102,7 +102,7 @@
      * <p>
      * This method can be called by any thread including the event
      * dispatch thread. This thread will be blocked until the {@link
-     * exit} method is called or the loop is terminated. A new
+     * #exit} method is called or the loop is terminated. A new
      * secondary loop will be created on the event dispatch thread
      * for dispatching events in either case.
      * <p>
@@ -123,23 +123,23 @@
 
     /**
      * Unblocks the execution of the thread blocked by the {@link
-     * enter} method and exits the secondary loop.
+     * #enter} method and exits the secondary loop.
      * <p>
-     * This method resumes the thread that called the {@link enter}
+     * This method resumes the thread that called the {@link #enter}
      * method and exits the secondary loop that was created when
-     * the {@link enter} method was invoked.
+     * the {@link #enter} method was invoked.
      * <p>
      * Note that if any other secondary loop is started while this
      * loop is running, the blocked thread will not resume execution
      * until the nested loop is terminated.
      * <p>
      * If this secondary loop has not been started with the {@link
-     * enter} method, or this secondary loop has already finished
-     * with the {@link exit} method, this method returns {@code
+     * #enter} method, or this secondary loop has already finished
+     * with the {@link #exit} method, this method returns {@code
      * false}, otherwise {@code true} is returned.
      *
      * @return {@code true} if this loop was previously started and
-     *         has not yet been finished with the {@link exit} method,
+     *         has not yet been finished with the {@link #exit} method,
      *         {@code false} otherwise
      */
     public boolean exit();
--- a/src/share/classes/java/dyn/BootstrapMethod.java	Wed Dec 22 13:49:23 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package java.dyn;
-
-import java.lang.annotation.*;
-
-/**
- * Annotation on InvokeDynamic method calls which requests the JVM to use a specific
- * <a href="package-summary.html#bsm">bootstrap method</a>
- * to link the call.  This annotation is not retained as such in the class file,
- * but is transformed into a constant-pool entry for the invokedynamic instruction which
- * specifies the desired bootstrap method.
- * <p>
- * If only the <code>value</code> is given, it must name a subclass of {@link CallSite}
- * with a constructor which accepts a class, string, and method type.
- * If the <code>value</code> and <code>name</code> are both given, there must be
- * a static method in the given class of the given name which accepts a class, string,
- * and method type, and returns a reference coercible to {@link CallSite}.
- * <p>
- * This annotation can be placed either on the return type of a single {@link InvokeDynamic}
- * call (see examples) or else it can be placed on an enclosing class or method, where it
- * determines a default bootstrap method for any {@link InvokeDynamic} calls which are not
- * specifically annotated with a bootstrap method.
- * Every {@link InvokeDynamic} call must be given a bootstrap method.
- * <p>
- * Examples:
-<blockquote><pre>
-&#064;BootstrapMethod(value=MyLanguageRuntime.class, name="bootstrapDynamic")
-String x = (String) InvokeDynamic.greet();
-//BSM => MyLanguageRuntime.bootstrapDynamic(Here.class, "greet", methodType(String.class))
-&#064;BootstrapMethod(MyCallSite.class)
-void example() throws Throwable {
-    InvokeDynamic.greet();
-    //BSM => new MyCallSite(Here.class, "greet", methodType(void.class))
-}
-</pre></blockquote>
- * <p>
- */
-@Target({ElementType.TYPE_USE,
-            // For defaulting every indy site within a class or method; cf. @SuppressWarnings:
-            ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR
-            })
-@Retention(RetentionPolicy.SOURCE)
-public @interface BootstrapMethod {
-    /** The class containing the bootstrap method. */
-    Class<?> value();
-
-    /** The name of the bootstrap method.
-     *  If this is the empty string, an instance of the bootstrap class is created,
-     *  and a constructor is invoked.
-     *  Otherwise, there must be a static method of the required name.
-     */
-    String name() default "";  // empty string denotes a constructor with 'new'
-
-    /** The argument types of the bootstrap method, as passed out by the JVM.
-     *  There is usually no reason to override the default.
-     */
-    Class<?>[] arguments() default {Class.class, String.class, MethodType.class};
-}
--- a/src/share/classes/java/dyn/CallSite.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/CallSite.java	Thu Dec 23 00:03:46 2010 -0800
@@ -26,40 +26,45 @@
 package java.dyn;
 
 import sun.dyn.*;
+import sun.dyn.empty.Empty;
+import sun.misc.Unsafe;
 import java.util.Collection;
 
 /**
  * A {@code CallSite} is a holder for a variable {@link MethodHandle},
  * which is called its {@code target}.
- * Every call to a {@code CallSite} is delegated to the site's current target.
+ * An {@code invokedynamic} instruction linked to a {@code CallSite} delegates
+ * all calls to the site's current target.
+ * A {@code CallSite} may be associated with several {@code invokedynamic}
+ * instructions, or it may be "free floating", associated with none.
+ * In any case, it may be invoked through an associated method handle
+ * called its {@linkplain #dynamicInvoker dynamic invoker}.
  * <p>
- * A call site is initially created in an <em>unlinked</em> state,
- * which is distinguished by a null target variable.
- * Before the call site may be invoked (and before certain other
- * operations are attempted), the call site must be linked to
- * a non-null target.
+ * {@code CallSite} is an abstract class which does not allow
+ * direct subclassing by users.  It has three immediate,
+ * concrete subclasses that may be either instantiated or subclassed.
+ * <ul>
+ * <li>If a mutable target is not required, an {@code invokedynamic} instruction
+ * may be permanently bound by means of a {@linkplain ConstantCallSite constant call site}.
+ * <li>If a mutable target is required which has volatile variable semantics,
+ * because updates to the target must be immediately and reliably witnessed by other threads,
+ * a {@linkplain VolatileCallSite volatile call site} may be used.
+ * <li>Otherwise, if a mutable target is required,
+ * a {@linkplain MutableCallSite mutable call site} may be used.
+ * </ul>
  * <p>
- * A call site may be <em>relinked</em> by changing its target.
- * The new target must be non-null and must have the same
- * {@linkplain MethodHandle#type() type}
+ * A non-constant call site may be <em>relinked</em> by changing its target.
+ * The new target must have the same {@linkplain MethodHandle#type() type}
  * as the previous target.
  * Thus, though a call site can be relinked to a series of
  * successive targets, it cannot change its type.
  * <p>
- * Linkage happens once in the lifetime of any given {@code CallSite} object.
- * Because of call site invalidation, this linkage can be repeated for
- * a single {@code invokedynamic} instruction, with multiple {@code CallSite} objects.
- * When a {@code CallSite} is unlinked from an {@code invokedynamic} instruction,
- * the instruction is reset so that it is no longer associated with
- * the {@code CallSite} object, but the {@code CallSite} does not change
- * state.
- * <p>
  * Here is a sample use of call sites and bootstrap methods which links every
  * dynamic call site to print its arguments:
 <blockquote><pre><!-- see indy-demo/src/PrintArgsDemo.java -->
-&#064;BootstrapMethod(value=PrintArgsDemo.class, name="bootstrapDynamic")
 static void test() throws Throwable {
-    InvokeDynamic.baz("baz arg", 2, 3.14);
+    // THE FOLLOWING LINE IS PSEUDOCODE FOR A JVM INSTRUCTION
+    InvokeDynamic[#bootstrapDynamic].baz("baz arg", 2, 3.14);
 }
 private static void printArgs(Object... args) {
   System.out.println(java.util.Arrays.deepToString(args));
@@ -71,16 +76,15 @@
   printArgs = lookup.findStatic(thisClass,
       "printArgs", MethodType.methodType(void.class, Object[].class));
 }
-private static CallSite bootstrapDynamic(Class caller, String name, MethodType type) {
+private static CallSite bootstrapDynamic(MethodHandles.Lookup caller, String name, MethodType type) {
   // ignore caller and name, but match the type:
-  return new CallSite(MethodHandles.collectArguments(printArgs, type));
+  return new ConstantCallSite(MethodHandles.collectArguments(printArgs, type));
 }
 </pre></blockquote>
  * @author John Rose, JSR 292 EG
  */
-public class CallSite
-    implements MethodHandleProvider
-{
+abstract
+public class CallSite {
     private static final Access IMPL_TOKEN = Access.getToken();
 
     // Fields used only by the JVM.  Do not use or change.
@@ -88,61 +92,47 @@
     private int        vmindex;  // supplied by the JVM (BCI within calling method)
 
     // The actual payload of this call site:
-    private MethodHandle target;
+    /*package-private*/
+    MethodHandle target;
 
     // Remove this field for PFD and delete deprecated methods:
     private MemberName calleeNameRemoveForPFD;
 
     /**
-     * Make a blank call site object.
-     * Before it is returned from a bootstrap method, this {@code CallSite} object
-     * must be provided with
-     * a target method via a call to {@link CallSite#setTarget(MethodHandle) setTarget},
-     * or by a subclass override of {@link CallSite#initialTarget(Class,String,MethodType) initialTarget}.
+     * Make a blank call site object with the given method type.
+     * An initial target method is supplied which will throw
+     * an {@link IllegalStateException} if called.
+     * <p>
+     * Before this {@code CallSite} object is returned from a bootstrap method,
+     * it is usually provided with a more useful target method,
+     * via a call to {@link CallSite#setTarget(MethodHandle) setTarget}.
+     * @throws NullPointerException if the proposed type is null
      */
-    public CallSite() {
+    /*package-private*/
+    CallSite(MethodType type) {
+        target = MethodHandles.invokers(type).uninitializedCallSite();
     }
 
     /**
      * Make a blank call site object, possibly equipped with an initial target method handle.
-     * The initial target reference may be null, in which case the {@code CallSite} object
-     * must be provided with a target method via a call to {@link CallSite#setTarget},
-     * or by a subclass override of {@link CallSite#initialTarget}.
-     * @param target the method handle which will be the initial target of the call site, or null if there is none yet
+     * @param target the method handle which will be the initial target of the call site
+     * @throws NullPointerException if the proposed target is null
      */
-    public CallSite(MethodHandle target) {
+    /*package-private*/
+    CallSite(MethodHandle target) {
+        target.type();  // null check
         this.target = target;
     }
 
-    /** @deprecated transitional form defined in EDR but removed in PFD */
-    public CallSite(Class<?> caller, String name, MethodType type) {
-        this.calleeNameRemoveForPFD = new MemberName(caller, name, type);
-    }
-    /** @deprecated transitional form defined in EDR but removed in PFD */
-    public Class<?> callerClass() {
-        MemberName callee = this.calleeNameRemoveForPFD;
-        return callee == null ? null : callee.getDeclaringClass();
-    }
-    /** @deprecated transitional form defined in EDR but removed in PFD */
-    public String name() {
-        MemberName callee = this.calleeNameRemoveForPFD;
-        return callee == null ? null : callee.getName();
-    }
-    /** @deprecated transitional form defined in EDR but removed in PFD */
+    /**
+     * Report the type of this call site's target.
+     * Although targets may change, the call site's type can never change.
+     * The {@code setTarget} method enforces this invariant by refusing any new target that does
+     * not have the previous target's type.
+     * @return the type of the current target, which is also the type of any future target
+     */
     public MethodType type() {
-        MemberName callee = this.calleeNameRemoveForPFD;
-        return callee == null ? (target == null ? null : target.type()) : callee.getMethodType();
-    }
-    /** @deprecated transitional form defined in EDR but removed in PFD */
-    protected MethodHandle initialTarget() {
-        return initialTarget(callerClass(), name(), type());
-    }
-
-    /** Report if the JVM has linked this {@code CallSite} object to a dynamic call site instruction.
-     *  Once it is linked, it is never unlinked.
-     */
-    private boolean isLinked() {
-        return vmmethod != null;
+        return target.type();
     }
 
     /** Called from JVM (or low-level Java code) after the BSM returns the newly created CallSite.
@@ -152,68 +142,66 @@
                            MethodType type,
                            MemberName callerMethod,
                            int        callerBCI) {
-        if (this.isLinked()) {
+        if (this.vmmethod != null) {
+            // FIXME
             throw new InvokeDynamicBootstrapError("call site has already been linked to an invokedynamic instruction");
         }
-        MethodHandle target = this.target;
-        if (target == null) {
-            this.target = target = this.initialTarget(callerMethod.getDeclaringClass(), name, type);
-        }
-        if (!target.type().equals(type)) {
+        if (!this.type().equals(type)) {
             throw wrongTargetType(target, type);
         }
         this.vmindex  = callerBCI;
         this.vmmethod = callerMethod;
-        assert(this.isLinked());
     }
 
     /**
-     * Just after a call site is created by a bootstrap method handle,
-     * if the target has not been initialized by the factory method itself,
-     * the method {@code initialTarget} is called to produce an initial
-     * non-null target.  (Live call sites must never have null targets.)
+     * Report the current linkage state of the call site, a value which may change over time.
      * <p>
-     * The arguments are the same as those passed to the bootstrap method.
-     * Thus, a bootstrap method is free to ignore the arguments and simply
-     * create a "blank" {@code CallSite} object of an appropriate subclass.
+     * If a {@code CallSite} object is returned
+     * from the bootstrap method of the {@code invokedynamic} instruction,
+     * the {@code CallSite} is permanently bound to that instruction.
+     * When the {@code invokedynamic} instruction is executed, the target method
+     * of its associated call site object is invoked directly.
+     * It is as if the instruction calls {@code getTarget} and then
+     * calls {@link MethodHandle#invokeExact invokeExact} on the result.
      * <p>
-     * If the bootstrap method itself does not initialize the call site,
-     * this method must be overridden, because it just raises an
-     * {@code InvokeDynamicBootstrapError}, which in turn causes the
-     * linkage of the {@code invokedynamic} instruction to terminate
-     * abnormally.
-     * @deprecated transitional form defined in EDR but removed in PFD
-     */
-    protected MethodHandle initialTarget(Class<?> callerClass, String name, MethodType type) {
-        throw new InvokeDynamicBootstrapError("target must be initialized before call site is linked: "+name+type);
-    }
-
-    /**
-     * Report the current linkage state of the call site.  (This is mutable.)
-     * The value may not be null after the {@code CallSite} object is returned
-     * from the bootstrap method of the {@code invokedynamic} instruction.
-     * When an {@code invokedynamic} instruction is executed, the target method
-     * of its associated {@code call site} object is invoked directly,
-     * as if via {@link MethodHandle}{@code .invoke}.
-     * <p>
-     * The interactions of {@code getTarget} with memory are the same
+     * Unless specified differently by a subclass,
+     * the interactions of {@code getTarget} with memory are the same
      * as of a read from an ordinary variable, such as an array element or a
      * non-volatile, non-final field.
      * <p>
      * In particular, the current thread may choose to reuse the result
      * of a previous read of the target from memory, and may fail to see
      * a recent update to the target by another thread.
-     * @return the current linkage state of the call site
+     * <p>
+     * In a {@linkplain ConstantCallSite constant call site}, the {@code getTarget} method behaves
+     * like a read from a {@code final} field of the {@code CallSite}.
+     * <p>
+     * In a {@linkplain VolatileCallSite volatile call site}, the {@code getTarget} method behaves
+     * like a read from a {@code volatile} field of the {@code CallSite}.
+     * <p>
+     * This method may not be overridden by application code.
+     * @return the current linkage state of the call site, its target method handle
+     * @see ConstantCallSite
+     * @see VolatileCallSite
      * @see #setTarget
      */
-    public MethodHandle getTarget() {
+    public final MethodHandle getTarget() {
+        return getTarget0();
+    }
+
+    /**
+     * Privileged implementations can override this to force final or volatile semantics on getTarget.
+     */
+    /*package-private*/
+    MethodHandle getTarget0() {
         return target;
     }
 
     /**
      * Set the target method of this call site.
      * <p>
-     * The interactions of {@code setTarget} with memory are the same
+     * Unless a subclass of CallSite documents otherwise,
+     * the interactions of {@code setTarget} with memory are the same
      * as of a write to an ordinary variable, such as an array element or a
      * non-volatile, non-final field.
      * <p>
@@ -224,43 +212,32 @@
      * at any given call site.
      * @param newTarget the new target
      * @throws NullPointerException if the proposed new target is null
-     * @throws WrongMethodTypeException if the call site is linked and the proposed new target
+     * @throws WrongMethodTypeException if the proposed new target
      *         has a method type that differs from the previous target
+     * @throws UnsupportedOperationException if the call site is
+     *         in fact a {@link ConstantCallSite}
      */
     public void setTarget(MethodHandle newTarget) {
+        checkTargetChange(this.target, newTarget);
+        setTargetNormal(newTarget);
+    }
+
+    void checkTargetChange(MethodHandle oldTarget, MethodHandle newTarget) {
+        MethodType oldType = oldTarget.type();
         MethodType newType = newTarget.type();  // null check!
-        MethodHandle oldTarget = this.target;
-        if (oldTarget == null) {
-            // CallSite is not yet linked.
-            assert(!isLinked());
-            this.target = newTarget;  // might be null!
-            return;
-        }
-        MethodType oldType = oldTarget.type();
-        if (!newTarget.type().equals(oldType))
+        if (!newType.equals(oldType))
             throw wrongTargetType(newTarget, oldType);
-        if (oldTarget != newTarget)
-            CallSiteImpl.setCallSiteTarget(IMPL_TOKEN, this, newTarget);
     }
 
     private static WrongMethodTypeException wrongTargetType(MethodHandle target, MethodType type) {
-        return new WrongMethodTypeException(String.valueOf(target)+target.type()+" should be of type "+type);
-    }
-
-    /** Produce a printed representation that displays information about this call site
-     *  that may be useful to the human reader.
-     */
-    @Override
-    public String toString() {
-        return "CallSite"+(target == null ? "" : target.type());
+        return new WrongMethodTypeException(String.valueOf(target)+" should be of type "+type);
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle equivalent to an invokedynamic instruction
      * which has been linked to this call site.
-     * <p>If this call site is a {@link ConstantCallSite}, this method
-     * simply returns the call site's target, since that will not change.
+     * <p>If this call site is a {@linkplain ConstantCallSite constant call site},
+     * this method simply returns the call site's target, since that will never change.
      * <p>Otherwise, this method is equivalent to the following code:
      * <p><blockquote><pre>
      * MethodHandle getTarget, invoker, result;
@@ -271,8 +248,9 @@
      * @return a method handle which always invokes this call site's current target
      */
     public final MethodHandle dynamicInvoker() {
-        if (this instanceof ConstantCallSite)
-            return getTarget();  // will not change dynamically
+        if (this instanceof ConstantCallSite) {
+            return getTarget0();  // will not change dynamically
+        }
         MethodHandle getTarget = MethodHandleImpl.bindReceiver(IMPL_TOKEN, GET_TARGET, this);
         MethodHandle invoker = MethodHandles.exactInvoker(this.type());
         return MethodHandles.foldArguments(invoker, getTarget);
@@ -287,9 +265,34 @@
         }
     }
 
-    /** Implementation of {@link MethodHandleProvider} which returns {@code this.dynamicInvoker()}. */
-    public final MethodHandle asMethodHandle() { return dynamicInvoker(); }
+    /** This guy is rolled into the default target if a MethodType is supplied to the constructor. */
+    /*package-private*/
+    static Empty uninitializedCallSite() {
+        throw new IllegalStateException("uninitialized call site");
+    }
 
-    /** Implementation of {@link MethodHandleProvider}, which returns {@code this.dynamicInvoker().asType(type)}. */
-    public final MethodHandle asMethodHandle(MethodType type) { return dynamicInvoker().asType(type); }
+    // unsafe stuff:
+    private static final Unsafe unsafe = Unsafe.getUnsafe();
+    private static final long TARGET_OFFSET;
+
+    static {
+        try {
+            TARGET_OFFSET = unsafe.objectFieldOffset(CallSite.class.getDeclaredField("target"));
+        } catch (Exception ex) { throw new Error(ex); }
+    }
+
+    /*package-private*/
+    void setTargetNormal(MethodHandle newTarget) {
+        target = newTarget;
+        //CallSiteImpl.setCallSiteTarget(IMPL_TOKEN, this, newTarget);
+    }
+    /*package-private*/
+    MethodHandle getTargetVolatile() {
+        return (MethodHandle) unsafe.getObjectVolatile(this, TARGET_OFFSET);
+    }
+    /*package-private*/
+    void setTargetVolatile(MethodHandle newTarget) {
+        unsafe.putObjectVolatile(this, TARGET_OFFSET, newTarget);
+        //CallSiteImpl.setCallSiteTarget(IMPL_TOKEN, this, newTarget);
+    }
 }
--- a/src/share/classes/java/dyn/ClassValue.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/ClassValue.java	Thu Dec 23 00:03:46 2010 -0800
@@ -28,44 +28,78 @@
 import java.util.WeakHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
+import java.lang.reflect.UndeclaredThrowableException;
 
 /**
  * Lazily associate a computed value with (potentially) every class.
  * @author John Rose, JSR 292 EG
  */
-public abstract class ClassValue<T> {
+public class ClassValue<T> {
     /**
      * Compute the given class's derived value for this {@code ClassValue}.
      * <p>
      * This method will be invoked within the first thread that accesses
-     * the value with the {@link #get}.
+     * the value with the {@link #get get} method.
      * <p>
      * Normally, this method is invoked at most once per class,
-     * but it may be invoked again in case of subsequent invocations
-     * of {@link #remove} followed by {@link #get}.
+     * but it may be invoked again if there has been a call to
+     * {@link #remove remove}.
+     * <p>
+     * If there is no override from a subclass, this method returns
+     * the result of applying the {@code ClassValue}'s {@code computeValue}
+     * method handle, which was supplied at construction time.
      *
-     * @return the computed value for this thread-local
+     * @return the newly computed value associated with this {@code ClassValue}, for the given class or interface
+     * @throws UndeclaredThrowableException if the {@code computeValue} method handle invocation throws something other than a {@code RuntimeException} or {@code Error}
+     * @throws UnsupportedOperationException if the {@code computeValue} method handle is null (subclasses must override)
      */
-    protected abstract T computeValue(Class<?> type);
+    protected T computeValue(Class<?> type) {
+        if (computeValue == null)
+            return null;
+        try {
+            return (T) (Object) computeValue.invokeGeneric(type);
+        } catch (Throwable ex) {
+            if (ex instanceof Error)             throw (Error) ex;
+            if (ex instanceof RuntimeException)  throw (RuntimeException) ex;
+            throw new UndeclaredThrowableException(ex);
+        }
+    }
+
+    private final MethodHandle computeValue;
 
     /**
      * Creates a new class value.
+     * Subclasses which use this constructor must override
+     * the {@link #computeValue computeValue} method,
+     * since the default {@code computeValue} method requires a method handle,
+     * which this constructor does not provide.
      */
     protected ClassValue() {
+        this.computeValue = null;
+    }
+
+    /**
+     * Creates a new class value, whose {@link #computeValue computeValue} method
+     * will return the result of {@code computeValue.invokeGeneric(type)}.
+     * @throws NullPointerException  if the method handle parameter is null
+     */
+    public ClassValue(MethodHandle computeValue) {
+        computeValue.getClass();  // trigger NPE if null
+        this.computeValue = computeValue;
     }
 
     /**
      * Returns the value for the given class.
      * If no value has yet been computed, it is obtained by
-     * by an invocation of the {@link #computeValue} method.
+     * by an invocation of the {@link #computeValue computeValue} method.
      * <p>
      * The actual installation of the value on the class
-     * is performed while the class's synchronization lock
-     * is held.  At that point, if racing threads have
+     * is performed atomically.
+     * At that point, if racing threads have
      * computed values, one is chosen, and returned to
      * all the racing threads.
      *
-     * @return the current thread's value of this thread-local
+     * @return the current value associated with this {@code ClassValue}, for the given class or interface
      */
     public T get(Class<?> type) {
         ClassValueMap map = getMap(type);
@@ -81,9 +115,16 @@
     /**
      * Removes the associated value for the given class.
      * If this value is subsequently {@linkplain #get read} for the same class,
-     * its value will be reinitialized by invoking its {@link #computeValue} method.
+     * its value will be reinitialized by invoking its {@link #computeValue computeValue} method.
      * This may result in an additional invocation of the
-     * {@code computeValue} method for the given class.
+     * {@code computeValue computeValue} method for the given class.
+     * <p>
+     * If racing threads perform a combination of {@code get} and {@code remove} calls,
+     * the calls are serialized.
+     * A value produced by a call to {@code computeValue} will be discarded, if
+     * the corresponding {@code get} call was followed by a {@code remove} call
+     * before the {@code computeValue} could complete.
+     * In such a case, the {@code get} call will re-invoke {@code computeValue}.
      */
     public void remove(Class<?> type) {
         ClassValueMap map = getMap(type);
@@ -118,6 +159,7 @@
             // Warm up the table with a null entry.
             map.preInitializeEntry(this);
         }
+        STORE_BARRIER.lazySet(0);
         // All stores pending from table expansion are completed.
         synchronized (map) {
             value = (T) map.initializeEntry(this, value);
--- a/src/share/classes/java/dyn/ConstantCallSite.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/ConstantCallSite.java	Thu Dec 23 00:03:46 2010 -0800
@@ -27,17 +27,21 @@
 
 /**
  * A {@code ConstantCallSite} is a {@link CallSite} whose target is permanent, and can never be changed.
- * The only way to relink an {@code invokedynamic} instruction bound to a {@code ConstantCallSite} is
- * to invalidate the instruction as a whole.
+ * An {@code invokedynamic} instruction linked to a {@code ConstantCallSite} is permanently
+ * bound to the call site's target.
  * @author John Rose, JSR 292 EG
  */
 public class ConstantCallSite extends CallSite {
-    /** Create a call site with a permanent target. */
+    /** Create a call site with a permanent target.
+     * @throws NullPointerException if the proposed target is null
+     */
     public ConstantCallSite(MethodHandle target) {
         super(target);
     }
-    /** Throw an {@link IllegalArgumentException}, because this kind of call site cannot change its target. */
+    /**
+     * Throw an {@link UnsupportedOperationException}, because this kind of call site cannot change its target.
+     */
     @Override public final void setTarget(MethodHandle ignore) {
-        throw new IllegalArgumentException("ConstantCallSite");
+        throw new UnsupportedOperationException("ConstantCallSite");
     }
 }
--- a/src/share/classes/java/dyn/InvokeDynamic.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/InvokeDynamic.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 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
@@ -26,55 +26,8 @@
 package java.dyn;
 
 /**
- * {@code InvokeDynamic} is a class with neither methods nor instances,
- * which serves only as a syntactic marker in Java source code for
- * an {@code invokedynamic} instruction.
- * (See <a href="package-summary.html#jvm_mods">the package information</a> for specifics on this instruction.)
- * <p>
- * The {@code invokedynamic} instruction is incomplete without a target method.
- * The target method is a property of the reified {@linkplain CallSite call site object}
- * which is linked to each active {@code invokedynamic} instruction.
- * The call site object is initially produced by a
- * {@linkplain BootstrapMethod bootstrap method}
- * associated with the class whose bytecodes include the dynamic call site.
- * <p>
- * The type {@code InvokeDynamic} has no particular meaning as a
- * class or interface supertype, or an object type; it can never be instantiated.
- * Logically, it denotes a source of all dynamically typed methods.
- * It may be viewed as a pure syntactic marker of static calls.
- * It may be imported for ease of use.
- * <p>
- * Here are some examples:
-<blockquote><pre><!-- see indy-demo/src/JavaDocExamples.java -->
-&#064;BootstrapMethod(value=Here.class, name="bootstrapDynamic")
-static void example() throws Throwable {
-    Object x; String s; int i;
-    x = InvokeDynamic.greet("world"); // greet(Ljava/lang/String;)Ljava/lang/Object;
-    s = (String) InvokeDynamic.hail(x); // hail(Ljava/lang/Object;)Ljava/lang/String;
-    InvokeDynamic.cogito(); // cogito()V
-    i = (int) InvokeDynamic.#"op:+"(2, 3); // "op:+"(II)I
+ * This is a place-holder class.  Some HotSpot implementations need to see it.
+ */
+final class InvokeDynamic {
+    private InvokeDynamic() { throw new InternalError(); }  // do not instantiate
 }
-static MethodHandle bootstrapDynamic(Class caller, String name, MethodType type) { ... }
-</pre></blockquote>
- * Each of the above calls generates a single invokedynamic instruction
- * with the name-and-type descriptors indicated in the comments.
- * <p>
- * The argument types are taken directly from the actual arguments,
- * while the return type corresponds to the target of the assignment.
- * (Currently, the return type must be given as a false type parameter.
- * This type parameter is an irregular use of the generic type syntax,
- * and is likely to change in favor of a convention based on target typing.)
- * <p>
- * The final example uses a special syntax for uttering non-Java names.
- * Any name legal to the JVM may be given between the double quotes.
- * <p>
- * None of these calls is complete without a bootstrap method,
- * which must be declared for the enclosing class or method.
- * @author John Rose, JSR 292 EG
- */
-@MethodHandle.PolymorphicSignature
-public final class InvokeDynamic {
-    private InvokeDynamic() { throw new InternalError(); }  // do not instantiate
-
-    // no statically defined static methods
-}
--- a/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java	Thu Dec 23 00:03:46 2010 -0800
@@ -67,4 +67,16 @@
     public InvokeDynamicBootstrapError(String s, Throwable cause) {
         super(s, cause);
     }
+
+    /**
+     * Constructs a {@code InvokeDynamicBootstrapError} with the specified
+     * cause.
+     *
+     * @param cause the cause, may be {@code null}.
+     */
+    public InvokeDynamicBootstrapError(Throwable cause) {
+        // cf. Throwable(Throwable cause) constructor.
+        super(cause == null ? null : cause.toString());
+        initCause(cause);
+    }
 }
--- a/src/share/classes/java/dyn/Linkage.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/Linkage.java	Thu Dec 23 00:03:46 2010 -0800
@@ -29,15 +29,16 @@
 import java.util.WeakHashMap;
 import sun.dyn.Access;
 import sun.dyn.MethodHandleImpl;
+import sun.dyn.util.VerifyAccess;
 import sun.reflect.Reflection;
-import static sun.dyn.util.VerifyAccess.checkBootstrapPrivilege;
 import static sun.dyn.MemberName.newIllegalArgumentException;
 
 /**
- * This class consists exclusively of static methods that control
- * the linkage of {@code invokedynamic} instructions, and specifically
- * their reification as {@link CallSite} objects.
+ * <em>CLASS WILL BE REMOVED FOR PFD:</em>
+ * Static routines for controlling invokedynamic behavior.
+ * Replaced by non-static APIs.
  * @author John Rose, JSR 292 EG
+ * @deprecated This class will be removed in the Public Final Draft.
  */
 public class Linkage {
     private static final Access IMPL_TOKEN = Access.getToken();
@@ -45,68 +46,24 @@
     private Linkage() {}  // do not instantiate
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
      * Register a <em>bootstrap method</em> to use when linking dynamic call sites within
      * a given caller class.
-     * <p>
-     * A bootstrap method must be a method handle with a return type of {@link CallSite}
-     * and the following arguments:
-     * <ul>
-     * <li>the class containing the {@code invokedynamic} instruction, for which the bootstrap method was registered
-     * <li>the name of the method being invoked (a {@link String})
-     * <li>the type of the method being invoked (a {@link MethodType})
-     * </ul>
-     * The bootstrap method acts as a factory method which accepts the given arguments
-     * and returns a {@code CallSite} object (possibly of a subclass of {@code CallSite}).
-     * <p>
-     * The registration must take place exactly once, either before the class has begun
-     * being initialized, or from within the class's static initializer.
-     * Registration will fail with an exception if any of the following conditions hold:
-     * <ul>
-     * <li>The immediate caller of this method is in a different package than the given caller class,
-     *     and there is a security manager, and its {@code checkPermission} call throws
-     *     when passed {@link LinkagePermission}("registerBootstrapMethod",callerClass).
-     * <li>The given caller class already has a bootstrap method registered.
-     * <li>The given caller class is already fully initialized.
-     * <li>The given caller class is in the process of initialization, in another thread.
-     * </ul>
-     * Because of these rules, a class may install its own bootstrap method in
-     * a static initializer.
-     * @param callerClass a class that may have {@code invokedynamic} sites
-     * @param bootstrapMethod the method to use to bootstrap all such sites
-     * @exception IllegalArgumentException if the class argument is null or
-     *            a primitive class, or if the bootstrap method is the wrong type
-     * @exception IllegalStateException if the class already has a bootstrap
-     *            method, or if the its static initializer has already run
-     *            or is already running in another thread
-     * @exception SecurityException if there is a security manager installed,
-     *            and a {@link LinkagePermission} check fails for "registerBootstrapMethod"
-     * @deprecated Use @{@link BootstrapMethod} annotations instead
+     * @deprecated Use @{@link BootstrapMethod} annotations instead.
      */
     public static
     void registerBootstrapMethod(Class callerClass, MethodHandle bootstrapMethod) {
         Class callc = Reflection.getCallerClass(2);
-        checkBootstrapPrivilege(callc, callerClass, "registerBootstrapMethod");
-        checkBSM(bootstrapMethod);
+        if (callc != null && !VerifyAccess.isSamePackage(callerClass, callc))
+            throw new IllegalArgumentException("cannot set bootstrap method on "+callerClass);
         MethodHandleImpl.registerBootstrap(IMPL_TOKEN, callerClass, bootstrapMethod);
     }
 
-    static private void checkBSM(MethodHandle mh) {
-        if (mh == null)  throw newIllegalArgumentException("null bootstrap method");
-        if (mh.type() == BOOTSTRAP_METHOD_TYPE)  return;
-        throw new WrongMethodTypeException(mh.toString());
-    }
-
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
      * Simplified version of {@code registerBootstrapMethod} for self-registration,
      * to be called from a static initializer.
-     * Finds a static method of the required type in the
-     * given runtime class, and installs it on the caller class.
-     * @throws NoSuchMethodException if there is no such method
-     * @throws IllegalStateException if the caller class's static initializer
-     *         has already run, or is already running in another thread
-     * @deprecated Use @{@link BootstrapMethod} annotations instead
+     * @deprecated Use @{@link BootstrapMethod} annotations instead.
      */
     public static
     void registerBootstrapMethod(Class<?> runtime, String name) {
@@ -115,15 +72,9 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
      * Simplified version of {@code registerBootstrapMethod} for self-registration,
-     * to be called from a static initializer.
-     * Finds a static method of the required type in the
-     * caller class itself, and installs it on the caller class.
-     * @throws IllegalArgumentException if there is no such method
-     * @throws IllegalStateException if the caller class's static initializer
-     *         has already run, or is already running in another thread
-     * @deprecated Use @{@link BootstrapMethod} annotations instead
+     * @deprecated Use @{@link BootstrapMethod} annotations instead.
      */
     public static
     void registerBootstrapMethod(String name) {
@@ -140,82 +91,33 @@
         } catch (NoAccessException ex) {
             throw new IllegalArgumentException("no such bootstrap method in "+runtime+": "+name, ex);
         }
-        checkBSM(bootstrapMethod);
         MethodHandleImpl.registerBootstrap(IMPL_TOKEN, callerClass, bootstrapMethod);
     }
 
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Report the bootstrap method registered for a given caller class.
-     * Returns null if the class has never yet registered a bootstrap method.
-     * Only callers privileged to set the bootstrap method may inquire
-     * about it, because a bootstrap method is potentially a back-door entry
-     * point into its class.
-     * @exception IllegalArgumentException if the argument is null or
-     *            a primitive class
-     * @exception SecurityException if there is a security manager installed,
-     *            and the immediate caller of this method is not in the same
-     *            package as the caller class
-     *            and a {@link LinkagePermission} check fails for "getBootstrapMethod"
-     * @deprecated
-     */
-    public static
-    MethodHandle getBootstrapMethod(Class callerClass) {
-        Class callc = Reflection.getCallerClass(2);
-        checkBootstrapPrivilege(callc, callerClass, "getBootstrapMethod");
-        return MethodHandleImpl.getBootstrap(IMPL_TOKEN, callerClass);
-    }
-
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * The type of any bootstrap method is a three-argument method
-     * {@code (Class, String, MethodType)} returning a {@code CallSite}.
-     */
-    public static final MethodType BOOTSTRAP_METHOD_TYPE
+    private static final MethodType BOOTSTRAP_METHOD_TYPE
             = MethodType.methodType(CallSite.class,
                                     Class.class, String.class, MethodType.class);
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
      * Invalidate all <code>invokedynamic</code> call sites everywhere.
-     * <p>
-     * When this method returns, every <code>invokedynamic</code> instruction
-     * will invoke its bootstrap method on next call.
-     * <p>
-     * It is unspecified whether call sites already known to the Java
-     * code will continue to be associated with <code>invokedynamic</code>
-     * instructions.  If any call site is still so associated, its
-     * {@link CallSite#getTarget()} method is guaranteed to return null
-     * the invalidation operation completes.
-     * <p>
-     * Invalidation operations are likely to be slow.  Use them sparingly.
+     * @deprecated Use {@linkplain CallSite#setTarget call site target setting}
+     * and {@link VolatileCallSite#invalidateAll call site invalidation} instead.
      */
     public static
     Object invalidateAll() {
-        SecurityManager security = System.getSecurityManager();
-        if (security != null) {
-            security.checkPermission(new LinkagePermission("invalidateAll"));
-        }
-        throw new UnsupportedOperationException("NYI");
+        throw new UnsupportedOperationException();
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
      * Invalidate all {@code invokedynamic} call sites in the bytecodes
      * of any methods of the given class.
-     * <p>
-     * When this method returns, every matching <code>invokedynamic</code>
-     * instruction will invoke its bootstrap method on next call.
-     * <p>
-     * For additional semantics of call site invalidation,
-     * see {@link #invalidateAll()}.
+     * @deprecated Use {@linkplain CallSite#setTarget call site target setting}
+     * and {@link VolatileCallSite#invalidateAll call site invalidation} instead.
      */
     public static
     Object invalidateCallerClass(Class<?> callerClass) {
-        SecurityManager security = System.getSecurityManager();
-        if (security != null) {
-            security.checkPermission(new LinkagePermission("invalidateAll", callerClass));
-        }
-        throw new UnsupportedOperationException("NYI");
+        throw new UnsupportedOperationException();
     }
 }
--- a/src/share/classes/java/dyn/LinkagePermission.java	Wed Dec 22 13:49:23 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package java.dyn;
-
-import java.security.*;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-
-/**
- * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
- * This class is for managing runtime permission checking for
- * operations performed by methods in the {@link Linkage} class.
- * Like a {@link RuntimePermission}, on which it is modeled,
- * a {@code LinkagePermission} contains a target name but
- * no actions list; you either have the named permission
- * or you don't.
- * <p>
- * The following table lists all the possible {@code LinkagePermission} target names,
- * and for each provides a description of what the permission allows
- * and a discussion of the risks of granting code the permission.
- * <p>
- *
- * <table border=1 cellpadding=5 summary="permission target name,
- *  what the target allows,and associated risks">
- * <tr>
- * <th>Permission Target Name</th>
- * <th>What the Permission Allows</th>
- * <th>Risks of Allowing this Permission</th>
- * </tr>
- *
- * <tr>
- *   <td>invalidateAll</td>
- *   <td>Force the relinking of invokedynamic call sites everywhere.</td>
- *   <td>This could allow an attacker to slow down the system,
- *       or perhaps expose timing bugs in a dynamic language implementations,
- *       by forcing redundant relinking operations.</td>
- * </tr>
- *
- *
- * <tr>
- *   <td>invalidateCallerClass.{class name}</td>
- *   <td>Force the relinking of invokedynamic call sites in the given class.</td>
- *   <td>See {@code invalidateAll}.</td>
- * </tr>
- * </table>
- * <p>ISSUE: Is this still needed?
- *
- * @see java.lang.RuntimePermission
- * @see java.lang.SecurityManager
- *
- * @author John Rose, JSR 292 EG
- */
-
-public final class LinkagePermission extends BasicPermission {
-    private static final long serialVersionUID = 292L;
-
-    /**
-     * Create a new LinkagePermission with the given name.
-     * The name is the symbolic name of the LinkagePermission, such as
-     * "invalidateCallerClass.*", etc. An asterisk
-     * may appear at the end of the name, following a ".", or by itself, to
-     * signify a wildcard match.
-     *
-     * @param name the name of the LinkagePermission
-     */
-    public LinkagePermission(String name) {
-        super(name);
-    }
-
-    /**
-     * Create a new LinkagePermission with the given name on the given class.
-     * Equivalent to {@code LinkagePermission(name+"."+clazz.getName())}.
-     *
-     * @param name the name of the LinkagePermission
-     * @param clazz the class affected by the permission
-     */
-    public LinkagePermission(String name, Class<?> clazz) {
-        super(name + "." + clazz.getName());
-    }
-}
--- a/src/share/classes/java/dyn/MethodHandle.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/MethodHandle.java	Thu Dec 23 00:03:46 2010 -0800
@@ -37,20 +37,29 @@
  * A method handle is a typed, directly executable reference to a method,
  * constructor, field, or similar low-level operation, with optional
  * transformations of arguments or return values.
- * (These transformations include conversion, insertion, deletion,
- * substitution.  See the methods of this class and of {@link MethodHandles}.)
+ * These transformations are quite general, and include such patterns as
+ * {@linkplain #asType conversion},
+ * {@linkplain #bindTo insertion},
+ * {@linkplain java.dyn.MethodHandles#dropArguments deletion},
+ * and {@linkplain java.dyn.MethodHandles#filterArguments substitution}.
+ * <p>
+ * <em>Note: The super-class of MethodHandle is Object.
+ *     Any other super-class visible in the Reference Implementation
+ *     will be removed before the Proposed Final Draft.
+ *     Also, the final version will not include any public or
+ *     protected constructors.</em>
  * <p>
  * Method handles are strongly typed according to signature.
  * They are not distinguished by method name or enclosing class.
  * A method handle must be invoked under a signature which matches
- * the method handle's own {@link MethodType method type}.
+ * the method handle's own {@linkplain MethodType method type}.
  * <p>
- * Every method handle confesses its type via the {@code type} accessor.
+ * Every method handle reports its type via the {@link #type type} accessor.
  * The structure of this type is a series of classes, one of which is
  * the return type of the method (or {@code void.class} if none).
  * <p>
  * Every method handle appears as an object containing a method named
- * {@code invoke}, whose signature exactly matches
+ * {@link #invokeExact invokeExact}, whose signature exactly matches
  * the method handle's type.
  * A Java method call expression, which compiles to an
  * {@code invokevirtual} instruction,
@@ -61,15 +70,29 @@
  * (The type is specified in the {@code invokevirtual} instruction,
  * via a {@code CONSTANT_NameAndType} constant pool entry.)
  * The call looks within the receiver object for a method
- * named {@code invoke} of the intended method type.
+ * named {@code invokeExact} of the intended method type.
  * The call fails with a {@link WrongMethodTypeException}
- * if the method does not exist, even if there is an {@code invoke}
+ * if the method does not exist, even if there is an {@code invokeExact}
  * method of a closely similar signature.
  * As with other kinds
  * of methods in the JVM, signature matching during method linkage
  * is exact, and does not allow for language-level implicit conversions
  * such as {@code String} to {@code Object} or {@code short} to {@code int}.
  * <p>
+ * Each individual method handle also contains a method named
+ * {@link #invokeGeneric invokeGeneric}, whose type is the same
+ * as {@code invokeExact}, and is therefore also reported by
+ * the {@link #type type} accessor.
+ * A call to {@code invokeGeneric} works the same as a call to
+ * {@code invokeExact}, if the signature specified by the caller
+ * exactly matches the method handle's own type.
+ * If there is a type mismatch, {@code invokeGeneric} attempts
+ * to adjust the type of the target method handle
+ * (as if by a call to {@link #asType asType})
+ * to obtain an exactly invokable target.
+ * This allows a more powerful negotiation of method type
+ * between caller and callee.
+ * <p>
  * A method handle is an unrestricted capability to call a method.
  * A method handle can be formed on a non-public method by a class
  * that has access to that method; the resulting handle can be used
@@ -77,31 +100,47 @@
  * checking is performed when the method handle is created, not
  * (as in reflection) every time it is called.  Handles to non-public
  * methods, or in non-public classes, should generally be kept secret.
- * They should not be passed to untrusted code.
+ * They should not be passed to untrusted code unless their use from
+ * the untrusted code would be harmless.
  * <p>
- * Bytecode in an extended JVM can directly call a method handle's
- * {@code invoke} from an {@code invokevirtual} instruction.
+ * Bytecode in the JVM can directly call a method handle's
+ * {@code invokeExact} method from an {@code invokevirtual} instruction.
  * The receiver class type must be {@code MethodHandle} and the method name
- * must be {@code invoke}.  The signature of the invocation
+ * must be {@code invokeExact}.  The signature of the invocation
  * (after resolving symbolic type names) must exactly match the method type
  * of the target method.
+ * Similarly, bytecode can directly call a method handle's {@code invokeGeneric}
+ * method.  The signature of the invocation (after resolving symbolic type names)
+ * must either exactly match the method type or be a valid argument to
+ * the target's {@link #asType asType} method.
  * <p>
- * Every {@code invoke} method always throws {@link Exception},
+ * Every {@code invokeExact} and {@code invokeGeneric} method always
+ * throws {@link java.lang.Throwable Throwable},
  * which is to say that there is no static restriction on what a method handle
  * can throw.  Since the JVM does not distinguish between checked
  * and unchecked exceptions (other than by their class, of course),
  * there is no particular effect on bytecode shape from ascribing
  * checked exceptions to method handle invocations.  But in Java source
  * code, methods which perform method handle calls must either explicitly
- * throw {@code Exception}, or else must catch all checked exceptions locally.
+ * throw {@code java.lang.Throwable Throwable}, or else must catch all
+ * throwables locally, rethrowing only those which are legal in the context,
+ * and wrapping ones which are illegal.
  * <p>
- * Bytecode in an extended JVM can directly obtain a method handle
+ * Bytecode in the JVM can directly obtain a method handle
  * for any accessible method from a {@code ldc} instruction
- * which refers to a {@code CONSTANT_Methodref} or
- * {@code CONSTANT_InterfaceMethodref} constant pool entry.
+ * which refers to a {@code CONSTANT_MethodHandle} constant pool entry.
+ * (Each such entry refers directly to a {@code CONSTANT_Methodref},
+ * {@code CONSTANT_InterfaceMethodref}, or {@code CONSTANT_Fieldref}
+ * constant pool entry.
+ * For more details, see the <a href="package-summary.html#mhcon">package summary</a>.)
  * <p>
- * All JVMs can also use a reflective API called {@code MethodHandles}
+ * Java code can also use a reflective API called
+ * {@link java.dyn.MethodHandles.Lookup MethodHandles.Lookup}
  * for creating and calling method handles.
+ * For example, a static method handle can be obtained
+ * from {@link java.dyn.MethodHandles.Lookup#findStatic Lookup.findStatic}.
+ * There are also bridge methods from Core Reflection API objects,
+ * such as {@link java.dyn.MethodHandles.Lookup#unreflect Lookup.ureflect}.
  * <p>
  * A method reference may refer either to a static or non-static method.
  * In the non-static case, the method handle type includes an explicit
@@ -128,10 +167,10 @@
 mt = MethodType.methodType(String.class, char.class, char.class);
 mh = lookup.findVirtual(String.class, "replace", mt);
 // (Ljava/lang/String;CC)Ljava/lang/String;
-s = mh.&lt;String&gt;invokeExact("daddy",'d','n');
+s = (String) mh.invokeExact("daddy",'d','n');
 assert(s.equals("nanny"));
 // weakly typed invocation (using MHs.invoke)
-s = (String) mh.invokeVarargs("sappy", 'p', 'v');
+s = (String) mh.invokeWithArguments("sappy", 'p', 'v');
 assert(s.equals("savvy"));
 // mt is {Object[] =&gt; List}
 mt = MethodType.methodType(java.util.List.class, Object[].class);
@@ -147,14 +186,22 @@
 mt = MethodType.methodType(int.class);
 mh = lookup.findVirtual(java.util.List.class, "size", mt);
 // (Ljava/util/List;)I
-i = mh.&lt;int&gt;invokeExact(java.util.Arrays.asList(1,2,3));
+i = (int) mh.invokeExact(java.util.Arrays.asList(1,2,3));
 assert(i == 3);
+mt = MethodType.methodType(void.class, String.class);
+mh = lookup.findVirtual(java.io.PrintStream.class, "println", mt);
+mh.invokeExact(System.out, "Hello, world.");
+// (Ljava/io/PrintStream;Ljava/lang/String;)V
  * </pre></blockquote>
  * Each of the above calls generates a single invokevirtual instruction
  * with the name {@code invoke} and the type descriptors indicated in the comments.
  * The argument types are taken directly from the actual arguments,
- * while the return type is taken from the type parameter.
- * (This type parameter may be a primitive, and it defaults to {@code Object}.)
+ * while the return type is taken from the cast immediately applied to the call.
+ * This cast may be to a primitive.
+ * If it is missing, the type defaults to {@code Object} if the call
+ * occurs in a context which uses the return value.
+ * If the call occurs as a statement, a cast is impossible,
+ * and there is no return type; the call is {@code void}.
  * <p>
  * <em>A note on generic typing:</em>  Method handles do not represent
  * their function types in terms of Java parameterized (generic) types,
@@ -162,7 +209,7 @@
  * Java types.
  * <ol>
  * <li>Method types range over all possible arities,
- * from no arguments to an arbitrary number of arguments.
+ * from no arguments to up to 255 of arguments (a limit imposed by the JVM).
  * Generics are not variadic, and so cannot represent this.</li>
  * <li>Method types can specify arguments of primitive types,
  * which Java generic types cannot range over.</li>
@@ -180,6 +227,19 @@
  * fields, methods, and constructors can be represented directly
  * in a class file's constant pool as constants to be loaded by {@code ldc} bytecodes.
  * Loading such a constant causes the component classes of its type to be loaded as necessary.
+ * <p>
+ * Method handles cannot be subclassed by the user.
+ * Implementations may (or may not) create internal subclasses of {@code MethodHandle}
+ * which may be visible via the {@code java.lang.Object#getClass Object.getClass}
+ * operation.  The programmer should not draw conclusions about a method handle
+ * from its specific class, as the method handle class hierarchy (if any)
+ * may change from time to time or across implementations from different vendors.
+ * <p>
+ * With respect to the Java Memory Model, any method handle will behave
+ * as if all of its fields are final variables.  This means that any method
+ * handle made visible to the application will always be fully formed.
+ * This is true even if the method handle is published through a shared
+ * variables in a data race.
  *
  * @see MethodType
  * @see MethodHandles
@@ -189,7 +249,6 @@
         // Note: This is an implementation inheritance hack, and will be removed
         // with a JVM change which moves the required hidden state onto this class.
         extends MethodHandleImpl
-        implements MethodHandleProvider
 {
     private static Access IMPL_TOKEN = Access.getToken();
 
@@ -208,7 +267,7 @@
 
     /**
      * Report the type of this method handle.
-     * Every invocation of this method handle must exactly match this type.
+     * Every invocation of this method handle via {@code invokeExact} must exactly match this type.
      * @return the method handle type
      */
     public final MethodType type() {
@@ -216,12 +275,16 @@
     }
 
     /**
-     * The constructor for MethodHandle may only be called by privileged code.
-     * Subclasses may be in other packages, but must possess
-     * a token which they obtained from MH with a security check.
-     * @param token non-null object which proves access permission
-     * @param type type (permanently assigned) of the new method handle
+     * <em>CONSTRUCTOR WILL BE REMOVED FOR PFD:</em>
+     * Temporary constructor in early versions of the Reference Implementation.
+     * Method handle inheritance (if any) will be contained completely within
+     * the {@code java.dyn} package.
      */
+    // The constructor for MethodHandle may only be called by privileged code.
+    // Subclasses may be in other packages, but must possess
+    // a token which they obtained from MH with a security check.
+    // @param token non-null object which proves access permission
+    // @param type type (permanently assigned) of the new method handle
     protected MethodHandle(Access token, MethodType type) {
         super(token);
         Access.check(token);
@@ -243,92 +306,116 @@
         });
     }
 
-    /** The string of a direct method handle is the simple name of its target method.
-     * The string of an adapter or bound method handle is the string of its
-     * target method handle.
-     * The string of a Java method handle is the string of its entry point method,
-     * unless the Java method handle overrides the toString method.
+    /**
+     * Returns a string representation of the method handle,
+     * starting with the string {@code "MethodHandle"} and
+     * ending with the string representation of the method handle's type.
+     * In other words, this method returns a string equal to the value of:
+     * <blockquote><pre>
+     * "MethodHandle" + type().toString()
+     * </pre></blockquote>
+     * <p>
+     * Note:  Future releases of this API may add further information
+     * to the string representation.
+     * Therefore, the present syntax should not be parsed by applications.
+     *
+     * @return a string representation of the method handle
      */
     @Override
     public String toString() {
         return MethodHandleImpl.getNameString(IMPL_TOKEN, this);
     }
 
-    //// This is the "Method Handle Kernel API" discussed at the JVM Language Summit, 9/2009.
-    //// Implementations here currently delegate to statics in MethodHandles.  Some of those statics
-    //// will be deprecated.  Others will be kept as "algorithms" to supply degrees of freedom
-    //// not present in the Kernel API.
+    /**
+     * Invoke the method handle, allowing any caller signature, but requiring an exact signature match.
+     * The signature at the call site of {@code invokeExact} must
+     * exactly match this method handle's {@link #type type}.
+     * No conversions are allowed on arguments or return values.
+     * @throws WrongMethodTypeException if the target's type is not identical with the caller's type signature
+     * @throws Throwable anything thrown by the underlying method propagates unchanged through the method handle call
+     */
+    public final native @PolymorphicSignature Object invokeExact(Object... args) throws Throwable;
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Invoke the method handle, allowing any caller signature, but requiring an exact signature match.
-     * The signature at the call site of {@code invokeExact} must
-     * exactly match this method handle's {@code type}.
-     * No conversions are allowed on arguments or return values.
+     * Invoke the method handle, allowing any caller signature,
+     * and optionally performing conversions for arguments and return types.
+     * <p>
+     * If the call site signature exactly matches this method handle's {@link #type type},
+     * the call proceeds as if by {@link #invokeExact invokeExact}.
+     * <p>
+     * Otherwise, the call proceeds as if this method handle were first
+     * adjusted by calling {@link #asType asType} to adjust this method handle
+     * to the required type, and then the call proceeds as if by
+     * {@link #invokeExact invokeExact} on the adjusted method handle.
+     * <p>
+     * There is no guarantee that the {@code asType} call is actually made.
+     * If the JVM can predict the results of making the call, it may perform
+     * adaptations directly on the caller's arguments,
+     * and call the target method handle according to its own exact type.
+     * <p>
+     * If the method handle is equipped with a
+     * {@linkplain #withTypeHandler type handler}, the handler must produce
+     * an entry point of the call site's exact type.
+     * Otherwise, the signature at the call site of {@code invokeGeneric} must
+     * be a valid argument to the standard {@code asType} method.
+     * In particular, the caller must specify the same argument arity
+     * as the callee's type.
+     * @throws WrongMethodTypeException if the target's type cannot be adjusted to the caller's type signature
+     * @throws Throwable anything thrown by the underlying method propagates unchanged through the method handle call
      */
-    public final native @PolymorphicSignature <R,A> R invokeExact(A... args) throws Throwable;
-
-    // FIXME: remove this transitional form
-    /** @deprecated transitional form defined in EDR but removed in PFD */
-    public final native @PolymorphicSignature <R,A> R invoke(A... args) throws Throwable;
+    public final native @PolymorphicSignature Object invokeGeneric(Object... args) throws Throwable;
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Invoke the method handle, allowing any caller signature,
-     * and performing simple conversions for arguments and return types.
-     * The signature at the call site of {@code invokeGeneric} must
-     * have the same arity as this method handle's {@code type}.
-     * <p>
-     * If the call site signature exactly matches this method handle's {@code type},
-     * the call proceeds as if by {@link #invokeExact}.
-     * <p>
-     * Otherwise, the call proceeds as if this method handle were first
-     * adjusted by calling {@link #asType} to adjust this method handle
-     * to the required type, and then the call proceeds as if by
-     * {@link #invokeExact} on the adjusted method handle.
-     */
-    public final native @PolymorphicSignature <R,A> R invokeGeneric(A... args) throws Throwable;
-
-    // ?? public final native @PolymorphicSignature <R,A,V> R invokeVarargs(A args, V[] varargs) throws Throwable;
-
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Perform a varargs invocation, passing the arguments in the given array
-     * to the method handle, as if via {@link #invokeGeneric} from a call site
+     * to the method handle, as if via {@link #invokeGeneric invokeGeneric} from a call site
      * which mentions only the type {@code Object}, and whose arity is the length
      * of the argument array.
      * <p>
-     * The length of the arguments array must equal the parameter count
-     * of the target's type.
-     * The arguments array is spread into separate arguments.
+     * Specifically, execution proceeds as if by the following steps,
+     * although the methods are not guaranteed to be called if the JVM
+     * can predict their effects.
+     * <ul>
+     * <li>Determine the length of the argument array as {@code N}.
+     *     For a null reference, {@code N=0}. </li>
+     * <li>Determine the generic type {@code TN} of {@code N} arguments as
+     *     as {@code TN=MethodType.genericMethodType(N)}.</li>
+     * <li>Force the original target method handle {@code MH0} to the
+     *     required type, as {@code MH1 = MH0.asType(TN)}. </li>
+     * <li>Spread the array into {@code N} separate arguments {@code A0, ...}. </li>
+     * <li>Invoke the type-adjusted method handle on the unpacked arguments:
+     *     MH1.invokeExact(A0, ...). </li>
+     * <li>Take the return value as an {@code Object} reference. </li>
+     * </ul>
      * <p>
-     * In order to match the type of the target, the following argument
+     * Because of the action of the {@code asType} step, the following argument
      * conversions are applied as necessary:
      * <ul>
      * <li>reference casting
      * <li>unboxing
+     * <li>widening primitive conversions
      * </ul>
-     * The following conversions are not applied:
-     * <ul>
-     * <li>primitive conversions (e.g., {@code byte} to {@code int}
-     * <li>varargs conversions other than the initial spread
-     * <li>any application-specific conversions (e.g., string to number)
-     * </ul>
+     * <p>
      * The result returned by the call is boxed if it is a primitive,
      * or forced to null if the return type is void.
      * <p>
      * This call is equivalent to the following code:
      * <p><blockquote><pre>
-     *   MethodHandle invoker = MethodHandles.genericInvoker(this.type(), 0, true);
-     *   Object result = invoker.invokeExact(this, arguments);
+     * MethodHandle invoker = MethodHandles.varargsInvoker(this.type(), 0);
+     * Object result = invoker.invokeExact(this, arguments);
      * </pre></blockquote>
      * @param arguments the arguments to pass to the target
      * @return the result returned by the target
-     * @see MethodHandles#genericInvoker
+     * @throws WrongMethodTypeException if the target's type cannot be adjusted to take the arguments
+     * @throws Throwable anything thrown by the target method invocation
+     * @see MethodHandles#varargsInvoker
      */
-    public final Object invokeVarargs(Object... arguments) throws Throwable {
+    public final Object invokeWithArguments(Object... arguments) throws Throwable {
         int argc = arguments == null ? 0 : arguments.length;
         MethodType type = type();
+        if (type.parameterCount() != argc) {
+            // simulate invokeGeneric
+            return asType(MethodType.genericMethodType(argc)).invokeWithArguments(arguments);
+        }
         if (argc <= 10) {
             MethodHandle invoker = MethodHandles.invokers(type).genericInvoker();
             switch (argc) {
@@ -372,99 +459,70 @@
         MethodHandle invoker = MethodHandles.invokers(type).varargsInvoker(0);
         return invoker.invokeExact(this, arguments);
     }
-    /** Equivalent to {@code invokeVarargs(arguments.toArray())}. */
+    /** Equivalent to {@code invokeWithArguments(arguments.toArray())}. */
+    public final Object invokeWithArguments(java.util.List<?> arguments) throws Throwable {
+        return invokeWithArguments(arguments.toArray());
+    }
+    @Deprecated
+    public final Object invokeVarargs(Object... arguments) throws Throwable {
+        return invokeWithArguments(arguments);
+    }
+    @Deprecated
     public final Object invokeVarargs(java.util.List<?> arguments) throws Throwable {
-        return invokeVarargs(arguments.toArray());
+        return invokeWithArguments(arguments.toArray());
     }
 
-    /*  --- this is intentionally NOT a javadoc yet ---
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+    /**
      * Produce an adapter method handle which adapts the type of the
-     * current method handle to a new type by pairwise argument conversion.
-     * The original type and new type must have the same number of arguments.
-     * The resulting method handle is guaranteed to confess a type
+     * current method handle to a new type
+     * The resulting method handle is guaranteed to report a type
      * which is equal to the desired new type.
      * <p>
      * If the original type and new type are equal, returns {@code this}.
      * <p>
-     * The following conversions are applied as needed both to
-     * arguments and return types.  Let T0 and T1 be the differing
-     * new and old parameter types (or old and new return types)
-     * for corresponding values passed by the new and old method types.
-     * Given those types T0, T1, one of the following conversions is applied
-     * if possible:
-     * <ul>
-     * <li>If T0 and T1 are references, and T1 is not an interface type,
-     *     then a cast to T1 is applied.
-     *     (The types do not need to be related in any particular way.)
-     * <li>If T0 and T1 are references, and T1 is an interface type,
-     *     then the value of type T0 is passed as a T1 without a cast.
-     *     (This treatment of interfaces follows the usage of the bytecode verifier.)
-     * <li>If T0 and T1 are primitives, then a Java casting
-     *     conversion (JLS 5.5) is applied, if one exists.
-     * <li>If T0 and T1 are primitives and one is boolean,
-     *     the boolean is treated as a one-bit unsigned integer.
-     *     (This treatment follows the usage of the bytecode verifier.)
-     *     A conversion from another primitive type behaves as if
-     *     it first converts to byte, and then masks all but the low bit.
-     * <li>If T0 is a primitive and T1 a reference, a boxing
-     *     conversion is applied if one exists, possibly followed by
-     *     an reference conversion to a superclass.
-     *     T1 must be a wrapper class or a supertype of one.
-     *     If T1 is a wrapper class, T0 is converted if necessary
-     *     to T1's primitive type by one of the preceding conversions.
-     *     Otherwise, T0 is boxed, and its wrapper converted to T1.
-     * <li>If T0 is a reference and T1 a primitive, an unboxing
-     *     conversion is applied if one exists, possibly preceded by
-     *     a reference conversion to a wrapper class.
-     *     T0 must be a wrapper class or a supertype of one.
-     *     If T0 is a wrapper class, its primitive value is converted
-     *     if necessary to T1 by one of the preceding conversions.
-     *     Otherwise, T0 is converted directly to the wrapper type for T1,
-     *     which is then unboxed.
-     * <li>If the return type T1 is void, any returned value is discarded
-     * <li>If the return type T0 is void and T1 a reference, a null value is introduced.
-     * <li>If the return type T0 is void and T1 a primitive, a zero value is introduced.
-     * </ul>
+     * This method provides the crucial behavioral difference between
+     * {@link #invokeExact invokeExact} and {@link #invokeGeneric invokeGeneric}.  The two methods
+     * perform the same steps when the caller's type descriptor is identical
+     * with the callee's, but when the types differ, {@link #invokeGeneric invokeGeneric}
+     * also calls {@code asType} (or some internal equivalent) in order
+     * to match up the caller's and callee's types.
      * <p>
-     */
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Produce an adapter method handle which adapts the type of the
-     * current method handle to a new type by pairwise argument conversion.
-     * The original type and new type must have the same number of arguments.
-     * The resulting method handle is guaranteed to confess a type
-     * which is equal to the desired new type.
+     * This method is equivalent to {@link MethodHandles#convertArguments convertArguments},
+     * except for method handles produced by {@link #withTypeHandler withTypeHandler},
+     * in which case the specified type handler is used for calls to {@code asType}.
      * <p>
-     * If the original type and new type are equal, returns {@code this}.
-     * <p>
-     * This method is equivalent to {@link MethodHandles#convertArguments}.
+     * Note that the default behavior of {@code asType} only performs
+     * pairwise argument conversion and return value conversion.
+     * Because of this, unless the method handle has a type handler,
+     * the original type and new type must have the same number of arguments.
+     *
      * @param newType the expected type of the new method handle
      * @return a method handle which delegates to {@code this} after performing
      *           any necessary argument conversions, and arranges for any
      *           necessary return value conversions
-     * @throws IllegalArgumentException if the conversion cannot be made
+     * @throws WrongMethodTypeException if the conversion cannot be made
      * @see MethodHandles#convertArguments
      */
-    public final MethodHandle asType(MethodType newType) {
+    public MethodHandle asType(MethodType newType) {
         return MethodHandles.convertArguments(this, newType);
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle which adapts, as its <i>target</i>,
      * the current method handle.  The type of the adapter will be
-     * the same as the type of the target, except that all but the first
-     * {@code keepPosArgs} parameters of the target's type are replaced
-     * by a single array parameter of type {@code Object[]}.
-     * Thus, if {@code keepPosArgs} is zero, the adapter will take all
-     * arguments in a single object array.
+     * the same as the type of the target, except that the final
+     * {@code arrayLength} parameters of the target's type are replaced
+     * by a single array parameter of type {@code arrayType}.
+     * <p>
+     * If the array element type differs from any of the corresponding
+     * argument types on original target,
+     * the original target is adapted to take the array elements directly,
+     * as if by a call to {@link #asType asType}.
      * <p>
      * When called, the adapter replaces a trailing array argument
      * by the array's elements, each as its own argument to the target.
      * (The order of the arguments is preserved.)
      * They are converted pairwise by casting and/or unboxing
-     * (as if by {@link MethodHandles#convertArguments})
      * to the types of the trailing parameters of the target.
      * Finally the target is called.
      * What the target eventually returns is returned unchanged by the adapter.
@@ -473,54 +531,67 @@
      * contains exactly enough elements to provide a correct argument count
      * to the target method handle.
      * (The array may also be null when zero elements are required.)
-     * @param keepPosArgs the number of leading positional arguments to preserve
-     * @return a new method handle which spreads its final argument,
+     * @param arrayType usually {@code Object[]}, the type of the array argument from which to extract the spread arguments
+     * @param arrayLength the number of arguments to spread from an incoming array argument
+     * @return a new method handle which spreads its final array argument,
      *         before calling the original method handle
+     * @throws IllegalArgumentException if {@code arrayType} is not an array type
      * @throws IllegalArgumentException if target does not have at least
-     *         {@code keepPosArgs} parameter types
+     *         {@code arrayLength} parameter types
+     * @throws WrongMethodTypeException if the implied {@code asType} call fails
      */
-    public final MethodHandle asSpreader(int keepPosArgs) {
+    public final MethodHandle asSpreader(Class<?> arrayType, int arrayLength) {
+        Class<?> arrayElement = arrayType.getComponentType();
+        if (arrayElement == null)  throw newIllegalArgumentException("not an array type");
         MethodType oldType = type();
         int nargs = oldType.parameterCount();
+        if (nargs < arrayLength)  throw newIllegalArgumentException("bad spread array length");
+        int keepPosArgs = nargs - arrayLength;
         MethodType newType = oldType.dropParameterTypes(keepPosArgs, nargs);
-        newType = newType.insertParameterTypes(keepPosArgs, Object[].class);
+        newType = newType.insertParameterTypes(keepPosArgs, arrayType);
         return MethodHandles.spreadArguments(this, newType);
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle which adapts, as its <i>target</i>,
      * the current method handle.  The type of the adapter will be
      * the same as the type of the target, except that a single trailing
-     * array parameter of type {@code Object[]} is replaced by
-     * {@code spreadArrayArgs} parameters of type {@code Object}.
+     * parameter (usually of type {@code arrayType}) is replaced by
+     * {@code arrayLength} parameters whose type is element type of {@code arrayType}.
      * <p>
-     * When called, the adapter replaces its trailing {@code spreadArrayArgs}
-     * arguments by a single new {@code Object} array, whose elements
+     * If the array type differs from the final argument type on original target,
+     * the original target is adapted to take the array type directly,
+     * as if by a call to {@link #asType asType}.
+     * <p>
+     * When called, the adapter replaces its trailing {@code arrayLength}
+     * arguments by a single new array of type {@code arrayType}, whose elements
      * comprise (in order) the replaced arguments.
      * Finally the target is called.
      * What the target eventually returns is returned unchanged by the adapter.
      * <p>
-     * (The array may also be a shared constant when {@code spreadArrayArgs} is zero.)
-     * @param spreadArrayArgs the number of arguments to spread from the trailing array
+     * (The array may also be a shared constant when {@code arrayLength} is zero.)
+     * @param arrayType usually {@code Object[]}, the type of the array argument which will collect the arguments
+     * @param arrayLength the number of arguments to collect into a new array argument
      * @return a new method handle which collects some trailing argument
      *         into an array, before calling the original method handle
-     * @throws IllegalArgumentException if the last argument of the target
-     *         is not {@code Object[]}
-     * @throws IllegalArgumentException if {@code spreadArrayArgs} is not
+     * @throws IllegalArgumentException if {@code arrayType} is not an array type
+               or {@code arrayType} is not assignable to this method handle's trailing parameter type
+     * @throws IllegalArgumentException if {@code arrayLength} is not
      *         a legal array size
-     * @deprecated Provisional and unstable; use {@link MethodHandles#collectArguments}.
+     * @throws WrongMethodTypeException if the implied {@code asType} call fails
      */
-    public final MethodHandle asCollector(int spreadArrayArgs) {
+    public final MethodHandle asCollector(Class<?> arrayType, int arrayLength) {
+        Class<?> arrayElement = arrayType.getComponentType();
+        if (arrayElement == null)  throw newIllegalArgumentException("not an array type");
         MethodType oldType = type();
         int nargs = oldType.parameterCount();
         MethodType newType = oldType.dropParameterTypes(nargs-1, nargs);
-        newType = newType.insertParameterTypes(nargs-1, MethodType.genericMethodType(spreadArrayArgs).parameterArray());
+        newType = newType.insertParameterTypes(nargs-1,
+                    java.util.Collections.<Class<?>>nCopies(arrayLength, arrayElement));
         return MethodHandles.collectArguments(this, newType);
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle which binds the given argument
      * to the current method handle as <i>target</i>.
      * The type of the bound handle will be
@@ -541,15 +612,81 @@
      *         leading parameter type that is a reference type
      * @throws ClassCastException if {@code x} cannot be converted
      *         to the leading parameter type of the target
-     * @deprecated Provisional and unstable; use {@link MethodHandles#insertArguments}.
+     * @see MethodHandles#insertArguments
      */
     public final MethodHandle bindTo(Object x) {
         return MethodHandles.insertArguments(this, 0, x);
     }
 
-    /** Implementation of {@link MethodHandleProvider}, which returns {@code this}. */
-    public final MethodHandle asMethodHandle() { return this; }
+    /**
+     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * Create a new method handle with the same type as this one,
+     * but whose {@code asType} method invokes the given
+     * {@code typeHandler} on this method handle,
+     * instead of the standard {@code MethodHandles.convertArguments}.
+     * <p>
+     * The new method handle will have the same behavior as the
+     * old one when invoked by {@code invokeExact}.
+     * For {@code invokeGeneric} calls which exactly match
+     * the method type, the two method handles will also
+     * have the same behavior.
+     * For other {@code invokeGeneric} calls, the {@code typeHandler}
+     * will control the behavior of the new method handle.
+     * <p>
+     * Thus, a method handle with an {@code asType} handler can
+     * be configured to accept more than one arity of {@code invokeGeneric}
+     * call, and potentially every possible arity.
+     * It can also be configured to supply default values for
+     * optional arguments, when the caller does not specify them.
+     * <p>
+     * The given method handle must take two arguments and return
+     * one result.  The result it returns must be a method handle
+     * of exactly the requested type.  If the result returned by
+     * the target is null, a {@link NullPointerException} is thrown,
+     * else if the type of the target does not exactly match
+     * the requested type, a {@link WrongMethodTypeException} is thrown.
+     * <p>
+     * A method handle's type handler is not guaranteed to be called every
+     * time its {@code asType} or {@code invokeGeneric} method is called.
+     * If the implementation is faced is able to prove that an equivalent
+     * type handler call has already occurred (on the same two arguments),
+     * it may substitute the result of that previous invocation, without
+     * making a new invocation.  Thus, type handlers should not (in general)
+     * perform significant side effects.
+     * <p>
+     * Therefore, the type handler is invoked as if by this code:
+     * <blockquote><pre>
+     * MethodHandle target = this;      // original method handle
+     * MethodHandle adapter = ...;      // adapted method handle
+     * MethodType requestedType = ...;  // argument to asType()
+     * if (type().equals(requestedType))
+     *    return adapter;
+     * MethodHandle result = (MethodHandle)
+     *    typeHandler.invokeGeneric(target, requestedType);
+     * if (!result.type().equals(requestedType))
+     *    throw new WrongMethodTypeException();
+     * return result;
+     * </pre></blockquote>
+     * <p>
+     * For example, here is a list-making variable-arity method handle:
+     * <blockquote><pre>
+MethodHandle makeEmptyList = MethodHandles.constant(List.class, Arrays.asList());
+MethodHandle asList = lookup()
+  .findStatic(Arrays.class, "asList", methodType(List.class, Object[].class));
+static MethodHandle collectingTypeHandler(MethodHandle base, MethodType newType) {
+  return asList.asCollector(Object[].class, newType.parameterCount()).asType(newType);
+}
+MethodHandle collectingTypeHandler = lookup()
+  .findStatic(lookup().lookupClass(), "collectingTypeHandler",
+     methodType(MethodHandle.class, MethodHandle.class, MethodType.class));
+MethodHandle makeAnyList = makeEmptyList.withTypeHandler(collectingTypeHandler);
 
-    /** Implementation of {@link MethodHandleProvider}, which returns {@code this.asType(type)}. */
-    public final MethodHandle asMethodHandle(MethodType type) { return this.asType(type); }
+assertEquals("[]", makeAnyList.invokeGeneric().toString());
+assertEquals("[1]", makeAnyList.invokeGeneric(1).toString());
+assertEquals("[two, too]", makeAnyList.invokeGeneric("two", "too").toString());
+     * <pre><blockquote>
+     */
+    public MethodHandle withTypeHandler(MethodHandle typeHandler) {
+        return MethodHandles.withTypeHandler(this, typeHandler);
+    }
 }
--- a/src/share/classes/java/dyn/MethodHandleProvider.java	Wed Dec 22 13:49:23 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2009, 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 java.dyn;
-
-/**
- * An interface for an object to provide a target {@linkplain MethodHandle method handle} to a {@code invokedynamic} instruction.
- * There are many function-like objects in various Java APIs.
- * This interface provides a standard way for such function-like objects to be bound
- * to a dynamic call site, by providing a view of their behavior in the form of a low-level method handle.
- * <p>
- * The type {@link MethodHandle} is a concrete class whose implementation
- * hierarchy (if any) may be tightly coupled to the underlying JVM implementation.
- * It cannot also serve as a base type for user-defined functional APIs.
- * For this reason, {@code MethodHandle} cannot be subclassed to add new
- * behavior to method handles.  But this interface can be used to provide
- * a link between a user-defined function and the {@code invokedynamic}
- * instruction and the method handle API.
- */
-public interface MethodHandleProvider {
-    /** Produce a method handle which will serve as a behavioral proxy for the current object.
-     *  The type and invocation behavior of the proxy method handle are user-defined,
-     *  and should have some relation to the intended meaning of the original object itself.
-     *  <p>
-     *  The current object may have a changeable behavior.
-     *  For example, {@link CallSite} has a {@code setTarget} method which changes its invocation.
-     *  In such a case, it is <em>incorrect</em> for {@code asMethodHandle} to return
-     *  a method handle whose behavior may diverge from that of the current object.
-     *  Rather, the returned method handle must stably and permanently access
-     *  the behavior of the current object, even if that behavior is changeable.
-     *  <p>
-     *  The reference identity of the proxy method handle is not guaranteed to
-     *  have any particular relation to the reference identity of the object.
-     *  In particular, several objects with the same intended meaning could
-     *  share a common method handle, or the same object could return different
-     *  method handles at different times.  In the latter case, the different
-     *  method handles should have the same type and invocation behavior,
-     *  and be usable from any thread at any time.
-     *  In particular, if a MethodHandleProvider is bound to an <code>invokedynamic</code>
-     *  call site, the proxy method handle extracted at the time of binding
-     *  will be used for an unlimited time, until the call site is rebound.
-     *  <p>
-     *  The type {@link MethodHandle} itself implements {@code MethodHandleProvider}, and
-     *  for this method simply returns {@code this}.
-     */
-    public MethodHandle asMethodHandle();
-
-    /** Produce a method handle of a given type which will serve as a behavioral proxy for the current object.
-     *  As for the no-argument version {@link #asMethodHandle()}, the invocation behavior of the
-     *  proxy method handle is user-defined.  But the type must be the given type,
-     *  or else a {@link WrongMethodTypeException} must be thrown.
-     *  <p>
-     *  If the current object somehow represents a variadic or overloaded behavior,
-     *  the method handle returned for a given type might represent only a subset of
-     *  the current object's repertoire of behaviors, which correspond to that type.
-     */
-    public MethodHandle asMethodHandle(MethodType type) throws WrongMethodTypeException;
-}
--- a/src/share/classes/java/dyn/MethodHandles.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/MethodHandles.java	Thu Dec 23 00:03:46 2010 -0800
@@ -29,6 +29,7 @@
 import sun.dyn.Access;
 import sun.dyn.MemberName;
 import sun.dyn.MethodHandleImpl;
+import sun.dyn.util.ValueConversions;
 import sun.dyn.util.VerifyAccess;
 import sun.dyn.util.Wrapper;
 import java.util.List;
@@ -135,28 +136,58 @@
      * In general, the conditions under which a method handle may be
      * created for a method {@code M} are exactly as restrictive as the conditions
      * under which the lookup class could have compiled a call to {@code M}.
-     * This rule is applied even if the Java compiler might have created
+     * <p>
+     * In some cases, this access is obtained by the Java compiler by creating
      * an wrapper method to access a private method of another class
      * in the same top-level declaration.
-     * For example, a lookup object created for a nested class {@code C.D}
+     * For example, a nested class {@code C.D}
      * can access private members within other related classes such as
-     * {@code C}, {@code C.D.E}, or {@code C.B}.
+     * {@code C}, {@code C.D.E}, or {@code C.B},
+     * but the Java compiler may need to generate wrapper methods in
+     * those related classes.  In such cases, a {@code Lookup} object on
+     * {@code C.E} would be unable to those private members.
+     * A workaround for this limitation is the {@link Lookup#in Lookup.in} method,
+     * which can transform a lookup on {@code C.E} into one on any of those other
+     * classes, without special elevation of privilege.
      */
     public static final
     class Lookup {
         /** The class on behalf of whom the lookup is being performed. */
         private final Class<?> lookupClass;
 
-        /** The allowed sorts of members which may be looked up (public, etc.), with STATIC for package. */
+        /** The allowed sorts of members which may be looked up (PUBLIC, etc.). */
         private final int allowedModes;
 
-        private static final int
-            PUBLIC    = Modifier.PUBLIC,
-            PACKAGE   = Modifier.STATIC,
-            PROTECTED = Modifier.PROTECTED,
-            PRIVATE   = Modifier.PRIVATE,
-            ALL_MODES = (PUBLIC | PACKAGE | PROTECTED | PRIVATE),
-            TRUSTED   = -1;
+        /** A single-bit mask representing {@code public} access,
+         *  which may contribute to the result of {@link #lookupModes lookupModes}.
+         *  The value, {@code 0x01}, happens to be the same as the value of the
+         *  {@code public} {@linkplain java.lang.reflect.Modifier#PUBLIC modifier bit}.
+         */
+        public static final int PUBLIC = Modifier.PUBLIC;
+
+        /** A single-bit mask representing {@code private} access,
+         *  which may contribute to the result of {@link #lookupModes lookupModes}.
+         *  The value, {@code 0x02}, happens to be the same as the value of the
+         *  {@code private} {@linkplain java.lang.reflect.Modifier#PRIVATE modifier bit}.
+         */
+        public static final int PRIVATE = Modifier.PRIVATE;
+
+        /** A single-bit mask representing {@code protected} access,
+         *  which may contribute to the result of {@link #lookupModes lookupModes}.
+         *  The value, {@code 0x04}, happens to be the same as the value of the
+         *  {@code protected} {@linkplain java.lang.reflect.Modifier#PROTECTED modifier bit}.
+         */
+        public static final int PROTECTED = Modifier.PROTECTED;
+
+        /** A single-bit mask representing {@code package} access (default access),
+         *  which may contribute to the result of {@link #lookupModes lookupModes}.
+         *  The value is {@code 0x08}, which does not correspond meaningfully to
+         *  any particular {@linkplain java.lang.reflect.Modifier modifier bit}.
+         */
+        public static final int PACKAGE = Modifier.STATIC;
+
+        private static final int ALL_MODES = (PUBLIC | PRIVATE | PROTECTED | PACKAGE);
+        private static final int TRUSTED   = -1;
 
         private static int fixmods(int mods) {
             mods &= (ALL_MODES - PACKAGE);
@@ -181,13 +212,21 @@
         }
 
         /** Which types of members can this lookup object produce?
-         *  The result is a bit-mask of the {@link Modifier} bits
-         *  {@linkplain Modifier#PUBLIC PUBLIC (0x01)},
-         *  {@linkplain Modifier#PROTECTED PROTECTED (0x02)},
-         *  {@linkplain Modifier#PRIVATE PRIVATE (0x04)},
-         *  and {@linkplain Modifier#STATIC STATIC (0x08)}.
-         *  The modifier bit {@code STATIC} stands in for the package protection mode,
-         *  which does not have an explicit modifier bit.
+         *  The result is a bit-mask of the bits
+         *  {@linkplain #PUBLIC PUBLIC (0x01)},
+         *  {@linkplain #PRIVATE PRIVATE (0x02)},
+         *  {@linkplain #PROTECTED PROTECTED (0x04)},
+         *  and {@linkplain #PACKAGE PACKAGE (0x08)}.
+         *  <p>
+         *  A freshly-created lookup object
+         *  on the {@linkplain java.dyn.MethodHandles#lookup() caller's class}
+         *  has all possible bits set, since the caller class can access all its own members.
+         *  A lookup object on a new lookup class
+         *  {@linkplain java.dyn.MethodHandles.Lookup#in created from a previous lookup object}
+         *  may have some mode bits set to zero.
+         *  The purpose of this is to restrict access via the new lookup object,
+         *  so that it can access only names which can be reached by the original
+         *  lookup object, and also by the new lookup class.
          */
         public int lookupModes() {
             return allowedModes & ALL_MODES;
@@ -220,18 +259,21 @@
         /**
          * Create a lookup on the specified new lookup class.
          * The resulting object will report the specified
-         * class as its own {@link #lookupClass}.
+         * class as its own {@link #lookupClass lookupClass}.
          * <p>
          * However, the resulting {@code Lookup} object is guaranteed
          * to have no more access capabilities than the original.
-         * In particular:<ul>
+         * In particular, access capabilities can be lost as follows:<ul>
          * <li>If the new lookup class differs from the old one,
          * protected members will not be accessible by virtue of inheritance.
+         * (Protected members may continue to be accessible because of package sharing.)
          * <li>If the new lookup class is in a different package
          * than the old one, protected and default (package) members will not be accessible.
          * <li>If the new lookup class is not within the same package member
          * as the old one, private members will not be accessible.
-         * <li>In all cases, public members will continue to be accessible.
+         * <li>If the new lookup class is not accessible to the old lookup class,
+         * then no members, not even public members, will be accessible.
+         * (In all other cases, public members will continue to be accessible.)
          * </ul>
          */
         public Lookup in(Class<?> requestedLookupClass) {
@@ -245,10 +287,17 @@
                 && !VerifyAccess.isSamePackage(this.lookupClass, requestedLookupClass)) {
                 newModes &= ~(PACKAGE|PRIVATE);
             }
+            // Allow nestmate lookups to be created without special privilege:
             if ((newModes & PRIVATE) != 0
                 && !VerifyAccess.isSamePackageMember(this.lookupClass, requestedLookupClass)) {
                 newModes &= ~PRIVATE;
             }
+            if (newModes == PUBLIC
+                && !VerifyAccess.isClassAccessible(requestedLookupClass, this.lookupClass)) {
+                // The requested class it not accessible from the lookup class.
+                // No permissions.
+                newModes = 0;
+            }
             checkUnprivilegedlookupClass(requestedLookupClass);
             return new Lookup(requestedLookupClass, newModes);
         }
@@ -272,35 +321,43 @@
                 throw newIllegalArgumentException("illegal lookupClass: "+lookupClass);
         }
 
-        /** Display the name of the class.
-         *  If there are restrictions on the access permitted to this lookup,
-         *  display those also.
+        /**
+         * Display the name of the class from which lookups are to be made.
+         * (The name is the one reported by {@link java.lang.Class#getName() Class.getName}.)
+         * If there are restrictions on the access permitted to this lookup,
+         * this is indicated by adding a suffix to the class name, consisting
+         * of a slash and a keyword.  The keyword is chosen as follows:
+         * <ul>
+         * <li>If no access is allowed, the suffix is "/noaccess".
+         * <li>If only public access is allowed, the suffix is "/public".
+         * <li>If only public and package access are allowed, the suffix is "/package".
+         * <li>If only public, package, and private access are allowed, the suffix is "/private".
+         * </ul>
+         * If none of the above cases apply, it is the case that full
+         * access (public, package, private, and protected) is allowed.
+         * In this case, no suffix is added.
+         * This is true only of an object obtained originally from
+         * {@link java.dyn.MethodHandles#lookup() MethodHandles.lookup}.
+         * Objects created by {@link java.dyn.MethodHandles.Lookup#in() Lookup#in}
+         * always have restricted access, and will display a suffix.
          */
         @Override
         public String toString() {
-            String modestr;
             String cname = lookupClass.getName();
             switch (allowedModes) {
             case TRUSTED:
-                return "/trusted";
+                return "/trusted";  // internal only
             case PUBLIC:
-                modestr = "/public";
-                if (lookupClass == Object.class)
-                    return modestr;
-                break;
+                return cname + "/public";
             case PUBLIC|PACKAGE:
                 return cname + "/package";
-            case 0:  // should not happen
-                return cname + "/empty";
+            case 0:  // no privileges
+                return cname + "/noaccess";
             case ALL_MODES:
                 return cname;
+            default:
+                return cname + "/private";
             }
-            StringBuilder buf = new StringBuilder(cname);
-            if ((allowedModes & PUBLIC) != 0)     buf.append("/public");
-            if ((allowedModes & PACKAGE) != 0)    buf.append("/package");
-            if ((allowedModes & PROTECTED) != 0)  buf.append("/protected");
-            if ((allowedModes & PRIVATE) != 0)    buf.append("/private");
-            return buf.toString();
         }
 
         // call this from an entry point method in Lookup with extraFrames=0.
@@ -326,7 +383,6 @@
          * @param name the name of the method
          * @param type the type of the method
          * @return the desired method handle
-         * @exception SecurityException <em>TBD</em>
          * @exception NoAccessException if the method does not exist or access checking fails
          */
         public
@@ -342,13 +398,6 @@
          * with the receiver type (usually {@code refc}) prepended.
          * The method and all its argument types must be accessible to the lookup class.
          * <p>
-         * (<em>BUG NOTE:</em> The type {@code Object} may be prepended instead
-         * of the receiver type, if the receiver type is not on the boot class path.
-         * This is due to a temporary JVM limitation, in which MethodHandle
-         * claims to be unable to access such classes.  To work around this
-         * bug, use {@code convertArguments} to normalize the type of the leading
-         * argument to a type on the boot class path, such as {@code Object}.)
-         * <p>
          * When called, the handle will treat the first argument as a receiver
          * and dispatch on the receiver's type to determine which method
          * implementation to enter.
@@ -358,7 +407,6 @@
          * @param name the name of the method
          * @param type the type of the method, with the receiver argument omitted
          * @return the desired method handle
-         * @exception SecurityException <em>TBD</em>
          * @exception NoAccessException if the method does not exist or access checking fails
          */
         public MethodHandle findVirtual(Class<?> refc, String name, MethodType type) throws NoAccessException {
@@ -382,7 +430,6 @@
          * @param refc the class or interface from which the method is accessed
          * @param type the type of the method, with the receiver argument omitted, and a void return type
          * @return the desired method handle
-         * @exception SecurityException <em>TBD</em>
          * @exception NoAccessException if the method does not exist or access checking fails
          */
         public MethodHandle findConstructor(Class<?> refc, MethodType type) throws NoAccessException {
@@ -409,13 +456,13 @@
          * {@code invokespecial} instruction.)
          * <p>
          * If the explicitly specified caller class is not identical with the
-         * lookup class, a security check TBD is performed.
+         * lookup class, or if this lookup object does not have private access
+         * privileges, the access fails.
          * @param refc the class or interface from which the method is accessed
          * @param name the name of the method (which must not be "&lt;init&gt;")
          * @param type the type of the method, with the receiver argument omitted
          * @param specialCaller the proposed calling class to perform the {@code invokespecial}
          * @return the desired method handle
-         * @exception SecurityException <em>TBD</em>
          * @exception NoAccessException if the method does not exist or access checking fails
          */
         public MethodHandle findSpecial(Class<?> refc, String name, MethodType type,
@@ -428,7 +475,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Produce a method handle giving read access to a non-static field.
          * The type of the method handle will have a return type of the field's
          * value type.
@@ -445,7 +491,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Produce a method handle giving write access to a non-static field.
          * The type of the method handle will have a void return type.
          * The method handle will take two arguments, the instance containing
@@ -462,7 +507,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Produce a method handle giving read access to a static field.
          * The type of the method handle will have a return type of the field's
          * value type.
@@ -478,7 +522,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Produce a method handle giving write access to a static field.
          * The type of the method handle will have a void return type.
          * The method handle will take a single
@@ -515,7 +558,6 @@
          * @param name the name of the method
          * @param type the type of the method, with the receiver argument omitted
          * @return the desired method handle
-         * @exception SecurityException <em>TBD</em>
          * @exception NoAccessException if the method does not exist or access checking fails
          */
         public MethodHandle bind(Object receiver, String name, MethodType type) throws NoAccessException {
@@ -530,7 +572,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Make a direct method handle to <i>m</i>, if the lookup class has permission.
          * If <i>m</i> is non-static, the receiver argument is treated as an initial argument.
          * If <i>m</i> is virtual, overriding is respected on every call.
@@ -554,7 +595,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Produce a method handle for a reflected method.
          * It will bypass checks for overriding methods on the receiver,
          * as if by a {@code invokespecial} instruction from within the {@code specialCaller}.
@@ -579,7 +619,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Produce a method handle for a reflected constructor.
          * The type of the method handle will be that of the constructor,
          * with the return type changed to the declaring class.
@@ -602,7 +641,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Produce a method handle giving read access to a reflected field.
          * The type of the method handle will have a return type of the field's
          * value type.
@@ -620,7 +658,6 @@
         }
 
         /**
-         * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
          * Produce a method handle giving write access to a reflected field.
          * The type of the method handle will have a void return type.
          * If the field is static, the method handle will take a single
@@ -681,7 +718,7 @@
             int allowedModes = this.allowedModes;
             if (allowedModes == TRUSTED)  return;
             int mods = m.getModifiers();
-            if (Modifier.isPublic(mods) && Modifier.isPublic(refc.getModifiers()))
+            if (Modifier.isPublic(mods) && Modifier.isPublic(refc.getModifiers()) && allowedModes != 0)
                 return;  // common case
             int requestedModes = fixmods(mods);  // adjust 0 => PACKAGE
             if ((requestedModes & allowedModes) != 0
@@ -706,6 +743,8 @@
                 return "access to public member failed";  // (how?)
             else if (allowedModes == PUBLIC)
                 return "member is not public";
+            else if (allowedModes == 0)
+                return "attempted member access through a non-public class";
             if (Modifier.isPrivate(mods))
                 return "member is private";
             if (Modifier.isProtected(mods))
@@ -713,9 +752,14 @@
             return "member is private to package";
         }
 
+        private static final boolean ALLOW_NESTMATE_ACCESS = false;
+
         void checkSpecialCaller(Class<?> specialCaller) throws NoAccessException {
             if (allowedModes == TRUSTED)  return;
-            if (!VerifyAccess.isSamePackageMember(specialCaller, lookupClass()))
+            if ((allowedModes & PRIVATE) == 0
+                || (specialCaller != lookupClass()
+                    && !(ALLOW_NESTMATE_ACCESS &&
+                         VerifyAccess.isSamePackageMember(specialCaller, lookupClass()))))
                 throw newNoAccessException("no private access for invokespecial",
                                            new MemberName(specialCaller), lookupClass());
         }
@@ -725,7 +769,9 @@
             // on itself or a subclass.  Enforce that restriction, from JVMS 5.4.4, etc.
             if (!method.isProtected() || method.isStatic()
                 || allowedModes == TRUSTED
-                || VerifyAccess.isSamePackageMember(method.getDeclaringClass(), lookupClass()))
+                || method.getDeclaringClass() == lookupClass()
+                || (ALLOW_NESTMATE_ACCESS &&
+                    VerifyAccess.isSamePackageMember(method.getDeclaringClass(), lookupClass())))
                 return mh;
             else
                 return restrictReceiver(method, mh, lookupClass());
@@ -765,7 +811,6 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle giving read access to elements of an array.
      * The type of the method handle will have a return type of the array's
      * element type.  Its first argument will be the array type,
@@ -780,7 +825,6 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle giving write access to elements of an array.
      * The type of the method handle will have a void return type.
      * Its last argument will be the array's element type.
@@ -796,25 +840,6 @@
     /// method handle invocation (reflective style)
 
     /**
-     * @deprecated Alias for MethodHandle.invokeVarargs.
-     */
-    @Deprecated
-    public static
-    Object invokeVarargs(MethodHandle target, Object... arguments) throws Throwable {
-        return target.invokeVarargs(arguments);
-    }
-
-    /**
-     * @deprecated Alias for MethodHandle.invokeVarargs.
-     */
-    @Deprecated
-    public static
-    Object invoke(MethodHandle target, Object... arguments) throws Throwable {
-        return target.invokeVarargs(arguments);
-    }
-
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle which will invoke any method handle of the
      * given type on a standard set of {@code Object} type arguments.
      * The resulting invoker will be a method handle with the following
@@ -823,18 +848,28 @@
      * <li>a single {@code MethodHandle} target
      * <li>zero or more {@code Object} values (one for each argument in {@code type})
      * </ul>
-     * The invoker will apply reference casts as necessary and unbox primitive arguments,
-     * as if by {@link #convertArguments}.
+     * <p>
+     * The invoker will behave like a call to {@link MethodHandle.invokeGeneric} with
+     * the indicated {@code type}.
+     * That is, if the target is exactly of the given {@code type}, it will behave
+     * like {@code invokeExact}; otherwise it behave as if {@link MethodHandle.asType}
+     * is used to convert the target to the required {@code type}.
+     * <p>
+     * The type of the returned invoker will not be the given {@code type}, but rather
+     * will have all parameter and return types replaced by {@code Object}.
+     * <p>
+     * Before invoking its target, the invoker will apply reference casts as
+     * necessary and unbox and widen primitive arguments, as if by {@link #convertArguments}.
      * The return value of the invoker will be an {@code Object} reference,
      * boxing a primitive value if the original type returns a primitive,
      * and always null if the original type returns void.
      * <p>
      * This method is equivalent to the following code (though it may be more efficient):
      * <p><blockquote><pre>
-     * MethodHandle invoker = exactInvoker(type);
+     * MethodHandle invoker = lookup().findVirtual(MethodHandle.class, "invokeGeneric", type);
      * MethodType genericType = type.generic();
      * genericType = genericType.insertParameterType(0, MethodHandle.class);
-     * return convertArguments(invoker, genericType);
+     * return invoker.asType(genericType);
      * </pre></blockquote>
      * @param type the type of target methods which the invoker will apply to
      * @return a method handle suitable for invoking any method handle of the given type
@@ -845,9 +880,8 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle which will invoke any method handle of the
-     * given type on a standard set of {@code Object} type arguments
+     * given {@code type} on a standard set of {@code Object} type arguments
      * and a single trailing {@code Object[]} array.
      * The resulting invoker will be a method handle with the following
      * arguments:
@@ -856,18 +890,31 @@
      * <li>zero or more {@code Object} values (counted by {@code objectArgCount})
      * <li>an {@code Object[]} array containing more arguments
      * </ul>
-     * The invoker will spread the varargs array, apply
-     * reference casts as necessary, and unbox primitive arguments.
+     * <p>
+     * The invoker will behave like a call to {@link MethodHandle.invokeGeneric} with
+     * the indicated {@code type}.
+     * That is, if the target is exactly of the given {@code type}, it will behave
+     * like {@code invokeExact}; otherwise it behave as if {@link MethodHandle.asType}
+     * is used to convert the target to the required {@code type}.
+     * <p>
+     * The type of the returned invoker will not be the given {@code type}, but rather
+     * will have all parameter and return types replaced by {@code Object}, except for
+     * the last parameter type, which will be the array type {@code Object[]}.
+     * <p>
+     * Before invoking its target, the invoker will spread the varargs array, apply
+     * reference casts as necessary, and unbox and widen primitive arguments.
      * The return value of the invoker will be an {@code Object} reference,
      * boxing a primitive value if the original type returns a primitive,
      * and always null if the original type returns void.
      * <p>
      * This method is equivalent to the following code (though it may be more efficient):
      * <p><blockquote><pre>
-     * MethodHandle invoker = exactInvoker(type);
-     * MethodType vaType = MethodType.makeGeneric(objectArgCount, true);
+     * MethodHandle invoker = lookup().findVirtual(MethodHandle.class, "invokeGeneric", type);
+     * MethodType vaType = MethodType.genericMethodType(objectArgCount, true);
      * vaType = vaType.insertParameterType(0, MethodHandle.class);
-     * return spreadArguments(invoker, vaType);
+     * int spreadArgCount = type.parameterCount - objectArgCount;
+     * invoker = invoker.asSpreader(Object.class, spreadArgCount);
+     * return invoker.asType(vaType);
      * </pre></blockquote>
      * @param type the desired target type
      * @param objectArgCount number of fixed (non-varargs) {@code Object} arguments
@@ -881,7 +928,6 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle which will take a invoke any method handle of the
      * given type.  The resulting invoker will have a type which is
      * exactly equal to the desired type, except that it will accept
@@ -889,7 +935,7 @@
      * <p>
      * This method is equivalent to the following code (though it may be more efficient):
      * <p><blockquote><pre>
-     * lookup().findVirtual(MethodHandle.class, "invoke", type);
+     * lookup().findVirtual(MethodHandle.class, "invokeExact", type);
      * </pre></blockquote>
      * @param type the desired target type
      * @return a method handle suitable for invoking any method handle of the given type
@@ -899,39 +945,6 @@
         return invokers(type).exactInvoker();
     }
 
-    /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Produce a method handle equivalent to an invokedynamic instruction
-     * which has been linked to the given call site.
-     * Along with {@link Lookup#findVirtual}, {@link Lookup#findStatic},
-     * and {@link Lookup#findSpecial}, this completes the emulation
-     * of the JVM's {@code invoke} instructions.
-     * <p>This method is equivalent to the following code:
-     * <p><blockquote><pre>
-     * MethodHandle getTarget, invoker, result;
-     * getTarget = lookup().bind(site, "getTarget", methodType(MethodHandle.class));
-     * invoker = exactInvoker(site.type());
-     * result = foldArguments(invoker, getTarget)
-     * </pre></blockquote>
-     * @return a method handle which always invokes the call site's target
-     */
-    public static
-    MethodHandle dynamicInvoker(CallSite site) throws NoAccessException {
-        MethodHandle getCSTarget = GET_TARGET;
-        if (getCSTarget == null) {
-            try {
-                GET_TARGET = getCSTarget = Lookup.IMPL_LOOKUP.
-                    findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class));
-            } catch (NoAccessException ex) {
-                throw new InternalError();
-            }
-        }
-        MethodHandle getTarget = MethodHandleImpl.bindReceiver(IMPL_TOKEN, getCSTarget, site);
-        MethodHandle invoker = exactInvoker(site.type());
-        return foldArguments(invoker, getTarget);
-    }
-    private static MethodHandle GET_TARGET = null;  // link this lazily, not eagerly
-
     static Invokers invokers(MethodType type) {
         return MethodTypeImpl.invokers(IMPL_TOKEN, type);
     }
@@ -974,23 +987,23 @@
             if (t0.isPrimitive())
                 return Wrapper.asPrimitiveType(t1).cast(value);
             else
-                return Wrapper.OBJECT.cast(value, t1);
+                return Wrapper.OBJECT.convert(value, t1);
         }
         boolean prim0 = t0.isPrimitive(), prim1 = t1.isPrimitive();
         if (!prim0) {
             // check contract with caller
-            Wrapper.OBJECT.cast(value, t0);
+            Wrapper.OBJECT.convert(value, t0);
             if (!prim1) {
-                return Wrapper.OBJECT.cast(value, t1);
+                return Wrapper.OBJECT.convert(value, t1);
             }
             // convert reference to primitive by unboxing
             Wrapper w1 = Wrapper.forPrimitiveType(t1);
-            return w1.cast(value, t1);
+            return w1.convert(value, t1);
         }
         // check contract with caller:
         Wrapper.asWrapperType(t0).cast(value);
         Wrapper w1 = Wrapper.forPrimitiveType(t1);
-        return w1.cast(value, t1);
+        return w1.convert(value, t1);
     }
 
     static
@@ -1011,7 +1024,7 @@
      * Produce a method handle which adapts the type of the
      * given method handle to a new type by pairwise argument conversion.
      * The original type and new type must have the same number of arguments.
-     * The resulting method handle is guaranteed to confess a type
+     * The resulting method handle is guaranteed to report a type
      * which is equal to the desired new type.
      * <p>
      * If the original type and new type are equal, returns target.
@@ -1023,34 +1036,21 @@
      * Given those types T0, T1, one of the following conversions is applied
      * if possible:
      * <ul>
-     * <li>If T0 and T1 are references, and T1 is not an interface type,
-     *     then a cast to T1 is applied.
+     * <li>If T0 and T1 are references, then a cast to T1 is applied.
      *     (The types do not need to be related in any particular way.)
-     * <li>If T0 and T1 are references, and T1 is an interface type,
-     *     then the value of type T0 is passed as a T1 without a cast.
-     *     (This treatment of interfaces follows the usage of the bytecode verifier.)
-     * <li>If T0 and T1 are primitives, then a Java casting
-     *     conversion (JLS 5.5) is applied, if one exists.
-     * <li>If T0 and T1 are primitives and one is boolean,
-     *     the boolean is treated as a one-bit unsigned integer.
-     *     (This treatment follows the usage of the bytecode verifier.)
-     *     A conversion from another primitive type behaves as if
-     *     it first converts to byte, and then masks all but the low bit.
+     * <li>If T0 and T1 are primitives, then a Java method invocation
+     *     conversion (JLS 5.3) is applied, if one exists.
      * <li>If T0 is a primitive and T1 a reference, a boxing
      *     conversion is applied if one exists, possibly followed by
-     *     an reference conversion to a superclass.
+     *     a reference conversion to a superclass.
      *     T1 must be a wrapper class or a supertype of one.
-     *     If T1 is a wrapper class, T0 is converted if necessary
-     *     to T1's primitive type by one of the preceding conversions.
-     *     Otherwise, T0 is boxed, and its wrapper converted to T1.
      * <li>If T0 is a reference and T1 a primitive, an unboxing
-     *     conversion is applied if one exists, possibly preceded by
-     *     a reference conversion to a wrapper class.
+     *     conversion will be applied at runtime, possibly followed
+     *     by a Java method invocation conversion (JLS 5.3)
+     *     on the primitive value.  (These are the widening conversions.)
      *     T0 must be a wrapper class or a supertype of one.
-     *     If T0 is a wrapper class, its primitive value is converted
-     *     if necessary to T1 by one of the preceding conversions.
-     *     Otherwise, T0 is converted directly to the wrapper type for T1,
-     *     which is then unboxed.
+     *     (In the case where T0 is Object, these are the conversions
+     *     allowed by java.lang.reflect.Method.invoke.)
      * <li>If the return type T1 is void, any returned value is discarded
      * <li>If the return type T0 is void and T1 a reference, a null value is introduced.
      * <li>If the return type T0 is void and T1 a primitive, a zero value is introduced.
@@ -1060,26 +1060,109 @@
      * @return a method handle which delegates to {@code target} after performing
      *           any necessary argument conversions, and arranges for any
      *           necessary return value conversions
-     * @throws IllegalArgumentException if the conversion cannot be made
+     * @throws WrongMethodTypeException if the conversion cannot be made
      * @see MethodHandle#asType
+     * @see MethodHandles#explicitCastArguments
      */
     public static
     MethodHandle convertArguments(MethodHandle target, MethodType newType) {
         MethodType oldType = target.type();
         if (oldType.equals(newType))
             return target;
-        MethodHandle res = MethodHandleImpl.convertArguments(IMPL_TOKEN, target,
-                                                 newType, oldType, null);
+        MethodHandle res = null;
+        try {
+            res = MethodHandleImpl.convertArguments(IMPL_TOKEN, target,
+                                                    newType, oldType, null);
+        } catch (IllegalArgumentException ex) {
+        }
         if (res == null)
-            throw newIllegalArgumentException("cannot convert to "+newType+": "+target);
+            throw new WrongMethodTypeException("cannot convert to "+newType+": "+target);
         return res;
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * Produce a method handle which adapts the type of the
+     * given method handle to a new type by pairwise argument conversion.
+     * The original type and new type must have the same number of arguments.
+     * The resulting method handle is guaranteed to report a type
+     * which is equal to the desired new type.
+     * <p>
+     * If the original type and new type are equal, returns target.
+     * <p>
+     * The same conversions are allowed as for {@link #convertArguments convertArguments},
+     * and some additional conversions are also applied if those conversions fail.
+     * Given types T0, T1, one of the following conversions is applied
+     * in addition, if the conversions specified for {@code convertArguments}
+     * would be insufficient:
+     * <ul>
+     * <li>If T0 and T1 are references, and T1 is an interface type,
+     *     then the value of type T0 is passed as a T1 without a cast.
+     *     (This treatment of interfaces follows the usage of the bytecode verifier.)
+     * <li>If T0 and T1 are primitives and one is boolean,
+     *     the boolean is treated as a one-bit unsigned integer.
+     *     (This treatment follows the usage of the bytecode verifier.)
+     *     A conversion from another primitive type behaves as if
+     *     it first converts to byte, and then masks all but the low bit.
+     * <li>If a primitive value would be converted by {@code convertArguments}
+     *     using Java method invocation conversion (JLS 5.3),
+     *     Java casting conversion (JLS 5.5) may be used also.
+     *     This allows primitives to be narrowed as well as widened.
+     * </ul>
+     * @param target the method handle to invoke after arguments are retyped
+     * @param newType the expected type of the new method handle
+     * @return a method handle which delegates to {@code target} after performing
+     *           any necessary argument conversions, and arranges for any
+     *           necessary return value conversions
+     * @throws WrongMethodTypeException if the conversion cannot be made
+     * @see MethodHandle#asType
+     * @see MethodHandles#convertArguments
+     */
+    public static
+    MethodHandle explicitCastArguments(MethodHandle target, MethodType newType) {
+        return convertArguments(target, newType);  // FIXME!
+    }
+
+    /*
+      FIXME: Reconcile javadoc with 10/22/2010 EG notes on conversion:
+
+      Both converters arrange for their method handles to convert arguments
+      and return values.  The conversion rules are the same for arguments
+      and return values, and depend only on source and target types, S and
+      T.  The conversions allowed by castConvertArguments are a strict
+      superset of those performed by convertArguments.
+
+      In all cases, if S and T are references, a simple checkcast is done.
+      If neither S nor T is a primitive, no attempt is made to unbox and
+      box.  A failed conversion throws ClassCastException.
+
+      If T is void, the value is dropped.
+
+      For compatibility with reflection, if S is void and T is a reference,
+      a null value is produced.
+
+      For compatibility with reflection, if S is a reference and T is a
+      primitive, S is first unboxed and then undergoes primitive conversion.
+      In the case of 'convertArguments', only assignment conversion is
+      performed (no narrowing primitive conversion).
+
+      If S is a primitive, S is boxed, and then the above rules are applied.
+      If S and T are both primitives, the boxing will be undetectable; only
+      the primitive conversions will be apparent to the user.  The key point
+      is that if S is a primitive type, the implementation may box it and
+      treat is as Object, without loss of information, or it may use a "fast
+      path" which does not use boxing.
+
+      Notwithstanding the rules above, for compatibility with the verifier,
+      if T is an interface, it is treated as if it were Object.  [KEEP THIS?]
+
+      Also, for compatibility with the verifier, a boolean may be undergo
+      widening or narrowing conversion to any other primitive type.  [KEEP THIS?]
+    */
+
+    /**
      * Produce a method handle which adapts the calling sequence of the
      * given method handle to a new type, by reordering the arguments.
-     * The resulting method handle is guaranteed to confess a type
+     * The resulting method handle is guaranteed to report a type
      * which is equal to the desired new type.
      * <p>
      * The given array controls the reordering.
@@ -1092,22 +1175,42 @@
      * outgoing argument will be taken from the {@code I}-th incoming
      * argument, where {@code I} is {@code reorder[N]}.
      * <p>
+     * No argument or return value conversions are applied.
+     * The type of each incoming argument, as determined by {@code newType},
+     * must be identical to the type of the corresponding outgoing argument
+     * or arguments in the target method handle.
+     * The return type of {@code newType} must be identical to the return
+     * type of the original target.
+     * <p>
      * The reordering array need not specify an actual permutation.
      * An incoming argument will be duplicated if its index appears
      * more than once in the array, and an incoming argument will be dropped
      * if its index does not appear in the array.
-     * <p>
-     * Pairwise conversions are applied as needed to arguments and return
-     * values, as with {@link #convertArguments}.
+     * As in the case of {@link #dropArguments(MethodHandle,int,List) dropArguments},
+     * incoming arguments which are not mentioned in the reordering array
+     * are may be any type, as determined only by {@code newType}.
+     * <blockquote><pre>
+MethodType intfn1 = MethodType.methodType(int.class, int.class);
+MethodType intfn2 = MethodType.methodType(int.class, int.class, int.class);
+MethodHandle sub = ... {int x, int y => x-y} ...;
+assert(sub.type().equals(intfn2));
+MethodHandle sub1 = MethodHandles.permuteArguments(sub, intfn2, 0, 1);
+MethodHandle rsub = MethodHandles.permuteArguments(sub, intfn2, 1, 0);
+assert((int)rsub.invokeExact(1, 100) == 99);
+MethodHandle add = ... {int x, int y => x+y} ...;
+assert(add.type().equals(intfn2));
+MethodHandle twice = MethodHandles.permuteArguments(add, intfn1, 0, 0);
+assert(twice.type().equals(intfn1));
+assert((int)twice.invokeExact(21) == 42);
+     * </pre></blockquote>
      * @param target the method handle to invoke after arguments are reordered
      * @param newType the expected type of the new method handle
      * @param reorder a string which controls the reordering
-     * @return a method handle which delegates to {@code target} after performing
-     *           any necessary argument motion and conversions, and arranges for any
-     *           necessary return value conversions
+     * @return a method handle which delegates to {@code target} after it
+     *           drops unused arguments and moves and/or duplicates the other arguments
      */
     public static
-    MethodHandle permuteArguments(MethodHandle target, MethodType newType, int[] reorder) {
+    MethodHandle permuteArguments(MethodHandle target, MethodType newType, int... reorder) {
         MethodType oldType = target.type();
         checkReorder(reorder, newType, oldType);
         return MethodHandleImpl.convertArguments(IMPL_TOKEN, target,
@@ -1130,33 +1233,21 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Produce a method handle which adapts the type of the
-     * given method handle to a new type, by spreading the final argument.
-     * The resulting method handle is guaranteed to confess a type
-     * which is equal to the desired new type.
-     * <p>
-     * The final parameter type of the new type must be an array type T[].
-     * This is the type of what is called the <i>spread</i> argument.
-     * All other arguments of the new type are called <i>ordinary</i> arguments.
-     * <p>
-     * The ordinary arguments of the new type are pairwise converted
-     * to the initial parameter types of the old type, according to the
-     * rules in {@link #convertArguments}.
-     * Any additional arguments in the old type
-     * are converted from the array element type T,
-     * again according to the rules in {@link #convertArguments}.
-     * The return value is converted according likewise.
-     * <p>
-     * The call verifies that the spread argument is in fact an array
-     * of exactly the type length, i.e., the excess number of
-     * arguments in the old type over the ordinary arguments in the new type.
-     * If there are no excess arguments, the spread argument is also
-     * allowed to be null.
-     * @param target the method handle to invoke after the argument is prepended
+     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
+     * Equivalent to the following code:
+     * <p><blockquote><pre>
+     * int spreadPos = newType.parameterCount() - 1;
+     * Class<?> spreadType = newType.parameterType(spreadPos);
+     * int spreadCount = target.type().parameterCount() - spreadPos;
+     * MethodHandle adapter = target.asSpreader(spreadType, spreadCount);
+     * adapter = adapter.asType(newType);
+     * return adapter;
+     * </pre></blockquote>
+     * @param target the method handle to invoke after argument spreading
      * @param newType the expected type of the new method handle
-     * @return a new method handle which spreads its final argument,
+     * @return a method handle which spreads its final argument,
      *         before calling the original method handle
+     * @deprecated Use {@link MethodHandle#asSpreader}
      */
     public static
     MethodHandle spreadArguments(MethodHandle target, MethodType newType) {
@@ -1176,21 +1267,22 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
-     * Produce a method handle which adapts the type of the
-     * given method handle to a new type, by collecting a series of
-     * trailing arguments as elements to a single argument array.
-     * <p>
-     * This method may be used as an inverse to {@link #spreadArguments}.
-     * The final parameter type of the old type must be an array type T[],
-     * which is the type of what is called the <i>spread</i> argument.
-     * The trailing arguments of the new type which correspond to
-     * the spread argument are all converted to type T and collected
-     * into an array before the original method is called.
-     * @param target the method handle to invoke after the argument is prepended
+     * <em>METHOD WILL BE REMOVED FOR PFD:</em>
+     * Equivalent to the following code:
+     * <p><blockquote><pre>
+     * int collectPos = target.type().parameterCount() - 1;
+     * Class<?> collectType = target.type().parameterType(collectPos);
+     * if (!collectType.isArray())  collectType = Object[].class;
+     * int collectCount = newType.parameterCount() - collectPos;
+     * MethodHandle adapter = target.asCollector(collectType, collectCount);
+     * adapter = adapter.asType(newType);
+     * return adapter;
+     * </pre></blockquote>
+     * @param target the method handle to invoke after argument collection
      * @param newType the expected type of the new method handle
-     * @return a new method handle which collects some trailing argument
+     * @return a method handle which collects some trailing argument
      *         into an array, before calling the original method handle
+     * @deprecated Use {@link MethodHandle#asCollector} instead.
      */
     public static
     MethodHandle collectArguments(MethodHandle target, MethodType newType) {
@@ -1209,7 +1301,88 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * Produce a method handle of the requested return type which returns the given
+     * constant value every time it is invoked.
+     * <p>
+     * Before the method handle is returned, the passed-in value is converted to the requested type.
+     * If the requested type is primitive, widening primitive conversions are attempted,
+     * else reference conversions are attempted.
+     * <p>The returned method handle is equivalent to {@code identity(type).bindTo(value)},
+     * unless the type is {@code void}, in which case it is {@code identity(type)}.
+     * @param type the return type of the desired method handle
+     * @param value the value to return
+     * @return a method handle of the given return type and no arguments, which always returns the given value
+     * @throws WrongMethodTypeException if the value cannot be converted to the required return type
+     */
+    public static
+    MethodHandle constant(Class<?> type, Object value) {
+        if (type.isPrimitive()) {
+            if (type == void.class)  return identity(type);
+            Wrapper w = Wrapper.forPrimitiveType(type);
+            return identity(type).bindTo(w.convert(value, type));
+        } else {
+            return identity(type).bindTo(type.cast(value));
+        }
+    }
+
+    /**
+     * Produce a method handle of the requested type which returns the given
+     * constant value every time it is invoked.
+     * <p>
+     * Before the method handle is returned, the passed-in value is converted to the requested return type,
+     * as if by {@link #explicitCastArguments #explicitCastArguments}.
+     * That is, if the return type is primitive, the value is unboxed,
+     * and the primitive value is widened and/or narrowed.
+     * Otherwise, reference conversions are attempted.
+     * @param type the type of the desired method handle
+     * @param value the value to return
+     * @return a method handle of the given return type and no arguments, which always returns the given value
+     * @throws WrongMethodTypeException if the value cannot be converted to the required return type
+     */
+    public static
+    MethodHandle constant(MethodType type, Object value) {
+        MethodHandle target = constant(type.returnType(), value);
+        int len = type.parameterCount();
+        if (len == 0)
+            return target.asType(type);
+        target = target.asType(type.dropParameterTypes(0, len));
+        return dropArguments(target, 0, type.parameterList().subList(0, len));
+    }
+
+     /**
+      * Produce a method handle which returns its sole argument when invoked.
+      * <p>The identity function for {@code void} takes no arguments and returns no values.
+      * @param type the type of the sole parameter and return value of the desired method handle
+      * @return a unary method handle which accepts and returns the given type
+      */
+    public static
+    MethodHandle identity(Class<?> type) {
+        return ValueConversions.identity(type);
+    }
+
+     /**
+      * Produce a method handle of the requested type which returns its argument when invoked.
+      * If the return type differs from the first argument type, the argument will be
+      * converted as if by {@link #explicitCastArguments explicitCastArguments}.
+      * If there are additional arguments beyond the first, they are discarded.
+      * <p>The identity function for {@code void} discards all its arguments.
+      * @param type the type of the desired method handle
+      * @return a method handle of the given type, which always returns its first argument
+      * @throws WrongMethodTypeException if the first argument cannot be converted to the required return type
+      */
+    public static
+    MethodHandle identity(MethodType type) {
+        MethodHandle target = identity(type.returnType());
+        int len = type.parameterCount();
+        if (len == 1)
+            return explicitCastArguments(target, type);
+        if (len == 0)
+            throw new IllegalArgumentException("not enough arguments");
+        target = explicitCastArguments(target, type.dropParameterTypes(1, len));
+        return dropArguments(target, 1, type.parameterList().subList(1, len));
+    }
+
+    /**
      * Produce a method handle which calls the original method handle {@code target},
      * after inserting the given argument(s) at the given position.
      * The formal parameters to {@code target} which will be supplied by those
@@ -1229,8 +1402,9 @@
      * @param target the method handle to invoke after the argument is inserted
      * @param pos where to insert the argument (zero for the first)
      * @param values the series of arguments to insert
-     * @return a new method handle which inserts an additional argument,
+     * @return a method handle which inserts an additional argument,
      *         before calling the original method handle
+     * @see MethodHandle#bindTo
      */
     public static
     MethodHandle insertArguments(MethodHandle target, int pos, Object... values) {
@@ -1263,14 +1437,7 @@
         return result;
     }
 
-    @Deprecated // "use MethodHandles.insertArguments instead"
-    public static
-    MethodHandle insertArgument(MethodHandle target, int pos, Object value) {
-        return insertArguments(target, pos, value);
-    }
-
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Produce a method handle which calls the original method handle,
      * after dropping the given argument(s) at the given position.
      * The type of the new method handle will insert the given argument
@@ -1283,25 +1450,25 @@
      * <p>
      * <b>Example:</b>
      * <p><blockquote><pre>
-     *   import static java.dyn.MethodHandles.*;
-     *   import static java.dyn.MethodType.*;
-     *   ...
-     *   MethodHandle cat = lookup().findVirtual(String.class,
-     *     "concat", methodType(String.class, String.class));
-     *   System.out.println((String) cat.invokeExact("x", "y")); // xy
-     *   MethodHandle d0 = dropArguments(cat, 0, String.class);
-     *   System.out.println((String) d0.invokeExact("x", "y", "z")); // yz
-     *   MethodHandle d1 = dropArguments(cat, 1, String.class);
-     *   System.out.println((String) d1.invokeExact("x", "y", "z")); // xz
-     *   MethodHandle d2 = dropArguments(cat, 2, String.class);
-     *   System.out.println((String) d2.invokeExact("x", "y", "z")); // xy
-     *   MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class);
-     *   System.out.println((String) d12.invokeExact("x", 12, true, "z")); // xz
+import static java.dyn.MethodHandles.*;
+import static java.dyn.MethodType.*;
+...
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+assertEquals("xy", (String) cat.invokeExact("x", "y"));
+MethodHandle d0 = dropArguments(cat, 0, String.class);
+assertEquals("yz", (String) d0.invokeExact("x", "y", "z"));
+MethodHandle d1 = dropArguments(cat, 1, String.class);
+assertEquals("xz", (String) d1.invokeExact("x", "y", "z"));
+MethodHandle d2 = dropArguments(cat, 2, String.class);
+assertEquals("xy", (String) d2.invokeExact("x", "y", "z"));
+MethodHandle d12 = dropArguments(cat, 1, int.class, boolean.class);
+assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
      * </pre></blockquote>
-     * @param target the method handle to invoke after the argument is dropped
-     * @param valueTypes the type(s) of the argument to drop
-     * @param pos which argument to drop (zero for the first)
-     * @return a new method handle which drops an argument of the given type,
+     * @param target the method handle to invoke after the arguments are dropped
+     * @param valueTypes the type(s) of the argument(s) to drop
+     * @param pos position of first argument to drop (zero for the leftmost)
+     * @return a method handle which drops arguments of the given types,
      *         before calling the original method handle
      */
     public static
@@ -1319,23 +1486,36 @@
         return MethodHandleImpl.dropArguments(IMPL_TOKEN, target, newType, pos);
     }
 
+    /**
+     * Produce a method handle which calls the original method handle,
+     * after dropping the given argument(s) at the given position.
+     * The type of the new method handle will insert the given argument
+     * type(s), at that position, into the original handle's type.
+     * This method is equivalent to the following code:
+     * <code>
+     * {@link #dropArguments(MethodHandle,int,List) dropArguments}(target, pos, Arrays.asList(valueTypes))
+     * </code>
+     * @param target the method handle to invoke after the arguments are dropped
+     * @param valueTypes the type(s) of the argument(s) to drop
+     * @param pos position of first argument to drop (zero for the leftmost)
+     * @return a method handle which drops arguments of the given types,
+     *         before calling the original method handle
+     */
     public static
     MethodHandle dropArguments(MethodHandle target, int pos, Class<?>... valueTypes) {
         return dropArguments(target, pos, Arrays.asList(valueTypes));
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Adapt a target method handle {@code target} by pre-processing
      * one or more of its arguments, each with its own unary filter function,
      * and then calling the target with each pre-processed argument
      * replaced by the result of its corresponding filter function.
      * <p>
      * The pre-processing is performed by one or more method handles,
-     * specified in the non-null elements of the {@code filters} array.
-     * (If there are no such elements, the original target is returned.)
-     * Each filter (that is, each non-null element of {@code filters})
-     * is applied to the corresponding argument of the adapter.
+     * specified in the elements of the {@code filters} array.
+     * (If there are no elements in the array, the original target is returned.)
+     * Each filter is applied to the corresponding argument of the adapter.
      * <p>
      * If a filter {@code F} applies to the {@code N}th argument of
      * the method handle, then {@code F} must be a method handle which
@@ -1345,46 +1525,49 @@
      * The return type of {@code F} must be identical to the corresponding
      * parameter type of the target.
      * <p>
-     * It is an error if there are non-null elements of {@code filters}
+     * It is an error if there are elements of {@code filters}
      * which do not correspond to argument positions in the target.
-     * The actual length of the target array may be any number, it need
-     * not be the same as the parameter count of the target type.
-     * (This provides an easy way to filter just the first argument or two
-     * of a target method handle.)
-     * <p> Here is pseudocode for the resulting adapter:
-     * <blockquote><pre>
-     * // there are N arguments in the A sequence
-     * T target(A[N]...);
-     * [i&lt;N] V[i] filter[i](B[i]) = filters[i] ?: identity;
-     * T adapter(B[N]... b) {
-     *   A[N] a...;
-     *   [i&lt;N] a[i] = filter[i](b[i]);
-     *   return target(a...);
-     * }
+     * <b>Example:</b>
+     * <p><blockquote><pre>
+import static java.dyn.MethodHandles.*;
+import static java.dyn.MethodType.*;
+...
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+MethodHandle upcase = lookup().findVirtual(String.class,
+  "toUpperCase", methodType(String.class));
+assertEquals("xy", (String) cat.invokeExact("x", "y"));
+MethodHandle f0 = filterArguments(cat, 0, upcase);
+assertEquals("Xy", (String) f0.invokeExact("x", "y")); // Xy
+MethodHandle f1 = filterArguments(cat, 1, upcase);
+assertEquals("xY", (String) f1.invokeExact("x", "y")); // xY
+MethodHandle f2 = filterArguments(cat, 0, upcase, upcase);
+assertEquals("XY", (String) f2.invokeExact("x", "y")); // XY
      * </pre></blockquote>
      * @param target the method handle to invoke after arguments are filtered
+     * @param pos the position of the first argument to filter
      * @param filters method handles to call initially on filtered arguments
      * @return method handle which incorporates the specified argument filtering logic
-     * @throws IllegalArgumentException if a non-null element of {@code filters}
-     *          does not match a corresponding argument type of {@code target}
+     * @throws IllegalArgumentException if an element of {@code filters} is null or
+     *          does not match a corresponding argument type of {@code target} as described above
      */
     public static
-    MethodHandle filterArguments(MethodHandle target, MethodHandle... filters) {
+    MethodHandle filterArguments(MethodHandle target, int pos, MethodHandle... filters) {
         MethodType targetType = target.type();
         MethodHandle adapter = target;
         MethodType adapterType = targetType;
-        int pos = -1, maxPos = targetType.parameterCount();
+        int maxPos = targetType.parameterCount();
+        int curPos = pos;
         for (MethodHandle filter : filters) {
-            pos += 1;
-            if (filter == null)  continue;
-            if (pos >= maxPos)
+            if (curPos >= maxPos)
                 throw newIllegalArgumentException("too many filters");
             MethodType filterType = filter.type();
             if (filterType.parameterCount() != 1
-                || filterType.returnType() != targetType.parameterType(pos))
+                || filterType.returnType() != targetType.parameterType(curPos))
                 throw newIllegalArgumentException("target and filter types do not match");
-            adapterType = adapterType.changeParameterType(pos, filterType.parameterType(0));
-            adapter = MethodHandleImpl.filterArgument(IMPL_TOKEN, adapter, pos, filter);
+            adapterType = adapterType.changeParameterType(curPos, filterType.parameterType(0));
+            adapter = MethodHandleImpl.filterArgument(IMPL_TOKEN, adapter, curPos, filter);
+            curPos += 1;
         }
         MethodType midType = adapter.type();
         if (midType != adapterType)
@@ -1393,7 +1576,48 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * Adapt a target method handle {@code target} by post-processing
+     * its return value with a unary filter function.
+     * <p>
+     * If a filter {@code F} applies to the return value of
+     * the target method handle, then {@code F} must be a method handle which
+     * takes exactly one argument.  The return type of {@code F}
+     * replaces the return type of the target
+     * in the resulting adapted method handle.
+     * The argument type of {@code F} must be identical to the
+     * return type of the target.
+     * <b>Example:</b>
+     * <p><blockquote><pre>
+import static java.dyn.MethodHandles.*;
+import static java.dyn.MethodType.*;
+...
+MethodHandle cat = lookup().findVirtual(String.class,
+  "concat", methodType(String.class, String.class));
+MethodHandle length = lookup().findVirtual(String.class,
+  "length", methodType(int.class));
+System.out.println((String) cat.invokeExact("x", "y")); // xy
+MethodHandle f0 = filterReturnValue(cat, length);
+System.out.println((int) f0.invokeExact("x", "y")); // 2
+     * </pre></blockquote>
+     * @param target the method handle to invoke before filtering the return value
+     * @param filter method handle to call on the return value
+     * @return method handle which incorporates the specified return value filtering logic
+     * @throws IllegalArgumentException if {@code filter} is null or
+     *          does not match the return type of {@code target} as described above
+     */
+    public static
+    MethodHandle filterReturnValue(MethodHandle target, MethodHandle filter) {
+        MethodType targetType = target.type();
+        MethodType filterType = filter.type();
+        if (filterType.parameterCount() != 1
+            || filterType.parameterType(0) != targetType.returnType())
+            throw newIllegalArgumentException("target and filter types do not match");
+        // FIXME: Too many nodes here.
+        MethodHandle returner = dropArguments(filter, 0, targetType.parameterList());
+        return foldArguments(returner, exactInvoker(target.type()).bindTo(target));
+    }
+
+    /**
      * Adapt a target method handle {@code target} by pre-processing
      * some of its arguments, and then calling the target with
      * the result of the pre-processing, plus all original arguments.
@@ -1410,10 +1634,10 @@
      * The resulting adapter is the same type as the target, except that the
      * initial argument type of the target is dropped.
      * <p>
-     * (Note that {@link #dropArguments} can be used to remove any arguments
+     * (Note that {@link #dropArguments(MethodHandle,int,List) dropArguments} can be used to remove any arguments
      * that either the {@code combiner} or {@code target} does not wish to receive.
      * If some of the incoming arguments are destined only for the combiner,
-     * consider using {@link #collectArguments} instead, since those
+     * consider using {@link MethodHandle#asCollector} instead, since those
      * arguments will not need to be live on the stack on entry to the
      * target.)
      * <p>
@@ -1434,7 +1658,7 @@
      * @return method handle which incorporates the specified argument folding logic
      * @throws IllegalArgumentException if the first argument type of
      *          {@code target} is not the same as {@code combiner}'s return type,
-     *          or if the next {@code foldArgs} argument types of {@code target}
+     *          or if the following argument types of {@code target}
      *          are not identical with the argument types of {@code combiner}
      */
     public static
@@ -1443,6 +1667,10 @@
         MethodType combinerType = combiner.type();
         int foldArgs = combinerType.parameterCount();
         boolean ok = (targetType.parameterCount() >= 1 + foldArgs);
+        if (ok && !combinerType.parameterList().equals(targetType.parameterList().subList(1, foldArgs+1)))
+            ok = false;
+        if (ok && !combinerType.returnType().equals(targetType.parameterType(0)))
+            ok = false;
         if (!ok)
             throw misMatchedTypes("target and combiner types", targetType, combinerType);
         MethodType newType = targetType.dropParameterTypes(0, 1);
@@ -1450,7 +1678,6 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Make a method handle which adapts a target method handle,
      * by guarding it with a test, a boolean-valued method handle.
      * If the guard fails, a fallback handle is called instead.
@@ -1470,6 +1697,9 @@
      *     return fallback(a..., b...);
      * }
      * </pre></blockquote>
+     * Note that the test arguments ({@code a...} in the pseudocode) cannot
+     * be modified by execution of the test, and so are passed unchanged
+     * from the caller to the target or fallback as appropriate.
      * @param test method handle used for test, must return boolean
      * @param target method handle to call if test passes
      * @param fallback method handle to call if test fails
@@ -1485,40 +1715,19 @@
         MethodType gtype = test.type();
         MethodType ttype = target.type();
         MethodType ftype = fallback.type();
-        if (ttype != ftype)
+        if (!ttype.equals(ftype))
             throw misMatchedTypes("target and fallback types", ttype, ftype);
-        MethodType gtype2 = ttype.changeReturnType(boolean.class);
-        if (gtype2 != gtype) {
-            if (gtype.returnType() != boolean.class)
-                throw newIllegalArgumentException("guard type is not a predicate "+gtype);
-            int gpc = gtype.parameterCount(), tpc = ttype.parameterCount();
-            if (gpc < tpc) {
-                test = dropArguments(test, gpc, ttype.parameterList().subList(gpc, tpc));
-                gtype = test.type();
-            }
-            if (gtype2 != gtype)
+        if (gtype.returnType() != boolean.class)
+            throw newIllegalArgumentException("guard type is not a predicate "+gtype);
+        List<Class<?>> targs = ttype.parameterList();
+        List<Class<?>> gargs = gtype.parameterList();
+        if (!targs.equals(gargs)) {
+            int gpc = gargs.size(), tpc = targs.size();
+            if (gpc >= tpc || !targs.subList(0, gpc).equals(gargs))
                 throw misMatchedTypes("target and test types", ttype, gtype);
+            test = dropArguments(test, gpc, targs.subList(gpc, tpc));
+            gtype = test.type();
         }
-        /* {
-            MethodHandle invoke = findVirtual(MethodHandle.class, "invoke", target.type());
-            static MethodHandle choose(boolean z, MethodHandle t, MethodHandle f) {
-                return z ? t : f;
-            }
-            static MethodHandle compose(MethodHandle f, MethodHandle g) {
-                Class<?> initargs = g.type().parameterArray();
-                f = dropArguments(f, 1, initargs);  // ignore 2nd copy of args
-                return combineArguments(f, g);
-            }
-            // choose = \z.(z ? target : fallback)
-            MethodHandle choose = findVirtual(MethodHandles.class, "choose",
-                    MethodType.methodType(boolean.class, MethodHandle.class, MethodHandle.class));
-            choose = appendArgument(choose, target);
-            choose = appendArgument(choose, fallback);
-            MethodHandle dispatch = compose(choose, test);
-            // dispatch = \(a...).(test(a...) ? target : fallback)
-            return combineArguments(invoke, dispatch, 0);
-            // return \(a...).((test(a...) ? target : fallback).invokeExact(a...))
-        } */
         return MethodHandleImpl.makeGuardWithTest(IMPL_TOKEN, test, target, fallback);
     }
 
@@ -1527,29 +1736,38 @@
     }
 
     /**
-     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
      * Make a method handle which adapts a target method handle,
      * by running it inside an exception handler.
      * If the target returns normally, the adapter returns that value.
      * If an exception matching the specified type is thrown, the fallback
      * handle is called instead on the exception, plus the original arguments.
      * <p>
-     * The handler must have leading parameter of {@code exType} or a supertype,
-     * followed by arguments which correspond <em>(how? TBD)</em> to
-     * all the parameters of the target.
-     * The target and handler must return the same type.
+     * The target and handler must have the same corresponding
+     * argument and return types, except that handler may omit trailing arguments
+     * (similarly to the predicate in {@link #guardWithTest guardWithTest}).
+     * Also, the handler must have an extra leading parameter of {@code exType} or a supertype.
      * <p> Here is pseudocode for the resulting adapter:
      * <blockquote><pre>
-     * T target(A...);
+     * T target(A..., B...);
      * T handler(ExType, A...);
-     * T adapter(A... a) {
+     * T adapter(A... a, B... b) {
      *   try {
-     *     return target(a...);
+     *     return target(a..., b...);
      *   } catch (ExType ex) {
      *     return handler(ex, a...);
      *   }
      * }
      * </pre></blockquote>
+     * Note that the saved arguments ({@code a...} in the pseudocode) cannot
+     * be modified by execution of the target, and so are passed unchanged
+     * from the caller to the handler, if the handler is invoked.
+     * <p>
+     * The target and handler must return the same type, even if the handler
+     * always throws.  (This might happen, for instance, because the handler
+     * is simulating a {@code finally} clause).
+     * To create such a throwing handler, compose the handler creation logic
+     * with {@link #throwException throwException},
+     * in order to create a method handle of the correct return type.
      * @param target method handle to call
      * @param exType the type of exception which the handler will catch
      * @param handler method handle to call if a matching exception is thrown
@@ -1563,16 +1781,23 @@
     MethodHandle catchException(MethodHandle target,
                                 Class<? extends Throwable> exType,
                                 MethodHandle handler) {
-        MethodType targetType = target.type();
-        MethodType handlerType = handler.type();
-        boolean ok = (targetType.parameterCount() ==
-                      handlerType.parameterCount() - 1);
-//        for (int i = 0; ok && i < numExArgs; i++) {
-//            if (targetType.parameterType(i) != handlerType.parameterType(1+i))
-//                ok = false;
-//        }
-        if (!ok)
-            throw newIllegalArgumentException("target and handler types do not match");
+        MethodType ttype = target.type();
+        MethodType htype = handler.type();
+        if (htype.parameterCount() < 1 ||
+            !htype.parameterType(0).isAssignableFrom(exType))
+            throw newIllegalArgumentException("handler does not accept exception type "+exType);
+        if (htype.returnType() != ttype.returnType())
+            throw misMatchedTypes("target and handler return types", ttype, htype);
+        List<Class<?>> targs = ttype.parameterList();
+        List<Class<?>> hargs = htype.parameterList();
+        hargs = hargs.subList(1, hargs.size());  // omit leading parameter from handler
+        if (!targs.equals(hargs)) {
+            int hpc = hargs.size(), tpc = targs.size();
+            if (hpc >= tpc || !targs.subList(0, hpc).equals(hargs))
+                throw misMatchedTypes("target and handler types", ttype, htype);
+            handler = dropArguments(handler, hpc, hargs.subList(hpc, tpc));
+            htype = handler.type();
+        }
         return MethodHandleImpl.makeGuardWithCatch(IMPL_TOKEN, target, exType, handler);
     }
 
@@ -1590,10 +1815,11 @@
     }
 
     /**
-     * Produce a wrapper instance of the given "SAM" type which redirects its calls to the given method handle.
-     * A SAM type is a type which declares a single abstract method.
-     * Additionally, it must have either no constructor (as an interface)
-     * or have a public or protected constructor of zero arguments (as a class).
+     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * Produce a wrapper instance of the given "SAM" interface which redirects
+     * its calls to the given method handle.
+     * A SAM interface is an interface which declares a single abstract method.
+     * The type must be public.  (No additional access checks are performed.)
      * <p>
      * The resulting instance of the required SAM type will respond to
      * invocation of the SAM type's single abstract method by calling
@@ -1605,9 +1831,9 @@
      * The method handle may throw an <em>undeclared exception</em>,
      * which means any checked exception (or other checked throwable)
      * not declared by the SAM type's single abstract method.
-     * If this happens, the throwable will be wrapped in an instance
-     * of {@link UndeclaredThrowableException} and thrown in that
-     * wrapped form.
+     * If this happens, the throwable will be wrapped in an instance of
+     * {@link java.lang.reflect.UndeclaredThrowableException UndeclaredThrowableException}
+     * and thrown in that wrapped form.
      * <p>
      * The wrapper instance is guaranteed to be of a non-public
      * implementation class C in a package containing no classes
@@ -1618,19 +1844,36 @@
      * <li>the SAM type itself and any methods in the SAM type
      * <li>the supertypes of the SAM type (if any) and their methods
      * <li>{@link Object} and its methods
-     * <li>{@link MethodHandleProvider} and its methods
+     * <li>{@link java.dyn.AsInstanceObject AsInstanceObject} and its methods</li>
      * </ul>
      * <p>
+     * (Note: When determining the unique abstract method of a SAM interface,
+     * the public {@code Object} methods ({@code toString}, {@code equals}, {@code hashCode})
+     * are disregarded.  For example, {@link java.util.Comparator} is a SAM interface,
+     * even though it re-declares the {@code Object.equals} method.)
+     * <p>
      * No stable mapping is promised between the SAM type and
      * the implementation class C.  Over time, several implementation
      * classes might be used for the same SAM type.
      * <p>
      * This method is not guaranteed to return a distinct
-     * wrapper object for each separate call.  If the JVM is able
-     * to prove that a wrapper has already been created for a given
+     * wrapper object for each separate call.  If the implementation is able
+     * to prove that a wrapper of the required SAM type
+     * has already been created for a given
      * method handle, or for another method handle with the
-     * same behavior, the JVM may return that wrapper in place of
+     * same behavior, the implementation may return that wrapper in place of
      * a new wrapper.
+     * <p>
+     * This method is designed to apply to common use cases
+     * where a single method handle must interoperate with
+     * a type (class or interface) that implements a function-like
+     * API.  Additional variations, such as SAM classes with
+     * private constructors, or interfaces with multiple but related
+     * entry points, must be covered by hand-written or automatically
+     * generated adapter classes.  In those cases, consider implementing
+     * {@link java.dyn.MethodHandles.AsInstanceObject AsInstanceObject}
+     * in the adapters, so that generic code can extract the underlying
+     * method handle without knowing where the SAM adapter came from.
      * @param target the method handle to invoke from the wrapper
      * @param samType the desired type of the wrapper, a SAM type
      * @return a correctly-typed wrapper for the given {@code target}
@@ -1639,38 +1882,93 @@
      */
     // ISSUE: Should we delegate equals/hashCode to the targets?
     // Not useful unless there is a stable equals/hashCode behavior
-    // for MethodHandle, and for MethodHandleProvider.asMethodHandle.
+    // for MethodHandle, but there isn't.
     public static
-    <T> T asInstance(MethodHandle target, Class<T> samType) {
+    <T> T asInstance(final MethodHandle target, final Class<T> samType) {
         // POC implementation only; violates the above contract several ways
         final Method sam = getSamMethod(samType);
         if (sam == null)
             throw new IllegalArgumentException("not a SAM type: "+samType.getName());
         MethodType samMT = MethodType.methodType(sam.getReturnType(), sam.getParameterTypes());
         if (!samMT.equals(target.type()))
-            throw new IllegalArgumentException("wrong method type");
-        final MethodHandle mh = target;
+            throw new IllegalArgumentException("wrong method type: "+target+" should match "+sam);
         return samType.cast(Proxy.newProxyInstance(
                 samType.getClassLoader(),
-                new Class[]{ samType, MethodHandleProvider.class },
+                new Class[]{ samType, AsInstanceObject.class },
                 new InvocationHandler() {
+                    private Object getArg(String name) {
+                        if ((Object)name == "getAsInstanceTarget")  return target;
+                        if ((Object)name == "getAsInstanceType")    return samType;
+                        throw new AssertionError();
+                    }
                     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-                        if (method.getDeclaringClass() == MethodHandleProvider.class) {
-                            return method.invoke(mh, args);
-                        }
-                        assert method.equals(sam) : method;
-                        return mh.invokeVarargs(args);
+                        if (method.getDeclaringClass() == AsInstanceObject.class)
+                            return getArg(method.getName());
+                        if (method.equals(sam))
+                            return target.invokeVarargs(args);
+                        if (isObjectMethod(method))
+                            return callObjectMethod(this, method, args);
+                        throw new InternalError();
                     }
                 }));
     }
 
+    /**
+     * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+     * Interface implemented by every object which is produced by {@link #asInstance asInstance}.
+     * The methods of this interface allow a caller to recover the parameters
+     * to {@code asInstance}.
+     * This allows applications to repeatedly convert between method handles
+     * and SAM objects, without the risk of creating unbounded delegation chains.
+     */
+    public interface AsInstanceObject {
+        /** Produce or recover a target method handle which is behaviorally
+         *  equivalent to the SAM method of this object.
+         */
+        public MethodHandle getAsInstanceTarget();
+        /** Recover the SAM type for which this object was created.
+         */
+        public Class<?> getAsInstanceType();
+    }
+
+    private static
+    boolean isObjectMethod(Method m) {
+        switch (m.getName()) {
+        case "toString":
+            return (m.getReturnType() == String.class
+                    && m.getParameterTypes().length == 0);
+        case "hashCode":
+            return (m.getReturnType() == int.class
+                    && m.getParameterTypes().length == 0);
+        case "equals":
+            return (m.getReturnType() == boolean.class
+                    && m.getParameterTypes().length == 1
+                    && m.getParameterTypes()[0] == Object.class);
+        }
+        return false;
+    }
+
+    private static
+    Object callObjectMethod(Object self, Method m, Object[] args) {
+        assert(isObjectMethod(m)) : m;
+        switch (m.getName()) {
+        case "toString":
+            return self.getClass().getName() + "@" + Integer.toHexString(self.hashCode());
+        case "hashCode":
+            return System.identityHashCode(self);
+        case "equals":
+            return (self == args[0]);
+        }
+        return null;
+    }
+
     private static
     Method getSamMethod(Class<?> samType) {
         Method sam = null;
         for (Method m : samType.getMethods()) {
             int mod = m.getModifiers();
             if (Modifier.isAbstract(mod)) {
-                if (sam != null)
+                if (sam != null && !isObjectMethod(sam))
                     return null;  // too many abstract methods
                 sam = m;
             }
@@ -1691,4 +1989,9 @@
         }
         return null;
     }
+
+    /*non-public*/
+    static MethodHandle withTypeHandler(MethodHandle target, MethodHandle typeHandler) {
+        return MethodHandleImpl.withTypeHandler(IMPL_TOKEN, target, typeHandler);
+    }
 }
--- a/src/share/classes/java/dyn/MethodType.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/MethodType.java	Thu Dec 23 00:03:46 2010 -0800
@@ -56,21 +56,33 @@
  * <p>
  * This type can be created only by factory methods.
  * All factory methods may cache values, though caching is not guaranteed.
+ * Some factory methods are static, while others are virtual methods which
+ * modify precursor method types, e.g., by changing a selected parameter.
+ * <p>
+ * Factory methods which operate on groups of parameter types
+ * are systematically presented in two versions, so that both Java arrays and
+ * Java lists can be used to work with groups of parameter types.
+ * The query methods {@code parameterArray} and {@code parameterList}
+ * also provide a choice between arrays and lists.
  * <p>
  * {@code MethodType} objects are sometimes derived from bytecode instructions
  * such as {@code invokedynamic}, specifically from the type descriptor strings associated
  * with the instructions in a class file's constant pool.
- * When this occurs, any classes named in the descriptor strings must be loaded.
- * (But they need not be initialized.)
+ * <p>
+ * Like classes and strings, method types can also be represented directly
+ * in a class file's constant pool as constants. The may be loaded by an {@code ldc}
+ * instruction which refers to a suitable {@code CONSTANT_MethodType} constant pool entry.
+ * The entry refers to a {@code CONSTANT_Utf8} spelling for the descriptor string.
+ * For more details, see the <a href="package-summary.html#mtcon">package summary</a>.
+ * <p>
+ * When the JVM materializes a {@code MethodType} from a descriptor string,
+ * all classes named in the descriptor must be accessible, and will be loaded.
+ * (But the classes need not be initialized, as is the case with a {@code CONSTANT_Class}.)
  * This loading may occur at any time before the {@code MethodType} object is first derived.
- * <p>
- * Like classes and strings, method types can be represented directly
- * in a class file's constant pool as constants to be loaded by {@code ldc} bytecodes.
- * Loading such a constant causes its component classes to be loaded as necessary.
  * @author John Rose, JSR 292 EG
  */
 public final
-class MethodType implements java.lang.reflect.Type {
+class MethodType {
     private final Class<?>   rtype;
     private final Class<?>[] ptypes;
     private MethodTypeForm form; // erased form, plus cached data about primitives
@@ -119,7 +131,7 @@
         for (Class<?> ptype : ptypes) {
             ptype.equals(ptype);  // null check
             if (ptype == void.class)
-                throw newIllegalArgumentException("void parameter: "+this);
+                throw newIllegalArgumentException("parameter type cannot be void");
         }
     }
 
@@ -139,10 +151,6 @@
     MethodType methodType(Class<?> rtype, Class<?>[] ptypes) {
         return makeImpl(rtype, ptypes, false);
     }
-    @Deprecated public static
-    MethodType make(Class<?> rtype, Class<?>[] ptypes) {
-        return methodType(rtype, ptypes);
-    }
 
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}. */
     public static
@@ -150,10 +158,6 @@
         boolean notrust = false;  // random List impl. could return evil ptypes array
         return makeImpl(rtype, ptypes.toArray(NO_PTYPES), notrust);
     }
-    @Deprecated public static
-    MethodType make(Class<?> rtype, List<? extends Class<?>> ptypes) {
-        return methodType(rtype, ptypes);
-    }
 
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
      *  The leading parameter type is prepended to the remaining array.
@@ -165,10 +169,6 @@
         System.arraycopy(ptypes, 0, ptypes1, 1, ptypes.length);
         return makeImpl(rtype, ptypes1, true);
     }
-    @Deprecated public static
-    MethodType make(Class<?> rtype, Class<?> ptype0, Class<?>... ptypes) {
-        return methodType(rtype, ptype0, ptypes);
-    }
 
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
      *  The resulting method has no parameter types.
@@ -177,10 +177,6 @@
     MethodType methodType(Class<?> rtype) {
         return makeImpl(rtype, NO_PTYPES, true);
     }
-    @Deprecated public static
-    MethodType make(Class<?> rtype) {
-        return methodType(rtype);
-    }
 
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
      *  The resulting method has the single given parameter type.
@@ -189,10 +185,6 @@
     MethodType methodType(Class<?> rtype, Class<?> ptype0) {
         return makeImpl(rtype, new Class<?>[]{ ptype0 }, true);
     }
-    @Deprecated public static
-    MethodType make(Class<?> rtype, Class<?> ptype0) {
-        return methodType(rtype, ptype0);
-    }
 
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
      *  The resulting method has the same parameter types as {@code ptypes},
@@ -202,10 +194,6 @@
     MethodType methodType(Class<?> rtype, MethodType ptypes) {
         return makeImpl(rtype, ptypes.ptypes, true);
     }
-    @Deprecated public static
-    MethodType make(Class<?> rtype, MethodType ptypes) {
-        return methodType(rtype, ptypes);
-    }
 
     /**
      * Sole factory method to find or create an interned method type.
@@ -275,10 +263,6 @@
         }
         return mt;
     }
-    @Deprecated public static
-    MethodType makeGeneric(int objectArgCount, boolean varargs) {
-        return genericMethodType(objectArgCount, varargs);
-    }
 
     /**
      * All parameters and the return type will be Object.
@@ -290,10 +274,6 @@
     MethodType genericMethodType(int objectArgCount) {
         return genericMethodType(objectArgCount, false);
     }
-    @Deprecated public static
-    MethodType makeGeneric(int objectArgCount) {
-        return genericMethodType(objectArgCount);
-    }
 
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
      * @param num    the index (zero-based) of the parameter type to change
@@ -307,18 +287,6 @@
         return makeImpl(rtype, nptypes, true);
     }
 
-    /** Convenience method for {@link #insertParameterTypes}.
-     * @deprecated Use {@link #insertParameterTypes} instead.
-     */
-    @Deprecated
-    public MethodType insertParameterType(int num, Class<?> nptype) {
-        int len = ptypes.length;
-        Class<?>[] nptypes = Arrays.copyOfRange(ptypes, 0, len+1);
-        System.arraycopy(nptypes, num, nptypes, num+1, len-num);
-        nptypes[num] = nptype;
-        return makeImpl(rtype, nptypes, true);
-    }
-
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
      * @param num    the position (zero-based) of the inserted parameter type(s)
      * @param ptypesToInsert zero or more a new parameter types to insert into the parameter list
@@ -337,6 +305,22 @@
     }
 
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
+     * @param ptypesToInsert zero or more a new parameter types to insert after the end of the parameter list
+     * @return the same type, except with the selected parameter(s) appended
+     */
+    public MethodType appendParameterTypes(Class<?>... ptypesToInsert) {
+        return insertParameterTypes(parameterCount(), ptypesToInsert);
+    }
+
+    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
+     * @param ptypesToInsert zero or more a new parameter types to insert after the end of the parameter list
+     * @return the same type, except with the selected parameter(s) appended
+     */
+    public MethodType appendParameterTypes(List<Class<?>> ptypesToInsert) {
+        return insertParameterTypes(parameterCount(), ptypesToInsert);
+    }
+
+    /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
      * @param num    the position (zero-based) of the inserted parameter type(s)
      * @param ptypesToInsert zero or more a new parameter types to insert into the parameter list
      * @return the same type, except with the selected parameter(s) inserted
@@ -377,14 +361,6 @@
         return makeImpl(rtype, nptypes, true);
     }
 
-    /** Convenience method for {@link #dropParameterTypes}.
-     * @deprecated Use {@link #dropParameterTypes} instead.
-     */
-    @Deprecated
-    public MethodType dropParameterType(int num) {
-        return dropParameterTypes(num, num+1);
-    }
-
     /** Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[])}.
      * @param nrtype a return parameter type to replace the old one with
      * @return the same type, except with the return type change
@@ -552,7 +528,9 @@
      * parenthesis enclosed, comma separated list of type names,
      * followed immediately by the return type.
      * <p>
-     * If a type name is array, it the base type followed
+     * Each type is represented by its
+     * {@link java.lang.Class#getSimpleName simple name}.
+     * If a type name name is array, it the base type followed
      * by [], rather than the Class.getName of the array type.
      */
     @Override
@@ -561,35 +539,13 @@
         sb.append("(");
         for (int i = 0; i < ptypes.length; i++) {
             if (i > 0)  sb.append(",");
-            putName(sb, ptypes[i]);
+            sb.append(ptypes[i].getSimpleName());
         }
         sb.append(")");
-        putName(sb, rtype);
+        sb.append(rtype.getSimpleName());
         return sb.toString();
     }
 
-    static void putName(StringBuilder sb, Class<?> cls) {
-        int brackets = 0;
-        while (cls.isArray()) {
-            cls = cls.getComponentType();
-            brackets++;
-        }
-        String n = cls.getName();
-        /*
-        if (n.startsWith("java.lang.")) {
-            String nb = n.substring("java.lang.".length());
-            if (nb.indexOf('.') < 0)  n = nb;
-        } else if (n.indexOf('.') < 0) {
-            n = "."+n;          // anonymous package
-        }
-        */
-        sb.append(n);
-        while (brackets > 0) {
-            sb.append("[]");
-            brackets--;
-        }
-    }
-
     /// Queries which have to do with the bytecode architecture
 
     /** The number of JVM stack slots required to invoke a method
@@ -690,14 +646,4 @@
     public String toMethodDescriptorString() {
         return BytecodeDescriptor.unparse(this);
     }
-
-    /** Temporary alias for toMethodDescriptorString; delete after M3. */
-    public String toBytecodeString() {
-        return toMethodDescriptorString();
-    }
-    /** Temporary alias for fromMethodDescriptorString; delete after M3. */
-    public static MethodType fromBytecodeString(String descriptor, ClassLoader loader)
-        throws IllegalArgumentException, TypeNotPresentException {
-        return fromMethodDescriptorString(descriptor, loader);
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/dyn/MutableCallSite.java	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,206 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.dyn;
+
+import sun.dyn.*;
+import sun.dyn.empty.Empty;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * A {@code MutableCallSite} is a {@link CallSite} whose target variable
+ * behaves like an ordinary field.
+ * An {@code invokedynamic} instruction linked to a {@code MutableCallSite} delegates
+ * all calls to the site's current target.
+ * The {@linkplain CallSite#dynamicInvoker dynamic invoker} of a mutable call site
+ * also delegates each call to the site's current target.
+ * <p>
+ * Here is an example of a mutable call site which introduces a
+ * state variable into a method handle chain.
+ * <blockquote><pre>
+MutableCallSite name = new MutableCallSite(MethodType.methodType(String.class));
+MethodHandle MH_name = name.dynamicInvoker();
+MethodType MT_str2 = MethodType.methodType(String.class, String.class);
+MethodHandle MH_upcase = MethodHandles.lookup()
+    .findVirtual(String.class, "toUpperCase", MT_str2);
+MethodHandle worker1 = MethodHandles.filterReturnValue(MH_name, MH_upcase);
+name.setTarget(MethodHandles.constant(String.class, "Rocky"));
+assertEquals("ROCKY", (String) worker1.invokeExact());
+name.setTarget(MethodHandles.constant(String.class, "Fred"));
+assertEquals("FRED", (String) worker1.invokeExact());
+// (mutation can be continued indefinitely)
+ * </pre></blockquote>
+ * <p>
+ * The same call site may be used in several places at once.
+ * <blockquote><pre>
+MethodHandle MH_dear = MethodHandles.lookup()
+    .findVirtual(String.class, "concat", MT_str2).bindTo(", dear?");
+MethodHandle worker2 = MethodHandles.filterReturnValue(MH_name, MH_dear);
+assertEquals("Fred, dear?", (String) worker2.invokeExact());
+name.setTarget(MethodHandles.constant(String.class, "Wilma"));
+assertEquals("WILMA", (String) worker1.invokeExact());
+assertEquals("Wilma, dear?", (String) worker2.invokeExact());
+ * </pre></blockquote>
+ * <p>
+ * <em>Non-synchronization of target values:</em>
+ * A write to a mutable call site's target does not force other threads
+ * to become aware of the updated value.  Threads which do not perform
+ * suitable synchronization actions relative to the updated call site
+ * may cache the old target value and delay their use of the new target
+ * value indefinitely.
+ * (This is a normal consequence of the Java Memory Model as applied
+ * to object fields.)
+ * <p>
+ * The {@link #sync sync} operation provides a way to force threads
+ * to accept a new target value, even if there is no other synchronization.
+ * <p>
+ * For target values which will be frequently updated, consider using
+ * a {@linkplain VolatileCallSite volatile call site} instead.
+ * @author John Rose, JSR 292 EG
+ */
+public class MutableCallSite extends CallSite {
+    /**
+     * Make a blank call site object with the given method type.
+     * An initial target method is supplied which will throw
+     * an {@link IllegalStateException} if called.
+     * <p>
+     * Before this {@code CallSite} object is returned from a bootstrap method,
+     * it is usually provided with a more useful target method,
+     * via a call to {@link CallSite#setTarget(MethodHandle) setTarget}.
+     * @throws NullPointerException if the proposed type is null
+     */
+    public MutableCallSite(MethodType type) {
+        super(type);
+    }
+
+    /**
+     * Make a blank call site object, possibly equipped with an initial target method handle.
+     * @param target the method handle which will be the initial target of the call site
+     * @throws NullPointerException if the proposed target is null
+     */
+    public MutableCallSite(MethodHandle target) {
+        super(target);
+    }
+
+    /**
+     * Perform a synchronization operation on each call site in the given array,
+     * forcing all other threads to throw away any cached values previously
+     * loaded from the target of any of the call sites.
+     * <p>
+     * This operation does not reverse any calls that have already started
+     * on an old target value.
+     * (Java supports {@linkplain java.lang.Object#wait() forward time travel} only.)
+     * <p>
+     * The overall effect is to force all future readers of each call site's target
+     * to accept the most recently stored value.
+     * ("Most recently" is reckoned relative to the {@code sync} itself.)
+     * Conversely, the {@code sync} call may block until all readers have
+     * (somehow) decached all previous versions of each call site's target.
+     * <p>
+     * To avoid race conditions, calls to {@code setTarget} and {@code sync}
+     * should generally be performed under some sort of mutual exclusion.
+     * Note that reader threads may observe an updated target as early
+     * as the {@code setTarget} call that install the value
+     * (and before the {@code sync} that confirms the value).
+     * On the other hand, reader threads may observe previous versions of
+     * the target until the {@code sync} call returns
+     * (and after the {@code setTarget} that attempts to convey the updated version).
+     * <p>
+     * In terms of the Java Memory Model, this operation performs a synchronization
+     * action which is comparable in effect to the writing of a volatile variable
+     * by the current thread, and an eventual volatile read by every other thread
+     * that may access one of the affected call sites.
+     * <p>
+     * The following effects are apparent, for each individual call site {@code S}:
+     * <ul>
+     * <li>A new volatile variable {@code V} is created, and written by the current thread.
+     *     As defined by the JMM, this write is a global synchronization event.
+     * <li>As is normal with thread-local ordering of write events,
+     *     every action already performed by the current thread is
+     *     taken to happen before the volatile write to {@code V}.
+     *     (In some implementations, this means that the current thread
+     *     performs a global release operation.)
+     * <li>Specifically, the write to the current target of {@code S} is
+     *     taken to happen before the volatile write to {@code V}.
+     * <li>The volatile write to {@code V} is placed
+     *     (in an implementation specific manner)
+     *     in the global synchronization order.
+     * <li>Consider an arbitrary thread {@code T} (other than the current thread).
+     *     If {@code T} executes a synchronization action {@code A}
+     *     after the volatile write to {@code V} (in the global synchronization order),
+     *     it is therefore required to see either the current target
+     *     of {@code S}, or a later write to that target,
+     *     if it executes a read on the target of {@code S}.
+     *     (This constraint is called "synchronization-order consistency".)
+     * <li>The JMM specifically allows optimizing compilers to elide
+     *     reads or writes of variables that are known to be useless.
+     *     Such elided reads and writes have no effect on the happens-before
+     *     relation.  Regardless of this fact, the volatile {@code V}
+     *     will not be elided, even though its written value is
+     *     indeterminate and its read value is not used.
+     * </ul>
+     * Because of the last point, the implementation behaves as if a
+     * volatile read of {@code V} were performed by {@code T}
+     * immediately after its action {@code A}.  In the local ordering
+     * of actions in {@code T}, this read happens before any future
+     * read of the target of {@code S}.  It is as if the
+     * implementation arbitrarily picked a read of {@code S}'s target
+     * by {@code T}, and forced a read of {@code V} to precede it,
+     * thereby ensuring communication of the new target value.
+     * <p>
+     * As long as the constraints of the Java Memory Model are obeyed,
+     * implementations may delay the completion of a {@code sync}
+     * operation while other threads ({@code T} above) continue to
+     * use previous values of {@code S}'s target.
+     * However, implementations are (as always) encouraged to avoid
+     * livelock, and to eventually require all threads to take account
+     * of the updated target.
+     * <p>
+     * This operation is likely to be expensive and should be used sparingly.
+     * If possible, it should be buffered for batch processing on sets of call sites.
+     * <p style="font-size:smaller;">
+     * (This is a static method on a set of call sites, not a
+     * virtual method on a single call site, for performance reasons.
+     * Some implementations may incur a large fixed overhead cost
+     * for processing one or more synchronization operations,
+     * but a small incremental cost for each additional call site.
+     * In any case, this operation is likely to be costly, since
+     * other threads may have to be somehow interrupted
+     * in order to make them notice the updated target value.
+     * However, it may be observed that a single call to synchronize
+     * several sites has the same formal effect as many calls,
+     * each on just one of the sites.)
+     * <p>
+     * Simple implementations of {@code MutableCallSite} may use
+     * a volatile variable for the target of a mutable call site.
+     * In such an implementation, the {@code sync} method can be a no-op,
+     * and yet it will conform to the JMM behavior documented above.
+     */
+    public static void sync(MutableCallSite[] sites) {
+        STORE_BARRIER.lazySet(0);
+        // FIXME: NYI
+    }
+    private static final AtomicInteger STORE_BARRIER = new AtomicInteger();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/dyn/Switcher.java	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,130 @@
+/*
+ * 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 java.dyn;
+
+/**
+ * <p>
+ * A {@code Switcher} is an object which can publish state transitions to other threads.
+ * A switcher is initially in the <em>valid</em> state, but may at any time be
+ * changed to the <em>invalid</em> state.  Invalidation cannot be reversed.
+ * <p>
+ * A single switcher may be used to create any number of guarded method handle pairs.
+ * Each guarded pair is wrapped in a new method handle {@code M},
+ * which is permanently associated with the switcher that created it.
+ * Each pair consists of a target {@code T} and a fallback {@code F}.
+ * While the switcher is valid, invocations to {@code M} are delegated to {@code T}.
+ * After it is invalidated, invocations are delegated to {@code F}.
+ * <p>
+ * Invalidation is global and immediate, as if the switcher contained a
+ * volatile boolean variable consulted on every call to {@code M}.
+ * The invalidation is also permanent, which means the switcher
+ * can change state only once.
+ * <p>
+ * Here is an example of a switcher in action:
+ * <blockquote><pre>
+MethodType MT_str2 = MethodType.methodType(String.class, String.class);
+MethodHandle MH_strcat = MethodHandles.lookup()
+    .findVirtual(String.class, "concat", MT_str2);
+Switcher switcher = new Switcher();
+// the following steps may be repeated to re-use the same switcher:
+MethodHandle worker1 = strcat;
+MethodHandle worker2 = MethodHandles.permuteArguments(strcat, MT_str2, 1, 0);
+MethodHandle worker = switcher.guardWithTest(worker1, worker2);
+assertEquals("method", (String) worker.invokeExact("met", "hod"));
+switcher.invalidate();
+assertEquals("hodmet", (String) worker.invokeExact("met", "hod"));
+ * </pre></blockquote>
+ * <p>
+ * <em>Implementation Note:</em>
+ * A switcher behaves as if implemented on top of {@link MutableCallSite},
+ * approximately as follows:
+ * <blockquote><pre>
+public class Switcher {
+  private static final MethodHandle
+    K_true  = MethodHandles.constant(boolean.class, true),
+    K_false = MethodHandles.constant(boolean.class, false);
+  private final MutableCallSite mcs;
+  private final MethodHandle mcsInvoker;
+  public Switcher() {
+    this.mcs = new MutableCallSite(K_true);
+    this.mcsInvoker = mcs.dynamicInvoker();
+  }
+  public MethodHandle guardWithTest(
+                MethodHandle target, MethodHandle fallback) {
+    // Note:  mcsInvoker is of type boolean().
+    // Target and fallback may take any arguments, but must have the same type.
+    return MethodHandles.guardWithTest(this.mcsInvoker, target, fallback);
+  }
+  public static void invalidateAll(Switcher[] switchers) {
+    List<MutableCallSite> mcss = new ArrayList<>();
+    for (Switcher s : switchers)  mcss.add(s.mcs);
+    for (MutableCallSite mcs : mcss)  mcs.setTarget(K_false);
+    MutableCallSite.sync(mcss.toArray(new MutableCallSite[0]));
+  }
+}
+ * </pre></blockquote>
+ * @author Remi Forax, JSR 292 EG
+ */
+public class Switcher {
+    private static final MethodHandle
+        K_true  = MethodHandles.constant(boolean.class, true),
+        K_false = MethodHandles.constant(boolean.class, false);
+
+    private final MutableCallSite mcs;
+    private final MethodHandle mcsInvoker;
+
+    /** Create a switcher. */
+    public Switcher() {
+        this.mcs = new MutableCallSite(K_true);
+        this.mcsInvoker = mcs.dynamicInvoker();
+    }
+
+    /**
+     * Return a method handle which always delegates either to the target or the fallback.
+     * The method handle will delegate to the target exactly as long as the switcher is valid.
+     * After that, it will permanently delegate to the fallback.
+     * <p>
+     * The target and fallback must be of exactly the same method type,
+     * and the resulting combined method handle will also be of this type.
+     * @see MethodHandles#guardWithTest
+     */
+    public MethodHandle guardWithTest(MethodHandle target, MethodHandle fallback) {
+        if (mcs.getTarget() == K_false)
+            return fallback;  // already invalid
+        return MethodHandles.guardWithTest(mcsInvoker, target, fallback);
+    }
+
+    /** Set all of the given switchers into the invalid state. */
+    public static void invalidateAll(Switcher[] switchers) {
+        MutableCallSite[] sites = new MutableCallSite[switchers.length];
+        int fillp = 0;
+        for (Switcher switcher : switchers) {
+            sites[fillp++] = switcher.mcs;
+            switcher.mcs.setTarget(K_false);
+        }
+        MutableCallSite.sync(sites);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/dyn/VolatileCallSite.java	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,79 @@
+/*
+ * 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 java.dyn;
+
+import java.util.List;
+
+/**
+ * A {@code VolatileCallSite} is a {@link CallSite} whose target acts like a volatile variable.
+ * An {@code invokedynamic} instruction linked to a {@code VolatileCallSite} sees updates
+ * to its call site target immediately, even if the update occurs in another thread.
+ * There may be a performance penalty for such tight coupling between threads.
+ * <p>
+ * Unlike {@code MutableCallSite}, there is no
+ * {@linkplain MutableCallSite#sync sync operation} on volatile
+ * call sites, since every write to a volatile variable is implicitly
+ * synchronized with reader threads.
+ * <p>
+ * In other respects, a {@code VolatileCallSite} is interchangeable
+ * with {@code MutableCallSite}.
+ * @see MutableCallSite
+ * @author John Rose, JSR 292 EG
+ */
+public class VolatileCallSite extends CallSite {
+    /** Create a call site with a volatile target.
+     *  The initial target is set to a method handle
+     *  of the given type which will throw {@code IllegalStateException}.
+     * @throws NullPointerException if the proposed type is null
+     */
+    public VolatileCallSite(MethodType type) {
+        super(type);
+    }
+
+    /** Create a call site with a volatile target.
+     *  The target is set to the given value.
+     * @throws NullPointerException if the proposed target is null
+     */
+    public VolatileCallSite(MethodHandle target) {
+        super(target);
+    }
+
+    /** Internal override to nominally final getTarget. */
+    @Override
+    MethodHandle getTarget0() {
+        return getTargetVolatile();
+    }
+
+    /**
+     * Set the target method of this call site, as a volatile variable.
+     * Has the same effect as {@link CallSite#setTarget CallSite.setTarget}, with the additional
+     * effects associated with volatiles, in the Java Memory Model.
+     */
+    @Override public void setTarget(MethodHandle newTarget) {
+        checkTargetChange(getTargetVolatile(), newTarget);
+        setTargetVolatile(newTarget);
+    }
+}
--- a/src/share/classes/java/dyn/package-info.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/dyn/package-info.java	Thu Dec 23 00:03:46 2010 -0800
@@ -24,7 +24,6 @@
  */
 
 /**
- * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
  * This package contains dynamic language support provided directly by
  * the Java core class libraries and virtual machine.
  * <p>
@@ -42,13 +41,6 @@
  * argument and return value conversions are applied.
  * </li>
  *
- * <li>In source code, the class {@link java.dyn.InvokeDynamic InvokeDynamic} appears to accept
- * any static method invocation, of any name and any signature.
- * But instead of emitting
- * an {@code invokestatic} instruction for such a call, the Java compiler emits
- * an {@code invokedynamic} instruction with the given name and signature.
- * </li>
- *
  * <li>The JVM bytecode format supports immediate constants of
  * the classes {@link java.dyn.MethodHandle MethodHandle} and {@link java.dyn.MethodType MethodType}.
  * </li>
@@ -56,51 +48,68 @@
  *
  * <h2><a name="jvm_mods"></a>Corresponding JVM bytecode format changes</h2>
  * <em>The following low-level information is presented here as a preview of
- * changes being made to the Java Virtual Machine specification for JSR 292.</em>
+ * changes being made to the Java Virtual Machine specification for JSR 292.
+ * This information will be incorporated in a future version of the JVM specification.</em>
  *
- * <h3>{@code invokedynamic} instruction format</h3>
+ * <h3><a name="indyinsn"></a>{@code invokedynamic} instruction format</h3>
  * In bytecode, an {@code invokedynamic} instruction is formatted as five bytes.
  * The first byte is the opcode 186 (hexadecimal {@code BA}).
  * The next two bytes are a constant pool index (in the same format as for the other {@code invoke} instructions).
  * The final two bytes are reserved for future use and required to be zero.
  * The constant pool reference of an {@code invokedynamic} instruction is to a entry
- * with tag {@code CONSTANT_InvokeDynamic} (decimal 17).  See below for its format.
- * The entry specifies the bootstrap method (a {@link java.dyn.MethodHandle MethodHandle} constant),
- * the dynamic invocation name, and the argument types and return type of the call.
+ * with tag {@code CONSTANT_InvokeDynamic} (decimal 18).  See below for its format.
+ * (The tag value 17 is also temporarily allowed.  See below.)
+ * The entry specifies the following information:
+ * <ul>
+ * <li>a bootstrap method (a {@link java.dyn.MethodHandle MethodHandle} constant)</li>
+ * <li>the dynamic invocation name (a UTF8 string)</li>
+ * <li>the argument and return types of the call (encoded as a signature in a UTF8 string)</li>
+ * <li>optionally, a sequence of additional <em>static arguments</em> to the bootstrap method ({@code ldc}-type constants)</li>
+ * </ul>
  * <p>
  * Each instance of an {@code invokedynamic} instruction is called a <em>dynamic call site</em>.
  * Multiple instances of an {@code invokedynamic} instruction can share a single
  * {@code CONSTANT_InvokeDynamic} entry.
  * In any case, distinct call sites always have distinct linkage state.
  * <p>
- * Moreover, for the purpose of distinguishing dynamic call sites,
- * the JVM is allowed (but not required) to make internal copies
- * of {@code invokedynamic} instructions, each one
- * constituting a separate dynamic call site with its own linkage state.
- * Such copying, if it occurs, cannot be observed except indirectly via
- * execution of bootstrap methods and target methods.
- * <p>
  * A dynamic call site is originally in an unlinked state.  In this state, there is
  * no target method for the call site to invoke.
  * A dynamic call site is linked by means of a bootstrap method,
  * as <a href="#bsm">described below</a>.
+ *
+ * <p style="font-size:smaller;">
+ * (Historic Note: Some older JVMs may allow the index of a {@code CONSTANT_NameAndType}
+ * instead of a {@code CONSTANT_InvokeDynamic}.  In earlier, obsolete versions of this API, the
+ * bootstrap method was specified dynamically, in a per-class basis, during class initialization.)
+ *
+ * <h3><a name="indycon"></a>constant pool entries for {@code invokedynamic} instructions</h3>
+ * If a constant pool entry has the tag {@code CONSTANT_InvokeDynamic} (decimal 18),
+ * it must contain exactly four more bytes after the tag.
+ * These bytes are interpreted as two 16-bit indexes, in the usual {@code u2} format.
+ * The first pair of bytes after the tag must be an index into a side table called the
+ * <em>bootstrap method table</em>, which is stored in the {@code BootstrapMethods}
+ * attribute as <a href="#bsmattr">described below</a>.
+ * The second pair of bytes must be an index to a {@code CONSTANT_NameAndType}.
+ * This table is not part of the constant pool.  Instead, it is stored
+ * in a class attribute named {@code BootstrapMethods}, described below.
  * <p>
- * <em>(Historic Note: Some older JVMs may allow the index of a {@code CONSTANT_NameAndType}
- * instead of a {@code CONSTANT_InvokeDynamic}.  In earlier, obsolete versions of this API, the
- * bootstrap method was specified dynamically, in a per-class basis, during class initialization.)</em>
- *
- * <h3>constant pool entries for {@code invokedynamic} instructions</h3>
- * If a constant pool entry has the tag {@code CONSTANT_InvokeDynamic} (decimal 17),
- * it must contain exactly four more bytes.
- * The first two bytes after the tag must be an index to a {@code CONSTANT_MethodHandle}
- * entry, and the second two bytes must be an index to a {@code CONSTANT_NameAndType}.
  * The first index specifies a bootstrap method used by the associated dynamic call sites.
  * The second index specifies the method name, argument types, and return type of the dynamic call site.
  * The structure of such an entry is therefore analogous to a {@code CONSTANT_Methodref},
- * except that the {@code CONSTANT_Class} reference in a {@code CONSTANT_Methodref} entry
- * is replaced by a bootstrap method reference.
+ * except that the bootstrap method specifier reference replaces
+ * the {@code CONSTANT_Class} reference of a {@code CONSTANT_Methodref} entry.
+ * <p>
+ * Some older JVMs may allow an older constant pool entry tag of decimal 17.
+ * The format and behavior of a constant pool entry with this tag is identical to
+ * an entry with a tag of decimal 18, except that the first index refers directly
+ * to a {@code CONSTANT_MethodHandle} to use as the bootstrap method.
+ * This format does not require the bootstrap method table.
  *
- * <h3>constant pool entries for {@code MethodType}s</h3>
+ * <p style="font-size:smaller;">
+ * <em>(Note: The Proposed Final Draft of this specification is likely to support
+ * only the tag 18, not the tag 17.)</em>
+ *
+ * <h3><a name="mtcon"></a>constant pool entries for {@linkplain java.dyn.MethodType method types}</h3>
  * If a constant pool entry has the tag {@code CONSTANT_MethodType} (decimal 16),
  * it must contain exactly two more bytes, which must be an index to a {@code CONSTANT_Utf8}
  * entry which represents a method type signature.
@@ -113,7 +122,7 @@
  * Access checking and error reporting is performed exactly as it is for
  * references by {@code ldc} instructions to {@code CONSTANT_Class} constants.
  *
- * <h3>constant pool entries for {@code MethodHandle}s</h3>
+ * <h3><a name="mhcon"></a>constant pool entries for {@linkplain java.dyn.MethodHandle method handles}</h3>
  * If a constant pool entry has the tag {@code CONSTANT_MethodHandle} (decimal 15),
  * it must contain exactly three more bytes.  The first byte after the tag is a subtag
  * value which must be in the range 1 through 9, and the last two must be an index to a
@@ -129,7 +138,7 @@
  * <p>
  * As with {@code CONSTANT_Class} and {@code CONSTANT_MethodType} constants,
  * the {@code Class} or {@code MethodType} object which reifies the field or method's
- * type is created.  Any classes mentioned in this reificaiton will be loaded if necessary,
+ * type is created.  Any classes mentioned in this reification will be loaded if necessary,
  * but not initialized, and access checking and error reporting performed as usual.
  * <p>
  * The method handle itself will have a type and behavior determined by the subtag as follows:
@@ -148,16 +157,45 @@
  * </table>
  * </code>
  * <p>
- * The special names {@code <init>} and {@code <clinit>} are not allowed except for subtag 8 as shown.
+ * The special name {@code <clinit>} is not allowed.
+ * The special name {@code <init>} is not allowed except for subtag 8 as shown.
  * <p>
- * The verifier applies the same access checks and restrictions for these references as for the hypothetical
+ * The JVM verifier and linker apply the same access checks and restrictions for these references as for the hypothetical
  * bytecode instructions specified in the last column of the table.  In particular, method handles to
  * private and protected members can be created in exactly those classes for which the corresponding
  * normal accesses are legal.
  * <p>
- * None of these constant types force class initialization.
- * Method handles for subtags {@code REF_getStatic}, {@code REF_putStatic}, and {@code REF_invokeStatic}
+ * A constant may refer to a method or constructor with the {@code varargs}
+ * bit (hexadecimal {@code 80}) set in its modifier bitmask.
+ * The method handle constant produced for such a method behaves the same
+ * as if the {@code varargs} bit were not set.
+ * The argument-collecting behavior of {@code varargs} can be emulated by
+ * adapting the method handle constant with
+ * {@link java.dyn.MethodHandle#asCollector asCollector}.
+ * There is no provision for doing this automatically.
+ * <p>
+ * Although the {@code CONSTANT_MethodHandle} and {@code CONSTANT_MethodType} constant types
+ * resolve class names, they do not force class initialization.
+ * Method handle constants for subtags {@code REF_getStatic}, {@code REF_putStatic}, and {@code REF_invokeStatic}
  * may force class initialization on their first invocation, just like the corresponding bytecodes.
+ * <p>
+ * The rules of section 5.4.3 of the
+ * <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ConstantPool.doc.html#73492">JVM Specification</a>
+ * apply to the resolution of {@code CONSTANT_MethodType}, {@code CONSTANT_MethodHandle},
+ * and {@code CONSTANT_InvokeDynamic} constants,
+ * by the execution of {@code invokedynamic} and {@code ldc} instructions.
+ * (Roughly speaking, this means that every use of a constant pool entry
+ * must lead to the same outcome.
+ * If the resoultion succeeds, the same object reference is produced
+ * by every subsequent execution of the same instruction.
+ * If the resolution of the constant causes an error to occur,
+ * the same error will be re-thrown on every subsequent attempt
+ * to use this particular constant.)
+ * <p>
+ * Constants created by the resolution of these constant pool types are not necessarily
+ * interned.  Except for {@link CONSTANT_Class} and {@link CONSTANT_String} entries,
+ * two distinct constant pool entries might not resolve to the same reference
+ * even if they contain the same symbolic reference.
  *
  * <h2><a name="bsm"></a>Bootstrap Methods</h2>
  * Before the JVM can execute a dynamic call site (an {@code invokedynamic} instruction),
@@ -181,24 +219,36 @@
  * call site execution.
  * Linkage does not trigger class initialization.
  * <p>
- * Next, the bootstrap method call is started, with four values being stacked:
+ * Next, the bootstrap method call is started, with four or five values being stacked:
  * <ul>
  * <li>a {@code MethodHandle}, the resolved bootstrap method itself </li>
- * <li>a {@code Class}, the <em>caller class</em> in which dynamic call site occurs </li>
+ * <li>a {@code MethodHandles.Lookup}, a lookup object on the <em>caller class</em> in which dynamic call site occurs </li>
  * <li>a {@code String}, the method name mentioned in the call site </li>
  * <li>a {@code MethodType}, the resolved type signature of the call </li>
+ * <li>optionally, a single object representing one or more <a href="#args">additional static arguments</a> </li>
  * </ul>
  * The method handle is then applied to the other values as if by
- * {@linkplain java.dyn.MethodHandle#invokeGeneric the <code>invokeGeneric</code> method}.
- * The returned result must be a {@link java.dyn.CallSite CallSite}, a {@link java.dyn.MethodHandle MethodHandle},
- * or another {@link java.dyn.MethodHandleProvider MethodHandleProvider} value.
- * The method {@linkplain java.dyn.MethodHandleProvider#asMethodHandle asMethodHandle}
- * is then called on the returned value.  The result of that second
- * call is the {@code MethodHandle} which becomes the
- * permanent binding for the dynamic call site.
- * That method handle's type must be exactly equal to the type
+ * {@link java.dyn.MethodHandle#invokeGeneric invokeGeneric}.
+ * The returned result must be a {@link java.dyn.CallSite CallSite} (or a subclass).
+ * The type of the call site's target must be exactly equal to the type
  * derived from the dynamic call site signature and passed to
  * the bootstrap method.
+ * The call site then becomes permanently linked to the dynamic call site.
+ * <p>
+ * As long as each bootstrap method can be correctly invoked
+ * by <code>invokeGeneric</code>, its detailed type is arbitrary.
+ * For example, the first argument could be {@code Object}
+ * instead of {@code MethodHandles.Lookup}, and the return type
+ * could also be {@code Object} instead of {@code CallSite}.
+ * <p>
+ * As with any method handle constant, a {@code varargs} modifier bit
+ * on the bootstrap method is ignored.
+ * <p>
+ * Note that the first argument of the bootstrap method cannot be
+ * a simple {@code Class} reference.  (This is a change from earlier
+ * versions of this specification.  If the caller class is needed,
+ * it is easy to {@linkplain java.dyn.MethodHandles.Lookup#lookupClass() extract it}
+ * from the {@code Lookup} object.)
  * <p>
  * After resolution, the linkage process may fail in a variety of ways.
  * All failures are reported by an {@link java.dyn.InvokeDynamicBootstrapError InvokeDynamicBootstrapError},
@@ -206,81 +256,209 @@
  * site execution.
  * The following circumstances will cause this:
  * <ul>
+ * <li>the index to the bootstrap method specifier is out of range </li>
+ * <li>the bootstrap method cannot be resolved </li>
+ * <li>the {@code MethodType} to pass to the bootstrap method cannot be resolved </li>
+ * <li>a static argument to the bootstrap method cannot be resolved
+ *     (i.e., a {@code CONSTANT_Class}, {@code CONSTANT_MethodType},
+ *     or {@code CONSTANT_MethodHandle} argument cannot be linked) </li>
+ * <li>the bootstrap method has the wrong arity,
+ *     causing {@code invokeGeneric} to throw {@code WrongMethodTypeException} </li>
+ * <li>the bootstrap method has a wrong argument or return type </li>
  * <li>the bootstrap method invocation completes abnormally </li>
  * <li>the result from the bootstrap invocation is not a reference to
- *     an object of type {@link java.dyn.MethodHandleProvider MethodHandleProvider} </li>
- * <li>the call to {@code asMethodHandle} completes abnormally </li>
- * <li>the call to {@code asMethodHandle} fails to return a reference to
- *     an object of type {@link java.dyn.MethodHandle MethodHandle} </li>
- * <li>the method handle produced by {@code asMethodHandle} does not have
+ *     an object of type {@link java.dyn.CallSite CallSite} </li>
+ * <li>the target of the {@code CallSite} does not have a target of
  *     the expected {@code MethodType} </li>
  * </ul>
- * <h3>timing of linkage</h3>
+ *
+ * <h3><a name="linktime"></a>timing of linkage</h3>
  * A dynamic call site is linked just before its first execution.
  * The bootstrap method call implementing the linkage occurs within
  * a thread that is attempting a first execution.
  * <p>
- * If there are several such threads, the JVM picks one thread
- * and runs the bootstrap method while the others wait for the
- * invocation to terminate normally or abnormally.
- * <p>
- * After a bootstrap method is called and a method handle target
- * successfully extracted, the JVM attempts to link the instruction
- * being executed to the target method handle.
- * This may fail if there has been intervening linkage
- * or invalidation event for the same instruction.
- * If such a failure occurs, the dynamic call site must be
- * re-executed from the beginning, either re-linking it
- * (if it has been invalidated) or invoking the target
- * (if it the instruction has been linked by some other means).
- * <p>
- * If the instruction is linked successfully, the target method
- * handle is invoked to complete the instruction execution.
- * The state of linkage continues until the method containing the
- * dynamic call site is garbage collected, or the dynamic call site
- * is invalidated by an explicit request,
- * such as {@link java.dyn.Linkage#invalidateCallerClass Linkage.invalidateCallerClass}.
+ * If there are several such threads, the bootstrap method may be
+ * invoked in several threads concurrently.
+ * Therefore, bootstrap methods which access global application
+ * data must take the usual precautions against race conditions.
+ * In any case, every {@code invokedynamic} instruction is either
+ * unlinked or linked to a unique {@code CallSite} object.
  * <p>
  * In an application which requires dynamic call sites with individually
  * mutable behaviors, their bootstrap methods should produce distinct
  * {@link java.dyn.CallSite CallSite} objects, one for each linkage request.
- * <p>
- * If a class containing {@code invokedynamic} instructions
- * is {@linkplain java.dyn.Linkage#invalidateCallerClass(Class) invalidated},
- * subsequent execution of those {@code invokedynamic} instructions
- * will require linking.
- * It is as if they had never been executed in the first place.
- * (However, invalidation does not cause constant pool entries to be
- * resolved a second time.)
- * <p>
- * Invalidation events and bootstrap method calls for a particular
- * dynamic call site are globally ordered relative to each other.
- * When an invokedynamic instruction is invalidated, if there is
- * simultaneously a bootstrap method invocation in process
- * (in the same thread or a different thread), the result
- * eventually returned must not be used to link the call site.
- * Put another way, when a call site is invalidated, its
- * subsequent linkage (if any) must be performed by a bootstrap method
- * call initiated after the invalidation occurred.
+ * Alternatively, an application can link a single {@code CallSite} object
+ * to several {@code invokedynamic} instructions, in which case
+ * a change to the target method will become visible at each of
+ * the instructions.
  * <p>
  * If several threads simultaneously execute a bootstrap method for a single dynamic
- * call site, the JVM must choose one target object and installs it visibly to
+ * call site, the JVM must choose one {@code CallSite} object and install it visibly to
  * all threads.  Any other bootstrap method calls are allowed to complete, but their
  * results are ignored, and their dynamic call site invocations proceed with the originally
  * chosen target object.
+ *
+ * <p style="font-size:smaller;">
+ * (Historic Note: Unlike some previous versions of this specification,
+ * these rules do not enable the JVM to duplicate dynamic call sites,
+ * or to issue &ldquo;causeless&rdquo; bootstrap method calls.
+ * Every dynamic call site transitions at most once from unlinked to linked,
+ * just before its first invocation.)
+ *
+ * <h3><a name="bsmattr">the {@code BootstrapMethods} attribute </h3>
+ * Each {@code CONSTANT_InvokeDynamic} entry contains an index which references
+ * a bootstrap method specifier; all such specifiers are contained in a separate array.
+ * This array is defined by a class attribute named {@code BootstrapMethods}.
+ * The body of this attribute consists of a sequence of byte pairs, all interpreted as
+ * as 16-bit counts or constant pool indexes, in the {@code u2} format.
+ * The attribute body starts with a count of bootstrap method specifiers,
+ * which is immediately followed by the sequence of specifiers.
  * <p>
- * The JVM is free to duplicate dynamic call sites.
- * This means that, even if a class contains just one {@code invokedynamic}
- * instruction, its bootstrap method may be executed several times,
- * once for each duplicate.  Thus, bootstrap method code should not
- * assume an exclusive one-to-one correspondence between particular occurrences
- * of {@code invokedynamic} bytecodes in class files and linkage events.
+ * Each bootstrap method specifier contains an index to a
+ * {@code CONSTANT_MethodHandle} constant, which is the bootstrap
+ * method itself.
+ * This is followed by a count, and then a sequence (perhaps empty) of
+ * indexes to <a href="#args">additional static arguments</a>
+ * for the bootstrap method.
  * <p>
- * In principle, each individual execution of an {@code invokedynamic}
- * instruction could be deemed (by a conforming implementation) to be a separate
- * duplicate, requiring its own execution of the bootstrap method.
- * However, implementations are expected to perform code duplication
- * (if at all) in order to improve performance, not make it worse.
+ * During class loading, the verifier must check the structure of the
+ * {@code BootstrapMethods} attribute.  In particular, each constant
+ * pool index must be of the correct type.  A bootstrap method index
+ * must refer to a {@code CONSTANT_MethodHandle} (tag 15).
+ * Every other index must refer to a valid operand of an
+ * {@code ldc_w} or {@code ldc2_w} instruction (tag 3..8 or 15..16).
+ *
+ * <h3><a name="args">static arguments to the bootstrap method</h3>
+ * An {@code invokedynamic} instruction specifies at least three arguments
+ * to pass to its bootstrap method:
+ * The caller class (expressed as a {@link java.dyn.MethodHandles.Lookup Lookup object},
+ * the name (extracted from the {@code CONSTANT_NameAndType} entry),
+ * and the type (also extracted from the {@code CONSTANT_NameAndType} entry).
+ * The {@code invokedynamic} instruction may specify additional metadata values
+ * to pass to its bootstrap method.
+ * Collectively, these values are called <em>static arguments</em> to the
+ * {@code invokedynamic} instruction, because they are used once at link
+ * time to determine the instruction's behavior on subsequent sets of
+ * <em>dynamic arguments</em>.
+ * <p>
+ * Static arguments are used to communicate application-specific meta-data
+ * to the bootstrap method.
+ * Drawn from the constant pool, they may include references to classes, method handles,
+ * strings, or numeric data that may be relevant to the task of linking that particular call site.
+ * <p>
+ * Static arguments are specified constant pool indexes stored in the {@code BootstrapMethods} attribute.
+ * Before the bootstrap method is invoked, each index is used to compute an {@code Object}
+ * reference to the indexed value in the constant pool.
+ * If the value is a primitive type, it is converted to a reference by boxing conversion.
+ * The valid constant pool entries are listed in this table:
+ * <code>
+ * <table border=1 cellpadding=5 summary="Static argument types">
+ * <tr><th>entry type</th><th>argument type</th><th>argument value</th></tr>
+ * <tr><td>CONSTANT_String</td><td><code>java.lang.String</code></td><td>the indexed string literal</td></tr>
+ * <tr><td>CONSTANT_Class</td><td><code>java.lang.Class</code></td><td>the indexed class, resolved</td></tr>
+ * <tr><td>CONSTANT_Integer</td><td><code>java.lang.Integer</code></td><td>the indexed int value</td></tr>
+ * <tr><td>CONSTANT_Long</td><td><code>java.lang.Long</code></td><td>the indexed long value</td></tr>
+ * <tr><td>CONSTANT_Float</td><td><code>java.lang.Float</code></td><td>the indexed float value</td></tr>
+ * <tr><td>CONSTANT_Double</td><td><code>java.lang.Double</code></td><td>the indexed double value</td></tr>
+ * <tr><td>CONSTANT_MethodHandle</td><td><code>java.dyn.MethodHandle</code></td><td>the indexed method handle constant</td></tr>
+ * <tr><td>CONSTANT_MethodType</td><td><code>java.dyn.MethodType</code></td><td>the indexed method type constant</td></tr>
+ * </table>
+ * </code>
+ * <p>
+ * If a given {@code invokedynamic} instruction specifies no static arguments,
+ * the instruction's bootstrap method will be invoked on three arguments,
+ * conveying the instruction's caller class, name, and method type.
+ * If the {@code invokedynamic} instruction specifies one or more static arguments,
+ * a fourth argument will be passed to the bootstrap argument,
+ * either an {@code Object} reference to the sole extra argument (if there is one)
+ * or an {@code Object} array of references to all the arguments (if there are two or more),
+ * as if the bootstrap method is a variable-arity method.
+ * <code>
+ * <table border=1 cellpadding=5 summary="Static argument types">
+ * <tr><th>N</th><th>sample bootstrap method</th></tr>
+ * <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
+ * <tr><td>1</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
+ * <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
+ * </table>
+ * </code>
+ * <p>
+ * The argument and return types listed here are used by the {@code invokeGeneric}
+ * call to the bootstrap method.
+ * As noted above, the actual method type of the bootstrap method can vary.
+ * For example, the fourth argument could be {@code MethodHandle},
+ * if that is the type of the corresponding constant in
+ * the {@code CONSTANT_InvokeDynamic} entry.
+ * In that case, the {@code invokeGeneric} call will pass the extra method handle
+ * constant as an {@code Object}, but the type matching machinery of {@code invokeGeneric}
+ * will cast the reference back to {@code MethodHandle} before invoking the bootstrap method.
+ * (If a string constant were passed instead, by badly generated code, that cast would then fail.)
+ * <p>
+ * If the fourth argument is an array, the array element type must be {@code Object},
+ * since object arrays (as produced by the JVM at this point) cannot be converted
+ * to other array types.
+ * <p>
+ * If an array is provided, it will appear to be freshly allocated.
+ * That is, the same array will not appear to two bootstrap method calls.
+ * <p>
+ * Extra bootstrap method arguments are intended to allow language implementors
+ * to safely and compactly encode metadata.
+ * In principle, the name and extra arguments are redundant,
+ * since each call site could be given its own unique bootstrap method.
+ * Such a practice is likely to produce large class files and constant pools.
+ *
+ * <p style="font-size:smaller;">
+ * <em>PROVISIONAL API, WORK IN PROGRESS:</em>
+ * (Usage Note: There is no mechanism for specifying five or more positional arguments to the bootstrap method.
+ * If there are two or more arguments, the Java code of the bootstrap method is required to extract them from
+ * a varargs-style object array.
+ * This design uses varargs because it anticipates some use cases where bootstrap arguments
+ * contribute components of variable-length structures, such as virtual function tables
+ * or interpreter token streams.
+ * Such parameters would be awkward or impossible to manage if represented
+ * as normal positional method arguments,
+ * since there would need to be one Java method per length.
+ * On balance, leaving out the varargs feature would cause more trouble to users than keeping it.
+ * Also, this design allows bootstrap methods to be called in a limited JVM stack depth.
+ * At both the user and JVM level, the difference between varargs and non-varargs
+ * calling sequences can easily be bridged via the
+ * {@link java.dyn.MethodHandle#asSpreader asSpreader}
+ * and {@link java.dyn.MethodHandle#asSpreader asCollector} methods.)
+ *
+ * <h2><a name="structs"></a>Structure Summary</h2>
+ * <blockquote><pre>// summary of constant and attribute structures
+struct CONSTANT_MethodHandle_info {
+  u1 tag = 15;
+  u1 reference_kind;       // 1..8 (one of REF_invokeVirtual, etc.)
+  u2 reference_index;      // index to CONSTANT_Fieldref or *Methodref
+}
+struct CONSTANT_MethodType_info {
+  u1 tag = 16;
+  u2 descriptor_index;    // index to CONSTANT_Utf8, as in NameAndType
+}
+struct CONSTANT_InvokeDynamic_17_info {
+  u1 tag = 17;
+  u2 bootstrap_method_index;   // index to CONSTANT_MethodHandle
+  u2 name_and_type_index;      // same as for CONSTANT_Methodref, etc.
+}
+struct CONSTANT_InvokeDynamic_info {
+  u1 tag = 18;
+  u2 bootstrap_method_attr_index;  // index into BootstrapMethods_attr
+  u2 name_and_type_index;          // index to CONSTANT_NameAndType, as in Methodref
+}
+struct BootstrapMethods_attr {
+ u2 name;  // CONSTANT_Utf8 = "BootstrapMethods"
+ u4 size;
+ u2 bootstrap_method_count;
+ struct bootstrap_method_specifier {
+   u2 bootstrap_method_ref;  // index to CONSTANT_MethodHandle
+   u2 bootstrap_argument_count;
+   u2 bootstrap_arguments[bootstrap_argument_count];  // constant pool indexes
+ } bootstrap_methods[bootstrap_method_count];
+}
+ * </pre></blockquote>
+ * <p>
+ * <em>Note: The Proposed Final Draft of JSR 292 may remove the constant tag 17,
+ * for the sake of simplicity.</em>
  *
  * @author John Rose, JSR 292 EG
  */
--- a/src/share/classes/java/io/FileOutputStream.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/io/FileOutputStream.java	Thu Dec 23 00:03:46 2010 -0800
@@ -56,7 +56,15 @@
      */
     private final FileDescriptor fd;
 
-    private FileChannel channel= null;
+    /**
+     * True if the file is opened for append.
+     */
+    private final boolean append;
+
+    /**
+     * The associated channel, initalized lazily.
+     */
+    private FileChannel channel;
 
     private final Object closeLock = new Object();
     private volatile boolean closed = false;
@@ -196,7 +204,9 @@
         if (name == null) {
             throw new NullPointerException();
         }
-        fd = new FileDescriptor();
+        this.fd = new FileDescriptor();
+        this.append = append;
+
         fd.incrementAndGetUseCount();
         open(name, append);
     }
@@ -232,7 +242,8 @@
         if (security != null) {
             security.checkWrite(fdObj);
         }
-        fd = fdObj;
+        this.fd = fdObj;
+        this.append = false;
 
         /*
          * FileDescriptor is being shared by streams.
@@ -251,22 +262,36 @@
         throws FileNotFoundException;
 
     /**
+     * Writes the specified byte to this file output stream.
+     *
+     * @param   b   the byte to be written.
+     * @param   append   {@code true} if the write operation first
+     *     advances the position to the end of file
+     */
+    private native void write(int b, boolean append) throws IOException;
+
+    /**
      * Writes the specified byte to this file output stream. Implements
      * the <code>write</code> method of <code>OutputStream</code>.
      *
      * @param      b   the byte to be written.
      * @exception  IOException  if an I/O error occurs.
      */
-    public native void write(int b) throws IOException;
+    public void write(int b) throws IOException {
+        write(b, append);
+    }
 
     /**
      * Writes a sub array as a sequence of bytes.
      * @param b the data to be written
      * @param off the start offset in the data
      * @param len the number of bytes that are written
+     * @param append {@code true} to first advance the position to the
+     *     end of file
      * @exception IOException If an I/O error has occurred.
      */
-    private native void writeBytes(byte b[], int off, int len) throws IOException;
+    private native void writeBytes(byte b[], int off, int len, boolean append)
+        throws IOException;
 
     /**
      * Writes <code>b.length</code> bytes from the specified byte array
@@ -276,7 +301,7 @@
      * @exception  IOException  if an I/O error occurs.
      */
     public void write(byte b[]) throws IOException {
-        writeBytes(b, 0, b.length);
+        writeBytes(b, 0, b.length, append);
     }
 
     /**
@@ -289,7 +314,7 @@
      * @exception  IOException  if an I/O error occurs.
      */
     public void write(byte b[], int off, int len) throws IOException {
-        writeBytes(b, off, len);
+        writeBytes(b, off, len, append);
     }
 
     /**
@@ -372,7 +397,7 @@
     public FileChannel getChannel() {
         synchronized (this) {
             if (channel == null) {
-                channel = FileChannelImpl.open(fd, false, true, this);
+                channel = FileChannelImpl.open(fd, false, true, append, this);
 
                 /*
                  * Increment fd's use count. Invoking the channel's close()
--- a/src/share/classes/java/io/ObjectInputStream.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/io/ObjectInputStream.java	Thu Dec 23 00:03:46 2010 -0800
@@ -3498,8 +3498,8 @@
             return ((int[]) array).clone();
         } else if (array instanceof long[]) {
             return ((long[]) array).clone();
-        } else if (array instanceof double[]) {
-            return ((double[]) array).clone();
+        } else if (array instanceof short[]) {
+            return ((short[]) array).clone();
         } else {
             throw new AssertionError();
         }
--- a/src/share/classes/java/lang/Character.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/lang/Character.java	Thu Dec 23 00:03:46 2010 -0800
@@ -6371,15 +6371,15 @@
      * This method returns <code>true</code> for the following five
      * characters only:
      * <table>
-     * <tr><td><code>'\t'</code></td>            <td><code>'&#92;u0009'</code></td>
+     * <tr><td><code>'\t'</code></td>            <td><code>U+0009</code></td>
      *     <td><code>HORIZONTAL TABULATION</code></td></tr>
-     * <tr><td><code>'\n'</code></td>            <td><code>'&#92;u000A'</code></td>
+     * <tr><td><code>'\n'</code></td>            <td><code>U+000A</code></td>
      *     <td><code>NEW LINE</code></td></tr>
-     * <tr><td><code>'\f'</code></td>            <td><code>'&#92;u000C'</code></td>
+     * <tr><td><code>'\f'</code></td>            <td><code>U+000C</code></td>
      *     <td><code>FORM FEED</code></td></tr>
-     * <tr><td><code>'\r'</code></td>            <td><code>'&#92;u000D'</code></td>
+     * <tr><td><code>'\r'</code></td>            <td><code>U+000D</code></td>
      *     <td><code>CARRIAGE RETURN</code></td></tr>
-     * <tr><td><code>'&nbsp;'</code></td>  <td><code>'&#92;u0020'</code></td>
+     * <tr><td><code>'&nbsp;'</code></td>  <td><code>U+0020</code></td>
      *     <td><code>SPACE</code></td></tr>
      * </table>
      *
@@ -6463,15 +6463,15 @@
      *      <code>LINE_SEPARATOR</code>, or <code>PARAGRAPH_SEPARATOR</code>)
      *      but is not also a non-breaking space (<code>'&#92;u00A0'</code>,
      *      <code>'&#92;u2007'</code>, <code>'&#92;u202F'</code>).
-     * <li> It is <code>'&#92;u0009'</code>, HORIZONTAL TABULATION.
-     * <li> It is <code>'&#92;u000A'</code>, LINE FEED.
-     * <li> It is <code>'&#92;u000B'</code>, VERTICAL TABULATION.
-     * <li> It is <code>'&#92;u000C'</code>, FORM FEED.
-     * <li> It is <code>'&#92;u000D'</code>, CARRIAGE RETURN.
-     * <li> It is <code>'&#92;u001C'</code>, FILE SEPARATOR.
-     * <li> It is <code>'&#92;u001D'</code>, GROUP SEPARATOR.
-     * <li> It is <code>'&#92;u001E'</code>, RECORD SEPARATOR.
-     * <li> It is <code>'&#92;u001F'</code>, UNIT SEPARATOR.
+     * <li> It is <code>'&#92;t'</code>, U+0009 HORIZONTAL TABULATION.
+     * <li> It is <code>'&#92;n'</code>, U+000A LINE FEED.
+     * <li> It is <code>'&#92;u000B'</code>, U+000B VERTICAL TABULATION.
+     * <li> It is <code>'&#92;f'</code>, U+000C FORM FEED.
+     * <li> It is <code>'&#92;r'</code>, U+000D CARRIAGE RETURN.
+     * <li> It is <code>'&#92;u001C'</code>, U+001C FILE SEPARATOR.
+     * <li> It is <code>'&#92;u001D'</code>, U+001D GROUP SEPARATOR.
+     * <li> It is <code>'&#92;u001E'</code>, U+001E RECORD SEPARATOR.
+     * <li> It is <code>'&#92;u001F'</code>, U+001F UNIT SEPARATOR.
      * </ul>
      *
      * <p><b>Note:</b> This method cannot handle <a
@@ -6499,15 +6499,15 @@
      *      {@link #LINE_SEPARATOR}, or {@link #PARAGRAPH_SEPARATOR})
      *      but is not also a non-breaking space (<code>'&#92;u00A0'</code>,
      *      <code>'&#92;u2007'</code>, <code>'&#92;u202F'</code>).
-     * <li> It is <code>'&#92;u0009'</code>, HORIZONTAL TABULATION.
-     * <li> It is <code>'&#92;u000A'</code>, LINE FEED.
-     * <li> It is <code>'&#92;u000B'</code>, VERTICAL TABULATION.
-     * <li> It is <code>'&#92;u000C'</code>, FORM FEED.
-     * <li> It is <code>'&#92;u000D'</code>, CARRIAGE RETURN.
-     * <li> It is <code>'&#92;u001C'</code>, FILE SEPARATOR.
-     * <li> It is <code>'&#92;u001D'</code>, GROUP SEPARATOR.
-     * <li> It is <code>'&#92;u001E'</code>, RECORD SEPARATOR.
-     * <li> It is <code>'&#92;u001F'</code>, UNIT SEPARATOR.
+     * <li> It is <code>'&#92;t'</code>, U+0009 HORIZONTAL TABULATION.
+     * <li> It is <code>'&#92;n'</code>, U+000A LINE FEED.
+     * <li> It is <code>'&#92;u000B'</code>, U+000B VERTICAL TABULATION.
+     * <li> It is <code>'&#92;f'</code>, U+000C FORM FEED.
+     * <li> It is <code>'&#92;r'</code>, U+000D CARRIAGE RETURN.
+     * <li> It is <code>'&#92;u001C'</code>, U+001C FILE SEPARATOR.
+     * <li> It is <code>'&#92;u001D'</code>, U+001D GROUP SEPARATOR.
+     * <li> It is <code>'&#92;u001E'</code>, U+001E RECORD SEPARATOR.
+     * <li> It is <code>'&#92;u001F'</code>, U+001F UNIT SEPARATOR.
      * </ul>
      * <p>
      *
--- a/src/share/classes/java/lang/Double.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/lang/Double.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -973,7 +973,8 @@
         if (d1 > d2)
             return 1;            // Neither val is NaN, thisVal is larger
 
-        long thisBits = Double.doubleToLongBits(d1);
+        // Cannot use doubleToRawLongBits because of possibility of NaNs.
+        long thisBits    = Double.doubleToLongBits(d1);
         long anotherBits = Double.doubleToLongBits(d2);
 
         return (thisBits == anotherBits ?  0 : // Values are equal
--- a/src/share/classes/java/lang/Float.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/lang/Float.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -872,12 +872,13 @@
      * @since 1.4
      */
     public static int compare(float f1, float f2) {
-       if (f1 < f2)
+        if (f1 < f2)
             return -1;           // Neither val is NaN, thisVal is smaller
         if (f1 > f2)
             return 1;            // Neither val is NaN, thisVal is larger
 
-        int thisBits = Float.floatToIntBits(f1);
+        // Cannot use floatToRawIntBits because of possibility of NaNs.
+        int thisBits    = Float.floatToIntBits(f1);
         int anotherBits = Float.floatToIntBits(f2);
 
         return (thisBits == anotherBits ?  0 : // Values are equal
--- a/src/share/classes/java/lang/ProcessBuilder.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/lang/ProcessBuilder.java	Thu Dec 23 00:03:46 2010 -0800
@@ -537,7 +537,11 @@
          */
         public File file() { return null; }
 
-        FileOutputStream toFileOutputStream() throws IOException {
+        /**
+         * When redirected to a destination file, indicates if the output
+         * is to be written to the end of the file.
+         */
+        boolean append() {
             throw new UnsupportedOperationException();
         }
 
@@ -588,9 +592,7 @@
                     public String toString() {
                         return "redirect to write to file \"" + file + "\"";
                     }
-                    FileOutputStream toFileOutputStream() throws IOException {
-                        return new FileOutputStream(file, false);
-                    }
+                    boolean append() { return false; }
                 };
         }
 
@@ -620,9 +622,7 @@
                     public String toString() {
                         return "redirect to append to file \"" + file + "\"";
                     }
-                    FileOutputStream toFileOutputStream() throws IOException {
-                        return new FileOutputStream(file, true);
-                    }
+                    boolean append() { return true; }
                 };
         }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/SafeVarargs.java	Thu Dec 23 00:03:46 2010 -0800
@@ -0,0 +1,79 @@
+/*
+ * 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 java.lang;
+
+import java.lang.annotation.*;
+
+/**
+ * A programmer assertion that the body of the annotated method or
+ * constructor does not perform potentially unsafe operations on its
+ * varargs parameter.  Applying this annotation to a method or
+ * constructor suppresses unchecked warnings about a
+ * <i>non-reifiable</i> variable-arity (vararg) type and suppresses
+ * unchecked warnings about parameterized array creation at call
+ * sites.
+ *
+ * <p> In addition to the usage restrictions imposed by its {@link
+ * Target @Target} meta-annotation, compilers are required to implement
+ * additional usage restrictions on this annotation type; it is a
+ * compile-time error if a method or constructor declaration is
+ * annotated with a {@code @SafeVarargs} annotation, and either:
+
+ * <ul>
+ * <li>  the declaration is a fixed-arity method or constructor
+ *
+ * <li> the declaration is a variable-arity method that is neither
+ * {@code static} nor {@code final}.
+ *
+ * </ul>
+ *
+ * <p> Compilers are encouraged to issue warnings when this annotation
+ * type is applied to a method or constructor declaration where:
+ *
+ * <ul>
+ *
+ * <li> The variable-arity parameter has a reifiable element type,
+ * which includes primitive types, {@code Object}, and {@code String}.
+ * (The unchecked warnings this annotation type suppresses already do
+ * not occur for a reifiable element type.)
+ *
+ * <li> The body of the method or constructor declaration performs
+ * potentially unsafe operations, such as an assignment to an element
+ * of the variable-arity parameter's array that generates an unchecked
+ * warning.
+ *
+ * <p>Future versions of the platform may mandate compiler errors for
+ * such unsafe operations.
+ *
+ * </ul>
+ *
+ * @jls3 4.7 Reifiable Types
+ * @jls3 8.4.1 Formal Parameters
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.CONSTRUCTOR, ElementType.METHOD})
+public @interface SafeVarargs {}
--- a/src/share/classes/java/lang/StrictMath.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/lang/StrictMath.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -801,8 +801,9 @@
         return (a >= b) ? a : b;
     }
 
-    private static long negativeZeroFloatBits = Float.floatToIntBits(-0.0f);
-    private static long negativeZeroDoubleBits = Double.doubleToLongBits(-0.0d);
+    // Use raw bit-wise conversions on guaranteed non-NaN arguments.
+    private static long negativeZeroFloatBits  = Float.floatToRawIntBits(-0.0f);
+    private static long negativeZeroDoubleBits = Double.doubleToRawLongBits(-0.0d);
 
     /**
      * Returns the greater of two {@code float} values.  That is,
@@ -819,9 +820,12 @@
      * @return  the larger of {@code a} and {@code b}.
      */
     public static float max(float a, float b) {
-        if (a != a) return a;   // a is NaN
-        if ((a == 0.0f) && (b == 0.0f)
-            && (Float.floatToIntBits(a) == negativeZeroFloatBits)) {
+        if (a != a)
+            return a;   // a is NaN
+        if ((a == 0.0f) &&
+            (b == 0.0f) &&
+            (Float.floatToRawIntBits(a) == negativeZeroFloatBits)) {
+            // Raw conversion ok since NaN can't map to -0.0.
             return b;
         }
         return (a >= b) ? a : b;
@@ -842,9 +846,12 @@
      * @return  the larger of {@code a} and {@code b}.
      */
     public static double max(double a, double b) {
-        if (a != a) return a;   // a is NaN
-        if ((a == 0.0d) && (b == 0.0d)
-            && (Double.doubleToLongBits(a) == negativeZeroDoubleBits)) {
+        if (a != a)
+            return a;   // a is NaN
+        if ((a == 0.0d) &&
+            (b == 0.0d) &&
+            (Double.doubleToRawLongBits(a) == negativeZeroDoubleBits)) {
+            // Raw conversion ok since NaN can't map to -0.0.
             return b;
         }
         return (a >= b) ? a : b;
@@ -893,9 +900,12 @@
      * @return  the smaller of {@code a} and {@code b.}
      */
     public static float min(float a, float b) {
-        if (a != a) return a;   // a is NaN
-        if ((a == 0.0f) && (b == 0.0f)
-            && (Float.floatToIntBits(b) == negativeZeroFloatBits)) {
+        if (a != a)
+            return a;   // a is NaN
+        if ((a == 0.0f) &&
+            (b == 0.0f) &&
+            (Float.floatToRawIntBits(b) == negativeZeroFloatBits)) {
+            // Raw conversion ok since NaN can't map to -0.0.
             return b;
         }
         return (a <= b) ? a : b;
@@ -916,9 +926,12 @@
      * @return  the smaller of {@code a} and {@code b}.
      */
     public static double min(double a, double b) {
-        if (a != a) return a;   // a is NaN
-        if ((a == 0.0d) && (b == 0.0d)
-            && (Double.doubleToLongBits(b) == negativeZeroDoubleBits)) {
+        if (a != a)
+            return a;   // a is NaN
+        if ((a == 0.0d) &&
+            (b == 0.0d) &&
+            (Double.doubleToRawLongBits(b) == negativeZeroDoubleBits)) {
+            // Raw conversion ok since NaN can't map to -0.0.
             return b;
         }
         return (a <= b) ? a : b;
--- a/src/share/classes/java/lang/Thread.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/lang/Thread.java	Thu Dec 23 00:03:46 2010 -0800
@@ -209,7 +209,7 @@
      * initialized to indicate thread 'not yet started'
      */
 
-    private int threadStatus = 0;
+    private volatile int threadStatus = 0;
 
 
     private static synchronized long nextThreadID() {
--- a/src/share/classes/java/nio/charset/Charset.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/nio/charset/Charset.java	Thu Dec 23 00:03:46 2010 -0800
@@ -275,18 +275,17 @@
 
     /* -- Static methods -- */
 
-    private static String bugLevel = null;
+    private static volatile String bugLevel = null;
 
     static boolean atBugLevel(String bl) {              // package-private
-        if (bugLevel == null) {
+        String level = bugLevel;
+        if (level == null) {
             if (!sun.misc.VM.isBooted())
                 return false;
-            bugLevel = AccessController.doPrivileged(
-                new GetPropertyAction("sun.nio.cs.bugLevel"));
-            if (bugLevel == null)
-                bugLevel = "";
+            bugLevel = level = AccessController.doPrivileged(
+                new GetPropertyAction("sun.nio.cs.bugLevel", ""));
         }
-        return (bugLevel != null) && bugLevel.equals(bl);
+        return level.equals(bl);
     }
 
     /**
--- a/src/share/classes/java/security/CodeSigner.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/security/CodeSigner.java	Thu Dec 23 00:03:46 2010 -0800
@@ -25,7 +25,7 @@
 
 package java.security;
 
-import java.io.Serializable;
+import java.io.*;
 import java.security.cert.CRL;
 import java.security.cert.CertPath;
 import sun.misc.JavaSecurityCodeSignerAccess;
@@ -205,4 +205,10 @@
         });
     }
 
+    // Explicitly reset hash code value to -1
+    private void readObject(ObjectInputStream ois)
+        throws IOException, ClassNotFoundException {
+     ois.defaultReadObject();
+     myhash = -1;
+    }
 }
--- a/src/share/classes/java/security/Timestamp.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/security/Timestamp.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 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
@@ -25,10 +25,12 @@
 
 package java.security;
 
-import java.io.Serializable;
+import java.io.*;
+import java.security.cert.Certificate;
 import java.security.cert.CertPath;
 import java.security.cert.X509Extension;
 import java.util.Date;
+import java.util.List;
 
 /**
  * This class encapsulates information about a signed timestamp.
@@ -142,8 +144,20 @@
         StringBuffer sb = new StringBuffer();
         sb.append("(");
         sb.append("timestamp: " + timestamp);
-        sb.append("TSA: " + signerCertPath.getCertificates().get(0));
+        List<? extends Certificate> certs = signerCertPath.getCertificates();
+        if (!certs.isEmpty()) {
+            sb.append("TSA: " + certs.get(0));
+        } else {
+            sb.append("TSA: <empty>");
+        }
         sb.append(")");
         return sb.toString();
     }
+
+    // Explicitly reset hash code value to -1
+    private void readObject(ObjectInputStream ois)
+        throws IOException, ClassNotFoundException {
+     ois.defaultReadObject();
+     myhash = -1;
+    }
 }
--- a/src/share/classes/java/text/AttributedCharacterIterator.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/text/AttributedCharacterIterator.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, 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
@@ -32,7 +32,7 @@
 import java.util.Set;
 
 /**
- * An AttributedCharacterIterator allows iteration through both text and
+ * An {@code AttributedCharacterIterator} allows iteration through both text and
  * related attribute information.
  *
  * <p>
@@ -46,22 +46,28 @@
  * <p>A <em>run with respect to an attribute</em> is a maximum text range for
  * which:
  * <ul>
- * <li>the attribute is undefined or null for the entire range, or
- * <li>the attribute value is defined and has the same non-null value for the
+ * <li>the attribute is undefined or {@code null} for the entire range, or
+ * <li>the attribute value is defined and has the same non-{@code null} value for the
  *     entire range.
  * </ul>
  *
  * <p>A <em>run with respect to a set of attributes</em> is a maximum text range for
  * which this condition is met for each member attribute.
  *
+ * <p>When getting a run with no explicit attributes specified (i.e.,
+ * calling {@link #getRunStart()} and {@link #getRunLimit()}), any
+ * contiguous text segments having the same attributes (the same set
+ * of attribute/value pairs) are treated as separate runs if the
+ * attributes have been given to those text segments separately.
+ *
  * <p>The returned indexes are limited to the range of the iterator.
  *
  * <p>The returned attribute information is limited to runs that contain
  * the current character.
  *
  * <p>
- * Attribute keys are instances of AttributedCharacterIterator.Attribute and its
- * subclasses, such as java.awt.font.TextAttribute.
+ * Attribute keys are instances of {@link AttributedCharacterIterator.Attribute} and its
+ * subclasses, such as {@link java.awt.font.TextAttribute}.
  *
  * @see AttributedCharacterIterator.Attribute
  * @see java.awt.font.TextAttribute
@@ -74,7 +80,7 @@
 
     /**
      * Defines attribute keys that are used to identify text attributes. These
-     * keys are used in AttributedCharacterIterator and AttributedString.
+     * keys are used in {@code AttributedCharacterIterator} and {@code AttributedString}.
      * @see AttributedCharacterIterator
      * @see AttributedString
      * @since 1.2
@@ -83,7 +89,7 @@
     public static class Attribute implements Serializable {
 
         /**
-         * The name of this Attribute. The name is used primarily by readResolve
+         * The name of this {@code Attribute}. The name is used primarily by {@code readResolve}
          * to look up the corresponding predefined instance when deserializing
          * an instance.
          * @serial
@@ -94,7 +100,7 @@
         private static final Map instanceMap = new HashMap(7);
 
         /**
-         * Constructs an Attribute with the given name.
+         * Constructs an {@code Attribute} with the given name.
          */
         protected Attribute(String name) {
             this.name = name;
@@ -114,7 +120,7 @@
 
         /**
          * Returns a hash code value for the object. This version is identical to
-         * the one in Object, but is also final.
+         * the one in {@code Object}, but is also final.
          */
         public final int hashCode() {
             return super.hashCode();
@@ -122,7 +128,8 @@
 
         /**
          * Returns a string representation of the object. This version returns the
-         * concatenation of class name, "(", a name identifying the attribute and ")".
+         * concatenation of class name, {@code "("}, a name identifying the attribute
+         * and {@code ")"}.
          */
         public String toString() {
             return getClass().getName() + "(" + name + ")";
@@ -153,7 +160,7 @@
 
         /**
          * Attribute key for the language of some text.
-         * <p> Values are instances of Locale.
+         * <p> Values are instances of {@link java.util.Locale Locale}.
          * @see java.util.Locale
          */
         public static final Attribute LANGUAGE = new Attribute("language");
@@ -163,7 +170,7 @@
          * and the pronunciation of a word are only loosely related (such as Japanese),
          * it is often necessary to store the reading (pronunciation) along with the
          * written form.
-         * <p>Values are instances of Annotation holding instances of String.
+         * <p>Values are instances of {@link Annotation} holding instances of {@link String}.
          * @see Annotation
          * @see java.lang.String
          */
@@ -172,7 +179,7 @@
         /**
          * Attribute key for input method segments. Input methods often break
          * up text into segments, which usually correspond to words.
-         * <p>Values are instances of Annotation holding a null reference.
+         * <p>Values are instances of {@link Annotation} holding a {@code null} reference.
          * @see Annotation
          */
         public static final Attribute INPUT_METHOD_SEGMENT = new Attribute("input_method_segment");
@@ -185,36 +192,44 @@
     /**
      * Returns the index of the first character of the run
      * with respect to all attributes containing the current character.
+     *
+     * <p>Any contiguous text segments having the same attributes (the
+     * same set of attribute/value pairs) are treated as separate runs
+     * if the attributes have been given to those text segments separately.
      */
     public int getRunStart();
 
     /**
      * Returns the index of the first character of the run
-     * with respect to the given attribute containing the current character.
+     * with respect to the given {@code attribute} containing the current character.
      */
     public int getRunStart(Attribute attribute);
 
     /**
      * Returns the index of the first character of the run
-     * with respect to the given attributes containing the current character.
+     * with respect to the given {@code attributes} containing the current character.
      */
     public int getRunStart(Set<? extends Attribute> attributes);
 
     /**
      * Returns the index of the first character following the run
      * with respect to all attributes containing the current character.
+     *
+     * <p>Any contiguous text segments having the same attributes (the
+     * same set of attribute/value pairs) are treated as separate runs
+     * if the attributes have been given to those text segments separately.
      */
     public int getRunLimit();
 
     /**
      * Returns the index of the first character following the run
-     * with respect to the given attribute containing the current character.
+     * with respect to the given {@code attribute} containing the current character.
      */
     public int getRunLimit(Attribute attribute);
 
     /**
      * Returns the index of the first character following the run
-     * with respect to the given attributes containing the current character.
+     * with respect to the given {@code attributes} containing the current character.
      */
     public int getRunLimit(Set<? extends Attribute> attributes);
 
@@ -225,9 +240,8 @@
     public Map<Attribute,Object> getAttributes();
 
     /**
-     * Returns the value of the named attribute for the current character.
-     * Returns null if the attribute is not defined.
-     * @param attribute the key of the attribute whose value is requested.
+     * Returns the value of the named {@code attribute} for the current character.
+     * Returns {@code null} if the {@code attribute} is not defined.
      */
     public Object getAttribute(Attribute attribute);
 
--- a/src/share/classes/java/text/CollationElementIterator.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/text/CollationElementIterator.java	Thu Dec 23 00:03:46 2010 -0800
@@ -79,9 +79,13 @@
  * <pre>
  *
  *  String testString = "This is a test";
- *  RuleBasedCollator ruleBasedCollator = (RuleBasedCollator)Collator.getInstance();
- *  CollationElementIterator collationElementIterator = ruleBasedCollator.getCollationElementIterator(testString);
- *  int primaryOrder = CollationElementIterator.primaryOrder(collationElementIterator.next());
+ *  Collator col = Collator.getInstance();
+ *  if (col instanceof RuleBasedCollator) {
+ *      RuleBasedCollator ruleBasedCollator = (RuleBasedCollator)col;
+ *      CollationElementIterator collationElementIterator = ruleBasedCollator.getCollationElementIterator(testString);
+ *      int primaryOrder = CollationElementIterator.primaryOrder(collationElementIterator.next());
+ *          :
+ *  }
  * </pre>
  * </blockquote>
  *
@@ -93,6 +97,10 @@
  * is its primary order; the next 8 bits is the secondary order and the
  * last 8 bits is the tertiary order.
  *
+ * <p><b>Note:</b> <code>CollationElementIterator</code> is a part of
+ * <code>RuleBasedCollator</code> implementation. It is only usable
+ * with <code>RuleBasedCollator</code> instances.
+ *
  * @see                Collator
  * @see                RuleBasedCollator
  * @author             Helena Shih, Laura Werner, Richard Gillam
--- a/src/share/classes/java/text/RuleBasedCollator.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/text/RuleBasedCollator.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, 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,11 +180,15 @@
  *
  * <p><strong>Examples</strong>
  * <p>Simple:     "&lt; a &lt; b &lt; c &lt; d"
- * <p>Norwegian:  "&lt; a,A&lt; b,B&lt; c,C&lt; d,D&lt; e,E&lt; f,F&lt; g,G&lt; h,H&lt; i,I&lt; j,J
- *                 &lt; k,K&lt; l,L&lt; m,M&lt; n,N&lt; o,O&lt; p,P&lt; q,Q&lt; r,R&lt; s,S&lt; t,T
- *                 &lt; u,U&lt; v,V&lt; w,W&lt; x,X&lt; y,Y&lt; z,Z
- *                 &lt; &#92;u00E5=a&#92;u030A,&#92;u00C5=A&#92;u030A
- *                 ;aa,AA&lt; &#92;u00E6,&#92;u00C6&lt; &#92;u00F8,&#92;u00D8"
+ * <p>Norwegian:  "&lt; a, A &lt; b, B &lt; c, C &lt; d, D &lt; e, E &lt; f, F
+ *                 &lt; g, G &lt; h, H &lt; i, I &lt; j, J &lt; k, K &lt; l, L
+ *                 &lt; m, M &lt; n, N &lt; o, O &lt; p, P &lt; q, Q &lt; r, R
+ *                 &lt; s, S &lt; t, T &lt; u, U &lt; v, V &lt; w, W &lt; x, X
+ *                 &lt; y, Y &lt; z, Z
+ *                 &lt; &#92;u00E6, &#92;u00C6
+ *                 &lt; &#92;u00F8, &#92;u00D8
+ *                 &lt; &#92;u00E5 = a&#92;u030A, &#92;u00C5 = A&#92;u030A;
+ *                      aa, AA"
  *
  * <p>
  * To create a <code>RuleBasedCollator</code> object with specialized
@@ -199,11 +203,14 @@
  * Or:
  * <blockquote>
  * <pre>
- * String Norwegian = "&lt; a,A&lt; b,B&lt; c,C&lt; d,D&lt; e,E&lt; f,F&lt; g,G&lt; h,H&lt; i,I&lt; j,J" +
- *                 "&lt; k,K&lt; l,L&lt; m,M&lt; n,N&lt; o,O&lt; p,P&lt; q,Q&lt; r,R&lt; s,S&lt; t,T" +
- *                 "&lt; u,U&lt; v,V&lt; w,W&lt; x,X&lt; y,Y&lt; z,Z" +
- *                 "&lt; &#92;u00E5=a&#92;u030A,&#92;u00C5=A&#92;u030A" +
- *                 ";aa,AA&lt; &#92;u00E6,&#92;u00C6&lt; &#92;u00F8,&#92;u00D8";
+ * String Norwegian = "&lt; a, A &lt; b, B &lt; c, C &lt; d, D &lt; e, E &lt; f, F &lt; g, G &lt; h, H &lt; i, I" +
+ *                    "&lt; j, J &lt; k, K &lt; l, L &lt; m, M &lt; n, N &lt; o, O &lt; p, P &lt; q, Q &lt; r, R" +
+ *                    "&lt; s, S &lt; t, T &lt; u, U &lt; v, V &lt; w, W &lt; x, X &lt; y, Y &lt; z, Z" +
+ *                    "&lt; &#92;u00E6, &#92;u00C6" +     // Latin letter ae & AE
+ *                    "&lt; &#92;u00F8, &#92;u00D8" +     // Latin letter o & O with stroke
+ *                    "&lt; &#92;u00E5 = a&#92;u030A," +  // Latin letter a with ring above
+ *                    "  &#92;u00C5 = A&#92;u030A;" +  // Latin letter A with ring above
+ *                    "  aa, AA";
  * RuleBasedCollator myNorwegian = new RuleBasedCollator(Norwegian);
  * </pre>
  * </blockquote>
--- a/src/share/classes/java/text/SimpleDateFormat.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/text/SimpleDateFormat.java	Thu Dec 23 00:03:46 2010 -0800
@@ -1839,8 +1839,15 @@
                 break parsing;
 
             case PATTERN_HOUR_OF_DAY1: // 'k' 1-based.  eg, 23:59 + 1 hour =>> 24:59
+                if (!isLenient()) {
+                    // Validate the hour value in non-lenient
+                    if (value < 1 || value > 24) {
+                        break parsing;
+                    }
+                }
                 // [We computed 'value' above.]
-                if (value == calendar.getMaximum(Calendar.HOUR_OF_DAY)+1) value = 0;
+                if (value == calendar.getMaximum(Calendar.HOUR_OF_DAY)+1)
+                    value = 0;
                 calb.set(Calendar.HOUR_OF_DAY, value);
                 return pos.index;
 
@@ -1886,8 +1893,15 @@
                 break parsing;
 
             case PATTERN_HOUR1: // 'h' 1-based.  eg, 11PM + 1 hour =>> 12 AM
+                if (!isLenient()) {
+                    // Validate the hour value in non-lenient
+                    if (value < 1 || value > 12) {
+                        break parsing;
+                    }
+                }
                 // [We computed 'value' above.]
-                if (value == calendar.getLeastMaximum(Calendar.HOUR)+1) value = 0;
+                if (value == calendar.getLeastMaximum(Calendar.HOUR)+1)
+                    value = 0;
                 calb.set(Calendar.HOUR, value);
                 return pos.index;
 
--- a/src/share/classes/java/util/AbstractCollection.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/util/AbstractCollection.java	Thu Dec 23 00:03:46 2010 -0800
@@ -96,14 +96,14 @@
      * @throws NullPointerException {@inheritDoc}
      */
     public boolean contains(Object o) {
-        Iterator<E> e = iterator();
+        Iterator<E> it = iterator();
         if (o==null) {
-            while (e.hasNext())
-                if (e.next()==null)
+            while (it.hasNext())
+                if (it.next()==null)
                     return true;
         } else {
-            while (e.hasNext())
-                if (o.equals(e.next()))
+            while (it.hasNext())
+                if (o.equals(it.next()))
                     return true;
         }
         return false;
@@ -269,18 +269,18 @@
      * @throws NullPointerException          {@inheritDoc}
      */
     public boolean remove(Object o) {
-        Iterator<E> e = iterator();
+        Iterator<E> it = iterator();
         if (o==null) {
-            while (e.hasNext()) {
-                if (e.next()==null) {
-                    e.remove();
+            while (it.hasNext()) {
+                if (it.next()==null) {
+                    it.remove();
                     return true;
                 }
             }
         } else {
-            while (e.hasNext()) {
-                if (o.equals(e.next())) {
-                    e.remove();
+            while (it.hasNext()) {
+                if (o.equals(it.next())) {
+                    it.remove();
                     return true;
                 }
             }
@@ -304,9 +304,8 @@
      * @see #contains(Object)
      */
     public boolean containsAll(Collection<?> c) {
-        Iterator<?> e = c.iterator();
-        while (e.hasNext())
-            if (!contains(e.next()))
+        for (Object e : c)
+            if (!contains(e))
                 return false;
         return true;
     }
@@ -331,11 +330,9 @@
      */
     public boolean addAll(Collection<? extends E> c) {
         boolean modified = false;
-        Iterator<? extends E> e = c.iterator();
-        while (e.hasNext()) {
-            if (add(e.next()))
+        for (E e : c)
+            if (add(e))
                 modified = true;
-        }
         return modified;
     }
 
@@ -362,10 +359,10 @@
      */
     public boolean removeAll(Collection<?> c) {
         boolean modified = false;
-        Iterator<?> e = iterator();
-        while (e.hasNext()) {
-            if (c.contains(e.next())) {
-                e.remove();
+        Iterator<?> it = iterator();
+        while (it.hasNext()) {
+            if (c.contains(it.next())) {
+                it.remove();
                 modified = true;
             }
         }
@@ -395,10 +392,10 @@
      */
     public boolean retainAll(Collection<?> c) {
         boolean modified = false;
-        Iterator<E> e = iterator();
-        while (e.hasNext()) {
-            if (!c.contains(e.next())) {
-                e.remove();
+        Iterator<E> it = iterator();
+        while (it.hasNext()) {
+            if (!c.contains(it.next())) {
+                it.remove();
                 modified = true;
             }
         }
@@ -421,10 +418,10 @@
      * @throws UnsupportedOperationException {@inheritDoc}
      */
     public void clear() {
-        Iterator<E> e = iterator();
-        while (e.hasNext()) {
-            e.next();
-            e.remove();
+        Iterator<E> it = iterator();
+        while (it.hasNext()) {
+            it.next();
+            it.remove();
         }
     }
 
@@ -442,18 +439,18 @@
      * @return a string representation of this collection
      */
     public String toString() {
-        Iterator<E> i = iterator();
-        if (! i.hasNext())
+        Iterator<E> it = iterator();
+        if (! it.hasNext())
             return "[]";
 
         StringBuilder sb = new StringBuilder();
         sb.append('[');
         for (;;) {
-            E e = i.next();
+            E e = it.next();
             sb.append(e == this ? "(this Collection)" : e);
-            if (! i.hasNext())
+            if (! it.hasNext())
                 return sb.append(']').toString();
-            sb.append(", ");
+            sb.append(',').append(' ');
         }
     }
 
--- a/src/share/classes/java/util/AbstractList.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/util/AbstractList.java	Thu Dec 23 00:03:46 2010 -0800
@@ -175,15 +175,15 @@
      * @throws NullPointerException {@inheritDoc}
      */
     public int indexOf(Object o) {
-        ListIterator<E> e = listIterator();
+        ListIterator<E> it = listIterator();
         if (o==null) {
-            while (e.hasNext())
-                if (e.next()==null)
-                    return e.previousIndex();
+            while (it.hasNext())
+                if (it.next()==null)
+                    return it.previousIndex();
         } else {
-            while (e.hasNext())
-                if (o.equals(e.next()))
-                    return e.previousIndex();
+            while (it.hasNext())
+                if (o.equals(it.next()))
+                    return it.previousIndex();
         }
         return -1;
     }
@@ -200,15 +200,15 @@
      * @throws NullPointerException {@inheritDoc}
      */
     public int lastIndexOf(Object o) {
-        ListIterator<E> e = listIterator(size());
+        ListIterator<E> it = listIterator(size());
         if (o==null) {
-            while (e.hasPrevious())
-                if (e.previous()==null)
-                    return e.nextIndex();
+            while (it.hasPrevious())
+                if (it.previous()==null)
+                    return it.nextIndex();
         } else {
-            while (e.hasPrevious())
-                if (o.equals(e.previous()))
-                    return e.nextIndex();
+            while (it.hasPrevious())
+                if (o.equals(it.previous()))
+                    return it.nextIndex();
         }
         return -1;
     }
@@ -517,7 +517,7 @@
 
         ListIterator<E> e1 = listIterator();
         ListIterator e2 = ((List) o).listIterator();
-        while(e1.hasNext() && e2.hasNext()) {
+        while (e1.hasNext() && e2.hasNext()) {
             E o1 = e1.next();
             Object o2 = e2.next();
             if (!(o1==null ? o2==null : o1.equals(o2)))
--- a/src/share/classes/java/util/AbstractMap.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/util/AbstractMap.java	Thu Dec 23 00:03:46 2010 -0800
@@ -523,7 +523,7 @@
             sb.append(value == this ? "(this Map)" : value);
             if (! i.hasNext())
                 return sb.append('}').toString();
-            sb.append(", ");
+            sb.append(',').append(' ');
         }
     }
 
--- a/src/share/classes/java/util/ArrayList.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/util/ArrayList.java	Thu Dec 23 00:03:46 2010 -0800
@@ -120,9 +120,9 @@
     /**
      * Constructs an empty list with the specified initial capacity.
      *
-     * @param   initialCapacity   the initial capacity of the list
-     * @exception IllegalArgumentException if the specified initial capacity
-     *            is negative
+     * @param  initialCapacity  the initial capacity of the list
+     * @throws IllegalArgumentException if the specified initial capacity
+     *         is negative
      */
     public ArrayList(int initialCapacity) {
         super();
@@ -173,7 +173,7 @@
      * necessary, to ensure that it can hold at least the number of elements
      * specified by the minimum capacity argument.
      *
-     * @param minCapacity the desired minimum capacity
+     * @param   minCapacity   the desired minimum capacity
      */
     public void ensureCapacity(int minCapacity) {
         if (minCapacity > 0)
--- a/src/share/classes/java/util/Collections.java	Wed Dec 22 13:49:23 2010 -0800
+++ b/src/share/classes/java/util/Collections.java	Thu Dec 23 00:03:46 2010 -0800
@@ -124,7 +124,7 @@
      *
      * <p>The implementation takes equal advantage of ascending and
      * descending order in its input array, and can take advantage of
-     * ascending and descending order in different parts of the the same
+     * ascending and descending order in different parts of the same
      * input array.  It is well-suited to merging two or more sorted arrays:
      * simply concatenate the arrays and sort the resulting array.
      *
@@ -184,7 +184,7 @@
      *
      * <p>The implementation takes equal advantage of ascending and
      * descending order in its input array, and can take advantage of
-     * ascending and descending order in different parts of the the same
+     * ascending and descending order in different parts of the same
      * input array.  It is well-suited to merging two or more sorted arrays:
      * simply concatenate the arrays and sort the resulting array.
      *
@@ -823,7 +823,7 @@
                     i -= size;
                 displaced = list.set(i, displaced);
                 nMoved ++;
-            } while(i != cycleStart);
+            } while (i != cycleStart);
         }
     }
 
@@ -1452,9 +1452,9 @@
              * when o is a Map.Entry, and calls o.setValue.
              */
             public boolean containsAll(Collection<?> coll) {
-                Iterator<?> e = coll.iterator();
-                while (e.hasNext())
-                    if (!contains(e.next())) // Invokes safe contains() above
+                Iterator<?> it = coll.iterator();
+                while (it.hasNext())
+                    if (!contains(it.next())) // Invokes safe contains() above
                         return false;
                 return true;
             }
@@ -1482,12 +1482,12 @@
 
                 UnmodifiableEntry(Map.Entry<? extends K, ? extends V> e) {this.e = e;}
 
-                public K getKey()         {return e.getKey();}
-                public V getValue()  {return e.getValue();}
+                public K getKey()        {return e.getKey();}
+                public V getValue()      {return e.getValue();}
                 public V setValue(V value) {
                     throw new UnsupportedOperationException();
                 }
-                public int hashCode()     {return e.hashCode();}
+                public int hashCode()    {return e.hashCode();}
                 public boolean equals(Object o) {
                     if (!(o instanceof Map.Entry))
                         return false;
@@ -1495,7 +1495,7 @@
                     return eq(e.getKey(),   t.getKey()) &&
                            eq(e.getValue(), t.getValue());
                 }
-                public String toString()  {return e.toString();}
+                public String toString() {return e.toString();}
             }
         }
     }
@@ -1562,7 +1562,7 @@
      * <pre>
      *  Collection c = Collections.synchronizedCollection(myCollection);
      *     ...
-     *  synchronized(c) {
+     *  synchronized (c) {
      *      Iterator i = c.iterator(); // Must be in the synchronized block
      *      while (i.hasNext())
      *         foo(i.next());
@@ -1611,19 +1611,19 @@
         }
 
         public int size() {
-            synchronized(mutex) {return c.size();}
+            synchronized (mutex) {return c.size();}
         }
         public boolean isEmpty() {
-            synchronized(mutex) {return c.isEmpty();}
+            synchronized (mutex) {return c.isEmpty();}
         }
         public boolean contains(Object o) {
-            synchronized(mutex) {return c.contains(o);}
+            synchronized (mutex) {return c.contains(o);}
         }
         public Object[] toArray() {
-            synchronized(mutex) {return c.toArray();}
+            synchronized (mutex) {return c.toArray();}
         }
         public <T> T[] toArray(T[] a) {
-            synchronized(mutex) {return c.toArray(a);}
+            synchronized (mutex) {return c.toArray(a);}
         }
 
         public Iterator<E> iterator() {
@@ -1631,32 +1631,32 @@
         }
 
         public boolean add(E e) {
-            synchronized(mutex) {return c.add(e);}
+            synchronized (mutex) {return c.add(e);}
         }
         public boolean remove(Object o) {
-            synchronized(mutex) {return c.remove(o);}
+            synchronized (mutex) {return c.remove(o);}
         }
 
         public boolean containsAll(Collection<?> coll) {
-            synchronized(mutex) {return c.containsAll(coll);}
+            synchronized (mutex) {return c.containsAll(coll);}
         }
         public boolean addAll(Collection<? extends E> coll) {
-            synchronized(mutex) {return c.addAll(coll);}
+            synchronized (mutex) {return c.addAll(coll);}
         }
         public boolean removeAll(Collection<?> coll) {
-            synchronized(mutex) {return c.removeAll(coll);}
+            synchronized (mutex) {return c.removeAll(coll);}
         }
         public boolean retainAll(Collection<?> coll) {
-            synchronized(mutex) {return c.retainAll(coll);}
+            synchronized (mutex) {return c.retainAll(coll);}
         }
         public void clear() {
-            synchronized(mutex) {c.clear();}
+            synchronized (mutex) {c.clear();}
         }
         public String toString() {
-            synchronized(mutex) {return c.toString();}
+            synchronized (mutex) {return c.toString();}
         }
         private void writeObject(ObjectOutputStream s) throws IOException {
-            synchronized(mutex) {s.defaultWriteObject();}
+            synchronized (mutex) {s.defaultWriteObject();}
         }
     }
 
@@ -1671,7 +1671,7 @@
      * <pre>
      *  Set s = Collections.synchronizedSet(new HashSet());
      *      ...
-     *  synchronized(s) {
+     *  synchronized (s) {
      *      Iterator i = s.iterator(); // Must be in the synchronized block
      *      while (i.hasNext())
      *          foo(i.next());
@@ -1709,10 +1709,10 @@
         }
 
         public boolean equals(Object o) {
-            synchronized(mutex) {return c.equals(o);}
+            synchronized (mutex) {return c.equals(o);}
         }
         public int hashCode() {
-            synchronized(mutex) {return c.hashCode();}
+            synchronized (mutex) {return c.hashCode();}
         }
     }
 
@@ -1728,7 +1728,7 @@
      * <pre>
      *  SortedSet s = Collections.synchronizedSortedSet(new TreeSet());
      *      ...
-     *  synchronized(s) {
+     *  synchronized (s) {
      *      Iterator i = s.iterator(); // Must be in the synchronized block
      *      while (i.hasNext())
      *          foo(i.next());
@@ -1739,7 +1739,7 @@
      *  SortedSet s = Collections.synchronizedSortedSet(new TreeSet());
      *  SortedSet s2 = s.headSet(foo);
      *      ...
-     *  synchronized(s) {  // Note: s, not s2!!!
+     *  synchronized (s) {  // Note: s, not s2!!!
      *      Iterator i = s2.iterator(); // Must be in the synchronized block
      *      while (i.hasNext())
      *          foo(i.next());
@@ -1766,7 +1766,7 @@
     {
         private static final long serialVersionUID = 8695801310862127406L;
 
-        final private SortedSet<E> ss;
+        private final SortedSet<E> ss;
 
         SynchronizedSortedSet(SortedSet<E> s) {
             super(s);
@@ -1778,31 +1778,31 @@
         }
 
         public Comparator<? super E> comparator() {
-            synchronized(mutex) {return ss.comparator();}
+            synchronized (mutex) {return ss.comparator();}
         }
 
         public SortedSet<E> subSet(E fromElement, E toElement) {
-            synchronized(mutex) {
+            synchronized (mutex) {
                 return new SynchronizedSortedSet<E>(
                     ss.subSet(fromElement, toElement), mutex);
             }
         }
         public SortedSet<E> headSet(E toElement) {
-            synchronized(mutex) {
+            synchronized (mutex) {
                 return new SynchronizedSortedSet<E>(ss.headSet(toElement), mutex);
             }
         }
         public SortedSet<E> tailSet(E fromElement) {
-            synchronized(mutex) {
+            synchronized (mutex) {
                return new SynchronizedSortedSet<E>(ss.tailSet(fromElement),mutex);
             }
         }
 
         public E first() {
-            synchronized(mutex) {return ss.first();}
+            synchronized (mutex) {return ss.first();}
         }
         public E last() {
-            synchronized(mutex) {return ss.last();}
+            synchronized (mutex) {return ss.last();}
         }
     }
 
@@ -1817,7 +1817,7 @@
      * <pre>
      *  List list = Collections.synchronizedList(new ArrayList());
      *      ...
-     *  synchronized(list) {
+     *  synchronized (list) {
      *      Iterator i = list.iterator(); // Must be in synchronized block
      *      while (i.hasNext())
      *          foo(i.next());
@@ -1863,34 +1863,34 @@
         }
 
         public boolean equals(Object o) {
-            synchronized(mutex) {return list.equals(o);}
+            synchronized (mutex) {return list.equals(o);}
         }
         public int hashCode() {
-            synchronized(mutex) {return list.hashCode();}
+            synchronized (mutex) {return list.hashCode();}
         }
 
         public E get(int index) {
-            synchronized(mutex) {return list.get(index);}
+            synchronized (mutex) {return list.get(index);}
         }
         public E set(int index, E element) {
-            synchronized(mutex) {return list.set(index, element);}
+            synchronized (mutex) {return list.set(index, element);}
         }
         public void add(int index, E element) {
-            synchronized(mutex) {list.add(index, element);}
+            synchronized (mutex) {list.add(index, element);}
         }
         public E remove(int index) {
-            synchronized(mutex) {return list.remove(index);}
+            synchronized (mutex) {return list.remove(index);}
         }
 
         public int indexOf(Object o) {
-            synchronized(mutex) {return list.indexOf(o);}
+            synchronized (mutex) {return list.indexOf(o);}
         }
         public int lastIndexOf(Object o) {
-            synchronized(mutex) {return list.lastIndexOf(o);}
+            synchronized (mutex) {return list.lastIndexOf(o);}
         }
 
         public boolean addAll(int index, Collection<? extends E> c) {
-            synchronized(mutex) {return list.addAll(index, c);}
+            synchronized (mutex) {return list.addAll(index, c);}
         }
 
         public ListIterator<E> listIterator() {
@@ -1902,7 +1902,7 @@
         }
 
         public List<E> subList(int fromIndex, int toIndex) {
-            synchronized(mutex) {
+            synchronized (mutex) {
                 return new SynchronizedList<E>(list.subList(fromIndex, toIndex),
                                             mutex);
             }
@@ -1943,7 +1943,7 @@
         }
 
         public List<E> subList(int fromIndex, int toIndex) {
-            synchronized(mutex) {
+            synchronized (mutex) {
                 return new SynchronizedRandomAccessList<E>(
                     list.subList(fromIndex, toIndex), mutex);
             }
@@ -1975,7 +1975,7 @@
      *      ...
      *  Set s = m.keySet();  // Needn't be in synchronized block
      *      ...
-     *  synchronized(m) {  // Synchronizing on m, not s!
+     *  synchronized (m) {  // Synchronizing on m, not s!
      *      Iterator i = s.iterator(); // Must be in synchronized block
      *      while (i.hasNext())
      *          foo(i.next());
@@ -2016,32 +2016,32 @@
         }
 
         public int size() {
-            synchronized(mutex) {return m.size();}
+            synchronized (mutex) {return m.size();}
         }
         public boolean isEmpty() {
-            synchronized(mutex) {return m.isEmpty();}
+            synchronized (mutex) {return m.isEmpty();}
         }
         public boolean containsKey(Object key) {
-            synchronized(mutex) {return m.containsKey(key);}
+            synchronized (mutex) {return m.containsKey(key);}
         }
         public boolean containsValue(Object value) {
-            synchronized(mutex) {return m.containsValue(value);}
+            synchronized (mutex) {return m.containsValue(value);}
         }
         public V get(Object key) {
-            synchronized(mutex) {return m.get(key);}
+            synchronized (mutex) {return m.get(key);}
         }
 
         public V put(K key, V value) {
-            synchronized(mutex) {return m.put(key, value);}
+