changeset 6080:4770b0a49675

Merge
author mullan
date Mon, 05 Nov 2012 10:33:18 -0500
parents 46b24eb85b86 8b944ebef8a7
children 510cb3671f14
files make/sun/jdbc/Makefile src/share/classes/sun/net/www/protocol/gopher/GopherClient.java src/share/classes/sun/net/www/protocol/gopher/Handler.java src/solaris/native/java/io/FileSystem_md.c src/windows/native/java/io/FileSystem_md.c
diffstat 399 files changed, 50161 insertions(+), 6249 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Nov 05 10:30:49 2012 -0500
+++ b/.hgtags	Mon Nov 05 10:33:18 2012 -0500
@@ -182,3 +182,5 @@
 d94613ac03d8de375ef60493e2bb76dbd30d875d jdk8-b58
 abad1f417bd3df4296631fc943cd3b7f5062c88a jdk8-b59
 cec8fa02f15634acd7d02d04b0b2d8c044cdbaaa jdk8-b60
+61ddb3fd000a09ab05bff1940b0ac211661e94cf jdk8-b61
+50b8b17449d200c66bfd68fb4f3a9197432c9e2b jdk8-b62
--- a/THIRD_PARTY_README	Mon Nov 05 10:30:49 2012 -0500
+++ b/THIRD_PARTY_README	Mon Nov 05 10:33:18 2012 -0500
@@ -2,11 +2,11 @@
 -----------------------------
 
 %% This notice is provided with respect to ASM Bytecode Manipulation 
-Framework v3.1, which is included with JRE 7, JDK 7, and OpenJDK 7.
+Framework v4.0, which is included with JRE 8, and JDK 8.
 
 --- begin of LICENSE ---
 
-Copyright (c) 2000-2005 INRIA, France Telecom
+Copyright (c) 2000-2011 France TÚlÚcom
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
--- a/make/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -233,7 +233,7 @@
 
 all build:: sanity-all post-sanity-all
 
-SUBDIRS       = tools java javax sun com
+SUBDIRS       = tools java javax sun com jdk
 ifeq ($(PLATFORM), macosx)
   SUBDIRS += apple
 endif
--- a/make/com/oracle/security/ucrypto/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/com/oracle/security/ucrypto/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -198,9 +198,9 @@
   #
   # Build ucrypto.jar.
   #
-  $(UNSIGNED_DIR)/ucrypto.jar: build
+  $(UNSIGNED_DIR)/ucrypto.jar: build $(JCE_MANIFEST_FILE)
 	$(prep-target)
-	$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
+	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
 	    $(BOOT_JAR_JFLAGS)
 	@$(java-vm-cleanup)
 
--- a/make/com/sun/java/pack/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/com/sun/java/pack/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -94,9 +94,9 @@
   LDOUTPUT = -Fe
 
   # JDK name required here
-  RC_FLAGS += /D "JDK_FNAME=$(PGRM).exe" \
-	/D "JDK_INTERNAL_NAME=$(PGRM)" \
-	/D "JDK_FTYPE=0x1L"
+  RC_FLAGS += -D "JDK_FNAME=$(PGRM).exe" \
+	-D "JDK_INTERNAL_NAME=$(PGRM)" \
+	-D "JDK_FTYPE=0x1L"
 
   RES = $(OBJDIR)/$(PGRM).res
 else
@@ -161,7 +161,7 @@
 	$(CP) mapfile-vers-unpack200 $(TEMPDIR)/mapfile-vers
 	$(LINKER)  $(LDDFLAGS) $(sort $(UNPACK_EXE_FILES_o)) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
 ifdef MT
-	$(MT) /manifest $(OBJDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
+	$(MT) -manifest $(OBJDIR)/unpack200$(EXE_SUFFIX).manifest -outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
 endif
 	$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
 	@$(call binary_file_verification,$@)
--- a/make/common/Defs-windows.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/Defs-windows.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -78,7 +78,7 @@
   MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
 endif
 
-EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
+EXTRA_LFLAGS += -LIBPATH:$(DXSDK_LIB_PATH)
 
 # Full Debug Symbols has been enabled on Windows since JDK1.4.1.
 # The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
@@ -198,7 +198,7 @@
 #   -MTd       Use static debug version (better than -MDd, no runtime issues)
 #   -D_DEBUG   Change use of malloc/free/etc to use special debug ones (-MTd)
 #
-#      NOTE: We also will use /D _STATIC_CPPLIB  so we don't need msvcpnn.dll
+#      NOTE: We also will use -D _STATIC_CPPLIB  so we don't need msvcpnn.dll
 #
 # If MS_RUNTIME_STATIC is requested we may have a problem, it is no longer
 #     supported by VS2010
@@ -223,12 +223,12 @@
 endif
 
 # Always add _STATIC_CPPLIB definition
-STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
+STATIC_CPPLIB_OPTION = -D _STATIC_CPPLIB
 
 # Silence the warning about using _STATIC_CPPLIB
 ifneq ($(SHOW_ALL_WARNINGS),true)
   # Needed with VS2010 to turn off the deprecated warning.
-  STATIC_CPPLIB_OPTION += /D _DISABLE_DEPRECATE_STATIC_CPPLIB
+  STATIC_CPPLIB_OPTION += -D _DISABLE_DEPRECATE_STATIC_CPPLIB
 endif
 
 MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
@@ -242,7 +242,7 @@
   #   -Od      Turns off optimization and speeds compilation
   #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
   #   -nologo  Don't print out startup message
-  #   /D _STATIC_CPPLIB
+  #  -D _STATIC_CPPLIB
   #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
   #   
   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
@@ -258,12 +258,12 @@
   CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
 
   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
-    LDEBUG = /debug
+    LDEBUG = -debug
   endif
   
   ifeq ($(VTUNE_SUPPORT), true)
     OTHER_CFLAGS = -Z7 -Ox 
-    LDEBUG += /pdb:NONE
+    LDEBUG += -pdb:NONE
   endif
   
   # VS2010, always need safe exception handlers, not needed on 64bit
@@ -272,7 +272,7 @@
   endif
 
   # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
-  BASELFLAGS = -nologo /opt:REF /incremental:no
+  BASELFLAGS = -nologo -opt:REF -incremental:no
 
   LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
   LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
@@ -404,7 +404,7 @@
   JDK_UPDATE_VER := 0
 endif
 
-RC_FLAGS = /l 0x409 /r
+RC_FLAGS = -l 0x409 -r
 
 ifeq ($(VARIANT), OPT)
   RC_FLAGS += -d NDEBUG 
--- a/make/common/Demo.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/Demo.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -292,9 +292,9 @@
 
 ifeq ($(PLATFORM),windows)
 # JDK name required here
-RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
-            /D "JDK_INTERNAL_NAME=$(LIBRARY)" \
-            /D "JDK_FTYPE=0x2L"
+RC_FLAGS += -D "JDK_FNAME=$(LIBRARY).dll" \
+            -D "JDK_INTERNAL_NAME=$(LIBRARY)" \
+            -D "JDK_FTYPE=0x2L"
 endif
 
 # Native library building
--- a/make/common/Library.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/Library.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -206,9 +206,9 @@
 	@$(ECHO) Created $@ 
 
 # JDK name required here
-RC_FLAGS += /D "JDK_FNAME=$(LIBRARY).dll" \
-            /D "JDK_INTERNAL_NAME=$(LIBRARY)" \
-            /D "JDK_FTYPE=0x2L"
+RC_FLAGS += -D "JDK_FNAME=$(LIBRARY).dll" \
+            -D "JDK_INTERNAL_NAME=$(LIBRARY)" \
+            -D "JDK_FTYPE=0x2L"
 
 $(OBJDIR)/$(LIBRARY).res: $(VERSIONINFO_RESOURCE)
 ifndef LOCAL_RESOURCE_FILE
--- a/make/common/Program.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/Program.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -157,9 +157,9 @@
 #
 ifeq ($(PLATFORM), windows)
   # JDK name required here
-  RC_FLAGS += /D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
-              /D "JDK_INTERNAL_NAME=$(PROGRAM)" \
-              /D "JDK_FTYPE=0x1L"
+  RC_FLAGS += -D "JDK_FNAME=$(PROGRAM)$(EXE_SUFFIX)" \
+              -D "JDK_INTERNAL_NAME=$(PROGRAM)" \
+              -D "JDK_FTYPE=0x1L"
 
   $(OBJDIR)/$(PROGRAM).res: $(VERSIONINFO_RESOURCE)
 	@$(prep-target)
@@ -201,11 +201,11 @@
 	@$(prep-target)
 	@set -- $?; \
 	    $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...};
-	$(LINK) -out:$@ /STACK:$(STACK_SIZE) \
+	$(LINK) -out:$@ -STACK:$(STACK_SIZE) \
 	    $(MAP_OPTION) $(LFLAGS) $(LDFLAGS) \
 	    @$(OBJDIR)/$(PROGRAM).lcf $(LDLIBS)
   ifdef MT
-	$(MT) /manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
+	$(MT) -manifest $(OBJDIR)/$(PROGRAM).exe.manifest /outputresource:$@;#1
   endif
 	@$(call binary_file_verification,$@)
   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
--- a/make/common/Release.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/Release.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -784,11 +784,22 @@
 		    $(RT_JAR) $(RESOURCES_JAR) $(JSSE_JAR) $(JFR_JAR) \
 		    $(BUILDMETAINDEX_JARFILE)
 	@# Copy in bin directory
+ifeq ($(USING_MSYS),true)
+        # No cpio in MinGW/MSYS
+	$(CD) $(OUTPUTDIR) && $(TAR) -cf - bin | ($(CD) $(JRE_IMAGE_DIR) && $(TAR) -xpf -)
+else
 	$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
+endif
 	@# CTE plugin security change require new empty directory lib/applet
 	$(MKDIR) -p $(JRE_IMAGE_DIR)/lib/applet
 	@# Copy in lib directory
+ifeq ($(USING_MSYS),true)
+        # No cpio in MinGW/MSYS
+	$(CD) $(OUTPUTDIR) && $(TAR) -cf - lib | ($(CD) $(JRE_IMAGE_DIR) && $(TAR) -xpf -)
+else
 	$(CD) $(OUTPUTDIR) && $(FIND) lib -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
+endif
+
   ifeq ($(USING_CYGWIN),true)
 	  $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
 	  $(RM) -rf $(OUTPUTDIR)/[A-Za-z]:
@@ -919,11 +930,17 @@
 # only places from which we copy everything), but because the presence
 # of this file causes cygwin's find to bomb out, thus breaking the build
 # in "install".
+
 initial-image-jdk-setup:
 	$(RM) -r $(JDK_IMAGE_DIR)
 	$(MKDIR) -p $(JDK_IMAGE_DIR)/jre
+ifeq ($(USING_MSYS),true)
+	($(CD) $(JRE_IMAGE_DIR) && $(TAR) -cf - . \
+	      | ($(CD) $(JDK_IMAGE_DIR)/jre && $(TAR) -xpf -))
+else
 	($(CD) $(JRE_IMAGE_DIR) && $(FIND) . -depth -print \
 	      | $(CPIO) -pdum $(JDK_IMAGE_DIR)/jre )
+endif
   ifeq ($(USING_CYGWIN),true)
 	  $(RM) -rf $(JRE_IMAGE_DIR)/[A-Za-z]:
 	  $(RM) -rf $(JDK_IMAGE_DIR)/jre/[A-Za-z]:
--- a/make/common/Sanity.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/Sanity.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -64,7 +64,6 @@
     sane-math_iso \
     sane-libCrun \
     sane-unixccs_path \
-    sane-odbcdir \
     sane-msdevtools_path \
     sane-dxsdk \
     sane-compiler \
--- a/make/common/shared/Defs-solaris.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/shared/Defs-solaris.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -206,13 +206,12 @@
 #     libjdgaSUNWffb.so
 #     libjdgaSUNWm64.so
 #     libxinerama.so
-#   The library libJdbcOdbc.so has also been given an exception.
 #   The JNI/JVMTI demo libraries are also missing mapfiles, no exceptions yet.
 ifeq ($(ARCH_FAMILY),sparc)
   MAPFILE_EXCEPTIONS = \
-    (libJdbcOdbc|libjdgaSUNWafb|libjdgaSUNWcg6|libjdgaSUNWffb|libjdgaSUNWm64|libxinerama)
+    (libjdgaSUNWafb|libjdgaSUNWcg6|libjdgaSUNWffb|libjdgaSUNWm64|libxinerama)
 else
-  MAPFILE_EXCEPTIONS = (libJdbcOdbc)
+  MAPFILE_EXCEPTIONS = ()
 endif
 
 # Macro to check it's input file for banned dependencies and verify the
--- a/make/common/shared/Defs-utils.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/shared/Defs-utils.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -169,15 +169,19 @@
 ifeq ($(PLATFORM),windows)
   ifdef USING_CYGWIN
     # Intrinsic unix command, with backslash-escaped character interpretation
-    ECHO = $(UNIXCOMMAND_PATH)echo -e
-    ZIPEXE = $(UNIXCOMMAND_PATH)zip
-    UNZIP  = $(UNIXCOMMAND_PATH)unzip
+    ECHO     = $(UNIXCOMMAND_PATH)echo -e
+    ZIPEXE   = $(UNIXCOMMAND_PATH)zip
+    UNZIP    = $(UNIXCOMMAND_PATH)unzip
     # Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation
-    NAWK   = $(UNIXCOMMAND_PATH)awk -v BINMODE=w
+    NAWK     = $(UNIXCOMMAND_PATH)awk -v BINMODE=w
   else
     ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
     UNZIP  = $(UTILS_DEVTOOL_PATH)unzip
     NAWK   = $(UNIXCOMMAND_PATH)awk
+    ifdef USING_MSYS
+      ECHO   = $(UTILS_COMMAND_PATH)echo -e
+      AR     = $(UTILS_DEVTOOL_PATH)ar
+    endif
   endif
   # Re-define some utilities
   LEX            =# override GNU Make intrinsic: no lex on windows
--- a/make/common/shared/Defs-windows.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/shared/Defs-windows.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -112,6 +112,15 @@
 $(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1" 2> $(DEV_NULL); else echo "$1"; fi)
 endef
 else
+ifdef USING_MSYS
+DOSPATH_CMD:=$(shell cd $(JDK_TOPDIR) 2> $(DEV_NULL) && pwd)/make/tools/msys_build_scripts/dospath.sh
+define FullPath
+$(subst \,/,$(shell $(DOSPATH_CMD) $1))
+endef
+define OptFullPath
+$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
+endef
+else
 # Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
 define FullPath
 $(shell cd $1 2> $(DEV_NULL) && pwd)
@@ -120,6 +129,7 @@
 $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
 endef
 endif
+endif
 
 # System drive
 ifdef SYSTEMDRIVE
@@ -146,43 +156,47 @@
   ifdef USING_CYGWIN
     UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
   else
-    ifdef ROOTDIR
-      xROOTDIR :="$(subst \,/,$(ROOTDIR))"
-      _rootdir :=$(call FullPath,$(xROOTDIR))
+    ifdef USING_MSYS
+      UNIXCOMMAND_PATH :=$(call PrefixPath,/bin)
     else
-      xROOTDIR :="$(_system_drive)/mksnt"
-      _rootdir :=$(call FullPath,$(xROOTDIR))
-    endif
-    ifneq ($(_rootdir),)
-      UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
-    endif
-  endif
+      ifdef ROOTDIR
+        xROOTDIR :="$(subst \,/,$(ROOTDIR))"
+        _rootdir :=$(call FullPath,$(xROOTDIR))
+      else
+        xROOTDIR :="$(_system_drive)/mksnt"
+        _rootdir :=$(call FullPath,$(xROOTDIR))
+      endif
+      ifneq ($(_rootdir),)
+        UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
+      endif
+    endif # USING_MSYS
+  endif # USING_CYGWIN
 endif
 UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
 
 # Get version of MKS or CYGWIN
-ifndef USING_CYGWIN
-_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
-MKS_VER  :=$(call GetVersion,$(_MKS_VER))
-# At this point, we can re-define FullPath to use DOSNAME_CMD
-CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
-TRY_DOSNAME:=false
-ifeq ($(CHECK_MKS87),same)
-TRY_DOSNAME:=true
-endif
-# Newer should be ok
-ifeq ($(CHECK_MKS87),newer)
-TRY_DOSNAME:=true
-endif
-ifeq ($(TRY_DOSNAME),true)
-ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
-_DOSNAME=$(UNIXCOMMAND_PATH)dosname
-DOSNAME_CMD:=$(_DOSNAME) -s
+ifdef USING_MKS
+  _MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
+  MKS_VER  :=$(call GetVersion,$(_MKS_VER))
+  # At this point, we can re-define FullPath to use DOSNAME_CMD
+  CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
+  TRY_DOSNAME:=false
+  ifeq ($(CHECK_MKS87),same)
+    TRY_DOSNAME:=true
+  endif
+  # Newer should be ok
+  ifeq ($(CHECK_MKS87),newer)
+    TRY_DOSNAME:=true
+  endif
+  ifeq ($(TRY_DOSNAME),true)
+    ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
+      _DOSNAME=$(UNIXCOMMAND_PATH)dosname
+      DOSNAME_CMD:=$(_DOSNAME) -s
 define FullPath
 $(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
 endef
-endif # test dosname -s
-endif # TRY_DOSNAME
+    endif # test dosname -s
+  endif # TRY_DOSNAME
 endif # MKS
 
 # We try to get references to what we need via the default component
@@ -440,10 +454,14 @@
   ifdef USING_CYGWIN
     DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
   else
-    xDEVTOOLS_PATH  :="$(_system_drive)/utils"
-    fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
-    DEVTOOLS_PATH  :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
-  endif
+    ifdef USING_MSYS
+      DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
+    else
+      xDEVTOOLS_PATH  :="$(_system_drive)/utils"
+      fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
+      DEVTOOLS_PATH  :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
+    endif # USING_MSYS
+  endif # USING_CYGWIN
 endif
 DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
 
@@ -636,7 +654,7 @@
 
 # Special define for checking the binaries
 
-# All windows dll and exe files should have been built with /NXCOMPAT
+# All windows dll and exe files should have been built with -NXCOMPAT
 #   and be setup for dynamic base addresses.
 #   In addition, we should not be dependent on certain dll files that
 #   we do not or cannot redistribute.
@@ -648,37 +666,37 @@
   BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
 endif
 
-# Check for /safeseh (only used on 32bit)
+# Check for -safeseh (only used on 32bit)
 define binary_file_safeseh_verification # binary_file
 ( \
-  $(ECHO) "Checking for /SAFESEH usage in: $1" && \
-  if [ "`$(DUMPBIN) /loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
+  $(ECHO) "Checking for -SAFESEH usage in: $1" && \
+  if [ "`$(DUMPBIN) -loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
     $(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \
-    $(DUMPBIN) /loadconfig $1 ; \
+    $(DUMPBIN) -loadconfig $1 ; \
     exit 6 ; \
   fi ; \
 )
 endef
 
-# Check for /NXCOMPAT usage
+# Check for -NXCOMPAT usage
 define binary_file_nxcompat_verification # binary_file
 ( \
-  $(ECHO) "Checking for /NXCOMPAT usage in: $1" && \
-  if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
+  $(ECHO) "Checking for -NXCOMPAT usage in: $1" && \
+  if [ "`$(DUMPBIN) -headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
     $(ECHO) "ERROR: Did not find 'NX compatible' in headers: $1" ; \
-    $(DUMPBIN) /headers $1 ; \
+    $(DUMPBIN) -headers $1 ; \
     exit 7 ; \
   fi ; \
 )
 endef
 
-# Check for /DYNAMICBASE usage
+# Check for -DYNAMICBASE usage
 define binary_file_dynamicbase_verification # binary_file
 ( \
-  $(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \
-  if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
+  $(ECHO) "Checking for -DYNAMICBASE usage in: $1" && \
+  if [ "`$(DUMPBIN) -headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
     $(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
-    $(DUMPBIN) /headers $1 ; \
+    $(DUMPBIN) -headers $1 ; \
     exit 8 ; \
   fi ; \
 )
@@ -688,9 +706,9 @@
 define binary_file_dll_verification # binary_file
 ( \
   $(ECHO) "Checking for banned dependencies in: $1" && \
-  if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
+  if [ "`$(DUMPBIN) -dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
     $(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
-    $(DUMPBIN) /dependents $1 ; \
+    $(DUMPBIN) -dependents $1 ; \
     exit 9 ; \
   fi ; \
 )
--- a/make/common/shared/Platform.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/shared/Platform.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -70,6 +70,8 @@
 #     LIBARCH32                   solaris only: sparc or i386
 #     LIBARCH64                   solaris only: sparcv9 or amd64
 #     USING_CYGWIN                windows only: true or false
+#     USING_MSYS                  windows only: true or false
+#     USING_MKS                   windows only: true or false
 #     ISHIELD_TEMP_MIN            windows only: minimum disk space in temp area
 
 # Only run uname once in this make session.
@@ -306,6 +308,8 @@
 # Windows with and without CYGWIN will be slightly different
 ifeq ($(SYSTEM_UNAME), Windows_NT)
   PLATFORM = windows
+  USING_MKS = true
+  export USING_MKS
 endif
 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
   PLATFORM = windows
@@ -318,6 +322,11 @@
     export CYGWIN_HOME
   endif
 endif
+ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
+  PLATFORM = windows
+  USING_MSYS = true
+  export USING_MSYS
+endif
 
 # Platform settings specific to Windows
 ifeq ($(PLATFORM), windows)
@@ -395,11 +404,12 @@
   endif
   ARCH_FAMILY = $(ARCH)
   # Where is unwanted output to be delivered?
-  # MKS uses the special file "NUL", cygwin uses the customary unix file.
-  ifeq ($(USING_CYGWIN),true)
+  # MKS uses the special file "NUL"; Cygwin and MinGW/MSYS use the
+  # customary unix file.
+  ifeq ($(USING_MKS),true)
+    DEV_NULL = NUL
+  else
     DEV_NULL = /dev/null
-  else
-    DEV_NULL = NUL
   endif
   export DEV_NULL
   # Classpath separator
@@ -440,28 +450,11 @@
       _MB_OF_MEMORY := \
 	   $(shell free -m | grep Mem: | awk '{print $$2;}' )
     else
-      # Windows 2000 has the mem utility, but two memory areas
-      #    extended memory is what is beyond 1024M
-      _B_OF_EXT_MEMORY := \
-	   $(shell mem 2> $(DEV_NULL) | \
-		   grep 'total contiguous extended memory' | awk '{print $$1;}')
-      ifeq ($(_B_OF_EXT_MEMORY),)
-          _B_OF_MEMORY := \
-	   $(shell mem 2> $(DEV_NULL) | \
-		   grep 'total conventional memory' | awk '{print $$1;}')
-      else
-        _B_OF_MEMORY := \
-           $(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL))
-      endif
-      ifeq ($(_B_OF_MEMORY),)
-        # Windows 2003 has the systeminfo utility use it if mem doesn't work
-        _MB_OF_MEMORY := \
-	    $(shell systeminfo 2> $(DEV_NULL) | \
-		    grep 'Total Physical Memory:' | \
-		    awk '{print $$4;}' | sed -e 's@,@@')
-      else
-        _MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL))
-      endif
+      # Windows XP and higher has the systeminfo utility
+      _MB_OF_MEMORY := \
+            $(shell systeminfo 2> $(DEV_NULL) | \
+                    grep 'Total Physical Memory:' | \
+                    awk '{print $$4;}' | sed -e 's@,@@')
     endif
     ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY))
       MB_OF_MEMORY := $(_MB_OF_MEMORY)
--- a/make/common/shared/Sanity-Settings.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/shared/Sanity-Settings.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -182,8 +182,13 @@
     ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER)
     ALL_SETTINGS+=$(call addRequiredSetting,CYGPATH_CMD)
   else
-    ALL_SETTINGS+=$(call addRequiredVersionSetting,MKS_VER)
-    ALL_SETTINGS+=$(call addOptionalSetting,DOSNAME_CMD)
+    ifdef USING_MSYS
+      ALL_SETTINGS+=$(call addRequiredSetting,USING_MSYS)
+      ALL_SETTINGS+=$(call addRequiredSetting,DOSPATH_CMD)
+    else
+      ALL_SETTINGS+=$(call addRequiredVersionSetting,MKS_VER)
+      ALL_SETTINGS+=$(call addOptionalSetting,DOSNAME_CMD)
+    endif
   endif
 endif
 ifeq ($(PLATFORM),linux)
--- a/make/common/shared/Sanity.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/common/shared/Sanity.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -208,7 +208,6 @@
 	sane-docs_import \
 	sane-math_iso \
 	sane-libCrun \
-	sane-odbcdir \
 	sane-msdevtools_path \
 	sane-hotspot_binaries \
 	sane-hotspot_import \
@@ -395,7 +394,7 @@
 ifeq ($(PLATFORM), windows)
     MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER))
 sane-mks:
-  ifndef USING_CYGWIN
+  ifdef USING_MKS
     ifeq ($(MKS_CHECK),missing)
 	@$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER))
     endif
@@ -905,14 +904,25 @@
 	    "" >> $(ERROR_FILE) ; \
 	fi
 ifeq ($(PLATFORM), windows)
-	@for utility in cpio ar file m4 ; do \
+ifeq ($(USING_MSYS), true)
+	@for utility in $(AR) $(FILE) $(M4) ; do \
 	  if [ ! -r "`$(WHICH) $${utility}`" ]; then \
 	    $(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \
 	      "      directory $(UNIXCOMMAND_PATH). \n" \
-	      "      The utilities cpio, ar, file, and m4 are required. \n" \
+	      "      The utilities ar, file and m4 are required. \n" \
 	      "" >> $(WARNING_FILE) ; \
 	  fi; \
 	done
+else
+	@for utility in $(AR) $(CPIO) $(FILE) $(M4) ; do \
+	  if [ ! -r "`$(WHICH) $${utility}`" ]; then \
+	    $(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \
+	      "      directory $(UNIXCOMMAND_PATH). \n" \
+	      "      The utilities ar, cpio, file and m4 are required. \n" \
+	      "" >> $(WARNING_FILE) ; \
+	  fi; \
+	done
+endif
 endif
 
 ######################################################
@@ -999,7 +1009,8 @@
 	    "      This is normally obtained from the WINDOWSSDKDIR." \
 	    "" >> $(ERROR_FILE)
   endif
-  ifeq ($(wildcard $(DUMPBIN)),)
+  # MinGW/MSYS make 3.81 will not tolerate a path with a quoted substring
+  ifeq ($(wildcard $(subst ",,$(DUMPBIN))),)
 	@$(ECHO) "ERROR: Cannot find the DUMPBIN utility from path: $(DUMPBIN)\n" \
 	    "      This is normally obtained from the COMPILER_PATH." \
 	    "" >> $(ERROR_FILE)
--- a/make/java/java/Exportedfiles.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/java/Exportedfiles.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, 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
@@ -66,6 +66,7 @@
     java/util/prefs/FileSystemPreferences.java \
     java/io/Console.java \
     java/io/FileDescriptor.java \
+    java/io/DefaultFileSystem.java \
     java/io/InputStream.java \
     java/io/FileInputStream.java \
     java/io/FileOutputStream.java \
@@ -142,6 +143,7 @@
     java/io/Console.java \
     java/io/FileSystem.java \
     java/io/FileDescriptor.java \
+    java/io/DefaultFileSystem.java \
     java/io/InputStream.java \
     java/io/FileInputStream.java \
     java/io/FileOutputStream.java \
--- a/make/java/java/FILES_c.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/java/FILES_c.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2012, 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,6 @@
 	Compiler.c \
 	Console_md.c \
 	Double.c \
-	FileSystem_md.c \
 	FileDescriptor_md.c \
 	FileInputStream.c \
 	FileInputStream_md.c \
--- a/make/java/java/FILES_java.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/java/FILES_java.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2012, 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
@@ -438,6 +438,7 @@
     java/io/File.java \
     java/io/FileSystem.java \
     java/io/FileDescriptor.java \
+    java/io/DefaultFileSystem.java \
     java/io/FilenameFilter.java \
     java/io/FileFilter.java \
     java/io/FilePermission.java \
--- a/make/java/java/genlocales.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/java/genlocales.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -38,31 +38,31 @@
 # only FILES_java and FILES_compiled_properties variables will be picked up
 #
 # $(BUILDDIR)/java/util/FILES_java.gmk & $(BUILDDIR)/java/util/FILES_properties.gmk
-# contain "sun.util.resources" for European language support
+# contain "sun.util.resources" for US language support
 
 include $(BUILDDIR)/java/util/FILES_java.gmk
 include $(BUILDDIR)/java/util/FILES_properties.gmk
 
-Euro_Resources_java := $(FILES_java)
-Euro_Resources_properties := $(FILES_compiled_properties)
+US_Resources_java := $(FILES_java)
+US_Resources_properties := $(FILES_compiled_properties)
 
 # $(BUILDDIR)/java/text/FILES_java.gmk contains the "sun.text.resources" for 
-# European language support
+# US language support
 
 include $(BUILDDIR)/java/text/base/FILES_java.gmk
 
-Euro_Resources_java += $(FILES_java)
+US_Resources_java += $(FILES_java)
 
 FILES_compiled_properties=
 
 # $(BUILDDIR)/sun/text/FILES_java.gmk & $(BUILDDIR)/sun/text/FILES_properties.gmk
-# contain both resources for Non-European language support
+# contain both resources for Non-US language support
 
 include $(BUILDDIR)/sun/text/FILES_java.gmk
 include $(BUILDDIR)/sun/text/FILES_properties.gmk
 
-NonEuro_Resources_java := $(FILES_java)
-NonEuro_Resources_properties := $(FILES_compiled_properties)
+NonUS_Resources_java := $(FILES_java)
+NonUS_Resources_properties := $(FILES_compiled_properties)
 
 # Restore the orignal FILES_java & FILES_compiled_properties variables
 FILES_java := $(FILES_java_orig)
@@ -80,30 +80,30 @@
 ifeq ($(PLATFORM), macosx)
 
 $(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
-	@$(RM) $@.tmp.euro $@.tmp.noneuro;
+	@$(RM) $@.tmp.us $@.tmp.nonus;
 	@$(prep-target) 
-	@$(ECHO) $(Euro_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}'  > $@.tmp.euro;
-	@$(ECHO) $(Euro_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.euro;
-	@$(ECHO) $(NonEuro_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.noneuro;
-	@$(ECHO) $(NonEuro_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.noneuro;
+	@$(ECHO) $(US_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}'  > $@.tmp.us;
+	@$(ECHO) $(US_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.us;
+	@$(ECHO) $(NonUS_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.nonus;
+	@$(ECHO) $(NonUS_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.nonus;
 	NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
-	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
-		$@.tmp.noneuro $< $@
-	@$(RM) $@.tmp.euro $@.tmp.noneuro;
+	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.us \
+		$@.tmp.nonus $< $@
+	@$(RM) $@.tmp.us $@.tmp.nonus;
 
 else
 
 $(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
-	@$(RM) $@.tmp.euro $@.tmp.noneuro;
+	@$(RM) $@.tmp.us $@.tmp.nonus;
 	@$(prep-target) 
-	@$(ECHO) $(subst .properties,'\n',$(Euro_Resources_properties)) > $@.tmp.euro;
-	@$(ECHO) $(subst .java,'\n',$(Euro_Resources_java)) >> $@.tmp.euro;	
-	@$(ECHO) $(subst .properties,'\n',$(NonEuro_Resources_properties)) > $@.tmp.noneuro;
-	@$(ECHO) $(subst .java,'\n',$(NonEuro_Resources_java)) >> $@.tmp.noneuro;
+	@$(ECHO) $(subst .properties,'\n',$(US_Resources_properties)) > $@.tmp.us;
+	@$(ECHO) $(subst .java,'\n',$(US_Resources_java)) >> $@.tmp.us;	
+	@$(ECHO) $(subst .properties,'\n',$(NonUS_Resources_properties)) > $@.tmp.nonus;
+	@$(ECHO) $(subst .java,'\n',$(NonUS_Resources_java)) >> $@.tmp.nonus;
 	NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
-	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
-		$@.tmp.noneuro $< $@
-	@$(RM) $@.tmp.euro $@.tmp.noneuro;
+	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.us \
+		$@.tmp.nonus $< $@
+	@$(RM) $@.tmp.us $@.tmp.nonus;
 endif
 	
 genlocales : $(LocaleDataMetaInfo_Dest)  
--- a/make/java/java/localegen.sh	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/java/localegen.sh	Mon Nov 05 10:33:18 2012 -0500
@@ -35,11 +35,11 @@
 # A list of resource base name list;
 RESOURCE_NAMES=$1
 
-# A list of European resources;
-EURO_FILES_LIST=$2
+# A list of US resources;
+US_FILES_LIST=$2
 
-# A list of non-European resources;
-NONEURO_FILES_LIST=$3
+# A list of non-US resources;
+NONUS_FILES_LIST=$3
 
 INPUT_FILE=$4
 OUTPUT_FILE=$5
@@ -53,23 +53,23 @@
 sed_script="$SED -e \"s@^#warn .*@// -- This file was mechanically generated: Do not edit! -- //@\" "
 
 # ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
-noneuroall=" ja-JP-JP th-TH-TH "
+nonusall=" ja-JP-JP th-TH-TH "
 
 for FILE in $RESOURCE_NAMES
 do
-    getlocalelist $FILE $EURO_FILES_LIST
-    sed_script=$sed_script"-e \"s@#"$FILE"_EuroLocales#@$localelist@g\" "
-    euroall=$euroall" "$localelist
-    getlocalelist $FILE $NONEURO_FILES_LIST
-    sed_script=$sed_script"-e \"s@#"$FILE"_NonEuroLocales#@$localelist@g\" "
-    noneuroall=$noneuroall" "$localelist
+    getlocalelist $FILE $US_FILES_LIST
+    sed_script=$sed_script"-e \"s@#"$FILE"_USLocales#@$localelist@g\" "
+    usall=$usall" "$localelist
+    getlocalelist $FILE $NONUS_FILES_LIST
+    sed_script=$sed_script"-e \"s@#"$FILE"_NonUSLocales#@$localelist@g\" "
+    nonusall=$nonusall" "$localelist
 done
 
-euroall=`(for LOC in $euroall; do echo $LOC;done) |$SORT -u`
-noneuroall=`(for LOC in $noneuroall; do echo $LOC;done) |$SORT -u`
+usall=`(for LOC in $usall; do echo $LOC;done) |$SORT -u`
+nonusall=`(for LOC in $nonusall; do echo $LOC;done) |$SORT -u`
 
-sed_script=$sed_script"-e \"s@#AvailableLocales_EuroLocales#@$euroall@g\" "
-sed_script=$sed_script"-e \"s@#AvailableLocales_NonEuroLocales#@$noneuroall@g\" "
+sed_script=$sed_script"-e \"s@#AvailableLocales_USLocales#@$usall@g\" "
+sed_script=$sed_script"-e \"s@#AvailableLocales_NonUSLocales#@$nonusall@g\" "
 
 sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE"
 eval $sed_script
--- a/make/java/java/mapfile-vers	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/java/mapfile-vers	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, 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
@@ -87,7 +87,6 @@
 		Java_java_io_FileOutputStream_open;
 		Java_java_io_FileOutputStream_write;
 		Java_java_io_FileOutputStream_writeBytes;
-		Java_java_io_FileSystem_getFileSystem;
 		Java_java_io_ObjectInputStream_bytesToDoubles;
 		Java_java_io_ObjectInputStream_bytesToFloats;
 		Java_java_io_ObjectOutputStream_doublesToBytes;
--- a/make/java/text/base/FILES_java.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/text/base/FILES_java.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -103,150 +103,7 @@
         sun/text/resources/BreakIteratorInfo.java \
 	\
         sun/text/resources/CollationData.java \
-        sun/text/resources/be/CollationData_be.java \
-        sun/text/resources/bg/CollationData_bg.java \
-        sun/text/resources/ca/CollationData_ca.java \
-        sun/text/resources/cs/CollationData_cs.java \
-        sun/text/resources/da/CollationData_da.java \
-        sun/text/resources/el/CollationData_el.java \
-        sun/text/resources/es/CollationData_es.java \
-        sun/text/resources/et/CollationData_et.java \
-        sun/text/resources/fi/CollationData_fi.java \
-        sun/text/resources/fr/CollationData_fr.java \
-        sun/text/resources/hr/CollationData_hr.java \
-        sun/text/resources/hu/CollationData_hu.java \
-        sun/text/resources/is/CollationData_is.java \
-        sun/text/resources/lt/CollationData_lt.java \
-        sun/text/resources/lv/CollationData_lv.java \
-        sun/text/resources/mk/CollationData_mk.java \
-        sun/text/resources/no/CollationData_no.java \
-        sun/text/resources/pl/CollationData_pl.java \
-        sun/text/resources/ro/CollationData_ro.java \
-        sun/text/resources/ru/CollationData_ru.java \
-        sun/text/resources/sk/CollationData_sk.java \
-        sun/text/resources/sl/CollationData_sl.java \
-        sun/text/resources/sq/CollationData_sq.java \
-        sun/text/resources/sr/CollationData_sr.java \
-        sun/text/resources/sr/CollationData_sr_Latn.java \
-        sun/text/resources/sv/CollationData_sv.java \
-        sun/text/resources/tr/CollationData_tr.java \
-        sun/text/resources/uk/CollationData_uk.java \
 	\
         sun/text/resources/FormatData.java \
-        sun/text/resources/be/FormatData_be.java \
-        sun/text/resources/be/FormatData_be_BY.java \
-        sun/text/resources/bg/FormatData_bg.java \
-        sun/text/resources/bg/FormatData_bg_BG.java \
-        sun/text/resources/ca/FormatData_ca.java \
-        sun/text/resources/ca/FormatData_ca_ES.java \
-        sun/text/resources/cs/FormatData_cs.java \
-        sun/text/resources/cs/FormatData_cs_CZ.java \
-        sun/text/resources/da/FormatData_da.java \
-        sun/text/resources/da/FormatData_da_DK.java \
-        sun/text/resources/de/FormatData_de.java \
-        sun/text/resources/de/FormatData_de_AT.java \
-        sun/text/resources/de/FormatData_de_CH.java \
-        sun/text/resources/de/FormatData_de_DE.java \
-        sun/text/resources/de/FormatData_de_LU.java \
-        sun/text/resources/el/FormatData_el.java \
-        sun/text/resources/el/FormatData_el_CY.java \
-        sun/text/resources/el/FormatData_el_GR.java \
         sun/text/resources/en/FormatData_en.java \
-        sun/text/resources/en/FormatData_en_US.java \
-        sun/text/resources/en/FormatData_en_AU.java \
-        sun/text/resources/en/FormatData_en_CA.java \
-        sun/text/resources/en/FormatData_en_GB.java \
-        sun/text/resources/en/FormatData_en_IE.java \
-        sun/text/resources/en/FormatData_en_IN.java \
-        sun/text/resources/en/FormatData_en_MT.java \
-        sun/text/resources/en/FormatData_en_NZ.java \
-        sun/text/resources/en/FormatData_en_PH.java \
-        sun/text/resources/en/FormatData_en_SG.java \
-        sun/text/resources/en/FormatData_en_ZA.java \
-        sun/text/resources/es/FormatData_es.java \
-        sun/text/resources/es/FormatData_es_BO.java \
-        sun/text/resources/es/FormatData_es_AR.java \
-        sun/text/resources/es/FormatData_es_CL.java \
-        sun/text/resources/es/FormatData_es_CO.java \
-        sun/text/resources/es/FormatData_es_CR.java \
-        sun/text/resources/es/FormatData_es_DO.java \
-        sun/text/resources/es/FormatData_es_EC.java \
-        sun/text/resources/es/FormatData_es_ES.java \
-        sun/text/resources/es/FormatData_es_GT.java \
-        sun/text/resources/es/FormatData_es_HN.java \
-        sun/text/resources/es/FormatData_es_MX.java \
-        sun/text/resources/es/FormatData_es_NI.java \
-        sun/text/resources/es/FormatData_es_PA.java \
-        sun/text/resources/es/FormatData_es_PE.java \
-        sun/text/resources/es/FormatData_es_PR.java \
-        sun/text/resources/es/FormatData_es_PY.java \
-        sun/text/resources/es/FormatData_es_SV.java \
-        sun/text/resources/es/FormatData_es_US.java \
-        sun/text/resources/es/FormatData_es_UY.java \
-        sun/text/resources/es/FormatData_es_VE.java \
-        sun/text/resources/et/FormatData_et.java \
-        sun/text/resources/et/FormatData_et_EE.java \
-        sun/text/resources/fi/FormatData_fi.java \
-        sun/text/resources/fi/FormatData_fi_FI.java \
-        sun/text/resources/fr/FormatData_fr.java \
-        sun/text/resources/fr/FormatData_fr_BE.java \
-        sun/text/resources/fr/FormatData_fr_CA.java \
-        sun/text/resources/fr/FormatData_fr_CH.java \
-        sun/text/resources/fr/FormatData_fr_FR.java \
-        sun/text/resources/ga/FormatData_ga.java \
-        sun/text/resources/ga/FormatData_ga_IE.java \
-        sun/text/resources/hr/FormatData_hr.java \
-        sun/text/resources/hr/FormatData_hr_HR.java \
-        sun/text/resources/hu/FormatData_hu.java \
-        sun/text/resources/hu/FormatData_hu_HU.java \
-        sun/text/resources/in/FormatData_in.java \
-        sun/text/resources/in/FormatData_in_ID.java \
-        sun/text/resources/is/FormatData_is.java \
-        sun/text/resources/is/FormatData_is_IS.java \
-        sun/text/resources/it/FormatData_it.java \
-        sun/text/resources/it/FormatData_it_CH.java \
-        sun/text/resources/it/FormatData_it_IT.java \
-        sun/text/resources/lt/FormatData_lt.java \
-        sun/text/resources/lt/FormatData_lt_LT.java \
-        sun/text/resources/lv/FormatData_lv.java \
-        sun/text/resources/lv/FormatData_lv_LV.java \
-        sun/text/resources/mk/FormatData_mk.java \
-        sun/text/resources/mk/FormatData_mk_MK.java \
-        sun/text/resources/ms/FormatData_ms.java \
-        sun/text/resources/ms/FormatData_ms_MY.java \
-        sun/text/resources/mt/FormatData_mt.java \
-        sun/text/resources/mt/FormatData_mt_MT.java \
-        sun/text/resources/nl/FormatData_nl.java \
-        sun/text/resources/nl/FormatData_nl_BE.java \
-        sun/text/resources/nl/FormatData_nl_NL.java \
-        sun/text/resources/no/FormatData_no.java \
-        sun/text/resources/no/FormatData_no_NO.java \
-        sun/text/resources/no/FormatData_no_NO_NY.java \
-        sun/text/resources/pl/FormatData_pl.java \
-        sun/text/resources/pl/FormatData_pl_PL.java \
-        sun/text/resources/pt/FormatData_pt.java \
-        sun/text/resources/pt/FormatData_pt_BR.java \
-        sun/text/resources/pt/FormatData_pt_PT.java \
-        sun/text/resources/ro/FormatData_ro.java \
-        sun/text/resources/ro/FormatData_ro_RO.java \
-        sun/text/resources/ru/FormatData_ru.java \
-        sun/text/resources/ru/FormatData_ru_RU.java \
-        sun/text/resources/sk/FormatData_sk.java \
-        sun/text/resources/sk/FormatData_sk_SK.java \
-        sun/text/resources/sl/FormatData_sl.java \
-        sun/text/resources/sl/FormatData_sl_SI.java \
-        sun/text/resources/sq/FormatData_sq.java \
-        sun/text/resources/sq/FormatData_sq_AL.java \
-        sun/text/resources/sr/FormatData_sr.java \
-        sun/text/resources/sr/FormatData_sr_BA.java \
-        sun/text/resources/sr/FormatData_sr_CS.java \
-        sun/text/resources/sr/FormatData_sr_ME.java \
-        sun/text/resources/sr/FormatData_sr_RS.java \
-        sun/text/resources/sr/FormatData_sr_Latn.java \
-        sun/text/resources/sr/FormatData_sr_Latn_ME.java \
-        sun/text/resources/sv/FormatData_sv.java \
-        sun/text/resources/sv/FormatData_sv_SE.java \
-        sun/text/resources/tr/FormatData_tr.java \
-        sun/text/resources/tr/FormatData_tr_TR.java \
-        sun/text/resources/uk/FormatData_uk.java \
-        sun/text/resources/uk/FormatData_uk_UA.java
+        sun/text/resources/en/FormatData_en_US.java
--- a/make/java/util/FILES_java.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/util/FILES_java.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -29,13 +29,4 @@
         sun/util/resources/LocaleNamesBundle.java \
         sun/util/resources/TimeZoneNamesBundle.java \
         sun/util/resources/TimeZoneNames.java \
-        sun/util/resources/de/TimeZoneNames_de.java \
-        sun/util/resources/en/TimeZoneNames_en.java \
-        sun/util/resources/en/TimeZoneNames_en_CA.java \
-        sun/util/resources/en/TimeZoneNames_en_GB.java \
-        sun/util/resources/en/TimeZoneNames_en_IE.java \
-        sun/util/resources/es/TimeZoneNames_es.java \
-        sun/util/resources/fr/TimeZoneNames_fr.java \
-        sun/util/resources/it/TimeZoneNames_it.java \
-        sun/util/resources/pt/TimeZoneNames_pt_BR.java \
-        sun/util/resources/sv/TimeZoneNames_sv.java
+        sun/util/resources/en/TimeZoneNames_en.java
--- a/make/java/util/FILES_properties.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/java/util/FILES_properties.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -25,189 +25,10 @@
 
 FILES_compiled_properties = \
         sun/util/resources/LocaleNames.properties \
-        sun/util/resources/be/LocaleNames_be.properties \
-        sun/util/resources/bg/LocaleNames_bg.properties \
-        sun/util/resources/ca/LocaleNames_ca.properties \
-        sun/util/resources/cs/LocaleNames_cs.properties \
-        sun/util/resources/da/LocaleNames_da.properties \
-        sun/util/resources/de/LocaleNames_de.properties \
-        sun/util/resources/el/LocaleNames_el.properties \
-        sun/util/resources/el/LocaleNames_el_CY.properties \
         sun/util/resources/en/LocaleNames_en.properties \
-        sun/util/resources/en/LocaleNames_en_MT.properties \
-        sun/util/resources/en/LocaleNames_en_PH.properties \
-        sun/util/resources/en/LocaleNames_en_SG.properties \
-        sun/util/resources/es/LocaleNames_es.properties \
-        sun/util/resources/es/LocaleNames_es_US.properties \
-        sun/util/resources/et/LocaleNames_et.properties \
-        sun/util/resources/fi/LocaleNames_fi.properties \
-        sun/util/resources/fr/LocaleNames_fr.properties \
-        sun/util/resources/ga/LocaleNames_ga.properties \
-        sun/util/resources/hr/LocaleNames_hr.properties \
-        sun/util/resources/hu/LocaleNames_hu.properties \
-        sun/util/resources/in/LocaleNames_in.properties \
-        sun/util/resources/is/LocaleNames_is.properties \
-        sun/util/resources/it/LocaleNames_it.properties \
-        sun/util/resources/lt/LocaleNames_lt.properties \
-        sun/util/resources/lv/LocaleNames_lv.properties \
-        sun/util/resources/mk/LocaleNames_mk.properties \
-        sun/util/resources/ms/LocaleNames_ms.properties \
-        sun/util/resources/mt/LocaleNames_mt.properties \
-        sun/util/resources/nl/LocaleNames_nl.properties \
-        sun/util/resources/no/LocaleNames_no.properties \
-        sun/util/resources/no/LocaleNames_no_NO_NY.properties \
-        sun/util/resources/pl/LocaleNames_pl.properties \
-        sun/util/resources/pt/LocaleNames_pt.properties \
-        sun/util/resources/pt/LocaleNames_pt_BR.properties \
-        sun/util/resources/pt/LocaleNames_pt_PT.properties \
-        sun/util/resources/ro/LocaleNames_ro.properties \
-        sun/util/resources/ru/LocaleNames_ru.properties \
-        sun/util/resources/sk/LocaleNames_sk.properties \
-        sun/util/resources/sl/LocaleNames_sl.properties \
-        sun/util/resources/sq/LocaleNames_sq.properties \
-        sun/util/resources/sr/LocaleNames_sr.properties \
-        sun/util/resources/sr/LocaleNames_sr_Latn.properties \
-        sun/util/resources/sv/LocaleNames_sv.properties \
-        sun/util/resources/tr/LocaleNames_tr.properties \
-        sun/util/resources/uk/LocaleNames_uk.properties \
 	\
         sun/util/resources/CalendarData.properties \
-        sun/util/resources/be/CalendarData_be.properties \
-        sun/util/resources/bg/CalendarData_bg.properties \
-        sun/util/resources/ca/CalendarData_ca.properties \
-        sun/util/resources/cs/CalendarData_cs.properties \
-        sun/util/resources/da/CalendarData_da.properties \
-        sun/util/resources/de/CalendarData_de.properties \
-        sun/util/resources/el/CalendarData_el.properties \
-        sun/util/resources/el/CalendarData_el_CY.properties \
         sun/util/resources/en/CalendarData_en.properties \
-        sun/util/resources/en/CalendarData_en_GB.properties \
-        sun/util/resources/en/CalendarData_en_IE.properties \
-        sun/util/resources/en/CalendarData_en_MT.properties \
-        sun/util/resources/es/CalendarData_es.properties \
-        sun/util/resources/es/CalendarData_es_ES.properties \
-        sun/util/resources/es/CalendarData_es_US.properties \
-        sun/util/resources/et/CalendarData_et.properties \
-        sun/util/resources/fi/CalendarData_fi.properties \
-        sun/util/resources/fr/CalendarData_fr.properties \
-        sun/util/resources/fr/CalendarData_fr_CA.properties \
-        sun/util/resources/hr/CalendarData_hr.properties \
-        sun/util/resources/hu/CalendarData_hu.properties \
-        sun/util/resources/in/CalendarData_in_ID.properties \
-        sun/util/resources/is/CalendarData_is.properties \
-        sun/util/resources/it/CalendarData_it.properties \
-        sun/util/resources/lt/CalendarData_lt.properties \
-        sun/util/resources/lv/CalendarData_lv.properties \
-        sun/util/resources/mk/CalendarData_mk.properties \
-        sun/util/resources/ms/CalendarData_ms_MY.properties \
-        sun/util/resources/mt/CalendarData_mt.properties \
-        sun/util/resources/mt/CalendarData_mt_MT.properties \
-        sun/util/resources/nl/CalendarData_nl.properties \
-        sun/util/resources/no/CalendarData_no.properties \
-        sun/util/resources/pl/CalendarData_pl.properties \
-        sun/util/resources/pt/CalendarData_pt.properties \
-        sun/util/resources/pt/CalendarData_pt_PT.properties \
-        sun/util/resources/ro/CalendarData_ro.properties \
-        sun/util/resources/ru/CalendarData_ru.properties \
-        sun/util/resources/sk/CalendarData_sk.properties \
-        sun/util/resources/sl/CalendarData_sl.properties \
-        sun/util/resources/sq/CalendarData_sq.properties \
-        sun/util/resources/sr/CalendarData_sr.properties \
-        sun/util/resources/sr/CalendarData_sr_Latn_BA.properties \
-        sun/util/resources/sr/CalendarData_sr_Latn_ME.properties \
-        sun/util/resources/sr/CalendarData_sr_Latn_RS.properties \
-        sun/util/resources/sv/CalendarData_sv.properties \
-        sun/util/resources/tr/CalendarData_tr.properties \
-        sun/util/resources/uk/CalendarData_uk.properties \
 	\
         sun/util/resources/CurrencyNames.properties \
-        sun/util/resources/be/CurrencyNames_be_BY.properties \
-        sun/util/resources/bg/CurrencyNames_bg_BG.properties \
-        sun/util/resources/ca/CurrencyNames_ca_ES.properties \
-        sun/util/resources/cs/CurrencyNames_cs_CZ.properties \
-        sun/util/resources/da/CurrencyNames_da_DK.properties \
-        sun/util/resources/de/CurrencyNames_de.properties \
-        sun/util/resources/de/CurrencyNames_de_AT.properties \
-        sun/util/resources/de/CurrencyNames_de_CH.properties \
-        sun/util/resources/de/CurrencyNames_de_DE.properties \
-        sun/util/resources/de/CurrencyNames_de_GR.properties \
-        sun/util/resources/de/CurrencyNames_de_LU.properties \
-        sun/util/resources/el/CurrencyNames_el_CY.properties \
-        sun/util/resources/el/CurrencyNames_el_GR.properties \
-        sun/util/resources/en/CurrencyNames_en_AU.properties \
-        sun/util/resources/en/CurrencyNames_en_CA.properties \
-        sun/util/resources/en/CurrencyNames_en_GB.properties \
-        sun/util/resources/en/CurrencyNames_en_IE.properties \
-        sun/util/resources/en/CurrencyNames_en_IN.properties \
-        sun/util/resources/en/CurrencyNames_en_MT.properties \
-        sun/util/resources/en/CurrencyNames_en_NZ.properties \
-        sun/util/resources/en/CurrencyNames_en_PH.properties \
-        sun/util/resources/en/CurrencyNames_en_SG.properties \
-        sun/util/resources/en/CurrencyNames_en_US.properties \
-        sun/util/resources/en/CurrencyNames_en_ZA.properties \
-        sun/util/resources/es/CurrencyNames_es.properties \
-        sun/util/resources/es/CurrencyNames_es_AR.properties \
-        sun/util/resources/es/CurrencyNames_es_BO.properties \
-        sun/util/resources/es/CurrencyNames_es_CL.properties \
-        sun/util/resources/es/CurrencyNames_es_CO.properties \
-        sun/util/resources/es/CurrencyNames_es_CR.properties \
-        sun/util/resources/es/CurrencyNames_es_CU.properties \
-        sun/util/resources/es/CurrencyNames_es_DO.properties \
-        sun/util/resources/es/CurrencyNames_es_EC.properties \
-        sun/util/resources/es/CurrencyNames_es_ES.properties \
-        sun/util/resources/es/CurrencyNames_es_GT.properties \
-        sun/util/resources/es/CurrencyNames_es_HN.properties \
-        sun/util/resources/es/CurrencyNames_es_MX.properties \
-        sun/util/resources/es/CurrencyNames_es_NI.properties \
-        sun/util/resources/es/CurrencyNames_es_PA.properties \
-        sun/util/resources/es/CurrencyNames_es_PE.properties \
-        sun/util/resources/es/CurrencyNames_es_PR.properties \
-        sun/util/resources/es/CurrencyNames_es_PY.properties \
-        sun/util/resources/es/CurrencyNames_es_SV.properties \
-        sun/util/resources/es/CurrencyNames_es_US.properties \
-        sun/util/resources/es/CurrencyNames_es_UY.properties \
-        sun/util/resources/es/CurrencyNames_es_VE.properties \
-        sun/util/resources/et/CurrencyNames_et_EE.properties \
-        sun/util/resources/fi/CurrencyNames_fi_FI.properties \
-        sun/util/resources/fr/CurrencyNames_fr.properties \
-        sun/util/resources/fr/CurrencyNames_fr_BE.properties \
-        sun/util/resources/fr/CurrencyNames_fr_CA.properties \
-        sun/util/resources/fr/CurrencyNames_fr_CH.properties \
-        sun/util/resources/fr/CurrencyNames_fr_FR.properties \
-        sun/util/resources/fr/CurrencyNames_fr_LU.properties \
-        sun/util/resources/ga/CurrencyNames_ga_IE.properties \
-        sun/util/resources/hr/CurrencyNames_hr_HR.properties \
-        sun/util/resources/hu/CurrencyNames_hu_HU.properties \
-        sun/util/resources/in/CurrencyNames_in_ID.properties \
-        sun/util/resources/is/CurrencyNames_is_IS.properties \
-        sun/util/resources/it/CurrencyNames_it.properties \
-        sun/util/resources/it/CurrencyNames_it_CH.properties \
-        sun/util/resources/it/CurrencyNames_it_IT.properties \
-        sun/util/resources/lt/CurrencyNames_lt_LT.properties \
-        sun/util/resources/lv/CurrencyNames_lv_LV.properties \
-        sun/util/resources/mk/CurrencyNames_mk_MK.properties \
-        sun/util/resources/ms/CurrencyNames_ms_MY.properties \
-        sun/util/resources/mt/CurrencyNames_mt_MT.properties \
-        sun/util/resources/nl/CurrencyNames_nl_BE.properties \
-        sun/util/resources/nl/CurrencyNames_nl_NL.properties \
-        sun/util/resources/no/CurrencyNames_no_NO.properties \
-        sun/util/resources/pl/CurrencyNames_pl_PL.properties \
-        sun/util/resources/pt/CurrencyNames_pt.properties \
-        sun/util/resources/pt/CurrencyNames_pt_BR.properties \
-        sun/util/resources/pt/CurrencyNames_pt_PT.properties \
-        sun/util/resources/ro/CurrencyNames_ro_RO.properties \
-        sun/util/resources/ru/CurrencyNames_ru_RU.properties \
-        sun/util/resources/sk/CurrencyNames_sk_SK.properties \
-        sun/util/resources/sl/CurrencyNames_sl_SI.properties \
-        sun/util/resources/sq/CurrencyNames_sq_AL.properties \
-        sun/util/resources/sr/CurrencyNames_sr_BA.properties \
-        sun/util/resources/sr/CurrencyNames_sr_CS.properties \
-        sun/util/resources/sr/CurrencyNames_sr_ME.properties \
-        sun/util/resources/sr/CurrencyNames_sr_RS.properties \
-        sun/util/resources/sr/CurrencyNames_sr_Latn_BA.properties \
-        sun/util/resources/sr/CurrencyNames_sr_Latn_ME.properties \
-        sun/util/resources/sr/CurrencyNames_sr_Latn_RS.properties \
-        sun/util/resources/sv/CurrencyNames_sv.properties \
-        sun/util/resources/sv/CurrencyNames_sv_SE.properties \
-        sun/util/resources/tr/CurrencyNames_tr_TR.properties \
-        sun/util/resources/uk/CurrencyNames_uk_UA.properties
+        sun/util/resources/en/CurrencyNames_en_US.properties
--- a/make/javax/crypto/Defs-jce.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/javax/crypto/Defs-jce.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
 JCE_MANIFEST_FILE    = $(TEMPDIR)/manifest.mf
 $(JCE_MANIFEST_FILE): $(MAINMANIFEST)
 	$(prep-target)
-	$(SED) -e "s#@@RELEASE@@#$(RELEASE)#"           \
+	$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#"       \
                -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
                $(MAINMANIFEST) >> $@
 	$(ECHO) "Extension-Name: javax.crypto" >> $@
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/jdk/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Makefile for building all of java
+#
+
+BUILDDIR = ..
+PRODUCT = jdk
+include $(BUILDDIR)/common/Defs.gmk
+
+SUBDIRS = asm
+include $(BUILDDIR)/common/Subdirs.gmk
+
+all build clean clobber::
+	$(SUBDIRS-loop)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/jdk/asm/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+BUILDDIR = ../..
+PACKAGE = jdk.internal.org.objectweb.asm
+PRODUCT = jdk
+JAVAC_LINT_OPTIONS=-Xlint:all
+include $(BUILDDIR)/common/Defs.gmk
+
+#
+# Files to compile
+#
+AUTO_FILES_JAVA_DIRS = jdk/internal/org/objectweb/asm
+
+#
+# Rules
+#
+include $(BUILDDIR)/common/Classes.gmk
--- a/make/jdk_generic_profile.sh	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/jdk_generic_profile.sh	Mon Nov 05 10:33:18 2012 -0500
@@ -176,17 +176,38 @@
   else
     windows_arch=i586
   fi
+
+  repo=`hg root | sed -e 's@\\\\@/@g'`
   # We need to check if we are running a CYGWIN shell
-  if [ "$(uname -a | fgrep Cygwin)" != "" -a -f /bin/cygpath ] ; then
+  if [ "$(echo ${osname} | fgrep Cygwin)" != "" -a -f /bin/cygpath ] ; then
     # For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
     # Utility to convert to short pathnames without spaces
     cygpath="/usr/bin/cygpath -a -m -s"
+    cygpathp="/usr/bin/cygpath -p"
     # Most unix utilities are in the /usr/bin
     unixcommand_path="/usr/bin"
     # Make the prompt tell you CYGWIN
     export PS1="CYGWIN:${COMPUTERNAME}:${USERNAME}[\!] "
+  elif [ "$(echo ${osname} | fgrep MINGW)" != "" ] ; then
+    # Utility to convert to short pathnames without spaces
+    cygpath="${repo}/make/tools/msys_build_scripts/dospath.sh"
+    if [ ! -f ${cygpath} ] ; then
+        echo "ERROR: Cannot find cygpath or equivalent on this machine"
+        exit 1
+    fi
+    # Utility to fix a path to MinGW/MSYS format - the equivalent of 'cygpath -p'
+    for tfile in "${repo}/make/scripts/fixpath.pl" "${repo}/../make/scripts/fixpath.pl"; do
+        if [ -f ${tfile} ] ; then
+            cygpathp="/bin/perl ${tfile} -m"
+        fi
+    done;
+    if [ -z "${cygpathp}" ] ; then
+        echo "ERROR: Cannot find make/scripts/fixpath.pl on this machine"
+        exit 1
+    fi
+    unixcommand_path="/usr/bin"
   else
-    echo "ERROR: Cannot find CYGWIN on this machine"
+    echo "ERROR: Cannot find CYGWIN or MinGW/MSYS on this machine"
     exit 1
   fi
   if [ "${ALT_UNIXCOMMAND_PATH}" != "" ] ; then
@@ -204,17 +225,18 @@
   else
     sys_root=$(${cygpath} "C:/WINNT")
   fi
-  path4sdk="${unixcommand_path};${sys_root}/system32;${sys_root};${sys_root}/System32/Wbem"
   if [ ! -d "${sys_root}" ] ; then
     echo "WARNING: No system root found at: ${sys_root}"
   fi
 
+  # Build a : separated path making sure each segment is acceptable to ${osname}
+  path4sdk="${unixcommand_path}:"`${cygpathp} "${sys_root}/system32;${sys_root};${sys_root}/System32/Wbem"`
+
   # Compiler setup (nasty part)
   #   NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
   #   NOTE: CYGWIN has a link.exe too, make sure the compilers are first
 
   # Use supplied vsvars.sh
-  repo=`hg root`
   if [ -f "${repo}/make/scripts/vsvars.sh" ] ; then
     eval `sh ${repo}/make/scripts/vsvars.sh -v10`
   elif [ -f "${repo}/../make/scripts/vsvars.sh" ] ; then
--- a/make/sun/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/sun/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -63,12 +63,6 @@
   LWAWT_SUBDIR = lwawt
 endif
 
-ifndef OPENJDK
-ifneq ($(PLATFORM), macosx)
-  JDBC_SUBDIR = jdbc
-endif
-endif
-
 ifdef OPENJDK
   RENDER_SUBDIR = pisces
 else
@@ -89,7 +83,7 @@
                      $(LWAWT_PRE_SUBDIR) $(DISPLAY_LIBS) $(DGA_SUBDIR) $(LWAWT_SUBDIR) \
                      jawt font jpeg cmm $(DISPLAY_TOOLS)
 SUBDIRS_management = management
-SUBDIRS_misc       = $(ORG_SUBDIR) rmi $(JDBC_SUBDIR) tracing
+SUBDIRS_misc       = $(ORG_SUBDIR) rmi tracing
 SUBDIRS_tools      = native2ascii serialver tools jconsole
 
 ifndef OPENJDK
--- a/make/sun/jdbc/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-#
-# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Makefile for JDBC-ODBC Bridge Driver 
-#
-# Note - the native library for the bridge may be linked with the 
-# shared library for the ODBC driver manager.  Or dummy libraries
-# may be used to just create libJdbcOdbc.so with a dependency on
-# libodbc.so and libodbcinst.so.
-#
-
-BUILDDIR = ../..
-PACKAGE = sun.jdbc.odbc
-LIBRARY = JdbcOdbc
-PRODUCT = sun
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Files
-#
-
-AUTO_FILES_JAVA_DIRS = sun/jdbc/odbc
-
-FILES_c = \
-	JdbcOdbc.c
-
-FILES_export = \
-    sun/jdbc/odbc/JdbcOdbc.java 
-
-# Use fake libraries on Solaris and Linux just so the library we create has
-#   a dependency on these two library names. (which are not part of the jdk)
-ifneq ($(PLATFORM), windows)
-  # In jdk5 and jdk6, and on Solaris 32bit, we would have required that
-  #    these two libraries exist at: $(ALT_ODBCDIR)/ISLIodbc/2.11/lib
-  #    In jdk7, we just fake them out like we did on Linux in jdk5 and jdk6.
-  #
-  # If you wanted to use the real odbc libraries, change the value of
-  #    ODBC_LIBRARY_LOCATION, and delete the variable assignments below.
-  #
-  # Tell linker to ignore missing externals when building this shared library.
-  LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker nodefs
-  # Define a place to create the fake libraries and their names.
-  ODBC_LIBRARY_LOCATION = $(TEMPDIR)
-  ODBC_FAKE_LIBRARIES = $(ODBC_LIBRARY_LOCATION)/libodbcinst.so $(ODBC_LIBRARY_LOCATION)/libodbc.so
-  # Make sure they get created early.
-  INIT += $(ODBC_FAKE_LIBRARIES)
-endif
-
-#
-# Rules
-#
-include $(BUILDDIR)/common/Library.gmk
-
-#
-# The UNIX define specifies conditional compilation for UNIX
-#
-ifeq ($(PLATFORM), windows)
-  LDLIBS += odbc32.lib odbccp32.lib
-else
-  CFLAGS += -DUNIX
-  LDFLAGS += -L$(ODBC_LIBRARY_LOCATION) -lodbcinst -lodbc
-endif
-
-#
-# The native code for the bridge uses conditional compilation to 
-# support Solaris, Win95 and Mac PPC. This is the path to the shared C files
-# (which unfortunately are in the same directory as shared Java files).
-#
-vpath %.c $(CLOSED_SHARE_SRC)/classes/sun/jdbc/odbc
-
-#
-# Rules to generate fake libraries
-#
-
-ifdef ODBC_FAKE_LIBRARIES
-$(TEMPDIR)/dummyodbc.c: 
-	@$(prep-target)
-	$(ECHO) "void dummyOdbc(void){}" >> $@
-$(TEMPDIR)/dummyodbc.o: $(TEMPDIR)/dummyodbc.c
-	@$(prep-target)
-	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
-$(ODBC_FAKE_LIBRARIES): $(TEMPDIR)/dummyodbc.o
-	@$(prep-target)
-	$(CC) $(SHARED_LIBRARY_FLAG) $(LDFLAGS_COMMON) -o $@ $< $(EXTRA_LIBS)
-clean::
-	$(RM) -f $(ODBC_FAKE_LIBRARIES)
-	$(RM) -f $(TEMPDIR)/dummyodbc.c
-	$(RM) -f $(TEMPDIR)/dummyodbc.o
-endif
-
-#
-# Files that need to be copied
-#
-SERVICEDIR = $(CLASSBINDIR)/META-INF/services
-
-FILES_copy = \
-	$(SERVICEDIR)/java.sql.Driver
-
-
-FILES_mkdirs = \
-	$(CLASSBINDIR)/META-INF \
-	$(CLASSBINDIR)/META-INF/services
-
-FILES_copydirs = \
-	$(CLASSBINDIR) \
-	$(FILES_mkdirs)
-
-build: copy-files
-
-copy-files: $(FILES_copy)
-
-$(SERVICEDIR)/%: $(CLOSED_SHARE_SRC)/classes/sun/jdbc/odbc/META-INF/services/%
-	$(install-file)
-
-clean clobber::
-	$(RM) $(FILES_copy)
-
-.PHONY: copy-files
-
--- a/make/sun/net/FILES_java.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/sun/net/FILES_java.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -128,8 +128,6 @@
 	sun/net/www/content/audio/x_wav.java \
 	sun/net/www/protocol/ftp/Handler.java \
 	sun/net/www/protocol/ftp/FtpURLConnection.java \
-	sun/net/www/protocol/gopher/GopherClient.java \
-	sun/net/www/protocol/gopher/Handler.java \
 	sun/net/www/protocol/mailto/Handler.java \
 	sun/net/www/protocol/mailto/MailToURLConnection.java \
 	sun/net/idn/Punycode.java \
--- a/make/sun/security/ec/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/sun/security/ec/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -246,9 +246,9 @@
 #
 # Build sunec.jar.
 #
-$(UNSIGNED_DIR)/sunec.jar: build
+$(UNSIGNED_DIR)/sunec.jar: build $(JCE_MANIFEST_FILE)
 	$(prep-target)
-	$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
+	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
 	    $(BOOT_JAR_JFLAGS)
 	@$(java-vm-cleanup)
 
--- a/make/sun/security/mscapi/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/sun/security/mscapi/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -209,9 +209,9 @@
 #
 # Build sunmscapi.jar.
 #
-$(UNSIGNED_DIR)/sunmscapi.jar: build
+$(UNSIGNED_DIR)/sunmscapi.jar: build $(JCE_MANIFEST_FILE)
 	$(prep-target)
-	$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
+	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
 	    $(BOOT_JAR_JFLAGS)
 	@$(java-vm-cleanup)
 
--- a/make/sun/security/pkcs11/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/sun/security/pkcs11/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -225,9 +225,9 @@
 #
 # Build sunpkcs11.jar.
 #
-$(UNSIGNED_DIR)/sunpkcs11.jar: build
+$(UNSIGNED_DIR)/sunpkcs11.jar: build $(JCE_MANIFEST_FILE)
 	$(prep-target)
-	$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
+	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
 	    $(BOOT_JAR_JFLAGS)
 	@$(java-vm-cleanup)
 
--- a/make/sun/text/FILES_java.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/sun/text/FILES_java.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -24,10 +24,10 @@
 #
 
 # Locale data files for lib/ext/localedata.jar.
-# This includes resource bundles and data for non-European
+# This includes resource bundles and data for non-US
 # languages in sun.text.resources as well as sun.util.resources.
 #
-# Locale data for European languages is built from
+# Locale data for US languages is built from
 # - make/java/text for classes in sun.text.resources
 # - make/java/util for classes in sun.util.resources
 #
@@ -36,11 +36,39 @@
 		sun/text/resources/th/BreakIteratorInfo_th.java \
 		\
 		sun/text/resources/ar/CollationData_ar.java \
+                sun/text/resources/be/CollationData_be.java \
+                sun/text/resources/bg/CollationData_bg.java \
+                sun/text/resources/ca/CollationData_ca.java \
+                sun/text/resources/cs/CollationData_cs.java \
+                sun/text/resources/da/CollationData_da.java \
+                sun/text/resources/el/CollationData_el.java \
+                sun/text/resources/es/CollationData_es.java \
+                sun/text/resources/et/CollationData_et.java \
+                sun/text/resources/fi/CollationData_fi.java \
+                sun/text/resources/fr/CollationData_fr.java \
 		sun/text/resources/hi/CollationData_hi.java \
+                sun/text/resources/hr/CollationData_hr.java \
+                sun/text/resources/hu/CollationData_hu.java \
+                sun/text/resources/is/CollationData_is.java \
 		sun/text/resources/iw/CollationData_iw.java \
 		sun/text/resources/ja/CollationData_ja.java \
 		sun/text/resources/ko/CollationData_ko.java \
+                sun/text/resources/lt/CollationData_lt.java \
+                sun/text/resources/lv/CollationData_lv.java \
+                sun/text/resources/mk/CollationData_mk.java \
+                sun/text/resources/no/CollationData_no.java \
+                sun/text/resources/pl/CollationData_pl.java \
+                sun/text/resources/ro/CollationData_ro.java \
+                sun/text/resources/ru/CollationData_ru.java \
+                sun/text/resources/sk/CollationData_sk.java \
+                sun/text/resources/sl/CollationData_sl.java \
+                sun/text/resources/sq/CollationData_sq.java \
+                sun/text/resources/sr/CollationData_sr.java \
+                sun/text/resources/sr/CollationData_sr_Latn.java \
+                sun/text/resources/sv/CollationData_sv.java \
 		sun/text/resources/th/CollationData_th.java \
+                sun/text/resources/tr/CollationData_tr.java \
+                sun/text/resources/uk/CollationData_uk.java \
 		sun/text/resources/vi/CollationData_vi.java \
 		sun/text/resources/zh/CollationData_zh.java \
 		sun/text/resources/zh/CollationData_zh_HK.java \
@@ -50,15 +78,130 @@
 		sun/text/resources/ar/FormatData_ar_JO.java \
 		sun/text/resources/ar/FormatData_ar_LB.java \
 		sun/text/resources/ar/FormatData_ar_SY.java \
+                sun/text/resources/be/FormatData_be.java \
+                sun/text/resources/be/FormatData_be_BY.java \
+                sun/text/resources/bg/FormatData_bg.java \
+                sun/text/resources/bg/FormatData_bg_BG.java \
+                sun/text/resources/ca/FormatData_ca.java \
+                sun/text/resources/ca/FormatData_ca_ES.java \
+                sun/text/resources/cs/FormatData_cs.java \
+                sun/text/resources/cs/FormatData_cs_CZ.java \
+                sun/text/resources/da/FormatData_da.java \
+                sun/text/resources/da/FormatData_da_DK.java \
+                sun/text/resources/de/FormatData_de.java \
+                sun/text/resources/de/FormatData_de_AT.java \
+                sun/text/resources/de/FormatData_de_CH.java \
+                sun/text/resources/de/FormatData_de_DE.java \
+                sun/text/resources/de/FormatData_de_LU.java \
+                sun/text/resources/el/FormatData_el.java \
+                sun/text/resources/el/FormatData_el_CY.java \
+                sun/text/resources/el/FormatData_el_GR.java \
+                sun/text/resources/en/FormatData_en_AU.java \
+                sun/text/resources/en/FormatData_en_CA.java \
+                sun/text/resources/en/FormatData_en_GB.java \
+                sun/text/resources/en/FormatData_en_IE.java \
+                sun/text/resources/en/FormatData_en_IN.java \
+                sun/text/resources/en/FormatData_en_MT.java \
+                sun/text/resources/en/FormatData_en_NZ.java \
+                sun/text/resources/en/FormatData_en_PH.java \
+                sun/text/resources/en/FormatData_en_SG.java \
+                sun/text/resources/en/FormatData_en_ZA.java \
+                sun/text/resources/es/FormatData_es.java \
+                sun/text/resources/es/FormatData_es_BO.java \
+                sun/text/resources/es/FormatData_es_AR.java \
+                sun/text/resources/es/FormatData_es_CL.java \
+                sun/text/resources/es/FormatData_es_CO.java \
+                sun/text/resources/es/FormatData_es_CR.java \
+                sun/text/resources/es/FormatData_es_DO.java \
+                sun/text/resources/es/FormatData_es_EC.java \
+                sun/text/resources/es/FormatData_es_ES.java \
+                sun/text/resources/es/FormatData_es_GT.java \
+                sun/text/resources/es/FormatData_es_HN.java \
+                sun/text/resources/es/FormatData_es_MX.java \
+                sun/text/resources/es/FormatData_es_NI.java \
+                sun/text/resources/es/FormatData_es_PA.java \
+                sun/text/resources/es/FormatData_es_PE.java \
+                sun/text/resources/es/FormatData_es_PR.java \
+                sun/text/resources/es/FormatData_es_PY.java \
+                sun/text/resources/es/FormatData_es_SV.java \
+                sun/text/resources/es/FormatData_es_US.java \
+                sun/text/resources/es/FormatData_es_UY.java \
+                sun/text/resources/es/FormatData_es_VE.java \
+                sun/text/resources/et/FormatData_et.java \
+                sun/text/resources/et/FormatData_et_EE.java \
+                sun/text/resources/fi/FormatData_fi.java \
+                sun/text/resources/fi/FormatData_fi_FI.java \
+                sun/text/resources/fr/FormatData_fr.java \
+                sun/text/resources/fr/FormatData_fr_BE.java \
+                sun/text/resources/fr/FormatData_fr_CA.java \
+                sun/text/resources/fr/FormatData_fr_CH.java \
+                sun/text/resources/fr/FormatData_fr_FR.java \
+                sun/text/resources/ga/FormatData_ga.java \
+                sun/text/resources/ga/FormatData_ga_IE.java \
                 sun/text/resources/hi/FormatData_hi_IN.java \
+                sun/text/resources/hr/FormatData_hr.java \
+                sun/text/resources/hr/FormatData_hr_HR.java \
+                sun/text/resources/hu/FormatData_hu.java \
+                sun/text/resources/hu/FormatData_hu_HU.java \
+                sun/text/resources/in/FormatData_in.java \
+                sun/text/resources/in/FormatData_in_ID.java \
+                sun/text/resources/is/FormatData_is.java \
+                sun/text/resources/is/FormatData_is_IS.java \
+                sun/text/resources/it/FormatData_it.java \
+                sun/text/resources/it/FormatData_it_CH.java \
+                sun/text/resources/it/FormatData_it_IT.java \
 		sun/text/resources/iw/FormatData_iw.java \
 		sun/text/resources/iw/FormatData_iw_IL.java \
 		sun/text/resources/ja/FormatData_ja.java \
 		sun/text/resources/ja/FormatData_ja_JP.java \
 		sun/text/resources/ko/FormatData_ko.java \
 		sun/text/resources/ko/FormatData_ko_KR.java \
+                sun/text/resources/lt/FormatData_lt.java \
+                sun/text/resources/lt/FormatData_lt_LT.java \
+                sun/text/resources/lv/FormatData_lv.java \
+                sun/text/resources/lv/FormatData_lv_LV.java \
+                sun/text/resources/mk/FormatData_mk.java \
+                sun/text/resources/mk/FormatData_mk_MK.java \
+                sun/text/resources/ms/FormatData_ms.java \
+                sun/text/resources/ms/FormatData_ms_MY.java \
+                sun/text/resources/mt/FormatData_mt.java \
+                sun/text/resources/mt/FormatData_mt_MT.java \
+                sun/text/resources/nl/FormatData_nl.java \
+                sun/text/resources/nl/FormatData_nl_BE.java \
+                sun/text/resources/nl/FormatData_nl_NL.java \
+                sun/text/resources/no/FormatData_no.java \
+                sun/text/resources/no/FormatData_no_NO.java \
+                sun/text/resources/no/FormatData_no_NO_NY.java \
+                sun/text/resources/pl/FormatData_pl.java \
+                sun/text/resources/pl/FormatData_pl_PL.java \
+                sun/text/resources/pt/FormatData_pt.java \
+                sun/text/resources/pt/FormatData_pt_BR.java \
+                sun/text/resources/pt/FormatData_pt_PT.java \
+                sun/text/resources/ro/FormatData_ro.java \
+                sun/text/resources/ro/FormatData_ro_RO.java \
+                sun/text/resources/ru/FormatData_ru.java \
+                sun/text/resources/ru/FormatData_ru_RU.java \
+                sun/text/resources/sk/FormatData_sk.java \
+                sun/text/resources/sk/FormatData_sk_SK.java \
+                sun/text/resources/sl/FormatData_sl.java \
+                sun/text/resources/sl/FormatData_sl_SI.java \
+                sun/text/resources/sq/FormatData_sq.java \
+                sun/text/resources/sq/FormatData_sq_AL.java \
+                sun/text/resources/sr/FormatData_sr.java \
+                sun/text/resources/sr/FormatData_sr_BA.java \
+                sun/text/resources/sr/FormatData_sr_CS.java \
+                sun/text/resources/sr/FormatData_sr_ME.java \
+                sun/text/resources/sr/FormatData_sr_RS.java \
+                sun/text/resources/sr/FormatData_sr_Latn.java \
+                sun/text/resources/sr/FormatData_sr_Latn_ME.java \
+                sun/text/resources/sv/FormatData_sv.java \
+                sun/text/resources/sv/FormatData_sv_SE.java \
 		sun/text/resources/th/FormatData_th.java \
 		sun/text/resources/th/FormatData_th_TH.java \
+                sun/text/resources/tr/FormatData_tr.java \
+                sun/text/resources/tr/FormatData_tr_TR.java \
+                sun/text/resources/uk/FormatData_uk.java \
+                sun/text/resources/uk/FormatData_uk_UA.java \
 		sun/text/resources/vi/FormatData_vi.java \
 		sun/text/resources/vi/FormatData_vi_VN.java \
 		sun/text/resources/zh/FormatData_zh.java \
@@ -70,9 +213,18 @@
                 sun/util/resources/zh/CurrencyNames_zh_HK.java \
                 sun/util/resources/zh/CurrencyNames_zh_SG.java \
                 sun/util/resources/zh/LocaleNames_zh_HK.java \
+                sun/util/resources/de/TimeZoneNames_de.java \
+                sun/util/resources/en/TimeZoneNames_en_CA.java \
+                sun/util/resources/en/TimeZoneNames_en_GB.java \
+                sun/util/resources/en/TimeZoneNames_en_IE.java \
+                sun/util/resources/es/TimeZoneNames_es.java \
+                sun/util/resources/fr/TimeZoneNames_fr.java \
                 sun/util/resources/hi/TimeZoneNames_hi.java \
+                sun/util/resources/it/TimeZoneNames_it.java \
 		sun/util/resources/ja/TimeZoneNames_ja.java \
 		sun/util/resources/ko/TimeZoneNames_ko.java \
+                sun/util/resources/pt/TimeZoneNames_pt_BR.java \
+                sun/util/resources/sv/TimeZoneNames_sv.java \
 		sun/util/resources/zh/TimeZoneNames_zh_CN.java \
 		sun/util/resources/zh/TimeZoneNames_zh_TW.java \
 		sun/util/resources/zh/TimeZoneNames_zh_HK.java
--- a/make/sun/text/FILES_properties.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/sun/text/FILES_properties.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -25,22 +25,112 @@
 
 FILES_compiled_properties = \
         sun/util/resources/ar/LocaleNames_ar.properties \
+        sun/util/resources/be/LocaleNames_be.properties \
+        sun/util/resources/bg/LocaleNames_bg.properties \
+        sun/util/resources/ca/LocaleNames_ca.properties \
+        sun/util/resources/cs/LocaleNames_cs.properties \
+        sun/util/resources/da/LocaleNames_da.properties \
+        sun/util/resources/de/LocaleNames_de.properties \
+        sun/util/resources/el/LocaleNames_el.properties \
+        sun/util/resources/el/LocaleNames_el_CY.properties \
+        sun/util/resources/en/LocaleNames_en_MT.properties \
+        sun/util/resources/en/LocaleNames_en_PH.properties \
+        sun/util/resources/en/LocaleNames_en_SG.properties \
+        sun/util/resources/es/LocaleNames_es.properties \
+        sun/util/resources/es/LocaleNames_es_US.properties \
+        sun/util/resources/et/LocaleNames_et.properties \
+        sun/util/resources/fi/LocaleNames_fi.properties \
+        sun/util/resources/fr/LocaleNames_fr.properties \
+        sun/util/resources/ga/LocaleNames_ga.properties \
         sun/util/resources/hi/LocaleNames_hi.properties \
+        sun/util/resources/hr/LocaleNames_hr.properties \
+        sun/util/resources/hu/LocaleNames_hu.properties \
+        sun/util/resources/in/LocaleNames_in.properties \
+        sun/util/resources/is/LocaleNames_is.properties \
+        sun/util/resources/it/LocaleNames_it.properties \
         sun/util/resources/iw/LocaleNames_iw.properties \
         sun/util/resources/ja/LocaleNames_ja.properties \
         sun/util/resources/ko/LocaleNames_ko.properties \
+        sun/util/resources/lt/LocaleNames_lt.properties \
+        sun/util/resources/lv/LocaleNames_lv.properties \
+        sun/util/resources/mk/LocaleNames_mk.properties \
+        sun/util/resources/ms/LocaleNames_ms.properties \
+        sun/util/resources/mt/LocaleNames_mt.properties \
+        sun/util/resources/nl/LocaleNames_nl.properties \
+        sun/util/resources/no/LocaleNames_no.properties \
+        sun/util/resources/no/LocaleNames_no_NO_NY.properties \
+        sun/util/resources/pl/LocaleNames_pl.properties \
+        sun/util/resources/pt/LocaleNames_pt.properties \
+        sun/util/resources/pt/LocaleNames_pt_BR.properties \
+        sun/util/resources/pt/LocaleNames_pt_PT.properties \
+        sun/util/resources/ro/LocaleNames_ro.properties \
+        sun/util/resources/ru/LocaleNames_ru.properties \
+        sun/util/resources/sk/LocaleNames_sk.properties \
+        sun/util/resources/sl/LocaleNames_sl.properties \
+        sun/util/resources/sq/LocaleNames_sq.properties \
+        sun/util/resources/sr/LocaleNames_sr.properties \
+        sun/util/resources/sr/LocaleNames_sr_Latn.properties \
+        sun/util/resources/sv/LocaleNames_sv.properties \
         sun/util/resources/th/LocaleNames_th.properties \
+        sun/util/resources/tr/LocaleNames_tr.properties \
+        sun/util/resources/uk/LocaleNames_uk.properties \
         sun/util/resources/vi/LocaleNames_vi.properties \
         sun/util/resources/zh/LocaleNames_zh.properties \
         sun/util/resources/zh/LocaleNames_zh_SG.properties \
         sun/util/resources/zh/LocaleNames_zh_TW.properties \
 	\
         sun/util/resources/ar/CalendarData_ar.properties \
+        sun/util/resources/be/CalendarData_be.properties \
+        sun/util/resources/bg/CalendarData_bg.properties \
+        sun/util/resources/ca/CalendarData_ca.properties \
+        sun/util/resources/cs/CalendarData_cs.properties \
+        sun/util/resources/da/CalendarData_da.properties \
+        sun/util/resources/de/CalendarData_de.properties \
+        sun/util/resources/el/CalendarData_el.properties \
+        sun/util/resources/el/CalendarData_el_CY.properties \
+        sun/util/resources/en/CalendarData_en_GB.properties \
+        sun/util/resources/en/CalendarData_en_IE.properties \
+        sun/util/resources/en/CalendarData_en_MT.properties \
+        sun/util/resources/es/CalendarData_es.properties \
+        sun/util/resources/es/CalendarData_es_ES.properties \
+        sun/util/resources/es/CalendarData_es_US.properties \
+        sun/util/resources/et/CalendarData_et.properties \
+        sun/util/resources/fi/CalendarData_fi.properties \
+        sun/util/resources/fr/CalendarData_fr.properties \
+        sun/util/resources/fr/CalendarData_fr_CA.properties \
         sun/util/resources/hi/CalendarData_hi.properties \
+        sun/util/resources/hr/CalendarData_hr.properties \
+        sun/util/resources/hu/CalendarData_hu.properties \
+        sun/util/resources/in/CalendarData_in_ID.properties \
+        sun/util/resources/is/CalendarData_is.properties \
+        sun/util/resources/it/CalendarData_it.properties \
         sun/util/resources/iw/CalendarData_iw.properties \
         sun/util/resources/ja/CalendarData_ja.properties \
         sun/util/resources/ko/CalendarData_ko.properties \
+        sun/util/resources/lt/CalendarData_lt.properties \
+        sun/util/resources/lv/CalendarData_lv.properties \
+        sun/util/resources/mk/CalendarData_mk.properties \
+        sun/util/resources/ms/CalendarData_ms_MY.properties \
+        sun/util/resources/mt/CalendarData_mt.properties \
+        sun/util/resources/mt/CalendarData_mt_MT.properties \
+        sun/util/resources/nl/CalendarData_nl.properties \
+        sun/util/resources/no/CalendarData_no.properties \
+        sun/util/resources/pl/CalendarData_pl.properties \
+        sun/util/resources/pt/CalendarData_pt.properties \
+        sun/util/resources/pt/CalendarData_pt_PT.properties \
+        sun/util/resources/ro/CalendarData_ro.properties \
+        sun/util/resources/ru/CalendarData_ru.properties \
+        sun/util/resources/sk/CalendarData_sk.properties \
+        sun/util/resources/sl/CalendarData_sl.properties \
+        sun/util/resources/sq/CalendarData_sq.properties \
+        sun/util/resources/sr/CalendarData_sr.properties \
+        sun/util/resources/sr/CalendarData_sr_Latn_BA.properties \
+        sun/util/resources/sr/CalendarData_sr_Latn_ME.properties \
+        sun/util/resources/sr/CalendarData_sr_Latn_RS.properties \
+        sun/util/resources/sv/CalendarData_sv.properties \
         sun/util/resources/th/CalendarData_th.properties \
+        sun/util/resources/tr/CalendarData_tr.properties \
+        sun/util/resources/uk/CalendarData_uk.properties \
         sun/util/resources/vi/CalendarData_vi.properties \
         sun/util/resources/zh/CalendarData_zh.properties \
 	\
@@ -61,13 +151,102 @@
         sun/util/resources/ar/CurrencyNames_ar_SY.properties \
         sun/util/resources/ar/CurrencyNames_ar_TN.properties \
         sun/util/resources/ar/CurrencyNames_ar_YE.properties \
+        sun/util/resources/be/CurrencyNames_be_BY.properties \
+        sun/util/resources/bg/CurrencyNames_bg_BG.properties \
+        sun/util/resources/ca/CurrencyNames_ca_ES.properties \
+        sun/util/resources/cs/CurrencyNames_cs_CZ.properties \
+        sun/util/resources/da/CurrencyNames_da_DK.properties \
+        sun/util/resources/de/CurrencyNames_de.properties \
+        sun/util/resources/de/CurrencyNames_de_AT.properties \
+        sun/util/resources/de/CurrencyNames_de_CH.properties \
+        sun/util/resources/de/CurrencyNames_de_DE.properties \
+        sun/util/resources/de/CurrencyNames_de_GR.properties \
+        sun/util/resources/de/CurrencyNames_de_LU.properties \
+        sun/util/resources/el/CurrencyNames_el_CY.properties \
+        sun/util/resources/el/CurrencyNames_el_GR.properties \
+        sun/util/resources/en/CurrencyNames_en_AU.properties \
+        sun/util/resources/en/CurrencyNames_en_CA.properties \
+        sun/util/resources/en/CurrencyNames_en_GB.properties \
+        sun/util/resources/en/CurrencyNames_en_IE.properties \
+        sun/util/resources/en/CurrencyNames_en_IN.properties \
+        sun/util/resources/en/CurrencyNames_en_MT.properties \
+        sun/util/resources/en/CurrencyNames_en_NZ.properties \
+        sun/util/resources/en/CurrencyNames_en_PH.properties \
+        sun/util/resources/en/CurrencyNames_en_SG.properties \
+        sun/util/resources/en/CurrencyNames_en_ZA.properties \
+        sun/util/resources/es/CurrencyNames_es.properties \
+        sun/util/resources/es/CurrencyNames_es_AR.properties \
+        sun/util/resources/es/CurrencyNames_es_BO.properties \
+        sun/util/resources/es/CurrencyNames_es_CL.properties \
+        sun/util/resources/es/CurrencyNames_es_CO.properties \
+        sun/util/resources/es/CurrencyNames_es_CR.properties \
+        sun/util/resources/es/CurrencyNames_es_CU.properties \
+        sun/util/resources/es/CurrencyNames_es_DO.properties \
+        sun/util/resources/es/CurrencyNames_es_EC.properties \
+        sun/util/resources/es/CurrencyNames_es_ES.properties \
+        sun/util/resources/es/CurrencyNames_es_GT.properties \
+        sun/util/resources/es/CurrencyNames_es_HN.properties \
+        sun/util/resources/es/CurrencyNames_es_MX.properties \
+        sun/util/resources/es/CurrencyNames_es_NI.properties \
+        sun/util/resources/es/CurrencyNames_es_PA.properties \
+        sun/util/resources/es/CurrencyNames_es_PE.properties \
+        sun/util/resources/es/CurrencyNames_es_PR.properties \
+        sun/util/resources/es/CurrencyNames_es_PY.properties \
+        sun/util/resources/es/CurrencyNames_es_SV.properties \
+        sun/util/resources/es/CurrencyNames_es_US.properties \
+        sun/util/resources/es/CurrencyNames_es_UY.properties \
+        sun/util/resources/es/CurrencyNames_es_VE.properties \
+        sun/util/resources/et/CurrencyNames_et_EE.properties \
+        sun/util/resources/fi/CurrencyNames_fi_FI.properties \
+        sun/util/resources/fr/CurrencyNames_fr.properties \
+        sun/util/resources/fr/CurrencyNames_fr_BE.properties \
+        sun/util/resources/fr/CurrencyNames_fr_CA.properties \
+        sun/util/resources/fr/CurrencyNames_fr_CH.properties \
+        sun/util/resources/fr/CurrencyNames_fr_FR.properties \
+        sun/util/resources/fr/CurrencyNames_fr_LU.properties \
+        sun/util/resources/ga/CurrencyNames_ga_IE.properties \
         sun/util/resources/hi/CurrencyNames_hi_IN.properties \
+        sun/util/resources/hr/CurrencyNames_hr_HR.properties \
+        sun/util/resources/hu/CurrencyNames_hu_HU.properties \
+        sun/util/resources/in/CurrencyNames_in_ID.properties \
+        sun/util/resources/is/CurrencyNames_is_IS.properties \
+        sun/util/resources/it/CurrencyNames_it.properties \
+        sun/util/resources/it/CurrencyNames_it_CH.properties \
+        sun/util/resources/it/CurrencyNames_it_IT.properties \
         sun/util/resources/iw/CurrencyNames_iw_IL.properties \
         sun/util/resources/ja/CurrencyNames_ja.properties \
         sun/util/resources/ja/CurrencyNames_ja_JP.properties \
         sun/util/resources/ko/CurrencyNames_ko.properties \
         sun/util/resources/ko/CurrencyNames_ko_KR.properties \
+        sun/util/resources/lt/CurrencyNames_lt_LT.properties \
+        sun/util/resources/lv/CurrencyNames_lv_LV.properties \
+        sun/util/resources/mk/CurrencyNames_mk_MK.properties \
+        sun/util/resources/ms/CurrencyNames_ms_MY.properties \
+        sun/util/resources/mt/CurrencyNames_mt_MT.properties \
+        sun/util/resources/nl/CurrencyNames_nl_BE.properties \
+        sun/util/resources/nl/CurrencyNames_nl_NL.properties \
+        sun/util/resources/no/CurrencyNames_no_NO.properties \
+        sun/util/resources/pl/CurrencyNames_pl_PL.properties \
+        sun/util/resources/pt/CurrencyNames_pt.properties \
+        sun/util/resources/pt/CurrencyNames_pt_BR.properties \
+        sun/util/resources/pt/CurrencyNames_pt_PT.properties \
+        sun/util/resources/ro/CurrencyNames_ro_RO.properties \
+        sun/util/resources/ru/CurrencyNames_ru_RU.properties \
+        sun/util/resources/sk/CurrencyNames_sk_SK.properties \
+        sun/util/resources/sl/CurrencyNames_sl_SI.properties \
+        sun/util/resources/sq/CurrencyNames_sq_AL.properties \
+        sun/util/resources/sr/CurrencyNames_sr_BA.properties \
+        sun/util/resources/sr/CurrencyNames_sr_CS.properties \
+        sun/util/resources/sr/CurrencyNames_sr_ME.properties \
+        sun/util/resources/sr/CurrencyNames_sr_RS.properties \
+        sun/util/resources/sr/CurrencyNames_sr_Latn_BA.properties \
+        sun/util/resources/sr/CurrencyNames_sr_Latn_ME.properties \
+        sun/util/resources/sr/CurrencyNames_sr_Latn_RS.properties \
+        sun/util/resources/sv/CurrencyNames_sv.properties \
+        sun/util/resources/sv/CurrencyNames_sv_SE.properties \
         sun/util/resources/th/CurrencyNames_th_TH.properties \
+        sun/util/resources/tr/CurrencyNames_tr_TR.properties \
+        sun/util/resources/uk/CurrencyNames_uk_UA.properties \
         sun/util/resources/vi/CurrencyNames_vi_VN.properties \
         sun/util/resources/zh/CurrencyNames_zh_CN.properties \
         sun/util/resources/zh/CurrencyNames_zh_TW.properties
--- a/make/tools/freetypecheck/Makefile	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/tools/freetypecheck/Makefile	Mon Nov 05 10:33:18 2012 -0500
@@ -37,11 +37,11 @@
 
 # Start with CFLAGS (which gets us the required -xarch setting on solaris)
 ifeq ($(PLATFORM), windows)
-  FT_OPTIONS  = /nologo /c
+  FT_OPTIONS  = -nologo -c
   FREETYPE_DLL = $(FREETYPE_LIB_PATH)/freetype.dll
   FT_LD_OPTIONS  = $(FREETYPE_LIB_PATH)/freetype.lib
   ifdef MT
-    FT_LD_OPTIONS += /manifest
+    FT_LD_OPTIONS += -manifest
   endif
 else
   FT_OPTIONS  = $(CFLAGS)
@@ -72,11 +72,11 @@
 	$(prep-target)
 ifeq ($(PLATFORM), windows)
 	$(CC) $(FT_OPTIONS) $(CC_OBJECT_OUTPUT_FLAG)$(FT_OBJ) $<
-	$(LINK) $(FT_LD_OPTIONS) /OUT:$(FT_TEST) $(FT_OBJ)
+	$(LINK) $(FT_LD_OPTIONS) -OUT:$(FT_TEST) $(FT_OBJ)
 	$(CP) $(FREETYPE_DLL) $(@D)/
   ifdef MT
 	$(CP) $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL) $(@D)/
-	$(MT) /manifest $(FT_TEST).manifest /outputresource:$(FT_TEST);#1
+	$(MT) -manifest $(FT_TEST).manifest -outputresource:$(FT_TEST);#1
   endif
 else
 	@$(CC) $(FT_OPTIONS) -o $@ $< $(FT_LD_OPTIONS)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/msys_build_scripts/dospath.sh	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2012, 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.
+#
+
+# A shell script which converts its first argument, which must be an existing 
+# path name, into a DOS (aka 8.3) path name. If the path is a file, only the 
+# directory part of the whole path will be converted.
+# This shell script executes the Visual Basic helper script 'dospath.vbs'
+# which must be located in the same directory as this script itself.
+# The Visual Basic script will be invoked trough the "Windows Script Host"
+# which is available by default on Windows since Windows 98.
+
+pushd `dirname "$0"` > /dev/null
+ABS_PATH=`pwd`
+popd > /dev/null
+if [ -d "$1" ]; then
+  echo `cd "$1" && cscript.exe -nologo $ABS_PATH/dospath.vbs`;
+elif [ -f "$1" ]; then
+  DIR=`dirname "$1"`;
+  echo `cd "$DIR" && cscript.exe -nologo $ABS_PATH/dospath.vbs`\\`basename "$1"`;
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/msys_build_scripts/dospath.vbs	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,34 @@
+'
+' Copyright (c) 2012, 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.
+'
+
+'
+' Visual Basic Script which returns the DOS (aka 8.3) filename of the current
+' directory.
+' Only called from 'dospath.sh' during a Windows build under MinGW/MSYS.
+'
+
+Set fso=CreateObject("Scripting.FileSystemObject")
+Set path = fso.GetFolder(".")
+WScript.Echo path.ShortPath
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/AbstractGradient.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+class AbstractGradient extends Paint {
+    public static enum CycleMethod {
+        NO_CYCLE, REFLECT, REPEAT
+    }
+
+    @XmlElement(name="stop") private ArrayList<GradientStop> stops;
+    public List<GradientStop> getStops() { return stops; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Border.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+class Border {
+    enum BorderType {
+        @XmlEnumValue("empty") EMPTY,
+        @XmlEnumValue("painter") PAINTER
+    }
+    @XmlAttribute private BorderType type;
+    @XmlAttribute private String painter;
+    @XmlAttribute private int top;
+    @XmlAttribute private int left;
+    @XmlAttribute private int bottom;
+    @XmlAttribute private int right;
+
+    public String write() {
+        switch (type) {
+            case PAINTER:
+                return String.format("new PainterBorder(\"%s\", new Insets(%d, %d, %d, %d))",
+                                     painter, top, left, bottom, right);
+            case EMPTY:
+                return String.format("BorderFactory.createEmptyBorder(%d, %d, %d, %d)",
+                                     top, left, bottom, right);
+            default:
+                return "### Look, here's an unknown border! $$$";
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Canvas.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+class Canvas {
+    @XmlElement private Dimension size;
+    public Dimension getSize() { return size; }
+
+    @XmlElement(name="layer") private List<Layer> layers;
+    public List<Layer> getLayers() { return layers; }
+
+    @XmlElement private Insets stretchingInsets = null;
+    public Insets getStretchingInsets() { return stretchingInsets; }
+
+    public boolean isBlank() {
+        return layers.size() == 0 || (layers.size() == 1 && layers.get(0).isEmpty());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/ComponentColor.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+class ComponentColor {
+    private String propertyName;
+    private String defaultColorVariableName;
+    private float saturationOffset = 0,  brightnessOffset = 0;
+    private int alphaOffset = 0;
+
+    ComponentColor(String propertyName,
+            String defaultColorVariableName,
+            float saturationOffset,
+            float brightnessOffset,
+            int alphaOffset) {
+        this.propertyName = propertyName;
+        this.defaultColorVariableName = defaultColorVariableName;
+        this.saturationOffset = saturationOffset;
+        this.brightnessOffset = brightnessOffset;
+        this.alphaOffset = alphaOffset;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        ComponentColor c = (ComponentColor) o;
+        if (alphaOffset != c.alphaOffset) {
+            return false;
+        }
+        if (Float.compare(saturationOffset, c.saturationOffset) != 0) {
+            return false;
+        }
+        if (Float.compare(brightnessOffset, c.brightnessOffset) != 0) {
+            return false;
+        }
+        if (defaultColorVariableName != null ? !defaultColorVariableName.equals(c.defaultColorVariableName) : c.defaultColorVariableName != null) {
+            return false;
+        }
+        if (propertyName != null ? !propertyName.equals(c.propertyName) : c.propertyName != null) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 5;
+        hash = 61 * hash + (this.propertyName != null ? this.propertyName.hashCode() : 0);
+        hash = 61 * hash + (this.defaultColorVariableName != null ? this.defaultColorVariableName.hashCode() : 0);
+        hash = 61 * hash + Float.floatToIntBits(this.saturationOffset);
+        hash = 61 * hash + Float.floatToIntBits(this.brightnessOffset);
+        hash = 61 * hash + this.alphaOffset;
+        return hash;
+    }
+
+    public void write(StringBuilder sb) {
+        sb.append("                     getComponentColor(c, \"").
+           append(propertyName).append("\", ").
+           append(defaultColorVariableName).append(", ").
+           append(saturationOffset).append("f, ").
+           append(brightnessOffset).append("f, ").
+           append(alphaOffset);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Dimension.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+class Dimension {
+    @XmlAttribute int width;
+    @XmlAttribute int height;
+
+    public String write(boolean uiResource) {
+        String uiSuffix = (uiResource ? "UIResource" : "");
+        return String.format("new Dimension%s(%d, %d)", uiSuffix, width, height);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Ellipse.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+class Ellipse extends Shape {
+    @XmlAttribute private double x1;
+    public double getX1() { return x1; }
+
+    @XmlAttribute private double x2;
+    public double getX2() { return x2; }
+
+    @XmlAttribute private double y1;
+    public double getY1() { return y1; }
+
+    @XmlAttribute private double y2;
+    public double getY2() { return y2; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Gradient.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+class Gradient extends AbstractGradient {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/GradientStop.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+class GradientStop {
+    @XmlAttribute private float position;
+    public float getPosition() { return position; }
+
+    @XmlAttribute private float midpoint;
+    public float getMidpoint() { return midpoint; }
+
+    @XmlElement private Matte matte;
+    public Matte getColor() { return matte; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Insets.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+class Insets {
+    @XmlAttribute int top;
+    @XmlAttribute int left;
+    @XmlAttribute int bottom;
+    @XmlAttribute int right;
+
+    public Insets() {
+        this(0, 0, 0, 0);
+    }
+
+    public Insets(int top, int left, int bottom, int right) {
+        this.top = top;
+        this.left = left;
+        this.bottom = bottom;
+        this.right = right;
+    }
+
+    public String write(boolean uiResource) {
+        String uiSuffix = (uiResource ? "UIResource" : "");
+        return String.format("new Insets%s(%d, %d, %d, %d)",
+                             uiSuffix, top, left, bottom, right);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Layer.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlElements;
+
+class Layer {
+    /** List of shapes in this layer, first shape is painted on top */
+    @XmlElements({
+        @XmlElement(name = "ellipse", type = Ellipse.class),
+        @XmlElement(name = "path", type = Path.class),
+        @XmlElement(name = "rectangle", type = Rectangle.class)
+    })
+    @XmlElementWrapper(name="shapes")
+    private List<Shape> shapes = new ArrayList<Shape>();
+    public List<Shape> getShapes() { return shapes; }
+
+    public boolean isEmpty() {
+        return shapes.isEmpty();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Matte.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+class Matte extends Paint {
+    @XmlAttribute private int red;
+    @XmlAttribute private int green;
+    @XmlAttribute private int blue;
+    @XmlAttribute private int alpha;
+
+    @XmlAttribute private String uiDefaultParentName = null;
+    @XmlAttribute private float hueOffset = 0;
+    @XmlAttribute private float saturationOffset = 0;
+    @XmlAttribute private float brightnessOffset = 0;
+    @XmlAttribute private int alphaOffset = 0;
+
+    @XmlAttribute private String componentPropertyName = null;
+    public String getComponentPropertyName() { return componentPropertyName; }
+
+    @XmlAttribute private boolean uiResource = true;
+
+    public boolean isAbsolute() {
+        return uiDefaultParentName == null;
+    }
+
+    public String getDeclaration() {
+        if (isAbsolute()) {
+            return String.format("new Color(%d, %d, %d, %d)",
+                                 red, green, blue, alpha);
+        } else {
+            return String.format("decodeColor(\"%s\", %sf, %sf, %sf, %d)",
+                    uiDefaultParentName, String.valueOf(hueOffset),
+                    String.valueOf(saturationOffset),
+                    String.valueOf(brightnessOffset), alphaOffset);
+        }
+    }
+
+    public String write() {
+        if (isAbsolute()) {
+            return String.format("%s, %s, %s, %s", red, green, blue, alpha);
+        } else {
+            String s = String.format("\"%s\", %sf, %sf, %sf, %d",
+                    uiDefaultParentName, String.valueOf(hueOffset),
+                    String.valueOf(saturationOffset),
+                    String.valueOf(brightnessOffset), alphaOffset);
+            if (! uiResource) {
+                s += ", false";
+            }
+            return s;
+        }
+    }
+
+    public ComponentColor createComponentColor(String variableName) {
+        return new ComponentColor(componentPropertyName, variableName,
+                saturationOffset, brightnessOffset, alphaOffset);
+    }
+}
--- a/make/tools/src/build/tools/generatenimbus/Paint.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/tools/src/build/tools/generatenimbus/Paint.java	Mon Nov 05 10:33:18 2012 -0500
@@ -25,157 +25,6 @@
 
 package build.tools.generatenimbus;
 
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
 
 public abstract class Paint {
 }
-
-class Matte extends Paint {
-    @XmlAttribute private int red;
-    @XmlAttribute private int green;
-    @XmlAttribute private int blue;
-    @XmlAttribute private int alpha;
-
-    @XmlAttribute private String uiDefaultParentName = null;
-    @XmlAttribute private float hueOffset = 0;
-    @XmlAttribute private float saturationOffset = 0;
-    @XmlAttribute private float brightnessOffset = 0;
-    @XmlAttribute private int alphaOffset = 0;
-
-    @XmlAttribute private String componentPropertyName = null;
-    public String getComponentPropertyName() { return componentPropertyName; }
-
-    @XmlAttribute private boolean uiResource = true;
-
-    public boolean isAbsolute() {
-        return uiDefaultParentName == null;
-    }
-
-    public String getDeclaration() {
-        if (isAbsolute()) {
-            return String.format("new Color(%d, %d, %d, %d)",
-                                 red, green, blue, alpha);
-        } else {
-            return String.format("decodeColor(\"%s\", %sf, %sf, %sf, %d)",
-                    uiDefaultParentName, String.valueOf(hueOffset),
-                    String.valueOf(saturationOffset),
-                    String.valueOf(brightnessOffset), alphaOffset);
-        }
-    }
-
-    public String write() {
-        if (isAbsolute()) {
-            return String.format("%s, %s, %s, %s", red, green, blue, alpha);
-        } else {
-            String s = String.format("\"%s\", %sf, %sf, %sf, %d",
-                    uiDefaultParentName, String.valueOf(hueOffset),
-                    String.valueOf(saturationOffset),
-                    String.valueOf(brightnessOffset), alphaOffset);
-            if (! uiResource) {
-                s += ", false";
-            }
-            return s;
-        }
-    }
-
-    public ComponentColor createComponentColor(String variableName) {
-        return new ComponentColor(componentPropertyName, variableName,
-                saturationOffset, brightnessOffset, alphaOffset);
-    }
-}
-
-class ComponentColor {
-    private String propertyName;
-    private String defaultColorVariableName;
-    private float saturationOffset = 0,  brightnessOffset = 0;
-    private int alphaOffset = 0;
-
-    ComponentColor(String propertyName,
-            String defaultColorVariableName,
-            float saturationOffset,
-            float brightnessOffset,
-            int alphaOffset) {
-        this.propertyName = propertyName;
-        this.defaultColorVariableName = defaultColorVariableName;
-        this.saturationOffset = saturationOffset;
-        this.brightnessOffset = brightnessOffset;
-        this.alphaOffset = alphaOffset;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        ComponentColor c = (ComponentColor) o;
-        if (alphaOffset != c.alphaOffset) {
-            return false;
-        }
-        if (Float.compare(saturationOffset, c.saturationOffset) != 0) {
-            return false;
-        }
-        if (Float.compare(brightnessOffset, c.brightnessOffset) != 0) {
-            return false;
-        }
-        if (defaultColorVariableName != null ? !defaultColorVariableName.equals(c.defaultColorVariableName) : c.defaultColorVariableName != null) {
-            return false;
-        }
-        if (propertyName != null ? !propertyName.equals(c.propertyName) : c.propertyName != null) {
-            return false;
-        }
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        int hash = 5;
-        hash = 61 * hash + (this.propertyName != null ? this.propertyName.hashCode() : 0);
-        hash = 61 * hash + (this.defaultColorVariableName != null ? this.defaultColorVariableName.hashCode() : 0);
-        hash = 61 * hash + Float.floatToIntBits(this.saturationOffset);
-        hash = 61 * hash + Float.floatToIntBits(this.brightnessOffset);
-        hash = 61 * hash + this.alphaOffset;
-        return hash;
-    }
-
-    public void write(StringBuilder sb) {
-        sb.append("                     getComponentColor(c, \"").
-           append(propertyName).append("\", ").
-           append(defaultColorVariableName).append(", ").
-           append(saturationOffset).append("f, ").
-           append(brightnessOffset).append("f, ").
-           append(alphaOffset);
-    }
-}
-
-class GradientStop {
-    @XmlAttribute private float position;
-    public float getPosition() { return position; }
-
-    @XmlAttribute private float midpoint;
-    public float getMidpoint() { return midpoint; }
-
-    @XmlElement private Matte matte;
-    public Matte getColor() { return matte; }
-}
-
-class AbstractGradient extends Paint {
-    public static enum CycleMethod {
-        NO_CYCLE, REFLECT, REPEAT
-    }
-
-    @XmlElement(name="stop") private ArrayList<GradientStop> stops;
-    public List<GradientStop> getStops() { return stops; }
-}
-
-class Gradient extends AbstractGradient {
-}
-
-class RadialGradient extends AbstractGradient {
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Path.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+
+class Path extends Shape {
+    @XmlElement(name="point")
+    @XmlElementWrapper(name="points")
+    private List<Point> controlPoints = new ArrayList<Point>();
+    public List<Point> getControlPoints() { return controlPoints; }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Point.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+class Point {
+    @XmlAttribute private double x;
+    public double getX() { return x; }
+
+    @XmlAttribute private double y;
+    public double getY() { return y; }
+
+    @XmlAttribute(name="cp1x") private double cp1x;
+    public double getCp1X() { return cp1x; }
+
+    @XmlAttribute(name="cp1y") private double cp1y;
+    public double getCp1Y() { return cp1y; }
+
+    @XmlAttribute(name="cp2x") private double cp2x;
+    public double getCp2X() { return cp2x; }
+
+    @XmlAttribute(name="cp2y") private double cp2y;
+    public double getCp2Y() { return cp2y; }
+
+    public boolean isP1Sharp() {
+        return cp1x == x && cp1y == y;
+    }
+
+    public boolean isP2Sharp() {
+        return cp2x == x && cp2y == y;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/RadialGradient.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+class RadialGradient extends AbstractGradient {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Rectangle.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+class Rectangle extends Shape {
+    @XmlAttribute private double x1;
+    public double getX1() { return x1; }
+
+    @XmlAttribute private double x2;
+    public double getX2() { return x2; }
+
+    @XmlAttribute private double y1;
+    public double getY1() { return y1; }
+
+    @XmlAttribute private double y2;
+    public double getY2() { return y2; }
+
+    @XmlAttribute
+    public double getRounding() {
+        double rounding = Math.abs(roundingX - x1) * 2;
+        return rounding > 2 ? rounding : 0;
+    }
+
+    public void setRounding(double rounding) {
+        if (rounding > 0 && rounding < 2) {
+            rounding = 0;
+        }
+        roundingX = rounding / 2d + x1;
+    }
+    private double roundingX;
+
+    public boolean isRounded() {
+        return getRounding() > 0;
+    }
+
+}
--- a/make/tools/src/build/tools/generatenimbus/Shape.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/tools/src/build/tools/generatenimbus/Shape.java	Mon Nov 05 10:33:18 2012 -0500
@@ -25,11 +25,8 @@
 
 package build.tools.generatenimbus;
 
-import java.util.ArrayList;
-import java.util.List;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlElements;
 
 
@@ -56,85 +53,3 @@
         @XmlAttribute double y2;
     }
 }
-
-class Point {
-    @XmlAttribute private double x;
-    public double getX() { return x; }
-
-    @XmlAttribute private double y;
-    public double getY() { return y; }
-
-    @XmlAttribute(name="cp1x") private double cp1x;
-    public double getCp1X() { return cp1x; }
-
-    @XmlAttribute(name="cp1y") private double cp1y;
-    public double getCp1Y() { return cp1y; }
-
-    @XmlAttribute(name="cp2x") private double cp2x;
-    public double getCp2X() { return cp2x; }
-
-    @XmlAttribute(name="cp2y") private double cp2y;
-    public double getCp2Y() { return cp2y; }
-
-    public boolean isP1Sharp() {
-        return cp1x == x && cp1y == y;
-    }
-
-    public boolean isP2Sharp() {
-        return cp2x == x && cp2y == y;
-    }
-}
-
-class Path extends Shape {
-    @XmlElement(name="point")
-    @XmlElementWrapper(name="points")
-    private List<Point> controlPoints = new ArrayList<Point>();
-    public List<Point> getControlPoints() { return controlPoints; }
-}
-
-class Rectangle extends Shape {
-    @XmlAttribute private double x1;
-    public double getX1() { return x1; }
-
-    @XmlAttribute private double x2;
-    public double getX2() { return x2; }
-
-    @XmlAttribute private double y1;
-    public double getY1() { return y1; }
-
-    @XmlAttribute private double y2;
-    public double getY2() { return y2; }
-
-    @XmlAttribute
-    public double getRounding() {
-        double rounding = Math.abs(roundingX - x1) * 2;
-        return rounding > 2 ? rounding : 0;
-    }
-
-    public void setRounding(double rounding) {
-        if (rounding > 0 && rounding < 2) {
-            rounding = 0;
-        }
-        roundingX = rounding / 2d + x1;
-    }
-    private double roundingX;
-
-    public boolean isRounded() {
-        return getRounding() > 0;
-    }
-
-}
-
-class Ellipse extends Shape {
-    @XmlAttribute private double x1;
-    public double getX1() { return x1; }
-
-    @XmlAttribute private double x2;
-    public double getX2() { return x2; }
-
-    @XmlAttribute private double y1;
-    public double getY1() { return y1; }
-
-    @XmlAttribute private double y2;
-    public double getY2() { return y2; }
-}
--- a/make/tools/src/build/tools/generatenimbus/SynthModel.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/tools/src/build/tools/generatenimbus/SynthModel.java	Mon Nov 05 10:33:18 2012 -0500
@@ -25,9 +25,7 @@
 
 package build.tools.generatenimbus;
 
-import java.awt.Font;
 import java.util.ArrayList;
-import java.util.List;
 import javax.xml.bind.annotation.*;
 
 
@@ -78,139 +76,3 @@
         }
     }
 }
-
-class Typeface {
-    public enum DeriveStyle {
-        Default, Off, On;
-
-        @Override public String toString() {
-            switch (this) {
-                default:  return "null";
-                case On:  return "true";
-                case Off: return "false";
-            }
-        }
-    }
-
-    @XmlAttribute private String uiDefaultParentName;
-    @XmlAttribute(name="family") private String name;
-    @XmlAttribute private int size;
-    @XmlAttribute private DeriveStyle bold = DeriveStyle.Default;
-    @XmlAttribute private DeriveStyle italic = DeriveStyle.Default;
-    @XmlAttribute private float sizeOffset = 1f;
-
-    public boolean isAbsolute() {
-        return uiDefaultParentName == null;
-    }
-
-    public String write() {
-        if (isAbsolute()) {
-            int style = Font.PLAIN;
-            if (bold == DeriveStyle.On) {
-                style = style | Font.BOLD;
-            }
-            if (italic == DeriveStyle.On) {
-                style = style | Font.ITALIC;
-            }
-
-            return String.format(
-                    "new javax.swing.plaf.FontUIResource(\"%s\", %d, %d)",
-                    name, style, size);
-        } else {
-            return String.format(
-                    "new DerivedFont(\"%s\", %sf, %s, %s)",
-                    uiDefaultParentName, String.valueOf(sizeOffset), bold, italic);
-        }
-    }
-}
-
-class Border {
-    enum BorderType {
-        @XmlEnumValue("empty") EMPTY,
-        @XmlEnumValue("painter") PAINTER
-    }
-    @XmlAttribute private BorderType type;
-    @XmlAttribute private String painter;
-    @XmlAttribute private int top;
-    @XmlAttribute private int left;
-    @XmlAttribute private int bottom;
-    @XmlAttribute private int right;
-
-    public String write() {
-        switch (type) {
-            case PAINTER:
-                return String.format("new PainterBorder(\"%s\", new Insets(%d, %d, %d, %d))",
-                                     painter, top, left, bottom, right);
-            case EMPTY:
-                return String.format("BorderFactory.createEmptyBorder(%d, %d, %d, %d)",
-                                     top, left, bottom, right);
-            default:
-                return "### Look, here's an unknown border! $$$";
-        }
-    }
-}
-
-class Insets {
-    @XmlAttribute int top;
-    @XmlAttribute int left;
-    @XmlAttribute int bottom;
-    @XmlAttribute int right;
-
-    public Insets() {
-        this(0, 0, 0, 0);
-    }
-
-    public Insets(int top, int left, int bottom, int right) {
-        this.top = top;
-        this.left = left;
-        this.bottom = bottom;
-        this.right = right;
-    }
-
-    public String write(boolean uiResource) {
-        String uiSuffix = (uiResource ? "UIResource" : "");
-        return String.format("new Insets%s(%d, %d, %d, %d)",
-                             uiSuffix, top, left, bottom, right);
-    }
-}
-
-class Dimension {
-    @XmlAttribute int width;
-    @XmlAttribute int height;
-
-    public String write(boolean uiResource) {
-        String uiSuffix = (uiResource ? "UIResource" : "");
-        return String.format("new Dimension%s(%d, %d)", uiSuffix, width, height);
-    }
-}
-
-class Canvas {
-    @XmlElement private Dimension size;
-    public Dimension getSize() { return size; }
-
-    @XmlElement(name="layer") private List<Layer> layers;
-    public List<Layer> getLayers() { return layers; }
-
-    @XmlElement private Insets stretchingInsets = null;
-    public Insets getStretchingInsets() { return stretchingInsets; }
-
-    public boolean isBlank() {
-        return layers.size() == 0 || (layers.size() == 1 && layers.get(0).isEmpty());
-    }
-}
-
-class Layer {
-    /** List of shapes in this layer, first shape is painted on top */
-    @XmlElements({
-        @XmlElement(name = "ellipse", type = Ellipse.class),
-        @XmlElement(name = "path", type = Path.class),
-        @XmlElement(name = "rectangle", type = Rectangle.class)
-    })
-    @XmlElementWrapper(name="shapes")
-    private List<Shape> shapes = new ArrayList<Shape>();
-    public List<Shape> getShapes() { return shapes; }
-
-    public boolean isEmpty() {
-        return shapes.isEmpty();
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/Typeface.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import java.awt.Font;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+class Typeface {
+    public enum DeriveStyle {
+        Default, Off, On;
+
+        @Override public String toString() {
+            switch (this) {
+                default:  return "null";
+                case On:  return "true";
+                case Off: return "false";
+            }
+        }
+    }
+
+    @XmlAttribute private String uiDefaultParentName;
+    @XmlAttribute(name="family") private String name;
+    @XmlAttribute private int size;
+    @XmlAttribute private DeriveStyle bold = DeriveStyle.Default;
+    @XmlAttribute private DeriveStyle italic = DeriveStyle.Default;
+    @XmlAttribute private float sizeOffset = 1f;
+
+    public boolean isAbsolute() {
+        return uiDefaultParentName == null;
+    }
+
+    public String write() {
+        if (isAbsolute()) {
+            int style = Font.PLAIN;
+            if (bold == DeriveStyle.On) {
+                style = style | Font.BOLD;
+            }
+            if (italic == DeriveStyle.On) {
+                style = style | Font.ITALIC;
+            }
+
+            return String.format(
+                    "new javax.swing.plaf.FontUIResource(\"%s\", %d, %d)",
+                    name, style, size);
+        } else {
+            return String.format(
+                    "new DerivedFont(\"%s\", %sf, %s, %s)",
+                    uiDefaultParentName, String.valueOf(sizeOffset), bold, italic);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/UIColor.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlElement;
+
+class UIColor extends UIDefault<Matte> {
+
+    @XmlElement
+    public void setMatte(Matte m) {
+        setValue(m);
+    }
+
+    public String write() {
+        return String.format("        addColor(d, \"%s\", %s);\n",
+                             getName(), getValue().write());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/UIComponent.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+
+class UIComponent extends UIRegion {
+    @XmlAttribute private String componentName;
+
+    @XmlElement(name="stateType")
+    @XmlElementWrapper(name="stateTypes")
+    private List<UIStateType> stateTypes = new ArrayList<UIStateType>();
+    public List<UIStateType> getStateTypes() { return stateTypes; }
+
+    @Override public String getKey() {
+        if (key == null || "".equals(key)) {
+            if (componentName == null || "".equals(componentName)) {
+                return name;
+            } else {
+                return "\"" + componentName + "\"";
+            }
+        } else {
+            return key;
+        }
+    }
+}
--- a/make/tools/src/build/tools/generatenimbus/UIDefault.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/tools/src/build/tools/generatenimbus/UIDefault.java	Mon Nov 05 10:33:18 2012 -0500
@@ -26,7 +26,6 @@
 package build.tools.generatenimbus;
 
 import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
 
 public class UIDefault<T> {
     @XmlAttribute private String name;
@@ -44,83 +43,3 @@
         this.value = value;
     }
 }
-
-class UIColor extends UIDefault<Matte> {
-
-    @XmlElement
-    public void setMatte(Matte m) {
-        setValue(m);
-    }
-
-    public String write() {
-        return String.format("        addColor(d, \"%s\", %s);\n",
-                             getName(), getValue().write());
-    }
-}
-
-class UIFont extends UIDefault<Typeface> {
-    @XmlElement
-    public void setTypeface(Typeface t) {
-        setValue(t);
-    }
-
-    public String write() {
-        return String.format("        d.put(\"%s\", %s);\n",
-                             getName(), getValue().write());
-    }
-}
-
-class UIProperty extends UIDefault<String> {
-    public static enum PropertyType {
-        BOOLEAN, INT, FLOAT, DOUBLE, STRING, FONT, COLOR, INSETS, DIMENSION, BORDER
-    }
-    @XmlAttribute private PropertyType type;
-
-    @XmlElement private Border border;
-    @XmlElement private Dimension dimension;
-    @XmlElement private Insets insets;
-    @XmlElement private Matte matte;
-    @XmlElement private Typeface typeface;
-
-    @XmlAttribute
-    @Override public void setValue(String value) {
-        super.setValue(value);
-    }
-
-    public String write(String prefix) {
-        switch (type) {
-            case BOOLEAN:
-                return String.format("        d.put(\"%s%s\", Boolean.%s);\n",
-                                     prefix, getName(), getValue().toUpperCase());  ///autobox
-            case STRING:
-                return String.format("        d.put(\"%s%s\", \"%s\");\n",
-                                     prefix, getName(), getValue());
-            case INT:
-                return String.format("        d.put(\"%s%s\", new Integer(%s));\n",
-                                     prefix, getName(), getValue());
-            case FLOAT:
-                return String.format("        d.put(\"%s%s\", new Float(%sf));\n",
-                                     prefix, getName(), getValue());
-            case DOUBLE:
-                return String.format("        d.put(\"%s%s\", new Double(%s));\n",
-                                     prefix, getName(), getValue());
-            case COLOR:
-                return String.format("        addColor(d, \"%s%s\", %s);\n",
-                                     prefix, getName(), matte.write());
-            case FONT:
-                return String.format("        d.put(\"%s%s\", %s);\n",
-                                     prefix, getName(), typeface.write());
-            case INSETS:
-                return String.format("        d.put(\"%s%s\", %s);\n",
-                                     prefix, getName(), insets.write(true));
-            case DIMENSION:
-                return String.format("        d.put(\"%s%s\", new DimensionUIResource(%d, %d));\n",
-                                     prefix, getName(), dimension.width, dimension.height);
-            case BORDER:
-                return String.format("        d.put(\"%s%s\", new BorderUIResource(%s));\n",
-                                     prefix, getName(), border.write());
-            default:
-                return "###  Look, something's wrong with UIProperty.write()  $$$";
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/UIFont.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlElement;
+
+class UIFont extends UIDefault<Typeface> {
+    @XmlElement
+    public void setTypeface(Typeface t) {
+        setValue(t);
+    }
+
+    public String write() {
+        return String.format("        d.put(\"%s\", %s);\n",
+                             getName(), getValue().write());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/UIIconRegion.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+class UIIconRegion extends UIRegion {
+    @XmlAttribute private String basicKey;
+
+    @Override public void write(StringBuilder sb, StringBuilder styleBuffer, UIComponent comp, String prefix, String pkg) {
+        Dimension size = null;
+        String fileNamePrefix = Utils.normalize(prefix) + "Painter";
+        // write states ui defaults
+        for (UIState state : backgroundStates) {
+            Canvas canvas = state.getCanvas();
+            if (!canvas.isBlank()) {
+                state.write(sb, prefix, pkg, fileNamePrefix, getKey());
+                size = canvas.getSize();
+            }
+        }
+
+        if (size != null) {
+            // Put SynthIconImpl wrapper in UiDefaults
+            String k = (basicKey == null ? prefix + "." + getKey() : basicKey);
+            sb.append(String.format(
+                    "        d.put(\"%s\", new NimbusIcon(\"%s\", \"%sPainter\", %d, %d));\n",
+                    k, prefix, getKey(), size.width, size.height));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/UIProperty.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+class UIProperty extends UIDefault<String> {
+    public static enum PropertyType {
+        BOOLEAN, INT, FLOAT, DOUBLE, STRING, FONT, COLOR, INSETS, DIMENSION, BORDER
+    }
+    @XmlAttribute private PropertyType type;
+
+    @XmlElement private Border border;
+    @XmlElement private Dimension dimension;
+    @XmlElement private Insets insets;
+    @XmlElement private Matte matte;
+    @XmlElement private Typeface typeface;
+
+    @XmlAttribute
+    @Override public void setValue(String value) {
+        super.setValue(value);
+    }
+
+    public String write(String prefix) {
+        switch (type) {
+            case BOOLEAN:
+                return String.format("        d.put(\"%s%s\", Boolean.%s);\n",
+                                     prefix, getName(), getValue().toUpperCase());  ///autobox
+            case STRING:
+                return String.format("        d.put(\"%s%s\", \"%s\");\n",
+                                     prefix, getName(), getValue());
+            case INT:
+                return String.format("        d.put(\"%s%s\", new Integer(%s));\n",
+                                     prefix, getName(), getValue());
+            case FLOAT:
+                return String.format("        d.put(\"%s%s\", new Float(%sf));\n",
+                                     prefix, getName(), getValue());
+            case DOUBLE:
+                return String.format("        d.put(\"%s%s\", new Double(%s));\n",
+                                     prefix, getName(), getValue());
+            case COLOR:
+                return String.format("        addColor(d, \"%s%s\", %s);\n",
+                                     prefix, getName(), matte.write());
+            case FONT:
+                return String.format("        d.put(\"%s%s\", %s);\n",
+                                     prefix, getName(), typeface.write());
+            case INSETS:
+                return String.format("        d.put(\"%s%s\", %s);\n",
+                                     prefix, getName(), insets.write(true));
+            case DIMENSION:
+                return String.format("        d.put(\"%s%s\", new DimensionUIResource(%d, %d));\n",
+                                     prefix, getName(), dimension.width, dimension.height);
+            case BORDER:
+                return String.format("        d.put(\"%s%s\", new BorderUIResource(%s));\n",
+                                     prefix, getName(), border.write());
+            default:
+                return "###  Look, something's wrong with UIProperty.write()  $$$";
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/UIRegion.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlElements;
+
+class UIRegion {
+    @XmlAttribute protected String name;
+    @XmlAttribute protected String key;
+    @XmlAttribute private boolean opaque = false;
+
+    @XmlElement private Insets contentMargins = new Insets(0, 0, 0, 0);
+
+    @XmlElement(name="state")
+    @XmlElementWrapper(name="backgroundStates")
+    protected List<UIState> backgroundStates = new ArrayList<UIState>();
+    public List<UIState> getBackgroundStates() { return backgroundStates; }
+
+    @XmlElement(name="state")
+    @XmlElementWrapper(name="foregroundStates")
+    protected List<UIState> foregroundStates = new ArrayList<UIState>();
+    public List<UIState> getForegroundStates() { return foregroundStates; }
+
+    @XmlElement(name="state")
+    @XmlElementWrapper(name="borderStates")
+    protected List<UIState> borderStates = new ArrayList<UIState>();
+    public List<UIState> getBorderStates() { return borderStates; }
+
+    @XmlElement private UIStyle style = new UIStyle();
+
+    @XmlElements({
+        @XmlElement(name = "region", type = UIRegion.class),
+        @XmlElement(name = "uiComponent", type = UIComponent.class),
+        @XmlElement(name = "uiIconRegion", type = UIIconRegion.class)
+    })
+    @XmlElementWrapper(name="regions")
+    private List<UIRegion> subRegions = new ArrayList<UIRegion>();
+    public List<UIRegion> getSubRegions() { return subRegions; }
+
+    protected void initStyles(UIStyle parentStyle) {
+        style.setParentStyle(parentStyle);
+        for (UIState state: backgroundStates) {
+            state.getStyle().setParentStyle(this.style);
+        }
+        for (UIState state: foregroundStates) {
+            state.getStyle().setParentStyle(this.style);
+        }
+        for (UIState state: borderStates) {
+            state.getStyle().setParentStyle(this.style);
+        }
+        for (UIRegion region: subRegions) {
+            region.initStyles(this.style);
+        }
+    }
+
+    public String getKey() {
+        return key == null || "".equals(key) ? name : key;
+    }
+
+    private boolean hasCanvas() {
+        for (UIState s : backgroundStates) {
+            if (s.hasCanvas()) return true;
+        }
+        for (UIState s : borderStates) {
+            if (s.hasCanvas()) return true;
+        }
+        for (UIState s : foregroundStates) {
+            if (s.hasCanvas()) return true;
+        }
+        for (UIRegion r: subRegions) {
+            if (r.hasCanvas()) return true;
+        }
+        return false;
+    }
+
+    public void write(StringBuilder sb, StringBuilder styleBuffer,
+                      UIComponent comp, String prefix, String pkg) {
+        // write content margins
+        sb.append(String.format("        d.put(\"%s.contentMargins\", %s);\n",
+                                prefix, contentMargins.write(true)));
+        // write opaque if true
+        if (opaque) {
+            sb.append(String.format("        d.put(\"%s.opaque\", Boolean.TRUE);\n", prefix));
+        }
+
+        // register component with LAF
+        String regionCode = "Region." + Utils.regionNameToCaps(name);
+        styleBuffer.append(String.format("        register(%s, \"%s\");\n",
+                                         regionCode, prefix));
+
+        //write the State, if necessary
+        StringBuffer regString = new StringBuffer();
+        List<UIStateType> types = comp.getStateTypes();
+        if (types != null && types.size() > 0) {
+            for (UIStateType type : types) {
+                regString.append(type.getKey());
+                regString.append(",");
+            }
+            //remove the last ","
+            regString.deleteCharAt(regString.length() - 1);
+        }
+
+        if (! regString.equals("Enabled,MouseOver,Pressed,Disabled,Focused,Selected,Default") && types.size() > 0) {
+            //there were either custom states, or the normal states were in a custom order
+            //so go ahead and write out prefix.State
+            sb.append(String.format("        d.put(\"%s.States\", \"%s\");\n",
+                                    prefix, regString));
+        }
+
+        // write out any custom states, if necessary
+        for (UIStateType type : types) {
+            String synthState = type.getKey();
+            if (! "Enabled".equals(synthState) &&
+                ! "MouseOver".equals(synthState) &&
+                ! "Pressed".equals(synthState) &&
+                ! "Disabled".equals(synthState) &&
+                ! "Focused".equals(synthState) &&
+                ! "Selected".equals(synthState) &&
+                ! "Default".equals(synthState)) {
+
+                //what we have here, gentlemen, is a bona-fide custom state.
+                //if the type is not one of the standard types, then construct a name for
+                //the new type, and write out a new subclass of State.
+                String className = Utils.normalize(prefix) + synthState + "State";
+                sb.append(String.format("        d.put(\"%s.%s\", new %s());\n",
+                                        prefix, synthState, className));
+
+                String body = type.getCodeSnippet();
+                Map<String, String> variables = Generator.getVariables();
+                variables.put("STATE_NAME", className);
+                variables.put("STATE_KEY", synthState);
+                variables.put("BODY", body);
+
+                Generator.writeSrcFile("StateImpl", variables, className);
+            }
+        }
+
+        // write style
+        sb.append(style.write(prefix + '.'));
+
+        String fileName = Utils.normalize(prefix) + "Painter";
+        boolean hasCanvas = hasCanvas();
+        if (hasCanvas) {
+            PainterGenerator.writePainter(this, fileName);
+        }
+        // write states ui defaults
+        for (UIState state : backgroundStates) {
+            state.write(sb, prefix, pkg, fileName, "background");
+        }
+        for (UIState state : foregroundStates) {
+            state.write(sb, prefix, pkg, fileName, "foreground");
+        }
+        for (UIState state : borderStates) {
+            state.write(sb, prefix, pkg, fileName, "border");
+        }
+
+        // handle sub regions
+        for (UIRegion subreg : subRegions) {
+            String p = prefix;
+            if (! (subreg instanceof UIIconRegion)) {
+                p = prefix + ":" + Utils.escape(subreg.getKey());
+            }
+            UIComponent c = comp;
+            if (subreg instanceof UIComponent) {
+                c = (UIComponent) subreg;
+            }
+            subreg.write(sb, styleBuffer, c, p, pkg);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/UIState.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+class UIState {
+    @XmlAttribute private String stateKeys;
+    public String getStateKeys() { return stateKeys; }
+
+    /** Indicates whether to invert the meaning of the 9-square stretching insets */
+    @XmlAttribute private boolean inverted;
+
+    /** A cached string representing the list of stateKeys deliminated with "+" */
+    private String cachedName = null;
+
+    @XmlElement private Canvas canvas;
+    public Canvas getCanvas() { return canvas; }
+
+    @XmlElement private UIStyle style;
+    public UIStyle getStyle() { return style; }
+
+    public boolean hasCanvas() {
+        return ! canvas.isBlank();
+    }
+
+    public static List<String> stringToKeys(String keysString) {
+        return Arrays.asList(keysString.split("\\+"));
+    }
+
+    public String getName() {
+        if (cachedName == null) {
+            StringBuilder buf = new StringBuilder();
+            List<String> keys = stringToKeys(stateKeys);
+            Collections.sort(keys);
+            for (Iterator<String> iter = keys.iterator(); iter.hasNext();) {
+                buf.append(iter.next());
+                if (iter.hasNext()) {
+                    buf.append('+');
+                }
+            }
+            cachedName = buf.toString();
+        }
+        return cachedName;
+    }
+
+    public void write(StringBuilder sb, String prefix, String pkg, String fileNamePrefix, String painterPrefix) {
+        String statePrefix = prefix + "[" + getName() + "]";
+        // write state style
+        sb.append(style.write(statePrefix + '.'));
+        // write painter
+        if (hasCanvas()) {
+            writeLazyPainter(sb, statePrefix, pkg, fileNamePrefix, painterPrefix);
+        }
+    }
+
+    private void writeLazyPainter(StringBuilder sb, String statePrefix, String packageNamePrefix, String fileNamePrefix, String painterPrefix) {
+        String cacheModeString = "AbstractRegionPainter.PaintContext.CacheMode." + style.getCacheMode();
+        String stateConstant = Utils.statesToConstantName(painterPrefix + "_" + stateKeys);
+        sb.append(String.format(
+                "        d.put(\"%s.%sPainter\", new LazyPainter(\"%s.%s\", %s.%s, %s, %s, %b, %s, %s, %s));\n",
+                statePrefix, painterPrefix, packageNamePrefix, fileNamePrefix,
+                fileNamePrefix, stateConstant, canvas.getStretchingInsets().write(false),
+                canvas.getSize().write(false), inverted, cacheModeString,
+                Utils.formatDouble(style.getMaxHozCachedImgScaling()),
+                Utils.formatDouble(style.getMaxVertCachedImgScaling())));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/tools/src/build/tools/generatenimbus/UIStateType.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.generatenimbus;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+class UIStateType {
+    @XmlAttribute private String key;
+    public String getKey() { return key; }
+
+    @XmlElement private String codeSnippet;
+    public String getCodeSnippet() { return codeSnippet; }
+}
--- a/make/tools/src/build/tools/generatenimbus/UIStyle.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/make/tools/src/build/tools/generatenimbus/UIStyle.java	Mon Nov 05 10:33:18 2012 -0500
@@ -26,15 +26,9 @@
 package build.tools.generatenimbus;
 
 import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlElements;
 
 
 class UIStyle {
@@ -115,285 +109,3 @@
         return sb.toString();
     }
 }
-
-class UIRegion {
-    @XmlAttribute protected String name;
-    @XmlAttribute protected String key;
-    @XmlAttribute private boolean opaque = false;
-
-    @XmlElement private Insets contentMargins = new Insets(0, 0, 0, 0);
-
-    @XmlElement(name="state")
-    @XmlElementWrapper(name="backgroundStates")
-    protected List<UIState> backgroundStates = new ArrayList<UIState>();
-    public List<UIState> getBackgroundStates() { return backgroundStates; }
-
-    @XmlElement(name="state")
-    @XmlElementWrapper(name="foregroundStates")
-    protected List<UIState> foregroundStates = new ArrayList<UIState>();
-    public List<UIState> getForegroundStates() { return foregroundStates; }
-
-    @XmlElement(name="state")
-    @XmlElementWrapper(name="borderStates")
-    protected List<UIState> borderStates = new ArrayList<UIState>();
-    public List<UIState> getBorderStates() { return borderStates; }
-
-    @XmlElement private UIStyle style = new UIStyle();
-
-    @XmlElements({
-        @XmlElement(name = "region", type = UIRegion.class),
-        @XmlElement(name = "uiComponent", type = UIComponent.class),
-        @XmlElement(name = "uiIconRegion", type = UIIconRegion.class)
-    })
-    @XmlElementWrapper(name="regions")
-    private List<UIRegion> subRegions = new ArrayList<UIRegion>();
-    public List<UIRegion> getSubRegions() { return subRegions; }
-
-    protected void initStyles(UIStyle parentStyle) {
-        style.setParentStyle(parentStyle);
-        for (UIState state: backgroundStates) {
-            state.getStyle().setParentStyle(this.style);
-        }
-        for (UIState state: foregroundStates) {
-            state.getStyle().setParentStyle(this.style);
-        }
-        for (UIState state: borderStates) {
-            state.getStyle().setParentStyle(this.style);
-        }
-        for (UIRegion region: subRegions) {
-            region.initStyles(this.style);
-        }
-    }
-
-    public String getKey() {
-        return key == null || "".equals(key) ? name : key;
-    }
-
-    private boolean hasCanvas() {
-        for (UIState s : backgroundStates) {
-            if (s.hasCanvas()) return true;
-        }
-        for (UIState s : borderStates) {
-            if (s.hasCanvas()) return true;
-        }
-        for (UIState s : foregroundStates) {
-            if (s.hasCanvas()) return true;
-        }
-        for (UIRegion r: subRegions) {
-            if (r.hasCanvas()) return true;
-        }
-        return false;
-    }
-
-    public void write(StringBuilder sb, StringBuilder styleBuffer,
-                      UIComponent comp, String prefix, String pkg) {
-        // write content margins
-        sb.append(String.format("        d.put(\"%s.contentMargins\", %s);\n",
-                                prefix, contentMargins.write(true)));
-        // write opaque if true
-        if (opaque) {
-            sb.append(String.format("        d.put(\"%s.opaque\", Boolean.TRUE);\n", prefix));
-        }
-
-        // register component with LAF
-        String regionCode = "Region." + Utils.regionNameToCaps(name);
-        styleBuffer.append(String.format("        register(%s, \"%s\");\n",
-                                         regionCode, prefix));
-
-        //write the State, if necessary
-        StringBuffer regString = new StringBuffer();
-        List<UIStateType> types = comp.getStateTypes();
-        if (types != null && types.size() > 0) {
-            for (UIStateType type : types) {
-                regString.append(type.getKey());
-                regString.append(",");
-            }
-            //remove the last ","
-            regString.deleteCharAt(regString.length() - 1);
-        }
-
-        if (! regString.equals("Enabled,MouseOver,Pressed,Disabled,Focused,Selected,Default") && types.size() > 0) {
-            //there were either custom states, or the normal states were in a custom order
-            //so go ahead and write out prefix.State
-            sb.append(String.format("        d.put(\"%s.States\", \"%s\");\n",
-                                    prefix, regString));
-        }
-
-        // write out any custom states, if necessary
-        for (UIStateType type : types) {
-            String synthState = type.getKey();
-            if (! "Enabled".equals(synthState) &&
-                ! "MouseOver".equals(synthState) &&
-                ! "Pressed".equals(synthState) &&
-                ! "Disabled".equals(synthState) &&
-                ! "Focused".equals(synthState) &&
-                ! "Selected".equals(synthState) &&
-                ! "Default".equals(synthState)) {
-
-                //what we have here, gentlemen, is a bona-fide custom state.
-                //if the type is not one of the standard types, then construct a name for
-                //the new type, and write out a new subclass of State.
-                String className = Utils.normalize(prefix) + synthState + "State";
-                sb.append(String.format("        d.put(\"%s.%s\", new %s());\n",
-                                        prefix, synthState, className));
-
-                String body = type.getCodeSnippet();
-                Map<String, String> variables = Generator.getVariables();
-                variables.put("STATE_NAME", className);
-                variables.put("STATE_KEY", synthState);
-                variables.put("BODY", body);
-
-                Generator.writeSrcFile("StateImpl", variables, className);
-            }
-        }
-
-        // write style
-        sb.append(style.write(prefix + '.'));
-
-        String fileName = Utils.normalize(prefix) + "Painter";
-        boolean hasCanvas = hasCanvas();
-        if (hasCanvas) {
-            PainterGenerator.writePainter(this, fileName);
-        }
-        // write states ui defaults
-        for (UIState state : backgroundStates) {
-            state.write(sb, prefix, pkg, fileName, "background");
-        }
-        for (UIState state : foregroundStates) {
-            state.write(sb, prefix, pkg, fileName, "foreground");
-        }
-        for (UIState state : borderStates) {
-            state.write(sb, prefix, pkg, fileName, "border");
-        }
-
-        // handle sub regions
-        for (UIRegion subreg : subRegions) {
-            String p = prefix;
-            if (! (subreg instanceof UIIconRegion)) {
-                p = prefix + ":" + Utils.escape(subreg.getKey());
-            }
-            UIComponent c = comp;
-            if (subreg instanceof UIComponent) {
-                c = (UIComponent) subreg;
-            }
-            subreg.write(sb, styleBuffer, c, p, pkg);
-        }
-    }
-}
-
-class UIIconRegion extends UIRegion {
-    @XmlAttribute private String basicKey;
-
-    @Override public void write(StringBuilder sb, StringBuilder styleBuffer, UIComponent comp, String prefix, String pkg) {
-        Dimension size = null;
-        String fileNamePrefix = Utils.normalize(prefix) + "Painter";
-        // write states ui defaults
-        for (UIState state : backgroundStates) {
-            Canvas canvas = state.getCanvas();
-            if (!canvas.isBlank()) {
-                state.write(sb, prefix, pkg, fileNamePrefix, getKey());
-                size = canvas.getSize();
-            }
-        }
-
-        if (size != null) {
-            // Put SynthIconImpl wrapper in UiDefaults
-            String k = (basicKey == null ? prefix + "." + getKey() : basicKey);
-            sb.append(String.format(
-                    "        d.put(\"%s\", new NimbusIcon(\"%s\", \"%sPainter\", %d, %d));\n",
-                    k, prefix, getKey(), size.width, size.height));
-        }
-    }
-}
-
-class UIComponent extends UIRegion {
-    @XmlAttribute private String componentName;
-
-    @XmlElement(name="stateType")
-    @XmlElementWrapper(name="stateTypes")
-    private List<UIStateType> stateTypes = new ArrayList<UIStateType>();
-    public List<UIStateType> getStateTypes() { return stateTypes; }
-
-    @Override public String getKey() {
-        if (key == null || "".equals(key)) {
-            if (componentName == null || "".equals(componentName)) {
-                return name;
-            } else {
-                return "\"" + componentName + "\"";
-            }
-        } else {
-            return key;
-        }
-    }
-}
-
-class UIState {
-    @XmlAttribute private String stateKeys;
-    public String getStateKeys() { return stateKeys; }
-
-    /** Indicates whether to invert the meaning of the 9-square stretching insets */
-    @XmlAttribute private boolean inverted;
-
-    /** A cached string representing the list of stateKeys deliminated with "+" */
-    private String cachedName = null;
-
-    @XmlElement private Canvas canvas;
-    public Canvas getCanvas() { return canvas; }
-
-    @XmlElement private UIStyle style;
-    public UIStyle getStyle() { return style; }
-
-    public boolean hasCanvas() {
-        return ! canvas.isBlank();
-    }
-
-    public static List<String> stringToKeys(String keysString) {
-        return Arrays.asList(keysString.split("\\+"));
-    }
-
-    public String getName() {
-        if (cachedName == null) {
-            StringBuilder buf = new StringBuilder();
-            List<String> keys = stringToKeys(stateKeys);
-            Collections.sort(keys);
-            for (Iterator<String> iter = keys.iterator(); iter.hasNext();) {
-                buf.append(iter.next());
-                if (iter.hasNext()) {
-                    buf.append('+');
-                }
-            }
-            cachedName = buf.toString();
-        }
-        return cachedName;
-    }
-
-    public void write(StringBuilder sb, String prefix, String pkg, String fileNamePrefix, String painterPrefix) {
-        String statePrefix = prefix + "[" + getName() + "]";
-        // write state style
-        sb.append(style.write(statePrefix + '.'));
-        // write painter
-        if (hasCanvas()) {
-            writeLazyPainter(sb, statePrefix, pkg, fileNamePrefix, painterPrefix);
-        }
-    }
-
-    private void writeLazyPainter(StringBuilder sb, String statePrefix, String packageNamePrefix, String fileNamePrefix, String painterPrefix) {
-        String cacheModeString = "AbstractRegionPainter.PaintContext.CacheMode." + style.getCacheMode();
-        String stateConstant = Utils.statesToConstantName(painterPrefix + "_" + stateKeys);
-        sb.append(String.format(
-                "        d.put(\"%s.%sPainter\", new LazyPainter(\"%s.%s\", %s.%s, %s, %s, %b, %s, %s, %s));\n",
-                statePrefix, painterPrefix, packageNamePrefix, fileNamePrefix,
-                fileNamePrefix, stateConstant, canvas.getStretchingInsets().write(false),
-                canvas.getSize().write(false), inverted, cacheModeString,
-                Utils.formatDouble(style.getMaxHozCachedImgScaling()),
-                Utils.formatDouble(style.getMaxVertCachedImgScaling())));
-    }
-}
-
-class UIStateType {
-    @XmlAttribute private String key;
-    public String getKey() { return key; }
-
-    @XmlElement private String codeSnippet;
-    public String getCodeSnippet() { return codeSnippet; }
-}
--- a/makefiles/CompileJavaClasses.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/makefiles/CompileJavaClasses.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -312,7 +312,8 @@
 JDK_BASE_HEADER_CLASSES:=java.lang.Integer \
 			 java.lang.Long \
 			 java.net.SocketOptions \
-			 sun.nio.ch.IOStatus
+			 sun.nio.ch.IOStatus \
+			 java.io.FileSystem
 
 JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\
 				$(subst .,/,$(JDK_BASE_HEADER_CLASSES)))
--- a/makefiles/CompileNativeLibraries.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/makefiles/CompileNativeLibraries.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -1540,96 +1540,6 @@
 
 ##########################################################################################
 
-ifndef OPENJDK
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-
-LIBJDBCODBC_DIR   :=$(JDK_OUTPUTDIR)/objs/libjdbcodbc
-LIBJDBCODBC_NAME  :=$(LIBRARY_PREFIX)JdbcOdbc$(SHARED_LIBRARY_SUFFIX)
-LIBJDBCODBC_CFLAGS:=
-LIBJDBCODBC_LIBS   :=
-LIBJDBCODBC_LDFLAGS:=
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-	LIBJDBCODBC_LDFLAGS:=$(LDFLAGS_JDKLIB)
-	LIBJDBCODBC_LIBS += odbc32.lib odbccp32.lib $(WIN_JAVA_LIB) advapi32.lib
-else
-	LIBJDBCODBC_CFLAGS:=-DUNIX
-
-#
-# This mimics "current" build system exactly. Link against fake -lodbcinst -lodbc
-#   but...those are linked with the -soname, causing the dependency to be dropped on linux (gnu ld)
-#   but kept with other linker (solaris)
-#
-# IMO very weird behaviour...very weird
-#
-	LIBJDBCODBC_LDFLAGS:=$(patsubst defs,nodefs,$(LDFLAGS_JDKLIB)) \
-				      -Xlinker -z -Xlinker nodefs
-	LIBJDBCODBC_LIBS += -L$(LIBJDBCODBC_DIR) -lodbcinst -lodbc
-	LIBJDBCODBC_SONAME:=$(call SET_SHARED_LIBRARY_NAME,$(LIBJDBCODBC_NAME))
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJDBCODBC,\
-		LIBRARY:=JdbcOdbc,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc,\
-		EXCLUDE_FILES:=dummyodbc.c,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB) \
-			$(SHARED_LIBRARY_FLAGS),\
-		LDFLAGS:=$(LIBJDBCODBC_LDFLAGS) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LIBS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=JdbcOdbc.dll" \
-			  /D "JDK_INTERNAL_NAME=JdbcOdbc" \
-			  /D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(LIBJDBCODBC_DIR),\
-		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
-
-$(BUILD_LIBJDBCODBC) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJDBCODBC)
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
-
-$(eval $(call SetupNativeCompilation,BUILD_FAKEODBCINST,\
-		LIBRARY:=odbcinst,\
-                OUTPUT_DIR:=$(LIBJDBCODBC_DIR),\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
-		INCLUDE_FILES:=dummyodbc1.c,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB),\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LDFLAGS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
-		OBJECT_DIR:=$(LIBJDBCODBC_DIR)))
-
-$(eval $(call SetupNativeCompilation,BUILD_FAKEODBC,\
-		LIBRARY:=odbc,\
-                OUTPUT_DIR:=$(LIBJDBCODBC_DIR),\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
-		INCLUDE_FILES:=dummyodbc2.c,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB),\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LDFLAGS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
-		OBJECT_DIR:=$(LIBJDBCODBC_DIR)))
-
-$(BUILD_FAKEODBCINST) $(BUILD_FAKEODBC) : \
-  $(BUILD_LIBJAVA)
-
-$(BUILD_LIBJDBCODBC) : $(BUILD_FAKEODBCINST) $(BUILD_FAKEODBC)
-
-endif
-
-endif
-endif
-
-##########################################################################################
-
 LIBINSTRUMENT_SRC   :=$(JDK_TOPDIR)/src/share/instrument \
                       $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
                       $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument
--- a/makefiles/CopyIntoClasses.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/makefiles/CopyIntoClasses.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -189,12 +189,6 @@
 endif
 
 ifndef OPENJDK
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-    ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc/META-INF
-endif
-endif
-
-ifndef OPENJDK
     ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF
 endif
 
--- a/makefiles/CreateJars.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/makefiles/CreateJars.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -74,10 +74,46 @@
 
 ##########################################################################################
 
-LOCALEDATA_INCLUDE_LOCALES := ar hi iw ja ko th vi zh
+LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
+                              iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
+                              th tr uk vi zh
+
 LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/,$(LOCALEDATA_INCLUDE_LOCALES)) \
 		       $(addprefix sun/util/resources/,$(LOCALEDATA_INCLUDE_LOCALES))
 
+# For non-US English locale data
+
+LOCALEDATA_INCLUDES += \
+                sun/text/resources/en/FormatData_en_AU.class \
+                sun/text/resources/en/FormatData_en_CA.class \
+                sun/text/resources/en/FormatData_en_GB.class \
+                sun/text/resources/en/FormatData_en_IE.class \
+                sun/text/resources/en/FormatData_en_IN.class \
+                sun/text/resources/en/FormatData_en_MT.class \
+                sun/text/resources/en/FormatData_en_NZ.class \
+                sun/text/resources/en/FormatData_en_PH.class \
+                sun/text/resources/en/FormatData_en_SG.class \
+                sun/text/resources/en/FormatData_en_ZA.class \
+                sun/util/resources/en/CalendarData_en_GB.class \
+                sun/util/resources/en/CalendarData_en_IE.class \
+                sun/util/resources/en/CalendarData_en_MT.class \
+                sun/util/resources/en/CurrencyNames_en_AU.class \
+                sun/util/resources/en/CurrencyNames_en_CA.class \
+                sun/util/resources/en/CurrencyNames_en_GB.class \
+                sun/util/resources/en/CurrencyNames_en_IE.class \
+                sun/util/resources/en/CurrencyNames_en_IN.class \
+                sun/util/resources/en/CurrencyNames_en_MT.class \
+                sun/util/resources/en/CurrencyNames_en_NZ.class \
+                sun/util/resources/en/CurrencyNames_en_PH.class \
+                sun/util/resources/en/CurrencyNames_en_SG.class \
+                sun/util/resources/en/CurrencyNames_en_ZA.class \
+                sun/util/resources/en/LocaleNames_en_MT.class \
+                sun/util/resources/en/LocaleNames_en_PH.class \
+                sun/util/resources/en/LocaleNames_en_SG.class \
+                sun/util/resources/en/TimeZoneNames_en_CA.class \
+                sun/util/resources/en/TimeZoneNames_en_GB.class \
+                sun/util/resources/en/TimeZoneNames_en_IE.class
+
 $(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
 		SUFFIXES:=.class _dict _th,\
@@ -249,7 +285,6 @@
 ifeq ($(OPENJDK_TARGET_OS), macosx)
         RT_JAR_EXCLUDES += com/sun/nio/sctp \
                            sun/nio/ch/sctp \
-                           sun/jdbc \
                            sun/nio/ch/DevPollArrayWrapper\$$$$Updator.class \
                            sun/nio/ch/DevPollArrayWrapper.class \
                            sun/nio/ch/DevPollSelectorImpl.class \
--- a/makefiles/GensrcLocaleDataMetaInfo.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/makefiles/GensrcLocaleDataMetaInfo.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -50,26 +50,26 @@
     $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/locale/provider/LocaleDataMetaInfo.java)
 endif
 
-# The non-euro zone locales have to be separated from the euro-zone locales.
-NON_EURO_LOCALES:=ar% hi% iw% ja% ko% th% vi% zh%
+# The US locales
+US_LOCALES:=en en-US
 
 # ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
-ALL_NON_EURO_LOCALES:=ja-JP-JP th-TH-TH
+ALL_NON_US_LOCALES:=ja-JP-JP th-TH-TH
 
 SED_ARGS:=-e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'
 
 # This macro creates a sed expression that substitues for example:
-# #FormatData_EuroLocales# with: be be_BY bg bg_BG ca ca_ES... and some more.
+# #FormatData_USLocales# with: en and/or en_US.
 define CaptureLocale
     $1_LOCALES := $$(subst _,-,$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES)))))
-    $1_EURO_LOCALES := $$(filter-out $(NON_EURO_LOCALES),$$($1_LOCALES))
-    $1_NON_EURO_LOCALES := $$(filter $(NON_EURO_LOCALES),$$($1_LOCALES))
+    $1_US_LOCALES := $$(filter $(US_LOCALES),$$($1_LOCALES))
+    $1_NON_US_LOCALES := $$(filter-out $(US_LOCALES),$$($1_LOCALES))
 
-    ALL_EURO_LOCALES += $$($1_EURO_LOCALES)
-    ALL_NON_EURO_LOCALES += $$($1_NON_EURO_LOCALES)
+    ALL_US_LOCALES += $$($1_US_LOCALES)
+    ALL_NON_US_LOCALES += $$($1_NON_US_LOCALES)
 
-    SED_ARGS+= -e 's/$$(HASH)$1_EuroLocales$$(HASH)/ $$($1_EURO_LOCALES)/g'
-    SED_ARGS+= -e 's/$$(HASH)$1_NonEuroLocales$$(HASH)/ $$($1_NON_EURO_LOCALES)/g'
+    SED_ARGS+= -e 's/$$(HASH)$1_USLocales$$(HASH)/ $$($1_US_LOCALES)/g'
+    SED_ARGS+= -e 's/$$(HASH)$1_NonUSLocales$$(HASH)/ $$($1_NON_US_LOCALES)/g'
 endef
 
 #sun.text.resources.FormatData
@@ -90,8 +90,8 @@
 #sun.util.resources.CalendarData
 $(eval $(call CaptureLocale,CalendarData))
 
-SED_ARGS+= -e 's/$(HASH)AvailableLocales_EuroLocales$(HASH)/$(sort $(ALL_EURO_LOCALES))/g'
-SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonEuroLocales$(HASH)/$(sort $(ALL_NON_EURO_LOCALES))/g'
+SED_ARGS+= -e 's/$(HASH)AvailableLocales_USLocales$(HASH)/$(sort $(ALL_US_LOCALES))/g'
+SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonUSLocales$(HASH)/$(sort $(ALL_NON_US_LOCALES))/g'
 
 $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/locale/provider/LocaleDataMetaInfo.java: \
 		$(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
--- a/makefiles/GensrcMisc.gmk	Mon Nov 05 10:30:49 2012 -0500
+++ b/makefiles/GensrcMisc.gmk	Mon Nov 05 10:33:18 2012 -0500
@@ -77,32 +77,6 @@
 
 ##########################################################################################
 
-ifndef OPENJDK
-ifneq ($(OPENJDK_TARGET_OS), windows)
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-    # These file(s) are needed for building fake .so libs on !windows for jdbcodbc
-
-    $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc1.c : 
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(ECHO) Creating $@
-	$(PRINTF) "void dummyOdbc(void){}\n" > $@
-	$(ECHO) Created $@
-
-    $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc2.c : 
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(ECHO) Creating $@
-	$(PRINTF) "void dummyOdbc(void){}\n" > $@
-	$(ECHO) Created $@
-
-    GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc1.c $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc2.c
-endif
-endif
-endif
-
-##########################################################################################
-
 GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java
 
 GENSRC_SOR_SRC := $(JDK_TOPDIR)/src/share/native/sun/nio/ch
--- a/makefiles/mapfiles/libjava/mapfile-vers	Mon Nov 05 10:30:49 2012 -0500
+++ b/makefiles/mapfiles/libjava/mapfile-vers	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, 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
@@ -87,7 +87,6 @@
 		Java_java_io_FileOutputStream_open;
 		Java_java_io_FileOutputStream_write;
 		Java_java_io_FileOutputStream_writeBytes;
-		Java_java_io_FileSystem_getFileSystem;
 		Java_java_io_ObjectInputStream_bytesToDoubles;
 		Java_java_io_ObjectInputStream_bytesToFloats;
 		Java_java_io_ObjectOutputStream_doublesToBytes;
--- a/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java	Mon Nov 05 10:33:18 2012 -0500
@@ -379,6 +379,19 @@
                         }
                     }
                     updateButtonState(getFileChooser());
+                } else if (prop.equals(JFileChooser.SELECTED_FILES_CHANGED_PROPERTY)) {
+                    JFileChooser fileChooser = getFileChooser();
+                    if (!fileChooser.isDirectorySelectionEnabled()) {
+                        final File[] files = (File[]) e.getNewValue();
+                        if (files != null) {
+                            for (int selectedRow : fFileList.getSelectedRows()) {
+                                File file = (File) fFileList.getValueAt(selectedRow, 0);
+                                if (fileChooser.isTraversable(file)) {
+                                    fFileList.removeSelectedIndex(selectedRow);
+                                }
+                            }
+                        }
+                    }
                 } else if (prop.equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)) {
                     fFileList.clearSelection();
                     final File currentDirectory = getFileChooser().getCurrentDirectory();
--- a/src/macosx/classes/sun/awt/CGraphicsDevice.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/macosx/classes/sun/awt/CGraphicsDevice.java	Mon Nov 05 10:33:18 2012 -0500
@@ -33,9 +33,7 @@
 
 import sun.java2d.opengl.CGLGraphicsConfig;
 
-import sun.awt.FullScreenCapable;
-
-public class CGraphicsDevice extends GraphicsDevice {
+public final class CGraphicsDevice extends GraphicsDevice {
 
     // CoreGraphics display ID
     private final int displayID;
@@ -108,11 +106,6 @@
         return nativeGetYResolution(displayID);
     }
 
-    public int getScreenResolution() {
-        // TODO: report non-72 value when HiDPI is turned on
-        return 72;
-    }
-
     private static native double nativeGetXResolution(int displayID);
     private static native double nativeGetYResolution(int displayID);
 
@@ -194,6 +187,9 @@
 
     @Override
     public void setDisplayMode(DisplayMode dm) {
+        if (dm == null) {
+            throw new IllegalArgumentException("Invalid display mode");
+        }
         nativeSetDisplayMode(displayID, dm.getWidth(), dm.getHeight(), dm.getBitDepth(), dm.getRefreshRate());
         if (isFullScreenSupported() && getFullScreenWindow() != null) {
             getFullScreenWindow().setSize(dm.getWidth(), dm.getHeight());
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Mon Nov 05 10:33:18 2012 -0500
@@ -65,7 +65,7 @@
     private static native void nativeDispose(long nsWindowPtr);
     private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
 
-    private static native int nativeGetNSWindowDisplayID_AppKitThread(long nsWindowPtr);
+    private static native int nativeGetNSWindowDisplayID(long nsWindowPtr);
 
     // Loger to report issues happened during execution but that do not affect functionality
     private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
@@ -444,7 +444,7 @@
     public GraphicsDevice getGraphicsDevice() {
         GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
         CGraphicsEnvironment cge = (CGraphicsEnvironment)ge;
-        int displayID = nativeGetNSWindowDisplayID_AppKitThread(getNSWindowPtr());
+        int displayID = nativeGetNSWindowDisplayID(getNSWindowPtr());
         GraphicsDevice gd = cge.getScreenDevice(displayID);
         if (gd == null) {
             // this could possibly happen during device removal
--- a/src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java	Mon Nov 05 10:33:18 2012 -0500
@@ -26,6 +26,7 @@
 package sun.lwawt.macosx;
 
 import sun.awt.SunToolkit;
+import sun.lwawt.macosx.event.NSEvent;
 
 import javax.swing.*;
 import java.awt.*;
@@ -42,6 +43,16 @@
     private JDialog messageDialog;
     private DialogEventHandler handler;
 
+    // In order to construct MouseEvent object, we need to specify a
+    // Component target. Because TrayIcon isn't Component's subclass,
+    // we use this dummy frame instead
+    private final Frame dummyFrame;
+
+    // A bitmask that indicates what mouse buttons produce MOUSE_CLICKED events
+    // on MOUSE_RELEASE. Click events are only generated if there were no drag
+    // events between MOUSE_PRESSED and MOUSE_RELEASED for particular button
+    private static int mouseClickButtons = 0;
+
     CTrayIcon(TrayIcon target) {
         super(0, true);
 
@@ -49,6 +60,7 @@
         this.handler = null;
         this.target = target;
         this.popup = target.getPopupMenu();
+        this.dummyFrame = new Frame();
         setPtr(createModel());
 
         //if no one else is creating the peer.
@@ -119,6 +131,8 @@
             disposeMessageDialog();
         }
 
+        dummyFrame.dispose();
+
         LWCToolkit.targetDisposedPeer(target, this);
         target = null;
 
@@ -161,17 +175,78 @@
 
     private native void setNativeImage(final long model, final long nsimage, final boolean autosize);
 
-    //invocation from the AWTTrayIcon.m
-    public void performAction() {
+    private void postEvent(final AWTEvent event) {
         SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
             public void run() {
-                final String cmd = target.getActionCommand();
-                final ActionEvent event = new ActionEvent(target, ActionEvent.ACTION_PERFORMED, cmd);
                 SunToolkit.postEvent(SunToolkit.targetToAppContext(target), event);
             }
         });
     }
 
+    //invocation from the AWTTrayIcon.m
+    private void handleMouseEvent(NSEvent nsEvent) {
+        int buttonNumber = nsEvent.getButtonNumber();
+        final SunToolkit tk = (SunToolkit)Toolkit.getDefaultToolkit();
+        if ((buttonNumber > 2 && !tk.areExtraMouseButtonsEnabled())
+                || buttonNumber > tk.getNumberOfButtons() - 1) {
+            return;
+        }
+
+        int jeventType = NSEvent.nsToJavaEventType(nsEvent.getType());
+
+        int jbuttonNumber = MouseEvent.NOBUTTON;
+        int jclickCount = 0;
+        if (jeventType != MouseEvent.MOUSE_MOVED) {
+            jbuttonNumber = NSEvent.nsToJavaButton(buttonNumber);
+            jclickCount = nsEvent.getClickCount();
+        }
+
+        int jmodifiers = NSEvent.nsToJavaMouseModifiers(buttonNumber,
+                nsEvent.getModifierFlags());
+        boolean isPopupTrigger = NSEvent.isPopupTrigger(jmodifiers);
+
+        int eventButtonMask = (jbuttonNumber > 0)?
+                MouseEvent.getMaskForButton(jbuttonNumber) : 0;
+        long when = System.currentTimeMillis();
+
+        if (jeventType == MouseEvent.MOUSE_PRESSED) {
+            mouseClickButtons |= eventButtonMask;
+        } else if (jeventType == MouseEvent.MOUSE_DRAGGED) {
+            mouseClickButtons = 0;
+        }
+
+        // The MouseEvent's coordinates are relative to screen
+        int absX = nsEvent.getAbsX();
+        int absY = nsEvent.getAbsY();
+
+        MouseEvent mouseEvent = new MouseEvent(dummyFrame, jeventType, when,
+                jmodifiers, absX, absY, absX, absY, jclickCount, isPopupTrigger,
+                jbuttonNumber);
+        mouseEvent.setSource(target);
+        postEvent(mouseEvent);
+
+        // fire ACTION event
+        if (jeventType == MouseEvent.MOUSE_PRESSED && isPopupTrigger) {
+            final String cmd = target.getActionCommand();
+            final ActionEvent event = new ActionEvent(target,
+                    ActionEvent.ACTION_PERFORMED, cmd);
+            postEvent(event);
+        }
+
+        // synthesize CLICKED event
+        if (jeventType == MouseEvent.MOUSE_RELEASED) {
+            if ((mouseClickButtons & eventButtonMask) != 0) {
+                MouseEvent clickEvent = new MouseEvent(dummyFrame,
+                        MouseEvent.MOUSE_CLICKED, when, jmodifiers, absX, absY,
+                        absX, absY, jclickCount, isPopupTrigger, jbuttonNumber);
+                clickEvent.setSource(target);
+                postEvent(clickEvent);
+            }
+
+            mouseClickButtons &= ~eventButtonMask;
+        }
+    }
+
     private native Point2D nativeGetIconLocation(long trayIconModel);
 
     public void displayMessageOnEDT(String caption, String text,
@@ -256,6 +331,9 @@
 
         dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
         dialog.setModal(false);
+        dialog.setModalExclusionType(Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
+        dialog.setAlwaysOnTop(true);
+        dialog.setAutoRequestFocus(false);
         dialog.setResizable(false);
         dialog.setContentPane(op);
 
--- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Mon Nov 05 10:33:18 2012 -0500
@@ -53,7 +53,7 @@
 /**
  * Mac OS X Cocoa-based AWT Toolkit.
  */
-public class LWCToolkit extends LWToolkit {
+public final class LWCToolkit extends LWToolkit {
     // While it is possible to enumerate all mouse devices
     // and query them for the number of buttons, the code
     // that does it is rather complex. Instead, we opt for
@@ -278,7 +278,6 @@
         return new CMouseInfoPeer();
     }
 
-
     @Override
     protected int getScreenHeight() {
         return GraphicsEnvironment.getLocalGraphicsEnvironment()
@@ -333,8 +332,9 @@
 
     @Override
     public int getScreenResolution() throws HeadlessException {
-        return ((CGraphicsDevice) GraphicsEnvironment
-                .getLocalGraphicsEnvironment().getDefaultScreenDevice()).getScreenResolution();
+        return (int) ((CGraphicsDevice) GraphicsEnvironment
+                .getLocalGraphicsEnvironment().getDefaultScreenDevice())
+                .getXResolution();
     }
 
     @Override
--- a/src/macosx/native/sun/awt/AWTWindow.m	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/macosx/native/sun/awt/AWTWindow.m	Mon Nov 05 10:33:18 2012 -0500
@@ -324,6 +324,13 @@
     }
 }
 
++ (NSNumber *) getNSWindowDisplayID_AppKitThread:(NSWindow *)window {
+    AWT_ASSERT_APPKIT_THREAD;
+    NSScreen *screen = [window screen];
+    NSDictionary *deviceDescription = [screen deviceDescription];
+    return [deviceDescription objectForKey:@"NSScreenNumber"];
+}
+
 - (void) dealloc {
 AWT_ASSERT_APPKIT_THREAD;
 
@@ -1113,19 +1120,22 @@
  * Signature: (J)I
  */
 JNIEXPORT jint JNICALL
-Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindowDisplayID_1AppKitThread
+Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindowDisplayID
 (JNIEnv *env, jclass clazz, jlong windowPtr)
 {
-    jint ret; // CGDirectDisplayID
+    __block jint ret; // CGDirectDisplayID
 
 JNF_COCOA_ENTER(env);
-AWT_ASSERT_APPKIT_THREAD;
 
     NSWindow *window = OBJC(windowPtr);
-    NSScreen *screen = [window screen];
-    NSDictionary *deviceDescription = [screen deviceDescription];
-    NSNumber *displayID = [deviceDescription objectForKey:@"NSScreenNumber"];
-    ret = (jint)[displayID intValue];
+
+    if ([NSThread isMainThread]) {
+        ret = (jint)[[AWTWindow getNSWindowDisplayID_AppKitThread: window] intValue];
+    } else {
+        [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
+            ret = (jint)[[AWTWindow getNSWindowDisplayID_AppKitThread: window] intValue];
+        }];
+    }
 
 JNF_COCOA_EXIT(env);
 
--- a/src/macosx/native/sun/awt/CTrayIcon.h	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/macosx/native/sun/awt/CTrayIcon.h	Mon Nov 05 10:33:18 2012 -0500
@@ -53,6 +53,7 @@
 - (jobject) peer;
 - (void) setImage:(NSImage *) imagePtr sizing:(BOOL)autosize;
 - (NSPoint) getLocationOnScreen;
+- (void) deliverJavaMouseEvent:(NSEvent*) event;
 
 @end //AWTTrayIcon
 
@@ -68,6 +69,7 @@
 -(id)initWithTrayIcon:(AWTTrayIcon *)theTrayIcon;
 -(void)setHighlighted:(BOOL)aFlag;
 -(void)setImage:(NSImage*)anImage;
+-(void)setTrayIcon:(AWTTrayIcon*)theTrayIcon;
 
 @end //AWTTrayIconView
 
--- a/src/macosx/native/sun/awt/CTrayIcon.m	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/macosx/native/sun/awt/CTrayIcon.m	Mon Nov 05 10:33:18 2012 -0500
@@ -29,6 +29,7 @@
 #import "CTrayIcon.h"
 #import "ThreadUtilities.h"
 #include "GeomUtilities.h"
+#import "LWCToolkit.h"
 
 #define kImageInset 4.0
 
@@ -76,8 +77,9 @@
     // Its a bad idea to force the item to release our view by setting
     // the item's view to nil: it can lead to a crash in some scenarios.
     // The item will release the view later on, so just set the view's image
-    // to nil since we are done with it.
+    // and tray icon to nil since we are done with it.
     [view setImage: nil];
+    [view setTrayIcon: nil];
     [view release];
 
     [theItem release];
@@ -115,6 +117,45 @@
     return [[view window] convertBaseToScreen: NSZeroPoint];
 }
 
+-(void) deliverJavaMouseEvent: (NSEvent *) event {
+    [AWTToolkit eventCountPlusPlus];
+
+    JNIEnv *env = [ThreadUtilities getJNIEnv];
+
+    NSPoint eventLocation = [event locationInWindow];
+    NSPoint localPoint = [view convertPoint: eventLocation fromView: nil];
+    localPoint.y = [view bounds].size.height - localPoint.y;
+
+    NSPoint absP = [NSEvent mouseLocation];
+    NSEventType type = [event type];
+
+    NSRect screenRect = [[NSScreen mainScreen] frame];
+    absP.y = screenRect.size.height - absP.y;
+    jint clickCount;
+
+    clickCount = [event clickCount];
+
+    static JNF_CLASS_CACHE(jc_NSEvent, "sun/lwawt/macosx/event/NSEvent");
+    static JNF_CTOR_CACHE(jctor_NSEvent, jc_NSEvent, "(IIIIIIIIDD)V");
+    jobject jEvent = JNFNewObject(env, jctor_NSEvent,
+                                  [event type],
+                                  [event modifierFlags],
+                                  clickCount,
+                                  [event buttonNumber],
+                                  (jint)localPoint.x, (jint)localPoint.y,
+                                  (jint)absP.x, (jint)absP.y,
+                                  [event deltaY],
+                                  [event deltaX]);
+    if (jEvent == nil) {
+        // Unable to create event by some reason.
+        return;
+    }
+
+    static JNF_CLASS_CACHE(jc_TrayIcon, "sun/lwawt/macosx/CTrayIcon");
+    static JNF_MEMBER_CACHE(jm_handleMouseEvent, jc_TrayIcon, "handleMouseEvent", "(Lsun/lwawt/macosx/event/NSEvent;)V");
+    JNFCallVoidMethod(env, peer, jm_handleMouseEvent, jEvent);
+}
+
 @end //AWTTrayIcon
 //================================================
 
@@ -123,7 +164,7 @@
 -(id)initWithTrayIcon:(AWTTrayIcon *)theTrayIcon {
     self = [super initWithFrame:NSMakeRect(0, 0, 1, 1)];
 
-    trayIcon = theTrayIcon;
+    [self setTrayIcon: theTrayIcon];
     isHighlighted = NO;
     image = nil;
 
@@ -153,6 +194,10 @@
     }
 }
 
+-(void)setTrayIcon:(AWTTrayIcon*)theTrayIcon {
+    trayIcon = theTrayIcon;
+}
+
 - (void)menuWillOpen:(NSMenu *)menu
 {
     [self setHighlighted:YES];
@@ -191,30 +236,57 @@
      ];
 }
 
-- (void) mouseDown:(NSEvent *)e {
-    //find CTrayIcon.getPopupMenuModel method and call it to get popup menu ptr.
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
-    static JNF_CLASS_CACHE(jc_CTrayIcon, "sun/lwawt/macosx/CTrayIcon");
-    static JNF_MEMBER_CACHE(jm_getPopupMenuModel, jc_CTrayIcon, "getPopupMenuModel", "()J");
-    static JNF_MEMBER_CACHE(jm_performAction, jc_CTrayIcon, "performAction", "()V");
-    jlong res = JNFCallLongMethod(env, trayIcon.peer, jm_getPopupMenuModel);
-    if (res != 0) {
-        CPopupMenu *cmenu = jlong_to_ptr(res);
-        NSMenu* menu = [cmenu menu];
-        [menu setDelegate:self];
-        [trayIcon.theItem popUpStatusItemMenu:menu];
-        [self setNeedsDisplay:YES];
-    } else {
-        JNFCallVoidMethod(env, trayIcon.peer, jm_performAction);
+- (void)mouseDown:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
+
+    // don't show the menu on ctrl+click: it triggers ACTION event, like right click
+    if (([event modifierFlags] & NSControlKeyMask) == 0) {
+        //find CTrayIcon.getPopupMenuModel method and call it to get popup menu ptr.
+        JNIEnv *env = [ThreadUtilities getJNIEnv];
+        static JNF_CLASS_CACHE(jc_CTrayIcon, "sun/lwawt/macosx/CTrayIcon");
+        static JNF_MEMBER_CACHE(jm_getPopupMenuModel, jc_CTrayIcon, "getPopupMenuModel", "()J");
+        jlong res = JNFCallLongMethod(env, trayIcon.peer, jm_getPopupMenuModel);
+
+        if (res != 0) {
+            CPopupMenu *cmenu = jlong_to_ptr(res);
+            NSMenu* menu = [cmenu menu];
+            [menu setDelegate:self];
+            [trayIcon.theItem popUpStatusItemMenu:menu];
+            [self setNeedsDisplay:YES];
+        }
     }
 }
 
-- (void) rightMouseDown:(NSEvent *)e {
-    // Call CTrayIcon.performAction() method on right mouse press
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
-    static JNF_CLASS_CACHE(jc_CTrayIcon, "sun/lwawt/macosx/CTrayIcon");
-    static JNF_MEMBER_CACHE(jm_performAction, jc_CTrayIcon, "performAction", "()V");
-    JNFCallVoidMethod(env, trayIcon.peer, jm_performAction);
+- (void) mouseUp:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
+}
+
+- (void) mouseDragged:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
+}
+
+- (void) rightMouseDown:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
+}
+
+- (void) rightMouseUp:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
+}
+
+- (void) rightMouseDragged:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
+}
+
+- (void) otherMouseDown:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
+}
+
+- (void) otherMouseUp:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
+}
+
+- (void) otherMouseDragged:(NSEvent *)event {
+    [trayIcon deliverJavaMouseEvent: event];
 }
 
 
--- a/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,9 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParserFactory;
@@ -46,6 +49,8 @@
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
+import sun.misc.SharedSecrets;
+
 /**
  * The main class to parse JavaBeans XML archive.
  *
@@ -56,11 +61,10 @@
  * @see ElementHandler
  */
 public final class DocumentHandler extends DefaultHandler {
-    private final Map<String, Class<? extends ElementHandler>> handlers = new HashMap<String, Class<? extends ElementHandler>>();
-
-    private final Map<String, Object> environment = new HashMap<String, Object>();
-
-    private final List<Object> objects = new ArrayList<Object>();
+    private final AccessControlContext acc = AccessController.getContext();
+    private final Map<String, Class<? extends ElementHandler>> handlers = new HashMap<>();
+    private final Map<String, Object> environment = new HashMap<>();
+    private final List<Object> objects = new ArrayList<>();
 
     private Reference<ClassLoader> loader;
     private ExceptionListener listener;
@@ -351,23 +355,32 @@
      *
      * @param input  the input source to parse
      */
-    public void parse(InputSource input) {
-        try {
-            SAXParserFactory.newInstance().newSAXParser().parse(input, this);
+    public void parse(final InputSource input) {
+        if ((this.acc == null) && (null != System.getSecurityManager())) {
+            throw new SecurityException("AccessControlContext is not set");
         }
-        catch (ParserConfigurationException exception) {
-            handleException(exception);
-        }
-        catch (SAXException wrapper) {
-            Exception exception = wrapper.getException();
-            if (exception == null) {
-                exception = wrapper;
+        AccessControlContext stack = AccessController.getContext();
+        SharedSecrets.getJavaSecurityAccess().doIntersectionPrivilege(new PrivilegedAction<Void>() {
+            public Void run() {
+                try {
+                    SAXParserFactory.newInstance().newSAXParser().parse(input, DocumentHandler.this);
+                }
+                catch (ParserConfigurationException exception) {
+                    handleException(exception);
+                }
+                catch (SAXException wrapper) {
+                    Exception exception = wrapper.getException();
+                    if (exception == null) {
+                        exception = wrapper;
+                    }
+                    handleException(exception);
+                }
+                catch (IOException exception) {
+                    handleException(exception);
+                }
+                return null;
             }
-            handleException(exception);
-        }
-        catch (IOException exception) {
-            handleException(exception);
-        }
+        }, stack, this.acc);
     }
 
     /**
--- a/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
+import sun.reflect.misc.MethodUtil;
+
 /**
  * This class is intended to handle &lt;property&gt; element.
  * This element simplifies access to the properties.
@@ -168,11 +170,11 @@
     private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException {
         Class<?> type = bean.getClass();
         if (index == null) {
-            return findGetter(type, name).invoke(bean);
+            return MethodUtil.invoke(findGetter(type, name), bean, new Object[] {});
         } else if (type.isArray() && (name == null)) {
             return Array.get(bean, index);
         } else {
-            return findGetter(type, name, int.class).invoke(bean, index);
+            return MethodUtil.invoke(findGetter(type, name, int.class), bean, new Object[] {index});
         }
     }
 
@@ -197,11 +199,11 @@
                 : null;
 
         if (index == null) {
-            findSetter(type, name, param).invoke(bean, value);
+            MethodUtil.invoke(findSetter(type, name, param), bean, new Object[] {value});
         } else if (type.isArray() && (name == null)) {
             Array.set(bean, index, value);
         } else {
-            findSetter(type, name, int.class, param).invoke(bean, index, value);
+            MethodUtil.invoke(findSetter(type, name, int.class, param), bean, new Object[] {index, value});
         }
     }
 
--- a/src/share/classes/com/sun/crypto/provider/KeyProtector.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/com/sun/crypto/provider/KeyProtector.java	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, 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
@@ -363,34 +363,3 @@
         super(cipherSpi, provider, transformation);
     }
 }
-
-final class SealedObjectForKeyProtector extends javax.crypto.SealedObject {
-
-    static final long serialVersionUID = -3650226485480866989L;
-
-    SealedObjectForKeyProtector(Serializable object, Cipher c)
-        throws IOException, IllegalBlockSizeException {
-        super(object, c);
-    }
-
-    SealedObjectForKeyProtector(SealedObject so) {
-        super(so);
-    }
-
-    AlgorithmParameters getParameters() {
-        AlgorithmParameters params = null;
-        if (super.encodedParams != null) {
-            try {
-                params = AlgorithmParameters.getInstance("PBE", "SunJCE");
-                params.init(super.encodedParams);
-            } catch (NoSuchProviderException nspe) {
-                // eat.
-            } catch (NoSuchAlgorithmException nsae) {
-                //eat.
-            } catch (IOException ioe) {
-                //eat.
-            }
-        }
-        return params;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.crypto.provider;
+
+import java.io.*;
+import java.security.*;
+import javax.crypto.*;
+
+final class SealedObjectForKeyProtector extends SealedObject {
+
+    static final long serialVersionUID = -3650226485480866989L;
+
+    SealedObjectForKeyProtector(Serializable object, Cipher c)
+            throws IOException, IllegalBlockSizeException {
+        super(object, c);
+    }
+
+    SealedObjectForKeyProtector(SealedObject so) {
+        super(so);
+    }
+
+    AlgorithmParameters getParameters() {
+        AlgorithmParameters params = null;
+        if (super.encodedParams != null) {
+            try {
+                params = AlgorithmParameters.getInstance("PBE", "SunJCE");
+                params.init(super.encodedParams);
+            } catch (NoSuchProviderException nspe) {
+                // eat.
+            } catch (NoSuchAlgorithmException nsae) {
+                //eat.
+            } catch (IOException ioe) {
+                //eat.
+            }
+        }
+        return params;
+    }
+}
--- a/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java	Mon Nov 05 10:33:18 2012 -0500
@@ -68,9 +68,9 @@
         this.notifBuffer = notifBuffer;
         this.connectionId = connectionId;
         connectionTimeout = EnvHelp.getServerConnectionTimeout(env);
-        checkNotificationEmission = EnvHelp.computeBooleanFromString(
-            env,
-            "jmx.remote.x.check.notification.emission",false);
+
+        String stringBoolean = (String) env.get("jmx.remote.x.check.notification.emission");
+        checkNotificationEmission = EnvHelp.computeBooleanFromString( stringBoolean );
         notificationAccessController =
                 EnvHelp.getNotificationAccessController(env);
     }
--- a/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java	Mon Nov 05 10:33:18 2012 -0500
@@ -665,97 +665,57 @@
      * Computes a boolean value from a string value retrieved from a
      * property in the given map.
      *
-     * @param env the environment map.
-     * @param prop the name of the property in the environment map whose
-     * returned string value must be converted into a boolean value.
-     * @param systemProperty if true, consult a system property of the
-     * same name if there is no entry in the environment map.
+     * @param stringBoolean the string value that must be converted
+     * into a boolean value.
      *
      * @return
      *   <ul>
-     *   <li>{@code false} if {@code env.get(prop)} is {@code null}</li>
+     *   <li>{@code false} if {@code stringBoolean} is {@code null}</li>
      *   <li>{@code false} if
-     *       {@code ((String)env.get(prop)).equalsIgnoreCase("false")}
+     *       {@code stringBoolean.equalsIgnoreCase("false")}
      *       is {@code true}</li>
      *   <li>{@code true} if
-     *       {@code ((String)env.get(prop)).equalsIgnoreCase("true")}
+     *       {@code stringBoolean.equalsIgnoreCase("true")}
      *       is {@code true}</li>
      *   </ul>
      *
-     * @throws IllegalArgumentException if {@code env} is {@code null} or
-     * {@code env.get(prop)} is not {@code null} and
+     * @throws IllegalArgumentException if
      * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and
      * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are
      * {@code false}.
-     * @throws ClassCastException if {@code env.get(prop)} cannot be cast
-     * to {@code String}.
      */
-    public static boolean computeBooleanFromString(
-            Map<String, ?> env, String prop, boolean systemProperty) {
-
-        if (env == null)
-            throw new IllegalArgumentException("env map cannot be null");
-
+    public static boolean computeBooleanFromString(String stringBoolean) {
         // returns a default value of 'false' if no property is found...
-        return computeBooleanFromString(env,prop,systemProperty,false);
+        return computeBooleanFromString(stringBoolean,false);
     }
 
     /**
      * Computes a boolean value from a string value retrieved from a
      * property in the given map.
      *
-     * @param env the environment map.
-     * @param prop the name of the property in the environment map whose
-     * returned string value must be converted into a boolean value.
-     * @param systemProperty if true, consult a system property of the
-     * same name if there is no entry in the environment map.
+     * @param stringBoolean the string value that must be converted
+     * into a boolean value.
      * @param defaultValue a default value to return in case no property
      *        was defined.
      *
      * @return
      *   <ul>
-     *   <li>{@code defaultValue} if {@code env.get(prop)} is {@code null}
-     *       and {@code systemProperty} is {@code false}</li>
-     *   <li>{@code defaultValue} if {@code env.get(prop)} is {@code null}
-     *       and {@code systemProperty} is {@code true} and
-     *       {@code System.getProperty(prop)} is {@code null}</li>
-     *   <li>{@code false} if {@code env.get(prop)} is {@code null}
-     *       and {@code systemProperty} is {@code true} and
-     *       {@code System.getProperty(prop).equalsIgnoreCase("false")}
-     *       is {@code true}</li>
-     *   <li>{@code true} if {@code env.get(prop)} is {@code null}
-     *       and {@code systemProperty} is {@code true} and
-     *       {@code System.getProperty(prop).equalsIgnoreCase("true")}
-     *       is {@code true}</li>
+     *   <li>{@code defaultValue} if {@code stringBoolean}
+     *   is {@code null}</li>
      *   <li>{@code false} if
-     *       {@code ((String)env.get(prop)).equalsIgnoreCase("false")}
+     *       {@code stringBoolean.equalsIgnoreCase("false")}
      *       is {@code true}</li>
      *   <li>{@code true} if
-     *       {@code ((String)env.get(prop)).equalsIgnoreCase("true")}
+     *       {@code stringBoolean.equalsIgnoreCase("true")}
      *       is {@code true}</li>
      *   </ul>
      *
-     * @throws IllegalArgumentException if {@code env} is {@code null} or
-     * {@code env.get(prop)} is not {@code null} and
+     * @throws IllegalArgumentException if
      * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and
      * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are
      * {@code false}.
-     * @throws ClassCastException if {@code env.get(prop)} cannot be cast
-     * to {@code String}.
      */
-    public static boolean computeBooleanFromString(
-            Map<String, ?> env, String prop,
-            boolean systemProperty, boolean defaultValue) {
-
-        if (env == null)
-            throw new IllegalArgumentException("env map cannot be null");
-
-        String stringBoolean = (String) env.get(prop);
-        if (stringBoolean == null && systemProperty) {
-            stringBoolean =
-                    AccessController.doPrivileged(new GetPropertyAction(prop));
-        }
-
+    public static boolean computeBooleanFromString( String stringBoolean, boolean defaultValue) {
         if (stringBoolean == null)
             return defaultValue;
         else if (stringBoolean.equalsIgnoreCase("true"))
@@ -763,8 +723,8 @@
         else if (stringBoolean.equalsIgnoreCase("false"))
             return false;
         else
-            throw new IllegalArgumentException(prop +
-                " must be \"true\" or \"false\" instead of \"" +
+            throw new IllegalArgumentException(
+                "Property value must be \"true\" or \"false\" instead of \"" +
                 stringBoolean + "\"");
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/jmx/snmp/agent/AcmChecker.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.jmx.snmp.agent;
+
+import java.io.Serializable;
+import java.util.Enumeration;
+import java.util.logging.Level;
+import java.util.Vector;
+
+import javax.management.ObjectName;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.MBeanRegistrationException;
+import javax.management.NotCompliantMBeanException;
+
+import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
+import com.sun.jmx.snmp.SnmpOid;
+import com.sun.jmx.snmp.SnmpVarBind;
+import com.sun.jmx.snmp.SnmpDefinitions;
+import com.sun.jmx.snmp.SnmpStatusException;
+import com.sun.jmx.snmp.SnmpEngine;
+import com.sun.jmx.snmp.SnmpUnknownModelException;
+import com.sun.jmx.snmp.internal.SnmpAccessControlModel;
+import com.sun.jmx.snmp.internal.SnmpEngineImpl;
+
+/**
+ * Oid Checker makes use of ACM to check each OID during the getnext process.
+ */
+class AcmChecker {
+
+
+    SnmpAccessControlModel model = null;
+    String principal = null;
+    int securityLevel = -1;
+    int version = -1;
+    int pduType = -1;
+    int securityModel = -1;
+    byte[] contextName = null;
+    SnmpEngineImpl engine = null;
+    LongList l = null;
+    AcmChecker(SnmpMibRequest req) {
+        engine = (SnmpEngineImpl) req.getEngine();
+        //We are in V3 architecture, ACM is in the picture.
+        if(engine != null) {
+            if(engine.isCheckOidActivated()) {
+                try {
+                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
+                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
+                                SnmpMib.class.getName(),
+                                "AcmChecker(SnmpMibRequest)",
+                                "SNMP V3 Access Control to be done");
+                    }
+                    model = (SnmpAccessControlModel)
+                        engine.getAccessControlSubSystem().
+                        getModel(SnmpDefinitions.snmpVersionThree);
+                    principal = req.getPrincipal();
+                    securityLevel = req.getSecurityLevel();
+                    pduType = req.getPdu().type;
+                    version = req.getRequestPduVersion();
+                    securityModel = req.getSecurityModel();
+                    contextName = req.getAccessContextName();
+                    l = new LongList();
+                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
+                        final StringBuilder strb = new StringBuilder()
+                        .append("Will check oid for : principal : ")
+                        .append(principal)
+                        .append("; securityLevel : ").append(securityLevel)
+                        .append("; pduType : ").append(pduType)
+                        .append("; version : ").append(version)
+                        .append("; securityModel : ").append(securityModel)
+                        .append("; contextName : ").append(contextName);
+                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
+                                SnmpMib.class.getName(),
+                                "AcmChecker(SnmpMibRequest)", strb.toString());
+                    }
+
+                }catch(SnmpUnknownModelException e) {
+                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
+                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
+                                SnmpMib.class.getName(),
+                                "AcmChecker(SnmpMibRequest)",
+                                "Unknown Model, no ACM check.");
+                    }
+                }
+            }
+        }
+    }
+
+    void add(int index, long arc) {
+        if(model != null)
+            l.add(index, arc);
+    }
+
+    void remove(int index) {
+        if(model != null)
+            l.remove(index);
+    }
+
+    void add(final int at,final long[] src, final int from,
+             final int count) {
+        if(model != null)
+            l.add(at,src,from,count);
+    }
+
+    void remove(final int from, final int count) {
+        if(model != null)
+            l.remove(from,count);
+    }
+
+    void checkCurrentOid() throws SnmpStatusException {
+        if(model != null) {
+            SnmpOid oid = new SnmpOid(l.toArray());
+            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
+                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(),
+                        "checkCurrentOid", "Checking access for : " + oid);
+            }
+            model.checkAccess(version,
+                              principal,
+                              securityLevel,
+                              pduType,
+                              securityModel,
+                              contextName,
+                              oid);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/jmx/snmp/agent/LongList.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.jmx.snmp.agent;
+
+import java.io.Serializable;
+import java.util.Enumeration;
+import java.util.logging.Level;
+import java.util.Vector;
+
+import javax.management.ObjectName;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.MBeanRegistrationException;
+import javax.management.NotCompliantMBeanException;
+
+import static com.sun.jmx.defaults.JmxProperties.SNMP_ADAPTOR_LOGGER;
+import com.sun.jmx.snmp.SnmpOid;
+import com.sun.jmx.snmp.SnmpVarBind;
+import com.sun.jmx.snmp.SnmpDefinitions;
+import com.sun.jmx.snmp.SnmpStatusException;
+import com.sun.jmx.snmp.SnmpEngine;
+import com.sun.jmx.snmp.SnmpUnknownModelException;
+import com.sun.jmx.snmp.internal.SnmpAccessControlModel;
+import com.sun.jmx.snmp.internal.SnmpEngineImpl;
+
+/**
+ * This list is used in order to construct the OID during the getnext.
+ * The constructed oid is checked by the checker AcmChecker.
+ */
+final class LongList {
+
+    public static int DEFAULT_CAPACITY = 10;
+
+    public static int DEFAULT_INCREMENT = 10;
+
+
+    private final int DELTA;
+    private int size;
+
+    /**
+     * The list content. Any access to this variable must be protected
+     * by a synchronized block on the LongList object.
+     * Only read-only action should be performed on this object.
+     **/
+    public  long[] list;
+
+    LongList() {
+        this(DEFAULT_CAPACITY,DEFAULT_INCREMENT);
+    }
+
+    LongList(int initialCapacity) {
+        this(initialCapacity,DEFAULT_INCREMENT);
+    }
+
+    LongList(int initialCapacity, int delta) {
+        size = 0;
+        DELTA = delta;
+        list = allocate(initialCapacity);
+    }
+
+    /**
+     * Same behaviour than size() in {@link java.util.List}.
+     **/
+    public final int size() { return size;}
+
+    /**
+     * Same behaviour than add(long o) in {@link java.util.List}.
+     * Any access to this method should be protected in a synchronized
+     * block on the LongList object.
+     **/
+    public final boolean add(final long o) {
+        if (size >= list.length)
+            resize();
+        list[size++]=o;
+        return true;
+    }
+
+    /**
+     * Same behaviour than add(int index, long o) in
+     * {@link java.util.List}.
+     * Any access to this method should be protected in a synchronized
+     * block on the LongList object.
+     **/
+    public final void add(final int index, final long o) {
+        if (index >  size) throw new IndexOutOfBoundsException();
+        if (index >= list.length) resize();
+        if (index == size) {
+            list[size++]=o;
+            return;
+        }
+
+        java.lang.System.arraycopy(list,index,list,index+1,size-index);
+        list[index]=o;
+        size++;
+    }
+
+    /**
+     * Adds <var>count</var> elements to the list.
+     * @param at index at which the elements must be inserted. The
+     *        first element will be inserted at this index.
+     * @param src  An array containing the elements we want to insert.
+     * @param from Index of the first element from <var>src</var> that
+     *        must be inserted.
+     * @param count number of elements to insert.
+     * Any access to this method should be protected in a synchronized
+     * block on the LongList object.
+     **/
+    public final void add(final int at,final long[] src, final int from,
+                          final int count) {
+        if (count <= 0) return;
+        if (at > size) throw new IndexOutOfBoundsException();
+        ensure(size+count);
+        if (at < size) {
+            java.lang.System.arraycopy(list,at,list,at+count,size-at);
+        }
+        java.lang.System.arraycopy(src,from,list,at,count);
+        size+=count;
+    }
+
+    /**
+     * Any access to this method should be protected in a synchronized
+     * block on the LongList object.
+     **/
+    public final long remove(final int from, final int count) {
+        if (count < 1 || from < 0) return -1;
+        if (from+count > size) return -1;
+
+        final long o = list[from];
+        final int oldsize = size;
+        size = size - count;
+
+        if (from == size) return o;
+
+        java.lang.System.arraycopy(list,from+count,list,from,
+                                   size-from);
+        return o;
+    }
+
+    /**
+     * Same behaviour than remove(int index) in {@link java.util.List}.
+     * Any access to this method should be protected in a synchronized
+     * block on the LongList object.
+     **/
+    public final long remove(final int index) {
+        if (index >= size) return -1;
+        final long o = list[index];
+        list[index]=0;
+        if (index == --size) return o;
+
+        java.lang.System.arraycopy(list,index+1,list,index,
+                                   size-index);
+        return o;
+    }
+
+    /**
+     * Same behaviour than the toArray(long[] a) method in
+     * {@link java.util.List}.
+     * Any access to this method should be protected in a synchronized
+     * block on the LongList object.
+     **/
+    public final long[] toArray(long[] a) {
+        java.lang.System.arraycopy(list,0,a,0,size);
+        return a;
+    }
+
+    /**
+     * Same behaviour than the toArray() method in
+     * {@link java.util.List}.
+     * Any access to this method should be protected in a synchronized
+     * block on the LongList object.
+     **/
+    public final long[] toArray() {
+        return toArray(new long[size]);
+    }
+
+    /**
+     * Resize the list. Increase its capacity by DELTA elements.
+     * Any call to this method must be protected by a synchronized
+     * block on this LongList.
+     **/
+    private final void resize() {
+        final long[] newlist = allocate(list.length + DELTA);
+        java.lang.System.arraycopy(list,0,newlist,0,size);
+        list = newlist;
+    }
+
+    /**
+     * Resize the list. Insure that the new length will be at
+     * least equal to <var>length</var>.
+     * @param length new minimal length requested.
+     * Any call to this method must be protected by a synchronized
+     * block on this LongList.
+     **/
+    private final void ensure(int length) {
+        if (list.length < length) {
+            final int min = list.length+DELTA;
+            length=(length<min)?min:length;
+            final long[] newlist = allocate(length);
+            java.lang.System.arraycopy(list,0,newlist,0,size);
+            list = newlist;
+        }
+    }
+
+    /**
+     * Allocate a new array of object of specified length.
+     **/
+    private final long[] allocate(final int length) {
+        return new long[length];
+    }
+
+}
--- a/src/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/com/sun/jmx/snmp/agent/SnmpMib.java	Mon Nov 05 10:33:18 2012 -0500
@@ -48,296 +48,6 @@
 import com.sun.jmx.snmp.internal.SnmpEngineImpl;
 
 /**
- * This list is used in order to construct the OID during the getnext.
- * The constructed oid is checked by the checker AcmChecker.
- */
-final class LongList {
-
-    public static int DEFAULT_CAPACITY = 10;
-
-    public static int DEFAULT_INCREMENT = 10;
-
-
-    private final int DELTA;
-    private int size;
-
-    /**
-     * The list content. Any access to this variable must be protected
-     * by a synchronized block on the LongList object.
-     * Only read-only action should be performed on this object.
-     **/
-    public  long[] list;
-
-    LongList() {
-        this(DEFAULT_CAPACITY,DEFAULT_INCREMENT);
-    }
-
-    LongList(int initialCapacity) {
-        this(initialCapacity,DEFAULT_INCREMENT);
-    }
-
-    LongList(int initialCapacity, int delta) {
-        size = 0;
-        DELTA = delta;
-        list = allocate(initialCapacity);
-    }
-
-    /**
-     * Same behaviour than size() in {@link java.util.List}.
-     **/
-    public final int size() { return size;}
-
-    /**
-     * Same behaviour than add(long o) in {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final boolean add(final long o) {
-        if (size >= list.length)
-            resize();
-        list[size++]=o;
-        return true;
-    }
-
-    /**
-     * Same behaviour than add(int index, long o) in
-     * {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final void add(final int index, final long o) {
-        if (index >  size) throw new IndexOutOfBoundsException();
-        if (index >= list.length) resize();
-        if (index == size) {
-            list[size++]=o;
-            return;
-        }
-
-        java.lang.System.arraycopy(list,index,list,index+1,size-index);
-        list[index]=o;
-        size++;
-    }
-
-    /**
-     * Adds <var>count</var> elements to the list.
-     * @param at index at which the elements must be inserted. The
-     *        first element will be inserted at this index.
-     * @param src  An array containing the elements we want to insert.
-     * @param from Index of the first element from <var>src</var> that
-     *        must be inserted.
-     * @param count number of elements to insert.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final void add(final int at,final long[] src, final int from,
-                          final int count) {
-        if (count <= 0) return;
-        if (at > size) throw new IndexOutOfBoundsException();
-        ensure(size+count);
-        if (at < size) {
-            java.lang.System.arraycopy(list,at,list,at+count,size-at);
-        }
-        java.lang.System.arraycopy(src,from,list,at,count);
-        size+=count;
-    }
-
-    /**
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final long remove(final int from, final int count) {
-        if (count < 1 || from < 0) return -1;
-        if (from+count > size) return -1;
-
-        final long o = list[from];
-        final int oldsize = size;
-        size = size - count;
-
-        if (from == size) return o;
-
-        java.lang.System.arraycopy(list,from+count,list,from,
-                                   size-from);
-        return o;
-    }
-
-    /**
-     * Same behaviour than remove(int index) in {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final long remove(final int index) {
-        if (index >= size) return -1;
-        final long o = list[index];
-        list[index]=0;
-        if (index == --size) return o;
-
-        java.lang.System.arraycopy(list,index+1,list,index,
-                                   size-index);
-        return o;
-    }
-
-    /**
-     * Same behaviour than the toArray(long[] a) method in
-     * {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final long[] toArray(long[] a) {
-        java.lang.System.arraycopy(list,0,a,0,size);
-        return a;
-    }
-
-    /**
-     * Same behaviour than the toArray() method in
-     * {@link java.util.List}.
-     * Any access to this method should be protected in a synchronized
-     * block on the LongList object.
-     **/
-    public final long[] toArray() {
-        return toArray(new long[size]);
-    }
-
-    /**
-     * Resize the list. Increase its capacity by DELTA elements.
-     * Any call to this method must be protected by a synchronized
-     * block on this LongList.
-     **/
-    private final void resize() {
-        final long[] newlist = allocate(list.length + DELTA);
-        java.lang.System.arraycopy(list,0,newlist,0,size);
-        list = newlist;
-    }
-
-    /**
-     * Resize the list. Insure that the new length will be at
-     * least equal to <var>length</var>.
-     * @param length new minimal length requested.
-     * Any call to this method must be protected by a synchronized
-     * block on this LongList.
-     **/
-    private final void ensure(int length) {
-        if (list.length < length) {
-            final int min = list.length+DELTA;
-            length=(length<min)?min:length;
-            final long[] newlist = allocate(length);
-            java.lang.System.arraycopy(list,0,newlist,0,size);
-            list = newlist;
-        }
-    }
-
-    /**
-     * Allocate a new array of object of specified length.
-     **/
-    private final long[] allocate(final int length) {
-        return new long[length];
-    }
-
-}
-
-/**
- * Oid Checker makes use of ACM to check each OID during the getnext process.
- */
-class AcmChecker {
-
-
-    SnmpAccessControlModel model = null;
-    String principal = null;
-    int securityLevel = -1;
-    int version = -1;
-    int pduType = -1;
-    int securityModel = -1;
-    byte[] contextName = null;
-    SnmpEngineImpl engine = null;
-    LongList l = null;
-    AcmChecker(SnmpMibRequest req) {
-        engine = (SnmpEngineImpl) req.getEngine();
-        //We are in V3 architecture, ACM is in the picture.
-        if(engine != null) {
-            if(engine.isCheckOidActivated()) {
-                try {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "AcmChecker(SnmpMibRequest)",
-                                "SNMP V3 Access Control to be done");
-                    }
-                    model = (SnmpAccessControlModel)
-                        engine.getAccessControlSubSystem().
-                        getModel(SnmpDefinitions.snmpVersionThree);
-                    principal = req.getPrincipal();
-                    securityLevel = req.getSecurityLevel();
-                    pduType = req.getPdu().type;
-                    version = req.getRequestPduVersion();
-                    securityModel = req.getSecurityModel();
-                    contextName = req.getAccessContextName();
-                    l = new LongList();
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        final StringBuilder strb = new StringBuilder()
-                        .append("Will check oid for : principal : ")
-                        .append(principal)
-                        .append("; securityLevel : ").append(securityLevel)
-                        .append("; pduType : ").append(pduType)
-                        .append("; version : ").append(version)
-                        .append("; securityModel : ").append(securityModel)
-                        .append("; contextName : ").append(contextName);
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "AcmChecker(SnmpMibRequest)", strb.toString());
-                    }
-
-                }catch(SnmpUnknownModelException e) {
-                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST,
-                                SnmpMib.class.getName(),
-                                "AcmChecker(SnmpMibRequest)",
-                                "Unknown Model, no ACM check.");
-                    }
-                }
-            }
-        }
-    }
-
-    void add(int index, long arc) {
-        if(model != null)
-            l.add(index, arc);
-    }
-
-    void remove(int index) {
-        if(model != null)
-            l.remove(index);
-    }
-
-    void add(final int at,final long[] src, final int from,
-             final int count) {
-        if(model != null)
-            l.add(at,src,from,count);
-    }
-
-    void remove(final int from, final int count) {
-        if(model != null)
-            l.remove(from,count);
-    }
-
-    void checkCurrentOid() throws SnmpStatusException {
-        if(model != null) {
-            SnmpOid oid = new SnmpOid(l.toArray());
-            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
-                SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpMib.class.getName(),
-                        "checkCurrentOid", "Checking access for : " + oid);
-            }
-            model.checkAccess(version,
-                              principal,
-                              securityLevel,
-                              pduType,
-                              securityModel,
-                              contextName,
-                              oid);
-        }
-    }
-
-}
-
-/**
  * Abstract class for representing an SNMP MIB.
  * <P>
  * When compiling a SNMP MIB, among all the classes generated by
--- a/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Mon Nov 05 10:33:18 2012 -0500
@@ -802,7 +802,7 @@
 
         if (doNotPrompt) {
             throw new LoginException
-                ("Unable to obtain Princpal Name for authentication ");
+                ("Unable to obtain Principal Name for authentication ");
         } else {
             if (callbackHandler == null)
                 throw new LoginException("No CallbackHandler "
--- a/src/share/classes/java/beans/XMLDecoder.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/beans/XMLDecoder.java	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,9 @@
 import java.io.Closeable;
 import java.io.InputStream;
 import java.io.IOException;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.helpers.DefaultHandler;
@@ -61,6 +64,7 @@
  * @author Philip Milne
  */
 public class XMLDecoder implements AutoCloseable {
+    private final AccessControlContext acc = AccessController.getContext();
     private final DocumentHandler handler = new DocumentHandler();
     private final InputSource input;
     private Object owner;
@@ -189,7 +193,15 @@
             return false;
         }
         if (this.array == null) {
-            this.handler.parse(this.input);
+            if ((this.acc == null) && (null != System.getSecurityManager())) {
+                throw new SecurityException("AccessControlContext is not set");
+            }
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                public Void run() {
+                    XMLDecoder.this.handler.parse(XMLDecoder.this.input);
+                    return null;
+                }
+            }, this.acc);
             this.array = this.handler.getObjects();
         }
         return true;
--- a/src/share/classes/java/io/File.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/io/File.java	Mon Nov 05 10:33:18 2012 -0500
@@ -153,7 +153,7 @@
     /**
      * The FileSystem object representing the platform's local file system.
      */
-    private static final FileSystem fs = FileSystem.getFileSystem();
+    private static final FileSystem fs = DefaultFileSystem.getFileSystem();
 
     /**
      * This abstract pathname's normalized pathname string.  A normalized
--- a/src/share/classes/java/io/FilePermission.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/io/FilePermission.java	Mon Nov 05 10:33:18 2012 -0500
@@ -407,7 +407,7 @@
      * @return a hash code value for this object.
      */
     public int hashCode() {
-        return this.cpath.hashCode();
+        return 0;
     }
 
     /**
--- a/src/share/classes/java/io/FileSystem.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/io/FileSystem.java	Mon Nov 05 10:33:18 2012 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, 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,13 +32,6 @@
 
 abstract class FileSystem {
 
-    /**
-     * Return the FileSystem object representing this platform's local
-     * filesystem.
-     */
-    public static native FileSystem getFileSystem();
-
-
     /* -- Normalization and construction -- */
 
     /**
--- a/src/share/classes/java/lang/AbstractStringBuilder.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/AbstractStringBuilder.java	Mon Nov 05 10:33:18 2012 -0500
@@ -70,6 +70,7 @@
      * @return  the length of the sequence of characters currently
      *          represented by this object
      */
+    @Override
     public int length() {
         return count;
     }
@@ -200,6 +201,7 @@
      * @throws     IndexOutOfBoundsException  if {@code index} is
      *             negative or greater than or equal to {@code length()}.
      */
+    @Override
     public char charAt(int index) {
         if ((index < 0) || (index >= count))
             throw new StringIndexOutOfBoundsException(index);
@@ -431,14 +433,29 @@
         return this;
     }
 
+    /**
+     * @since 1.8
+     */
+    AbstractStringBuilder append(AbstractStringBuilder asb) {
+        if (asb == null)
+            return append("null");
+        int len = asb.length();
+        ensureCapacityInternal(count + len);
+        asb.getChars(0, len, value, count);
+        count += len;
+        return this;
+    }
+
     // Documentation in subclasses because of synchro difference
+    @Override
     public AbstractStringBuilder append(CharSequence s) {
         if (s == null)
             s = "null";
         if (s instanceof String)
             return this.append((String)s);
-        if (s instanceof StringBuffer)
-            return this.append((StringBuffer)s);
+        if (s instanceof AbstractStringBuilder)
+            return this.append((AbstractStringBuilder)s);
+
         return this.append(s, 0, s.length());
     }
 
@@ -471,6 +488,7 @@
      *             {@code start} is greater than {@code end} or
      *             {@code end} is greater than {@code s.length()}
      */
+    @Override
     public AbstractStringBuilder append(CharSequence s, int start, int end) {
         if (s == null)
             s = "null";
@@ -585,6 +603,7 @@
      * @param   c   a {@code char}.
      * @return  a reference to this object.
      */
+    @Override
     public AbstractStringBuilder append(char c) {
         ensureCapacityInternal(count + 1);
         value[count++] = c;
@@ -847,6 +866,7 @@
      *          or if <tt>start</tt> is greater than <tt>end</tt>
      * @spec JSR-51
      */
+    @Override
     public CharSequence subSequence(int start, int end) {
         return substring(start, end);
     }
@@ -1397,6 +1417,7 @@
      *
      * @return  a string representation of this sequence of characters.
      */
+    @Override
     public abstract String toString();
 
     /**
--- a/src/share/classes/java/lang/StringBuffer.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/StringBuffer.java	Mon Nov 05 10:33:18 2012 -0500
@@ -149,15 +149,18 @@
         append(seq);
     }
 
+    @Override
     public synchronized int length() {
         return count;
     }
 
+    @Override
     public synchronized int capacity() {
         return value.length;
     }
 
 
+    @Override
     public synchronized void ensureCapacity(int minimumCapacity) {
         if (minimumCapacity > value.length) {
             expandCapacity(minimumCapacity);
@@ -167,6 +170,7 @@
     /**
      * @since      1.5
      */
+    @Override
     public synchronized void trimToSize() {
         super.trimToSize();
     }
@@ -175,6 +179,7 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @see        #length()
      */
+    @Override
     public synchronized void setLength(int newLength) {
         super.setLength(newLength);
     }
@@ -183,6 +188,7 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @see        #length()
      */
+    @Override
     public synchronized char charAt(int index) {
         if ((index < 0) || (index >= count))
             throw new StringIndexOutOfBoundsException(index);
@@ -192,6 +198,7 @@
     /**
      * @since      1.5
      */
+    @Override
     public synchronized int codePointAt(int index) {
         return super.codePointAt(index);
     }
@@ -199,6 +206,7 @@
     /**
      * @since     1.5
      */
+    @Override
     public synchronized int codePointBefore(int index) {
         return super.codePointBefore(index);
     }
@@ -206,6 +214,7 @@
     /**
      * @since     1.5
      */
+    @Override
     public synchronized int codePointCount(int beginIndex, int endIndex) {
         return super.codePointCount(beginIndex, endIndex);
     }
@@ -213,6 +222,7 @@
     /**
      * @since     1.5
      */
+    @Override
     public synchronized int offsetByCodePoints(int index, int codePointOffset) {
         return super.offsetByCodePoints(index, codePointOffset);
     }
@@ -221,6 +231,7 @@
      * @throws NullPointerException {@inheritDoc}
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public synchronized void getChars(int srcBegin, int srcEnd, char[] dst,
                                       int dstBegin)
     {
@@ -231,17 +242,20 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @see        #length()
      */
+    @Override
     public synchronized void setCharAt(int index, char ch) {
         if ((index < 0) || (index >= count))
             throw new StringIndexOutOfBoundsException(index);
         value[index] = ch;
     }
 
+    @Override
     public synchronized StringBuffer append(Object obj) {
         super.append(String.valueOf(obj));
         return this;
     }
 
+    @Override
     public synchronized StringBuffer append(String str) {
         super.append(str);
         return this;
@@ -276,6 +290,14 @@
         return this;
     }
 
+    /**
+     * @since 1.8
+     */
+    @Override
+    synchronized StringBuffer append(AbstractStringBuilder asb) {
+        super.append(asb);
+        return this;
+    }
 
     /**
      * Appends the specified {@code CharSequence} to this
@@ -298,27 +320,26 @@
      * @return  a reference to this object.
      * @since 1.5
      */
+    @Override
     public StringBuffer append(CharSequence s) {
-        // Note, synchronization achieved via other invocations
-        if (s == null)
-            s = "null";
-        if (s instanceof String)
-            return this.append((String)s);
-        if (s instanceof StringBuffer)
-            return this.append((StringBuffer)s);
-        return this.append(s, 0, s.length());
+        // Note, synchronization achieved via invocations of other StringBuffer methods after
+        // narrowing of s to specific type
+        super.append(s);
+        return this;
     }
 
     /**
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since      1.5
      */
+    @Override
     public synchronized StringBuffer append(CharSequence s, int start, int end)
     {
         super.append(s, start, end);
         return this;
     }
 
+    @Override
     public synchronized StringBuffer append(char[] str) {
         super.append(str);
         return this;
@@ -327,21 +348,25 @@
     /**
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public synchronized StringBuffer append(char[] str, int offset, int len) {
         super.append(str, offset, len);
         return this;
     }
 
+    @Override
     public synchronized StringBuffer append(boolean b) {
         super.append(b);
         return this;
     }
 
+    @Override
     public synchronized StringBuffer append(char c) {
         super.append(c);
         return this;
     }
 
+    @Override
     public synchronized StringBuffer append(int i) {
         super.append(i);
         return this;
@@ -350,21 +375,25 @@
     /**
      * @since 1.5
      */
+    @Override
     public synchronized StringBuffer appendCodePoint(int codePoint) {
         super.appendCodePoint(codePoint);
         return this;
     }
 
+    @Override
     public synchronized StringBuffer append(long lng) {
         super.append(lng);
         return this;
     }
 
+    @Override
     public synchronized StringBuffer append(float f) {
         super.append(f);
         return this;
     }
 
+    @Override
     public synchronized StringBuffer append(double d) {
         super.append(d);
         return this;
@@ -374,6 +403,7 @@
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      * @since      1.2
      */
+    @Override
     public synchronized StringBuffer delete(int start, int end) {
         super.delete(start, end);
         return this;
@@ -383,6 +413,7 @@
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      * @since      1.2
      */
+    @Override
     public synchronized StringBuffer deleteCharAt(int index) {
         super.deleteCharAt(index);
         return this;
@@ -392,6 +423,7 @@
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      * @since      1.2
      */
+    @Override
     public synchronized StringBuffer replace(int start, int end, String str) {
         super.replace(start, end, str);
         return this;
@@ -401,6 +433,7 @@
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      * @since      1.2
      */
+    @Override
     public synchronized String substring(int start) {
         return substring(start, count);
     }
@@ -409,6 +442,7 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since      1.4
      */
+    @Override
     public synchronized CharSequence subSequence(int start, int end) {
         return super.substring(start, end);
     }
@@ -417,6 +451,7 @@
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      * @since      1.2
      */
+    @Override
     public synchronized String substring(int start, int end) {
         return super.substring(start, end);
     }
@@ -425,6 +460,7 @@
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      * @since      1.2
      */
+    @Override
     public synchronized StringBuffer insert(int index, char[] str, int offset,
                                             int len)
     {
@@ -435,6 +471,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public synchronized StringBuffer insert(int offset, Object obj) {
         super.insert(offset, String.valueOf(obj));
         return this;
@@ -443,6 +480,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public synchronized StringBuffer insert(int offset, String str) {
         super.insert(offset, str);
         return this;
@@ -451,6 +489,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public synchronized StringBuffer insert(int offset, char[] str) {
         super.insert(offset, str);
         return this;
@@ -460,21 +499,21 @@
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since      1.5
      */
+    @Override
     public StringBuffer insert(int dstOffset, CharSequence s) {
-        // Note, synchronization achieved via other invocations
-        if (s == null)
-            s = "null";
-        if (s instanceof String)
-            return this.insert(dstOffset, (String)s);
-        return this.insert(dstOffset, s, 0, s.length());
+        // Note, synchronization achieved via invocations of other StringBuffer methods
+        // after narrowing of s to specific type
+        super.insert(dstOffset, s);
+        return this;
     }
 
     /**
      * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since      1.5
      */
+    @Override
     public synchronized StringBuffer insert(int dstOffset, CharSequence s,
-                                            int start, int end)
+            int start, int end)
     {
         super.insert(dstOffset, s, start, end);
         return this;
@@ -483,13 +522,18 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
-    public StringBuffer insert(int offset, boolean b) {
-        return insert(offset, String.valueOf(b));
+    @Override
+    public  StringBuffer insert(int offset, boolean b) {
+        // Note, synchronization achieved via invocation of StringBuffer insert(int, String)
+        // after conversion of b to String by super class method
+        super.insert(offset, b);
+        return this;
     }
 
     /**
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public synchronized StringBuffer insert(int offset, char c) {
         super.insert(offset, c);
         return this;
@@ -498,54 +542,73 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuffer insert(int offset, int i) {
-        return insert(offset, String.valueOf(i));
+        // Note, synchronization achieved via invocation of StringBuffer insert(int, String)
+        // after conversion of i to String by super class method
+        super.insert(offset, i);
+        return this;
     }
 
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuffer insert(int offset, long l) {
-        return insert(offset, String.valueOf(l));
+        // Note, synchronization achieved via invocation of StringBuffer insert(int, String)
+        // after conversion of l to String by super class method
+        super.insert(offset, l);
+        return this;
     }
 
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuffer insert(int offset, float f) {
-        return insert(offset, String.valueOf(f));
+        // Note, synchronization achieved via invocation of StringBuffer insert(int, String)
+        // after conversion of f to String by super class method
+        super.insert(offset, f);
+        return this;
     }
 
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuffer insert(int offset, double d) {
-        return insert(offset, String.valueOf(d));
+        // Note, synchronization achieved via invocation of StringBuffer insert(int, String)
+        // after conversion of d to String by super class method
+        super.insert(offset, d);
+        return this;
     }
 
     /**
      * @throws NullPointerException {@inheritDoc}
      * @since      1.4
      */
+    @Override
     public int indexOf(String str) {
-        return indexOf(str, 0);
+        // Note, synchronization achieved via invocations of other StringBuffer methods
+        return super.indexOf(str);
     }
 
     /**
      * @throws NullPointerException {@inheritDoc}
      * @since      1.4
      */
+    @Override
     public synchronized int indexOf(String str, int fromIndex) {
-        return String.indexOf(value, 0, count,
-                              str.toCharArray(), 0, str.length(), fromIndex);
+        return super.indexOf(str, fromIndex);
     }
 
     /**
      * @throws NullPointerException {@inheritDoc}
      * @since      1.4
      */
+    @Override
     public int lastIndexOf(String str) {
-        // Note, synchronization achieved via other invocations
+        // Note, synchronization achieved via invocations of other StringBuffer methods
         return lastIndexOf(str, count);
     }
 
@@ -553,19 +616,21 @@
      * @throws NullPointerException {@inheritDoc}
      * @since      1.4
      */
+    @Override
     public synchronized int lastIndexOf(String str, int fromIndex) {
-        return String.lastIndexOf(value, 0, count,
-                              str.toCharArray(), 0, str.length(), fromIndex);
+        return super.lastIndexOf(str, fromIndex);
     }
 
     /**
      * @since   JDK1.0.2
      */
+    @Override
     public synchronized StringBuffer reverse() {
         super.reverse();
         return this;
     }
 
+    @Override
     public synchronized String toString() {
         return new String(value, 0, count);
     }
--- a/src/share/classes/java/lang/StringBuilder.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/StringBuilder.java	Mon Nov 05 10:33:18 2012 -0500
@@ -124,28 +124,17 @@
         append(seq);
     }
 
+    @Override
     public StringBuilder append(Object obj) {
         return append(String.valueOf(obj));
     }
 
+    @Override
     public StringBuilder append(String str) {
         super.append(str);
         return this;
     }
 
-    // Appends the specified string builder to this sequence.
-    private StringBuilder append(StringBuilder sb) {
-        if (sb == null)
-            return append("null");
-        int len = sb.length();
-        int newcount = count + len;
-        if (newcount > value.length)
-            expandCapacity(newcount);
-        sb.getChars(0, len, value, count);
-        count = newcount;
-        return this;
-    }
-
     /**
      * Appends the specified <tt>StringBuffer</tt> to this sequence.
      * <p>
@@ -170,28 +159,22 @@
         return this;
     }
 
-    /**
-     */
+    @Override
     public StringBuilder append(CharSequence s) {
-        if (s == null)
-            s = "null";
-        if (s instanceof String)
-            return this.append((String)s);
-        if (s instanceof StringBuffer)
-            return this.append((StringBuffer)s);
-        if (s instanceof StringBuilder)
-            return this.append((StringBuilder)s);
-        return this.append(s, 0, s.length());
+        super.append(s);
+        return this;
     }
 
     /**
      * @throws     IndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder append(CharSequence s, int start, int end) {
         super.append(s, start, end);
         return this;
     }
 
+    @Override
     public StringBuilder append(char[] str) {
         super.append(str);
         return this;
@@ -200,36 +183,43 @@
     /**
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder append(char[] str, int offset, int len) {
         super.append(str, offset, len);
         return this;
     }
 
+    @Override
     public StringBuilder append(boolean b) {
         super.append(b);
         return this;
     }
 
+    @Override
     public StringBuilder append(char c) {
         super.append(c);
         return this;
     }
 
+    @Override
     public StringBuilder append(int i) {
         super.append(i);
         return this;
     }
 
+    @Override
     public StringBuilder append(long lng) {
         super.append(lng);
         return this;
     }
 
+    @Override
     public StringBuilder append(float f) {
         super.append(f);
         return this;
     }
 
+    @Override
     public StringBuilder append(double d) {
         super.append(d);
         return this;
@@ -238,6 +228,7 @@
     /**
      * @since 1.5
      */
+    @Override
     public StringBuilder appendCodePoint(int codePoint) {
         super.appendCodePoint(codePoint);
         return this;
@@ -246,6 +237,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder delete(int start, int end) {
         super.delete(start, end);
         return this;
@@ -254,6 +246,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder deleteCharAt(int index) {
         super.deleteCharAt(index);
         return this;
@@ -262,6 +255,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder replace(int start, int end, String str) {
         super.replace(start, end, str);
         return this;
@@ -270,6 +264,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int index, char[] str, int offset,
                                 int len)
     {
@@ -280,13 +275,16 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, Object obj) {
-        return insert(offset, String.valueOf(obj));
+            super.insert(offset, obj);
+            return this;
     }
 
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, String str) {
         super.insert(offset, str);
         return this;
@@ -295,6 +293,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, char[] str) {
         super.insert(offset, str);
         return this;
@@ -303,17 +302,16 @@
     /**
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int dstOffset, CharSequence s) {
-        if (s == null)
-            s = "null";
-        if (s instanceof String)
-            return this.insert(dstOffset, (String)s);
-        return this.insert(dstOffset, s, 0, s.length());
+            super.insert(dstOffset, s);
+            return this;
     }
 
     /**
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int dstOffset, CharSequence s,
                                 int start, int end)
     {
@@ -324,6 +322,7 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, boolean b) {
         super.insert(offset, b);
         return this;
@@ -332,6 +331,7 @@
     /**
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, char c) {
         super.insert(offset, c);
         return this;
@@ -340,66 +340,78 @@
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, int i) {
-        return insert(offset, String.valueOf(i));
+        super.insert(offset, i);
+        return this;
     }
 
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, long l) {
-        return insert(offset, String.valueOf(l));
+        super.insert(offset, l);
+        return this;
     }
 
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, float f) {
-        return insert(offset, String.valueOf(f));
+        super.insert(offset, f);
+        return this;
     }
 
     /**
      * @throws StringIndexOutOfBoundsException {@inheritDoc}
      */
+    @Override
     public StringBuilder insert(int offset, double d) {
-        return insert(offset, String.valueOf(d));
+        super.insert(offset, d);
+        return this;
     }
 
     /**
      * @throws NullPointerException {@inheritDoc}
      */
+    @Override
     public int indexOf(String str) {
-        return indexOf(str, 0);
+        return super.indexOf(str);
     }
 
     /**
      * @throws NullPointerException {@inheritDoc}
      */
+    @Override
     public int indexOf(String str, int fromIndex) {
-        return String.indexOf(value, 0, count,
-                              str.toCharArray(), 0, str.length(), fromIndex);
+        return super.indexOf(str, fromIndex);
     }
 
     /**
      * @throws NullPointerException {@inheritDoc}
      */
+    @Override
     public int lastIndexOf(String str) {
-        return lastIndexOf(str, count);
+        return super.lastIndexOf(str);
     }
 
     /**
      * @throws NullPointerException {@inheritDoc}
      */
+    @Override
     public int lastIndexOf(String str, int fromIndex) {
-        return String.lastIndexOf(value, 0, count,
-                              str.toCharArray(), 0, str.length(), fromIndex);
+        return super.lastIndexOf(str, fromIndex);
     }
 
+    @Override
     public StringBuilder reverse() {
         super.reverse();
         return this;
     }
 
+    @Override
     public String toString() {
         // Create a copy, don't share the array
         return new String(value, 0, count);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,376 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.lang.invoke;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import sun.invoke.util.Wrapper;
+import static sun.invoke.util.Wrapper.*;
+
+/**
+ * Abstract implementation of a meta-factory which provides parameter unrolling and input validation.
+ *
+ * @author Robert Field
+ */
+/*non-public*/ abstract class AbstractValidatingLambdaMetafactory {
+
+    /*
+     * For context, the comments for the following fields are marked in quotes with their values, given this program:
+     * interface II<T> {  Object foo(T x); }
+     * interface JJ<R extends Number> extends II<R> { }
+     * class CC {  String impl(int i) { return "impl:"+i; }}
+     * class X {
+     *     public static void main(String[] args) {
+     *         JJ<Integer> iii = (new CC())::impl;
+     *         System.out.printf(">>> %s\n", iii.foo(44));
+     * }}
+     */
+    final Class<?> targetClass;               // The class calling the meta-factory via invokedynamic "class X"
+    final MethodType invokedType;             // The type of the invoked method "(CC)II"
+    final Class<?> samBase;                   // The type of the returned instance "interface JJ"
+    final boolean isSerializable;             // Should the returned instance be serializable
+    final MethodHandleInfo samInfo;           // Info about the SAM method handle "MethodHandleInfo[9 II.foo(Object)Object]"
+    final Class<?> samClass;                  // Interface containing the SAM method "interface II"
+    final MethodType samMethodType;           // Type of the SAM method "(Object)Object"
+    final MethodHandleInfo implInfo;          // Info about the implementation method handle "MethodHandleInfo[5 CC.impl(int)String]"
+    final int implKind;                       // Invocation kind for implementation "5"=invokevirtual
+    final boolean implIsInstanceMethod;       // Is the implementation an instance method "true"
+    final Class<?> implDefiningClass;         // Type defining the implementation "class CC"
+    final MethodType implMethodType;          // Type of the implementation method "(int)String"
+    final MethodType instantiatedMethodType;  // Instantiated erased functional interface method type "(Integer)Object"
+
+
+    /**
+     * Meta-factory constructor.
+     *
+     * @param caller Stacked automatically by VM; represents a lookup context with the accessibility privileges
+     *               of the caller.
+     * @param invokedType Stacked automatically by VM; the signature of the invoked method, which includes the
+     *                    expected static type of the returned lambda object, and the static types of the captured
+     *                    arguments for the lambda.  In the event that the implementation method is an instance method,
+     *                    the first argument in the invocation signature will correspond to the receiver.
+     * @param samMethod The primary method in the functional interface to which the lambda or method reference is
+     *                  being converted, represented as a method handle.
+     * @param implMethod The implementation method which should be called (with suitable adaptation of argument
+     *                   types, return types, and adjustment for captured arguments) when methods of the resulting
+     *                   functional interface instance are invoked.
+     * @param instantiatedMethodType The signature of the SAM method from the functional interface's perspective
+     * @throws ReflectiveOperationException
+     */
+    AbstractValidatingLambdaMetafactory(MethodHandles.Lookup caller,
+                                       MethodType invokedType,
+                                       MethodHandle samMethod,
+                                       MethodHandle implMethod,
+                                       MethodType instantiatedMethodType)
+            throws ReflectiveOperationException {
+        this.targetClass = caller.lookupClass();
+        this.invokedType = invokedType;
+
+        this.samBase = invokedType.returnType();
+        this.isSerializable = Serializable.class.isAssignableFrom(samBase);
+
+        this.samInfo = new MethodHandleInfo(samMethod);
+        this.samClass = samInfo.getDeclaringClass();
+        this.samMethodType  = samInfo.getMethodType();
+
+        this.implInfo = new MethodHandleInfo(implMethod);
+        this.implKind = implInfo.getReferenceKind() == MethodHandleInfo.REF_invokeSpecial? MethodHandleInfo.REF_invokeVirtual : implInfo.getReferenceKind(); // @@@ Temp work-around to hotspot incorrectly converting to invokespecial
+        this.implIsInstanceMethod =
+                implKind == MethodHandleInfo.REF_invokeVirtual ||
+                implKind == MethodHandleInfo.REF_invokeSpecial ||
+                implKind == MethodHandleInfo.REF_invokeInterface;
+        this.implDefiningClass = implInfo.getDeclaringClass();
+        this.implMethodType = implInfo.getMethodType();
+
+        this.instantiatedMethodType = instantiatedMethodType;
+    }
+
+    /**
+     * Build the CallSite.
+     *
+     * @return a CallSite, which, when invoked, will return an instance of the
+     * functional interface
+     * @throws ReflectiveOperationException
+     */
+    abstract CallSite buildCallSite() throws ReflectiveOperationException, LambdaConversionException;
+
+    /**
+     * Check the meta-factory arguments for errors
+     * @throws LambdaConversionException if there are improper conversions
+     */
+    void validateMetafactoryArgs() throws LambdaConversionException {
+        // Check target type is a subtype of class where SAM method is defined
+        if (!samClass.isAssignableFrom(samBase)) {
+            throw new LambdaConversionException(String.format("Invalid target type %s for lambda conversion; not a subtype of functional interface %s",
+                    samBase.getName(), samClass.getName()));
+        }
+
+        switch (implKind) {
+            case MethodHandleInfo.REF_invokeInterface:
+            case MethodHandleInfo.REF_invokeVirtual:
+            case MethodHandleInfo.REF_invokeStatic:
+            case MethodHandleInfo.REF_newInvokeSpecial:
+            case MethodHandleInfo.REF_invokeSpecial:
+                break;
+            default:
+                throw new LambdaConversionException(String.format("Unsupported MethodHandle kind: %s", implInfo));
+        }
+
+        // Check arity: optional-receiver + captured + SAM == impl
+        final int implArity = implMethodType.parameterCount();
+        final int receiverArity = implIsInstanceMethod ? 1 : 0;
+        final int capturedArity = invokedType.parameterCount();
+        final int samArity = samMethodType.parameterCount();
+        final int instantiatedArity = instantiatedMethodType.parameterCount();
+        if (implArity + receiverArity != capturedArity + samArity) {
+            throw new LambdaConversionException(String.format("Incorrect number of parameters for %s method %s; %d captured parameters, %d functional interface parameters, %d implementation parameters",
+                    implIsInstanceMethod ? "instance" : "static", implInfo,
+                    capturedArity, samArity, implArity));
+        }
+        if (instantiatedArity != samArity) {
+            throw new LambdaConversionException(String.format("Incorrect number of parameters for %s method %s; %d functional interface parameters, %d SAM method parameters",
+                    implIsInstanceMethod ? "instance" : "static", implInfo,
+                    instantiatedArity, samArity));
+        }
+
+        // If instance: first captured arg (receiver) must be subtype of class where impl method is defined
+        final int capturedStart;
+        final int samStart;
+        if (implIsInstanceMethod) {
+            final Class<?> receiverClass;
+
+            // implementation is an instance method, adjust for receiver in captured variables / SAM arguments
+            if (capturedArity == 0) {
+                // receiver is function parameter
+                capturedStart = 0;
+                samStart = 1;
+                receiverClass = instantiatedMethodType.parameterType(0);
+            } else {
+                // receiver is a captured variable
+                capturedStart = 1;
+                samStart = 0;
+                receiverClass = invokedType.parameterType(0);
+            }
+
+            // check receiver type
+            if (!implDefiningClass.isAssignableFrom(receiverClass)) {
+                throw new LambdaConversionException(String.format("Invalid receiver type %s; not a subtype of implementation type %s",
+                                                                  receiverClass, implDefiningClass));
+            }
+        } else {
+            // no receiver
+            capturedStart = 0;
+            samStart = 0;
+        }
+
+        // Check for exact match on non-receiver captured arguments
+        final int implFromCaptured = capturedArity - capturedStart;
+        for (int i=0; i<implFromCaptured; i++) {
+            Class<?> implParamType = implMethodType.parameterType(i);
+            Class<?> capturedParamType = invokedType.parameterType(i + capturedStart);
+            if (!capturedParamType.equals(implParamType)) {
+                throw new LambdaConversionException(
+                        String.format("Type mismatch in captured lambda parameter %d: expecting %s, found %s", i, capturedParamType, implParamType));
+            }
+        }
+        // Check for adaptation match on SAM arguments
+        final int samOffset = samStart - implFromCaptured;
+        for (int i=implFromCaptured; i<implArity; i++) {
+            Class<?> implParamType = implMethodType.parameterType(i);
+            Class<?> instantiatedParamType = instantiatedMethodType.parameterType(i + samOffset);
+            if (!isAdaptableTo(instantiatedParamType, implParamType, true)) {
+                throw new LambdaConversionException(
+                        String.format("Type mismatch for lambda argument %d: %s is not convertible to %s", i, instantiatedParamType, implParamType));
+            }
+        }
+
+        // Adaptation match: return type
+        Class<?> expectedType = instantiatedMethodType.returnType();
+        Class<?> actualReturnType =
+                (implKind == MethodHandleInfo.REF_newInvokeSpecial)
+                  ? implDefiningClass
+                  : implMethodType.returnType();
+        if (!isAdaptableToAsReturn(actualReturnType, expectedType)) {
+            throw new LambdaConversionException(
+                    String.format("Type mismatch for lambda return: %s is not convertible to %s", actualReturnType, expectedType));
+        }
+     }
+
+    /**
+     * Check type adaptability
+     * @param fromType
+     * @param toType
+     * @param strict If true, do strict checks, else allow that fromType may be parameterized
+     * @return True if 'fromType' can be passed to an argument of 'toType'
+     */
+    private boolean isAdaptableTo(Class<?> fromType, Class<?> toType, boolean strict) {
+        if (fromType.equals(toType)) {
+            return true;
+        }
+        if (fromType.isPrimitive()) {
+            Wrapper wfrom = forPrimitiveType(fromType);
+            if (toType.isPrimitive()) {
+                // both are primitive: widening
+                Wrapper wto = forPrimitiveType(toType);
+                return wto.isConvertibleFrom(wfrom);
+            } else {
+                // from primitive to reference: boxing
+                return toType.isAssignableFrom(wfrom.wrapperType());
+            }
+        } else {
+            if (toType.isPrimitive()) {
+                // from reference to primitive: unboxing
+                Wrapper wfrom;
+                if (isWrapperType(fromType) && (wfrom = forWrapperType(fromType)).primitiveType().isPrimitive()) {
+                    // fromType is a primitive wrapper; unbox+widen
+                    Wrapper wto = forPrimitiveType(toType);
+                    return wto.isConvertibleFrom(wfrom);
+                } else {
+                    // must be convertible to primitive
+                    return !strict;
+                }
+            } else {
+                // both are reference types: fromType should be a superclass of toType.
+                return strict? toType.isAssignableFrom(fromType) : true;
+            }
+        }
+    }
+
+    /**
+     * Check type adaptability for return types -- special handling of void type) and parameterized fromType
+     * @param fromType
+     * @param toType
+     * @return True if 'fromType' can be converted to 'toType'
+     */
+    private boolean isAdaptableToAsReturn(Class<?> fromType, Class<?> toType) {
+        return toType.equals(void.class)
+               || !fromType.equals(void.class) && isAdaptableTo(fromType, toType, false);
+    }
+
+
+    /*********** Logging support -- for debugging only
+    static final Executor logPool = Executors.newSingleThreadExecutor(); // @@@ For debugging only
+    protected static void log(final String s) {
+        MethodHandleProxyLambdaMetafactory.logPool.execute(new Runnable() {
+            @Override
+            public void run() {
+                System.out.println(s);
+            }
+        });
+    }
+
+    protected static void log(final String s, final Throwable e) {
+        MethodHandleProxyLambdaMetafactory.logPool.execute(new Runnable() {
+            @Override
+            public void run() {
+                System.out.println(s);
+                e.printStackTrace(System.out);
+            }
+        });
+    }
+    ***********************/
+
+    /**
+     * Find the SAM method and corresponding methods which should be bridged. SAM method and those to be bridged
+     * will have the same name and number of parameters. Check for matching default methods (non-abstract), they
+     * should not be bridged-over and indicate a complex bridging situation.
+     */
+    class MethodAnalyzer {
+        private final Method[] methods = samBase.getMethods();
+        private final List<Method> methodsFound = new ArrayList<>(methods.length);
+
+        private Method samMethod = null;
+        private final List<Method> methodsToBridge = new ArrayList<>(methods.length);
+        private boolean defaultMethodFound = false;
+
+        MethodAnalyzer() {
+            String samMethodName = samInfo.getName();
+            Class<?>[] samParamTypes = samMethodType.parameterArray();
+            int samParamLength = samParamTypes.length;
+            Class<?> samReturnType = samMethodType.returnType();
+            Class<?> objectClass = Object.class;
+
+            for (Method m : methods) {
+                if (m.getName().equals(samMethodName) && m.getDeclaringClass() != objectClass) {
+                    Class<?>[] mParamTypes = m.getParameterTypes();
+                    if (mParamTypes.length == samParamLength) {
+                        if (Modifier.isAbstract(m.getModifiers())) {
+                            // Exclude methods with duplicate signatures
+                            if (methodUnique(m)) {
+                                if (m.getReturnType().equals(samReturnType) && Arrays.equals(mParamTypes, samParamTypes)) {
+                                    // Exact match, this is the SAM method signature
+                                    samMethod = m;
+                                } else {
+                                    methodsToBridge.add(m);
+                                }
+                            }
+                        } else {
+                            // This is a default method, flag for special processing
+                            defaultMethodFound = true;
+                            // Ignore future matching abstracts.
+                            // Note, due to reabstraction, this is really a punt, hence pass-off to VM
+                            methodUnique(m);
+                        }
+                    }
+                }
+            }
+        }
+
+        Method getSamMethod() {
+            return samMethod;
+        }
+
+        List<Method> getMethodsToBridge() {
+            return methodsToBridge;
+        }
+
+        boolean wasDefaultMethodFound() {
+            return defaultMethodFound;
+        }
+
+        /**
+         * Search the list of previously found methods to determine if there is a method with the same signature
+         * (return and parameter types) as the specified method. If it wasn't found before, add to the found list.
+         *
+         * @param m The method to match
+         * @return False if the method was found, True otherwise
+         */
+        private boolean methodUnique(Method m) {
+            Class<?>[] ptypes = m.getParameterTypes();
+            Class<?> rtype = m.getReturnType();
+            for (Method md : methodsFound) {
+                if (md.getReturnType().equals(rtype) && Arrays.equals(ptypes, md.getParameterTypes())) {
+                    return false;
+                }
+            }
+            methodsFound.add(m);
+            return true;
+        }
+    }
+}
--- a/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Mon Nov 05 10:33:18 2012 -0500
@@ -79,7 +79,7 @@
             default : throw new InternalError("unexpected xtype: " + xtype);
             }
         } catch (Throwable t) {
-            throw new InternalError(t);
+            throw newInternalError(t);
         }
     }
 
@@ -97,7 +97,7 @@
             case 'D': return cloneExtendD(type, form, (double) x);
             }
         } catch (Throwable t) {
-            throw new InternalError(t);
+            throw newInternalError(t);
         }
         throw new InternalError("unexpected type: " + xtype);
     }
@@ -115,7 +115,7 @@
         try {
              return clone(srcType, form);
          } catch (Throwable t) {
-             throw new InternalError(t);
+             throw newInternalError(t);
          }
     }
 
@@ -124,7 +124,7 @@
         try {
              return clone(newType, form.permuteArguments(1, reorder, basicTypes(newType.parameterList())));
          } catch (Throwable t) {
-             throw new InternalError(t);
+             throw newInternalError(t);
          }
     }
 
@@ -166,7 +166,7 @@
             case 'J': return argJ(i);
             }
         } catch (Throwable ex) {
-            throw new InternalError(ex);
+            throw newInternalError(ex);
         }
         throw new InternalError("unexpected type: " + speciesData().types+"."+i);
     }
@@ -192,7 +192,7 @@
         try {
             return (MethodHandle) argL(0);
         } catch (Throwable ex) {
-            throw new InternalError(ex);
+            throw newInternalError(ex);
         }
     }
 
@@ -464,7 +464,7 @@
                     }
                 }
             } catch (Throwable e) {
-                throw new InternalError(e);
+                throw newInternalError(e);
             }
 
             for (SpeciesData d : CACHE.values()) {
@@ -748,7 +748,7 @@
             try {
                 return LOOKUP.findGetter(cbmhClass, fieldName, fieldType);
             } catch (NoSuchFieldException | IllegalAccessException e) {
-                throw new InternalError(e);
+                throw newInternalError(e);
             }
         }
 
@@ -776,7 +776,7 @@
                 Field F_SPECIES_DATA = cbmh.getDeclaredField("SPECIES_DATA");
                 return (SpeciesData) F_SPECIES_DATA.get(null);
             } catch (ReflectiveOperationException ex) {
-                throw new InternalError(ex);
+                throw newInternalError(ex);
             }
         }
 
@@ -802,7 +802,7 @@
             try {
                 return linkConstructor(LOOKUP.findConstructor(cbmh, MethodType.fromMethodDescriptorString(makeSignature(types, true), null)));
             } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException | TypeNotPresentException e) {
-                throw new InternalError(e);
+                throw newInternalError(e);
             }
         }
 
@@ -833,7 +833,7 @@
                 linkerMN = MemberName.getFactory().resolveOrFail(REF_invokeStatic, linkerMN, null, NoSuchMethodException.class);
                 assert(linkerMN.isStatic());
             } catch (ReflectiveOperationException ex) {
-                throw new InternalError(ex);
+                throw newInternalError(ex);
             }
             // extend arguments array
             Object[] newArgs = Arrays.copyOf(initName.arguments, initName.arguments.length + 1);
--- a/src/share/classes/java/lang/invoke/CallSite.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/invoke/CallSite.java	Mon Nov 05 10:33:18 2012 -0500
@@ -222,7 +222,7 @@
             GET_TARGET = IMPL_LOOKUP.
                 findVirtual(CallSite.class, "getTarget", MethodType.methodType(MethodHandle.class));
         } catch (ReflectiveOperationException e) {
-            throw new InternalError(e);
+            throw newInternalError(e);
         }
     }
 
--- a/src/share/classes/java/lang/invoke/DirectMethodHandle.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/invoke/DirectMethodHandle.java	Mon Nov 05 10:33:18 2012 -0500
@@ -218,7 +218,7 @@
         try {
             linker = IMPL_NAMES.resolveOrFail(REF_invokeStatic, linker, null, NoSuchMethodException.class);
         } catch (ReflectiveOperationException ex) {
-            throw new InternalError(ex);
+            throw newInternalError(ex);
         }
         final int DMH_THIS    = 0;
         final int ARG_BASE    = 1;
@@ -554,7 +554,7 @@
         try {
             linker = IMPL_NAMES.resolveOrFail(REF_invokeVirtual, linker, null, NoSuchMethodException.class);
         } catch (ReflectiveOperationException ex) {
-            throw new InternalError(ex);
+            throw newInternalError(ex);
         }
 
         // What is the external type of the lambda form?
@@ -653,7 +653,7 @@
                 nf.resolve();
             }
         } catch (ReflectiveOperationException ex) {
-            throw new InternalError(ex);
+            throw newInternalError(ex);
         }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,402 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.invoke;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.security.ProtectionDomain;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import jdk.internal.org.objectweb.asm.*;
+import static jdk.internal.org.objectweb.asm.Opcodes.*;
+import sun.misc.Unsafe;
+
+/**
+ * InnerClassLambdaMetafactory
+ */
+/*non-public*/ final class InnerClassLambdaMetafactory extends AbstractValidatingLambdaMetafactory {
+    private static final int CLASSFILE_VERSION = 51;
+    private static final Type TYPE_VOID = Type.getType(void.class);
+    private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE);
+    private static final String NAME_MAGIC_ACCESSOR_IMPL = "java/lang/invoke/MagicLambdaImpl";
+    private static final String NAME_SERIALIZABLE = "java/io/Serializable";
+    private static final String NAME_CTOR = "<init>";
+
+    //Serialization support
+    private static final String NAME_SERIALIZED_LAMBDA = "com/oracle/java/lang/invoke/SerializedLambdaImpl";
+    private static final String DESCR_METHOD_WRITE_REPLACE = "()Ljava/lang/Object;";
+    private static final String NAME_METHOD_WRITE_REPLACE = "writeReplace";
+    private static final String NAME_OBJECT = "java/lang/Object";
+
+    // Used to ensure that each spun class name is unique
+    private static final AtomicInteger counter = new AtomicInteger(0);
+
+    // See context values in AbstractValidatingLambdaMetafactory
+    private final String implMethodClassName;        // Name of type containing implementation "CC"
+    private final String implMethodName;             // Name of implementation method "impl"
+    private final String implMethodDesc;             // Type descriptor for implementation methods "(I)Ljava/lang/String;"
+    private final Type[] implMethodArgumentTypes;    // ASM types for implementaion method parameters
+    private final Type implMethodReturnType;         // ASM type for implementaion method return type "Ljava/lang/String;"
+    private final MethodType constructorType;        // Generated class constructor type "(CC)void"
+    private final String constructorDesc;            // Type descriptor for constructor "(LCC;)V"
+    private final ClassWriter cw;                    // ASM class writer
+    private final Type[] argTypes;                   // ASM types for the constructor arguments
+    private final String[] argNames;                 // Generated names for the constructor arguments
+    private final String lambdaClassName;            // Generated name for the generated class "X$$Lambda$1"
+    private final Type[] instantiatedArgumentTypes;  // ASM types for the functional interface arguments
+
+    /**
+     * Meta-factory constructor.
+     *
+     * @param caller Stacked automatically by VM; represents a lookup context with the accessibility privileges
+     *               of the caller.
+     * @param invokedType Stacked automatically by VM; the signature of the invoked method, which includes the
+     *                    expected static type of the returned lambda object, and the static types of the captured
+     *                    arguments for the lambda.  In the event that the implementation method is an instance method,
+     *                    the first argument in the invocation signature will correspond to the receiver.
+     * @param samMethod The primary method in the functional interface to which the lambda or method reference is
+     *                  being converted, represented as a method handle.
+     * @param implMethod The implementation method which should be called (with suitable adaptation of argument
+     *                   types, return types, and adjustment for captured arguments) when methods of the resulting
+     *                   functional interface instance are invoked.
+     * @param instantiatedMethodType The signature of the SAM method from the functional interface's perspective
+     * @throws ReflectiveOperationException
+     */
+    public InnerClassLambdaMetafactory(MethodHandles.Lookup caller,
+                                       MethodType invokedType,
+                                       MethodHandle samMethod,
+                                       MethodHandle implMethod,
+                                       MethodType instantiatedMethodType)
+            throws ReflectiveOperationException {
+        super(caller, invokedType, samMethod, implMethod, instantiatedMethodType);
+        implMethodClassName = implDefiningClass.getName().replace('.', '/');
+        implMethodName = implInfo.getName();
+        implMethodDesc = implMethodType.toMethodDescriptorString();
+        Type implMethodAsmType = Type.getMethodType(implMethodDesc);
+        implMethodArgumentTypes = implMethodAsmType.getArgumentTypes();
+        implMethodReturnType = implMethodAsmType.getReturnType();
+        constructorType = invokedType.changeReturnType(Void.TYPE);
+        constructorDesc = constructorType.toMethodDescriptorString();
+        lambdaClassName = targetClass.getName().replace('.', '/') + "$$Lambda$" + counter.incrementAndGet();
+        cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
+        argTypes = Type.getArgumentTypes(constructorDesc);
+        argNames = new String[argTypes.length];
+        for (int i = 0; i < argTypes.length; i++) {
+            argNames[i] = "arg$" + (i + 1);
+        }
+        instantiatedArgumentTypes = Type.getArgumentTypes(instantiatedMethodType.toMethodDescriptorString());
+
+    }
+
+    /**
+     * Build the CallSite. Generate a class file which implements the functional
+     * interface, define the class, if there are no parameters create an instance
+     * of the class which the CallSite will return, otherwise, generate handles
+     * which will call the class' constructor.
+     *
+     * @return a CallSite, which, when invoked, will return an instance of the
+     * functional interface
+     * @throws ReflectiveOperationException
+     */
+    @Override
+    CallSite buildCallSite() throws ReflectiveOperationException, LambdaConversionException {
+        final Class<?> innerClass = spinInnerClass();
+        if (invokedType.parameterCount() == 0) {
+            return new ConstantCallSite(MethodHandles.constant(samBase, innerClass.newInstance()));
+        } else {
+            return new ConstantCallSite(
+                    MethodHandles.Lookup.IMPL_LOOKUP
+                    .findConstructor(innerClass, constructorType)
+                    .asType(constructorType.changeReturnType(samBase)));
+        }
+    }
+
+    /**
+     * Generate a class file which implements the functional
+     * interface, define and return the class.
+     *
+     * @return a Class which implements the functional interface
+     */
+    private <T> Class<? extends T> spinInnerClass() throws LambdaConversionException {
+        String samName = samBase.getName().replace('.', '/');
+
+        cw.visit(CLASSFILE_VERSION, ACC_PUBLIC + ACC_SUPER, lambdaClassName, null, NAME_MAGIC_ACCESSOR_IMPL,
+                 isSerializable ? new String[]{samName, NAME_SERIALIZABLE} : new String[]{samName});
+
+        // Generate final fields to be filled in by constructor
+        for (int i = 0; i < argTypes.length; i++) {
+            FieldVisitor fv = cw.visitField(ACC_PRIVATE + ACC_FINAL, argNames[i], argTypes[i].getDescriptor(), null, null);
+            fv.visitEnd();
+        }
+
+        generateConstructor();
+
+        MethodAnalyzer ma = new MethodAnalyzer();
+
+        // Forward the SAM method
+        if (ma.getSamMethod() == null) {
+            throw new LambdaConversionException(String.format("SAM method not found: %s", samMethodType));
+        } else {
+            generateForwardingMethod(ma.getSamMethod(), false);
+        }
+
+        // Forward the bridges
+        // @@@ Once the VM can do fail-over, uncomment the default method test
+        if (!ma.getMethodsToBridge().isEmpty() /* && !ma.wasDefaultMethodFound() */) {
+            for (Method m : ma.getMethodsToBridge()) {
+                generateForwardingMethod(m, true);
+            }
+        }
+
+        /***** Serialization not yet supported
+        if (isSerializable) {
+            String samMethodName = samInfo.getName();
+            Type samType = Type.getType(samBase);
+            generateSerializationMethod(samType, samMethodName);
+        }
+        ******/
+
+        cw.visitEnd();
+
+        // Define the generated class in this VM.
+
+        final byte[] classBytes = cw.toByteArray();
+
+        if (System.getProperty("debug.dump.generated") != null) {
+            System.out.printf("Loaded: %s (%d bytes) %n", lambdaClassName, classBytes.length);
+            try (FileOutputStream fos = new FileOutputStream(lambdaClassName.replace('/', '.') + ".class")) {
+                fos.write(classBytes);
+            } catch (IOException ex) {
+                Logger.getLogger(InnerClassLambdaMetafactory.class.getName()).log(Level.SEVERE, null, ex);
+            }
+        }
+
+        ClassLoader loader = targetClass.getClassLoader();
+        ProtectionDomain pd = (loader == null) ? null : targetClass.getProtectionDomain();
+        return (Class<? extends T>) Unsafe.getUnsafe().defineClass(lambdaClassName, classBytes, 0, classBytes.length, loader, pd);
+    }
+
+    /**
+     * Generate the constructor for the class
+     */
+    private void generateConstructor() {
+        // Generate constructor
+        MethodVisitor ctor = cw.visitMethod(ACC_PUBLIC, NAME_CTOR, constructorDesc, null, null);
+        ctor.visitCode();
+        ctor.visitVarInsn(ALOAD, 0);
+        ctor.visitMethodInsn(INVOKESPECIAL, NAME_MAGIC_ACCESSOR_IMPL, NAME_CTOR, METHOD_DESCRIPTOR_VOID);
+        int lvIndex = 0;
+        for (int i = 0; i < argTypes.length; i++) {
+            ctor.visitVarInsn(ALOAD, 0);
+            ctor.visitVarInsn(argTypes[i].getOpcode(ILOAD), lvIndex + 1);
+            lvIndex += argTypes[i].getSize();
+            ctor.visitFieldInsn(PUTFIELD, lambdaClassName, argNames[i], argTypes[i].getDescriptor());
+        }
+        ctor.visitInsn(RETURN);
+        ctor.visitMaxs(-1, -1); // Maxs computed by ClassWriter.COMPUTE_MAXS, these arguments ignored
+        ctor.visitEnd();
+    }
+
+    /**
+     * Generate the serialization method (if needed)
+     */
+    /****** This code is out of date -- known to be wrong -- and not currently used ******
+    private void generateSerializationMethod(Type samType, String samMethodName) {
+        String samMethodDesc = samMethodType.toMethodDescriptorString();
+        TypeConvertingMethodAdapter mv = new TypeConvertingMethodAdapter(cw.visitMethod(ACC_PRIVATE + ACC_FINAL, NAME_METHOD_WRITE_REPLACE, DESCR_METHOD_WRITE_REPLACE, null, null));
+
+        mv.visitCode();
+        mv.visitTypeInsn(NEW, NAME_SERIALIZED_LAMBDA);
+        mv.dup();
+        mv.visitLdcInsn(samType);
+        mv.visitLdcInsn(samMethodName);
+        mv.visitLdcInsn(samMethodDesc);
+        mv.visitLdcInsn(Type.getType(implDefiningClass));
+        mv.visitLdcInsn(implMethodName);
+        mv.visitLdcInsn(implMethodDesc);
+
+        mv.iconst(argTypes.length);
+        mv.visitTypeInsn(ANEWARRAY, NAME_OBJECT);
+        for (int i = 0; i < argTypes.length; i++) {
+            mv.dup();
+            mv.iconst(i);
+            mv.visitVarInsn(ALOAD, 0);
+            mv.getfield(lambdaClassName, argNames[i], argTypes[i].getDescriptor());
+            mv.boxIfPrimitive(argTypes[i]);
+            mv.visitInsn(AASTORE);
+        }
+        mv.invokespecial(NAME_SERIALIZED_LAMBDA, NAME_CTOR,
+                           "(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V");
+        mv.visitInsn(ARETURN);
+        mv.visitMaxs(-1, -1); // Maxs computed by ClassWriter.COMPUTE_MAXS, these arguments ignored
+        mv.visitEnd();
+    }
+    ********/
+
+    /**
+     * Generate a method which calls the lambda implementation method,
+     * converting arguments, as needed.
+     * @param m The method whose signature should be generated
+     * @param isBridge True if this methods should be flagged as a bridge
+     */
+    private void generateForwardingMethod(Method m, boolean isBridge) {
+        Class<?>[] exceptionTypes = m.getExceptionTypes();
+        String[] exceptionNames = new String[exceptionTypes.length];
+        for (int i = 0; i < exceptionTypes.length; i++) {
+            exceptionNames[i] = exceptionTypes[i].getName().replace('.', '/');
+        }
+        String methodDescriptor = Type.getMethodDescriptor(m);
+        int access = isBridge? ACC_PUBLIC | ACC_BRIDGE : ACC_PUBLIC;
+        MethodVisitor mv = cw.visitMethod(access, m.getName(), methodDescriptor, null, exceptionNames);
+        new ForwardingMethodGenerator(mv).generate(m);
+    }
+
+    /**
+     * This class generates a method body which calls the lambda implementation
+     * method, converting arguments, as needed.
+     */
+    private class ForwardingMethodGenerator extends TypeConvertingMethodAdapter {
+
+        ForwardingMethodGenerator(MethodVisitor mv) {
+            super(mv);
+        }
+
+        void generate(Method m) throws InternalError {
+            visitCode();
+
+            if (implKind == MethodHandleInfo.REF_newInvokeSpecial) {
+                visitTypeInsn(NEW, implMethodClassName);
+                dup();
+            }
+            for (int i = 0; i < argTypes.length; i++) {
+                visitVarInsn(ALOAD, 0);
+                getfield(lambdaClassName, argNames[i], argTypes[i].getDescriptor());
+            }
+
+            convertArgumentTypes(Type.getArgumentTypes(m));
+
+            // Invoke the method we want to forward to
+            visitMethodInsn(invocationOpcode(), implMethodClassName, implMethodName, implMethodDesc);
+
+            // Convert the return value (if any) and return it
+            // Note: if adapting from non-void to void, the 'return' instruction will pop the unneeded result
+            Type samReturnType = Type.getReturnType(m);
+            convertType(implMethodReturnType, samReturnType, samReturnType);
+            areturn(samReturnType);
+
+            visitMaxs(-1, -1); // Maxs computed by ClassWriter.COMPUTE_MAXS, these arguments ignored
+            visitEnd();
+        }
+
+        private void convertArgumentTypes(Type[] samArgumentTypes) {
+            int lvIndex = 0;
+            boolean samIncludesReceiver = implIsInstanceMethod && argTypes.length == 0;
+            int samReceiverLength = samIncludesReceiver ? 1 : 0;
+            if (samIncludesReceiver) {
+                // push receiver
+                Type rcvrType = samArgumentTypes[0];
+                Type instantiatedRcvrType = instantiatedArgumentTypes[0];
+
+                load(lvIndex + 1, rcvrType);
+                lvIndex += rcvrType.getSize();
+                convertType(rcvrType, Type.getType(implDefiningClass), instantiatedRcvrType);
+            }
+            int argOffset = implMethodArgumentTypes.length - samArgumentTypes.length;
+            for (int i = samReceiverLength; i < samArgumentTypes.length; i++) {
+                Type argType = samArgumentTypes[i];
+                Type targetType = implMethodArgumentTypes[argOffset + i];
+                Type instantiatedArgType = instantiatedArgumentTypes[i];
+
+                load(lvIndex + 1, argType);
+                lvIndex += argType.getSize();
+                convertType(argType, targetType, instantiatedArgType);
+            }
+        }
+
+        private void convertType(Type argType, Type targetType, Type functionalType) {
+            convertType(argType.getDescriptor(), targetType.getDescriptor(), functionalType.getDescriptor());
+        }
+
+        private int invocationOpcode() throws InternalError {
+            switch (implKind) {
+                case MethodHandleInfo.REF_invokeStatic:
+                    return INVOKESTATIC;
+                case MethodHandleInfo.REF_newInvokeSpecial:
+                    return INVOKESPECIAL;
+                 case MethodHandleInfo.REF_invokeVirtual:
+                    return INVOKEVIRTUAL;
+                case MethodHandleInfo.REF_invokeInterface:
+                    return INVOKEINTERFACE;
+                case MethodHandleInfo.REF_invokeSpecial:
+                    return INVOKESPECIAL;
+                default:
+                    throw new InternalError("Unexpected invocation kind: " + implKind);
+            }
+        }
+
+        /**
+         * The following methods are copied from
+         * org.objectweb.asm.commons.InstructionAdapter. Part of ASM: a very
+         * small and fast Java bytecode manipulation framework. Copyright (c)
+         * 2000-2005 INRIA, France Telecom All rights reserved.
+         *
+         * Subclass with that (removing these methods) if that package/class is
+         * ever added to the JDK.
+         */
+        private void iconst(final int cst) {
+            if (cst >= -1 && cst <= 5) {
+                mv.visitInsn(Opcodes.ICONST_0 + cst);
+            } else if (cst >= Byte.MIN_VALUE && cst <= Byte.MAX_VALUE) {
+                mv.visitIntInsn(Opcodes.BIPUSH, cst);
+            } else if (cst >= Short.MIN_VALUE && cst <= Short.MAX_VALUE) {
+                mv.visitIntInsn(Opcodes.SIPUSH, cst);
+            } else {
+                mv.visitLdcInsn(cst);
+            }
+        }
+
+        private void load(final int var, final Type type) {
+            mv.visitVarInsn(type.getOpcode(Opcodes.ILOAD), var);
+        }
+
+        private void dup() {
+            mv.visitInsn(Opcodes.DUP);
+        }
+
+        private void areturn(final Type t) {
+            mv.visitInsn(t.getOpcode(Opcodes.IRETURN));
+        }
+
+        private void getfield(
+                final String owner,
+                final String name,
+                final String desc) {
+            mv.visitFieldInsn(Opcodes.GETFIELD, owner, name, desc);
+        }
+    }
+}
--- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Mon Nov 05 10:33:18 2012 -0500
@@ -138,7 +138,7 @@
                 DUMP_CLASS_FILES_DIR = dumpDir;
                 System.out.println("Dumping class files to "+DUMP_CLASS_FILES_DIR+"/...");
             } catch (Exception e) {
-                throw new InternalError(e);
+                throw newInternalError(e);
             }
         } else {
             DUMP_CLASS_FILES_COUNTERS = null;
@@ -162,7 +162,7 @@
                         file.close();
                         return null;
                     } catch (IOException ex) {
-                        throw new InternalError(ex);
+                        throw newInternalError(ex);
                     }
                 }
             });
@@ -279,7 +279,7 @@
         try {
             member = MEMBERNAME_FACTORY.resolveOrFail(REF_invokeStatic, member, HOST_CLASS, ReflectiveOperationException.class);
         } catch (ReflectiveOperationException e) {
-            throw new InternalError(e);
+            throw newInternalError(e);
         }
         //System.out.println("resolveInvokerMember => "+member);
         return member;
--- a/src/share/classes/java/lang/invoke/Invokers.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/invoke/Invokers.java	Mon Nov 05 10:33:18 2012 -0500
@@ -27,6 +27,7 @@
 
 import java.util.Arrays;
 import sun.invoke.empty.Empty;
+import static java.lang.invoke.MethodHandleStatics.*;
 import static java.lang.invoke.MethodHandleNatives.Constants.*;
 import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
 import static java.lang.invoke.LambdaForm.*;
@@ -128,9 +129,8 @@
         try {
             //Lookup.findVirtual(MethodHandle.class, name, type);
             return IMPL_LOOKUP.resolveOrFail(REF_invokeVirtual, MethodHandle.class, name, type);
-
         } catch (ReflectiveOperationException ex) {
-            throw new InternalError("JVM cannot find invoker for "+type, ex);
+            throw newInternalError("JVM cannot find invoker for "+type, ex);
         }
     }
 
@@ -176,7 +176,7 @@
                     .findVirtual(MethodHandle.class, "asSpreader",
                         MethodType.methodType(MethodHandle.class, Class.class, int.class));
             } catch (ReflectiveOperationException ex) {
-                throw new InternalError(ex);
+                throw newInternalError(ex);
             }
             makeSpreader = MethodHandles.insertArguments(makeSpreader, 1, Object[].class, spreadArgCount);
             vaInvoker = MethodHandles.filterArgument(arrayInvoker, 0, makeSpreader);
@@ -215,7 +215,7 @@
                     .findStatic(CallSite.class, "uninitializedCallSite",
                                 MethodType.methodType(Empty.class));
             } catch (ReflectiveOperationException ex) {
-                throw new InternalError(ex);
+                throw newInternalError(ex);
             }
         }
         invoker = MethodHandles.explicitCastArguments(invoker, MethodType.methodType(targetType.returnType()));
@@ -389,7 +389,7 @@
             form.genericInvoker = gamh;
             return gamh;
         } catch (Exception ex) {
-            throw new InternalError("Exception while resolving inexact invoke", ex);
+            throw newInternalError("Exception while resolving inexact invoke", ex);
         }
     }
 
@@ -456,7 +456,7 @@
             NF_getCallSiteTarget.resolve();
             // bound
         } catch (ReflectiveOperationException ex) {
-            throw new InternalError(ex);
+            throw newInternalError(ex);
         }
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/LambdaConversionException.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.invoke;
+
+/**
+ * LambdaConversionException
+ */
+public class LambdaConversionException extends Exception {
+    public LambdaConversionException() {
+    }
+
+    public LambdaConversionException(String message) {
+        super(message);
+    }
+
+    public LambdaConversionException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public LambdaConversionException(Throwable cause) {
+        super(cause);
+    }
+
+    public LambdaConversionException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+        super(message, cause, enableSuppression, writableStackTrace);
+    }
+}
--- a/src/share/classes/java/lang/invoke/LambdaForm.java	Mon Nov 05 10:30:49 2012 -0500
+++ b/src/share/classes/java/lang/invoke/LambdaForm.java	Mon Nov 05 10:33:18 2012 -0500
@@ -457,7 +457,7 @@
             isCompiled = true;
             return vmentry;
         } catch (Error | Exception ex) {
-            throw new InternalError(this.toString(), ex);
+            throw newInternalError(this.toString(), ex);
         }
     }
 
@@ -1547,7 +1547,7 @@
             try {
                 zmem = IMPL_NAMES.resolveOrFail(REF_invokeStatic, zmem, null, NoSuchMethodException.class);
             } catch (IllegalAccessException|NoSuchMethodException ex) {
-                throw new InternalError(ex);
+                throw newInternalError(ex);
             }
             NamedFunction zcon = new NamedFunction(zmem);
             Name n = new Name(zcon).newIndex(0);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/LambdaMetafactory.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.invoke;
+
+/**
+ * <p>Bootstrap methods for converting lambda expressions and method references to functional interface objects.</p>
+ *
+ * <p>For every lambda expressions or method reference in the source code, there is a target type which is a
+ * functional interface. Evaluating a lambda expression produces an object of its target type. The mechanism for
+ * evaluating lambda expressions is to invoke an invokedynamic call site, which takes arguments describing the sole
+ * method of the functional interface and the implementation method, and returns an object (the lambda object) that
+ * implements the target type. Methods of the lambda object invoke the implementation method. For method
+ * references, the implementation method is simply the referenced method; for lambda expressions, the
+ * implementation method is produced by the compiler based on the body of the lambda expression. The methods in
+ * this file are the bootstrap methods for those invokedynamic call sites, called lambda factories, and the
+ * bootstrap methods responsible for linking the lambda factories are called lambda meta-factories.
+ *
+ * <p>The bootstrap methods in this class take the information about the functional interface, the implementation
+ * method, and the static types of the captured lambda arguments, and link a call site which, when invoked,
+ * produces the lambda object.
+ *
+ * <p>Two pieces of information are needed about the functional interface: the SAM method and the type of the SAM
+ * method in the functional interface. The type can be different when parameterized types are used. For example,
+ * consider
+ * <code>interface I&lt;T&gt; { int m(T x); }</code> if this SAM type is used in a lambda
+ * <code>I&lt;Byte&gt; v = ...</code>, we need both the actual SAM method which has the signature
+ * <code>(Object)int</code> and the functional interface type of the method, which has signature
+ * <code>(Byte)int</code>.  The latter is the instantiated erased functional interface method type, or
+ * simply <I>instantiated method type</I>.
+ *
+ * <p>While functional interfaces only have a single abstract method from the language perspective (concrete
+ * methods in Object are and default methods may be present), at the bytecode level they may actually have multiple
+ * methods because of the need for bridge methods. Invoking any of these methods on the lambda object will result
+ * in invoking the implementation method.
+ *
+ * <p>The argument list of the implementation method and the argument list of the functional interface method(s)
+ * may differ in several ways.  The implementation methods may have additional arguments to accommodate arguments
+ * captured by the lambda expression; there may also be differences resulting from permitted adaptations of
+ * arguments, such as casting, boxing, unboxing, and primitive widening. They may also differ because of var-args,
+ * but this is expected to be handled by the compiler.
+ *
+ * <p>Invokedynamic call sites have two argument lists: a static argument list and a dynamic argument list.  The
+ * static argument list lives in the constant pool; the dynamic argument list lives on the operand stack at
+ * invocation time.  The bootstrap method has access to the entire static argument list (which in this case,
+ * contains method handles describing the implementation method and the canonical functional interface method),
+ * as well as a method signature describing the number and static types (but not the values) of the dynamic
+ * arguments, and the static return type of the invokedynamic site.
+ *
+ * <p>The implementation method is described with a method handle. In theory, any method handle could be used.
+ * Currently supported are method handles representing invocation of virtual, interface, constructor and static
+ * methods.
+ *
+ * <p>Assume:
+ * <ul>
+ *      <li>the functional interface method has N arguments, of types (U1, U2, ... Un) and return type Ru</li>
+ *      <li>then the instantiated method type also has N arguments, of types (T1, T2, ... Tn) and return type Rt</li>
+ *      <li>the implementation method has M arguments, of types (A1..Am) and return type Ra,</li>
+ *      <li>the dynamic argument list has K arguments of types (D1..Dk), and the invokedynamic return site has
+ *          type Rd</li>
+ *      <li>the functional interface type is F</li>
+ * </ul>
+ *
+ * <p>The following signature invariants must hold:
+ * <ul>
+ *     <li>Rd is a subtype of F</li>
+ *     <li>For i=1..N, Ti is a subtype of Ui</li>
+ *     <li>Either Rt and Ru are primitive and are the same type, or both are reference types and
+ *         Rt is a subtype of Ru</li>
+ *     <li>If the implementation method is a static method:
+ *     <ul>
+ *         <li>K + N = M</li>
+ *         <li>For i=1..K, Di = Ai</li>
+ *         <li>For i=1..N, Ti is adaptable to Aj, where j=i+k</li>
+ *     </ul></li>
+ *     <li>If the implementation method is an instance method:
+ *     <ul>
+ *         <li>K + N = M + 1</li>
+ *         <li>D1 must be a subtype of the enclosing class for the implementation method</li>
+ *         <li>For i=2..K, Di = Aj, where j=i-1</li>
+ *         <li>For i=1..N, Ti is adaptable to Aj, where j=i+k-1</li>
+ *     </ul></li>
+ *     <li>The return type Rt is void, or the return type Ra is not void and is adaptable to Rt</li>
+ * </ul>
+ *
+ * <p>Note that the potentially parameterized implementation return type provides the value for the SAM. Whereas
+ * the completely known instantiated return type is adapted to the implementation arguments. Because the
+ * instantiated type of the implementation method is not available, the adaptability of return types cannot be
+ * checked as precisely at link-time as the arguments can be checked. Thus a loose version of link-time checking is
+ * done on return type, while a strict version is applied to arguments.
+ *
+ * <p>A type Q is considered adaptable to S as follows:
+ * <table>
+ *     <tr><th>Q</th><th>S</th><th>Link-time checks</th><th>Capture-time checks</th></tr>
+ *     <tr>
+ *         <td>Primitive</td><td>Primitive</td>
+ *         <td>Q can be converted to S via a primitive widening conversion</td>
+ *         <td>None</td>
+ *     </tr>
+ *     <tr>
+ *         <td>Primitive</td><td>Reference</td>
+ *         <td>S is a supertype of the Wrapper(Q)</td>
+ *         <td>Cast from Wrapper(Q) to S</td>
+ *     </tr>
+ *     <tr>
+ *         <td>Reference</td><td>Primitive</td>
+ *         <td>strict: Q is a primitive wrapper and Primitive(Q) can be widened to S
+ *         <br>loose: If Q is a primitive wrapper, check that Primitive(Q) can be widened to S</td>
+ *         <td>If Q is not a primitive wrapper, cast Q to the base Wrapper(S); for example Number for numeric types</td>
+ *     </tr>
+ *     <tr>
+ *         <td>Reference</td><td>Reference</td>
+ *         <td>strict: S is a supertype of Q
+ *         <br>loose: none</td>
+ *         <td>Cast from Q to S</td>
+ *     </tr>
+ * </table>
+ *
+ *
+ */
+public class LambdaMetafactory {
+
+    /**
+     * Standard meta-factory for conversion of lambda expressions or method references to functional interfaces.
+     *
+     * @param caller Stacked automatically by VM; represents a lookup context with the accessibility privileges
+     *               of the caller.
+     * @param invokedName Stacked automatically by VM; the name of the invoked method as it appears at the call site.
+     *                    Currently unused.
+     * @param invokedType Stacked automatically by VM; the signature of the invoked method, which includes the
+     *                    expected static type of the returned lambda object, and the static types of the captured
+     *                    arguments for the lambda.  In the event that the implementation method is an instance method,
+     *                    the first argument in the invocation signature will correspond to the receiver.
+     * @param samMethod The primary method in the functional interface to which the lambda or method reference is
+     *                  being converted, represented as a method handle.
+     * @param implMethod The implementation method which should be called (with suitable adaptation of argument
+     *                   types, return types, and adjustment for captured arguments) when methods of the resulting
+     *                   functional interface instance are invoked.
+     * @param instantiatedMethodType The signature of the SAM method from the functional interface's perspective
+     * @return a CallSite, which, when invoked, will return an instance of the functional interface
+     * @throws ReflectiveOperationException
+     * @throws LambdaConversionException If any of the meta-factory protocol invariants are violated
+     */
+    public static CallSite metaFactory(MethodHandles.Lookup caller,
+                                       String invokedName,
+                                       MethodType invokedType,
+                                       MethodHandle samMethod,
+                                       MethodHandle implMethod,
+                                       MethodType instantiatedMethodType)
+                   throws ReflectiveOperationException, LambdaConversionException {
+        AbstractValidatingLambdaMetafactory mf;
+        mf = new InnerClassLambdaMetafactory(caller, invokedType, samMethod, implMethod, instantiatedMethodType);
+        mf.validateMetafactoryArgs();
+        return mf.buildCallSite();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/lang/invoke/MagicLambdaImpl.java	Mon Nov 05 10:33:18 2012 -0500
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.lang.invoke;
+
+/** <P> MagicLambdaImpl (named for similarity to MagicAccessorImpl and
+ others, not because it actually implements an interface) is a
+ marker class in the hierarchy. All subclasses of this class are
+ "magically" granted access by the VM to otherwise inaccessible
+ fields and methods of other classes. It is distinct from MagicAccessorImpl
+ because, while we want to bypass accessibility checks, we do not want to
+ bypas