changeset 8446:240072825ada

Merge
author chegar
date Thu, 03 Oct 2013 19:06:43 +0100
parents 22ea25e71b4c 9f57d2774603
children adbf6d61c820 f8b097b01270
files make/sun/awt/Makefile makefiles/CompileLaunchers.gmk makefiles/CompileNativeLibraries.gmk makefiles/Images.gmk src/macosx/classes/sun/lwawt/SelectionClearListener.java src/macosx/classes/sun/lwawt/macosx/CMouseInfoPeer.java src/share/classes/java/awt/datatransfer/DataFlavor.java src/share/classes/java/beans/DefaultPersistenceDelegate.java src/share/classes/java/lang/Class.java src/share/classes/java/lang/invoke/MethodHandles.java src/share/classes/java/util/stream/CloseableStream.java src/share/classes/java/util/stream/DelegatingStream.java src/share/classes/javax/management/MBeanNotificationInfo.java src/share/classes/javax/management/remote/rmi/RMIConnector.java src/share/classes/javax/security/auth/Subject.java src/share/classes/javax/swing/JTable.java src/share/classes/javax/swing/UIDefaults.java src/share/classes/sun/swing/SwingUtilities2.java src/share/native/sun/awt/image/jpeg/imageioJPEG.c src/share/native/sun/font/layout/SunLayoutEngine.cpp src/solaris/bin/java_md_solinux.c src/windows/native/java/net/NetworkInterface.c src/windows/native/java/net/NetworkInterface_winXP.c test/com/sun/jdi/Solaris32AndSolaris64Test.sh test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-i586/libLauncher.so test/java/nio/channels/spi/SelectorProvider/inheritedChannel/lib/solaris-sparc/libLauncher.so test/java/util/Collection/ListDefaults.java test/java/util/Map/CheckRandomHashSeed.java test/java/util/Map/TreeBinSplitBackToEntries.java test/java/util/concurrent/ConcurrentHashMap/toArray.java test/java/util/regex/PatternTest.java test/sun/tools/jconsole/ImmutableResourceTest.java test/sun/tools/jconsole/ImmutableResourceTest.sh test/tools/launcher/RunpathTest.java
diffstat 861 files changed, 26358 insertions(+), 13434 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sat Sep 14 19:21:07 2013 +0100
+++ b/.hgtags	Thu Oct 03 19:06:43 2013 +0100
@@ -229,3 +229,6 @@
 1fe211ae3d2b8cc2dfc4f58d9a6eb96418679672 jdk8-b105
 c817276bd870dfe1dcc3a3dbbc092436b6907f75 jdk8-b106
 eea685b9ccaa1980e0a7e07d6a3a84bcc7e9ab82 jdk8-b107
+006aaa5f069e7dd98fccdc696866c9f8582c087c jdk8-b108
+946f3fd5f8bf0ccd180c258d25e5837fa1bf004c jdk8-b109
+54e099776f08430d3a7f4feabd9f2ba886b55320 jdk8-b110
--- a/make/Makefile	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/Makefile	Thu Oct 03 19:06:43 2013 +0100
@@ -99,7 +99,6 @@
 CACERTS_FILE.desc          = Location of certificates file
 DEVTOOLS_PATH.desc         = Directory containing zip and unzip
 CUPS_HEADERS_PATH.desc     = Include directory location for CUPS header files
-DXSDK_PATH.desc            = Root directory of DirectX SDK
 
 # Make variables to print out (description and value)
 VARIABLE_PRINTVAL_LIST +=       \
@@ -128,17 +127,6 @@
 VARIABLE_CHECKFIL_LIST +=       \
     CACERTS_FILE
 
-# Some are windows specific
-ifeq ($(PLATFORM), windows)
-
-VARIABLE_PRINTVAL_LIST +=       \
-    DXSDK_PATH
-
-VARIABLE_CHECKDIR_LIST +=       \
-    DXSDK_PATH
-
-endif
-
 # For pattern rules below, so all are treated the same
 DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval)
 DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir)
--- a/make/bridge/AccessBridgeJava/Makefile	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/bridge/AccessBridgeJava/Makefile	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -51,7 +51,7 @@
 #
 # Java files to compile.
 #
-FILES_java = com/sun/java/accessibility/AccessBridge.java
+FILES_java = com/sun/java/accessibility/AccessBridgeLoader.java com/sun/java/accessibility/AccessBridge.java
 
 #
 # Location for the newly built classfiles.
@@ -61,14 +61,13 @@
 #
 # Rules
 #
-CLASSDESTDIR = $(TEMPDIR)/classes
 
 FILES_class = $(FILES_java:%.java=$(CLASSDESTDIR)/%.class)
 
 build: prebuild
 
 prebuild:
-	$(CP) $(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility/$(ABPLATFORM)/AccessBridge.java \
+	$(CP) $(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility/$(ABPLATFORM)/AccessBridgeLoader.java \
 		$(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility
 
 all : build $(JARFILE) 
--- a/make/common/Defs-macosx.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/common/Defs-macosx.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -397,12 +397,10 @@
   INCLUDE_SA = true
 endif
 
-ifdef CROSS_COMPILE_ARCH
-  # X11 headers are not under /usr/include
-  OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
-  OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
-  OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
-endif
+# X11 headers are not under /usr/include
+OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
+OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
+OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
 
 LIB_LOCATION ?= $(LIBDIR)
 
--- a/make/common/Defs-windows.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/common/Defs-windows.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -78,8 +78,6 @@
   MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
 endif
 
-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
 # enabled with debug info files ZIP'ed to save space. For VARIANT !=
--- a/make/common/Sanity.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/common/Sanity.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -65,7 +65,6 @@
     sane-libCrun \
     sane-unixccs_path \
     sane-msdevtools_path \
-    sane-dxsdk \
     sane-compiler \
     sane-cacerts \
     sane-ant_version \
--- a/make/common/shared/Defs-versions.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/common/shared/Defs-versions.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -74,9 +74,6 @@
 # REQUIRED_CYGWIN_VER
 #   Windows only: If CYGWIN is used, the minimum CYGWIN version.
 #
-# REQUIRED_DXSDK_VER
-#   Windows only: The version of DirectX SDK expected.
-#
 # REQUIRED_FREETYPE_VERSION
 #   If we are using freetype, the freetype version expected.
 #
@@ -193,7 +190,6 @@
   REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION)
   REQUIRED_CYGWIN_VER         = 4.0
   REQUIRED_MKS_VER            = 6.1
-  REQUIRED_DXSDK_VER          = 0x0900
   ifeq ($(CC_VERSION),msvc)
     REQUIRED_COMPILER_NAME    = Visual Studio 10
     REQUIRED_COMPILER_VERSION = VS2010
--- a/make/common/shared/Defs-windows.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/common/shared/Defs-windows.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -79,7 +79,7 @@
 #   The ALT values should never really have spaces or use \.
 #   Suspect these environment variables to have spaces and/or \ characters:
 #     SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
-#     DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS, 
+#     MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS, 
 #     MSVCDIR, MSVCDir.
 #     So use $(subst \,/,) on them first adding quotes and placing them in
 #         their own variable assigned with :=, then use FullPath.
@@ -255,18 +255,6 @@
   _program_files:=
 endif
 
-# DirectX SDK
-ifdef ALT_DXSDK_DRIVE
-  _dx_sdk_dir  =$(ALT_DXSDK_DRIVE):/DXSDK
-else
-  ifdef DXSDK_DIR
-    xDXSDK_DIR  :="$(subst \,/,$(DXSDK_DIR))"
-  else
-    xDXSDK_DIR  :="$(_system_drive)/DXSDK"
-  endif
-  _dx_sdk_dir :=$(call FullPath,$(xDXSDK_DIR))
-endif
-
 # Use of the Visual Studio compilers requires certain env variables be set:
 #   PATH should include the path to cl.exe
 #   INCLUDE should be defined
@@ -489,39 +477,6 @@
   MSVCRNN_DLL_PATH:=$(call AltCheckValue,MSVCRNN_DLL_PATH)
 endif
 
-# DXSDK_PATH: path to Microsoft DirectX SDK Include and Lib
-ifdef ALT_DXSDK_PATH
-  xALT_DXSDK_PATH :="$(subst \,/,$(ALT_DXSDK_PATH))"
-  DXSDK_PATH      :=$(call FullPath,$(xALT_DXSDK_PATH))
-else
-  _DXSDK_PATH1 :=$(_dx_sdk_dir)
-  _DXSDK_PATH2 :=$(JDK_DEVTOOLS_DIR)/windows/dxsdk
-  DXSDK_PATH  :=$(call DirExists,$(_DXSDK_PATH1),$(_DXSDK_PATH2),$(_dx_sdk_dir))
-endif
-DXSDK_PATH :=$(call AltCheckSpaces,DXSDK_PATH)
-DXSDK_PATH:=$(call AltCheckValue,DXSDK_PATH)
-
-# DXSDK_INCLUDE_PATH: path to Microsoft DirectX SDK Include
-ifdef ALT_DXSDK_INCLUDE_PATH
-  xALT_DXSDK_INCLUDE_PATH :="$(subst \,/,$(ALT_DXSDK_INCLUDE_PATH))"
-  DXSDK_INCLUDE_PATH      :=$(call FullPath,$(xALT_DXSDK_INCLUDE_PATH))
-else
-  DXSDK_INCLUDE_PATH =$(subst //,/,$(DXSDK_PATH)/Include)
-endif
-
-# DXSDK_LIB_PATH: path to Microsoft DirectX SDK Lib
-ifdef ALT_DXSDK_LIB_PATH
-  xALT_DXSDK_LIB_PATH :="$(subst \,/,$(ALT_DXSDK_LIB_PATH))"
-  DXSDK_LIB_PATH      :=$(call FullPath,$(xALT_DXSDK_LIB_PATH))
-else
-  ifeq ($(ARCH_DATA_MODEL), 64)
-    # 64bit libs are located in "Lib/x64" subdir
-    DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib/x64)
-  else
-    DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib)
-  endif
-endif
-
 # DEPLOY_MSSDK: Microsoft SDK for this platform (for deploy)
 ifdef ALT_DEPLOY_MSSDK
   xALT_DEPLOY_MSSDK :="$(subst \,/,$(ALT_DEPLOY_MSSDK))"
--- a/make/common/shared/Sanity-Settings.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/common/shared/Sanity-Settings.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -234,10 +234,6 @@
 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_SERVER_PATH)
 ifeq ($(PLATFORM),windows)
   ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_LIB_PATH)
-  ALL_SETTINGS+=$(call addRequiredSetting,DXSDK_VER)
-  ALL_SETTINGS+=$(call addAltSetting,DXSDK_PATH)
-  ALL_SETTINGS+=$(call addAltSetting,DXSDK_INCLUDE_PATH)
-  ALL_SETTINGS+=$(call addAltSetting,DXSDK_LIB_PATH)
   ALL_SETTINGS+=$(call addAltSetting,WINDOWSSDKDIR)
   ALL_SETTINGS+=$(call addRequiredSetting,RC)
   ALL_SETTINGS+=$(call addRequiredSetting,REBASE)
--- a/make/common/shared/Sanity.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/common/shared/Sanity.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -143,8 +143,6 @@
     _CYGWIN_VER := $(SYSTEM_UNAME)
     CYGWIN_VER  :=$(call GetVersion,$(_CYGWIN_VER))
   endif
-  DXSDK_VER := $(shell $(EGREP) DIRECT3D_VERSION $(DXSDK_INCLUDE_PATH)/d3d9.h 2>&1 | \
-    $(EGREP) "\#define" | $(NAWK) '{print $$3}')
 endif
 
 # Get the version numbers of what we are using
@@ -1301,51 +1299,6 @@
 	fi
 
 ######################################################
-# Check for windows DirectX sdk directory
-######################################################
-sane-dxsdk:
-ifeq ($(PLATFORM), windows)
-	@if [ ! -r $(DXSDK_INCLUDE_PATH)/d3d9.h  ]; then \
-	$(ECHO) "ERROR: You do not have access to a valid DirectX SDK Include dir.\n" \
-	  "      The value of DXSDK_INCLUDE_PATH must point a valid DX SDK dir.\n" \
-	  "      Please check your access to \n" \
-	  "          $(DXSDK_INCLUDE_PATH) \n" \
-	  "      and/or check your value of ALT_DXSDK_PATH or ALT_DXSDK_INCLUDE_PATH.\n" \
-	  "      Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
-	  "          http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
-	  "      Or  http://www.microsoft.com/directx\n" \
-	  "" >> $(ERROR_FILE) ; \
-	else \
-	  if [ ! "$(DXSDK_VER)" = "$(REQUIRED_DXSDK_VER)" ]; then \
-	  $(ECHO) "ERROR: The DirectX SDK must be version $(REQUIRED_DXSDK_VER).\n" \
-	    "      $(YOU_ARE_USING) DirectX SDK version: $(DXSDK_VER)\n" \
-	    "      The DirectX SDK was obtained from the following location: \n" \
-	    "          $(DXSDK_PATH) \n" \
-	    "      Please change your DirectX SDK. \n" \
-	    "      Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
-	    "          http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
-	    "      Or  http://www.microsoft.com/directx\n" \
-	    "" >> $(ERROR_FILE) ; \
-	  else \
-	    if [ -r $(DXSDK_INCLUDE_PATH)/basetsd.h ]; then \
-              if [ `$(EGREP) -c __int3264 $(DXSDK_INCLUDE_PATH)/basetsd.h` -ne 0 ]; then \
-	      $(ECHO) "WARNING: The DirectX SDK Include directory contains a newer basetsd.h,\n" \
-		"      which may indicate that you're using an incorrect version of DirectX SDK.\n" \
-		"      This may result in a build failure.\n" \
-		"      The DirectX SDK Include dir was obtained from the following location:\n" \
-		" 	  $(DXSDK_INCLUDE_PATH) \n" \
-		"      Please change your DirectX SDK to version 9 (Summer 2004 Update or newer).\n" \
-	        "      Microsoft DirectX 9 SDK can be downloaded from the following location:\n" \
-	        "          http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
-		"      Or  http://www.microsoft.com/directx\n" \
-		"" >> $(WARNING_FILE) ; \
-	      fi \
-	    fi \
-	  fi \
-	fi
-endif
-
-######################################################
 # Check the linker version(s)
 ######################################################
 ifeq ($(PLATFORM), windows)
--- a/make/java/java/Makefile	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/java/java/Makefile	Thu Oct 03 19:06:43 2013 +0100
@@ -105,6 +105,7 @@
 		java/util/prefs/MacOSXPreferencesFactory.java
 
 CFLAGS_$(VARIANT)/java_props_md.o = -Os -x objective-c
+CFLAGS_$(VARIANT)/java_props_macosx.o = -Os -x objective-c
 endif
 
 #
--- a/make/java/java/genlocales.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/java/java/genlocales.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -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 US language support
+# contain "sun.util.resources" for EN language support
 
 include $(BUILDDIR)/java/util/FILES_java.gmk
 include $(BUILDDIR)/java/util/FILES_properties.gmk
 
-US_Resources_java := $(FILES_java)
-US_Resources_properties := $(FILES_compiled_properties)
+EN_Resources_java := $(FILES_java)
+EN_Resources_properties := $(FILES_compiled_properties)
 
 # $(BUILDDIR)/java/text/FILES_java.gmk contains the "sun.text.resources" for 
-# US language support
+# EN language support
 
 include $(BUILDDIR)/java/text/base/FILES_java.gmk
 
-US_Resources_java += $(FILES_java)
+EN_Resources_java += $(FILES_java)
 
 FILES_compiled_properties=
 
 # $(BUILDDIR)/sun/text/FILES_java.gmk & $(BUILDDIR)/sun/text/FILES_properties.gmk
-# contain both resources for Non-US language support
+# contain both resources for Non-EN language support
 
 include $(BUILDDIR)/sun/text/FILES_java.gmk
 include $(BUILDDIR)/sun/text/FILES_properties.gmk
 
-NonUS_Resources_java := $(FILES_java)
-NonUS_Resources_properties := $(FILES_compiled_properties)
+NonEN_Resources_java := $(FILES_java)
+NonEN_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.us $@.tmp.nonus;
+	@$(RM) $@.tmp.en $@.tmp.nonen;
 	@$(prep-target) 
-	@$(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;
+	@$(ECHO) $(EN_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}'  > $@.tmp.en;
+	@$(ECHO) $(EN_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.en;
+	@$(ECHO) $(NonEN_Resources_properties) | $(NAWK) 'gsub(/.properties/,"\n") {print}' > $@.tmp.nonen;
+	@$(ECHO) $(NonEN_Resources_java) | $(NAWK) 'gsub(/.java/,"\n") {print}' >> $@.tmp.nonen;
 	NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
-	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.us \
-		$@.tmp.nonus $< $@
-	@$(RM) $@.tmp.us $@.tmp.nonus;
+	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.en \
+		$@.tmp.nonen $< $@
+	@$(RM) $@.tmp.en $@.tmp.nonen;
 
 else
 
 $(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
-	@$(RM) $@.tmp.us $@.tmp.nonus;
+	@$(RM) $@.tmp.en $@.tmp.nonen;
 	@$(prep-target) 
-	@$(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;
+	@$(ECHO) $(subst .properties,'\n',$(EN_Resources_properties)) > $@.tmp.en;
+	@$(ECHO) $(subst .java,'\n',$(EN_Resources_java)) >> $@.tmp.en;	
+	@$(ECHO) $(subst .properties,'\n',$(NonEN_Resources_properties)) > $@.tmp.nonen;
+	@$(ECHO) $(subst .java,'\n',$(NonEN_Resources_java)) >> $@.tmp.nonen;
 	NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
-	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.us \
-		$@.tmp.nonus $< $@
-	@$(RM) $@.tmp.us $@.tmp.nonus;
+	     $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.en \
+		$@.tmp.nonen $< $@
+	@$(RM) $@.tmp.en $@.tmp.nonen;
 endif
 	
 genlocales : $(LocaleDataMetaInfo_Dest)  
--- a/make/java/java/localegen.sh	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/java/java/localegen.sh	Thu Oct 03 19:06:43 2013 +0100
@@ -35,11 +35,11 @@
 # A list of resource base name list;
 RESOURCE_NAMES=$1
 
-# A list of US resources;
-US_FILES_LIST=$2
+# A list of EN resources;
+EN_FILES_LIST=$2
 
-# A list of non-US resources;
-NONUS_FILES_LIST=$3
+# A list of non-EN resources;
+NONEN_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.
-nonusall=" ja-JP-JP th-TH-TH "
+nonenall=" ja-JP-JP th-TH-TH "
 
 for FILE in $RESOURCE_NAMES
 do
-    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
+    getlocalelist $FILE $EN_FILES_LIST
+    sed_script=$sed_script"-e \"s@#"$FILE"_ENLocales#@$localelist@g\" "
+    enall=$enall" "$localelist
+    getlocalelist $FILE $NONEN_FILES_LIST
+    sed_script=$sed_script"-e \"s@#"$FILE"_NonENLocales#@$localelist@g\" "
+    nonenall=$nonenall" "$localelist
 done
 
-usall=`(for LOC in $usall; do echo $LOC;done) |$SORT -u`
-nonusall=`(for LOC in $nonusall; do echo $LOC;done) |$SORT -u`
+enall=`(for LOC in $enall; do echo $LOC;done) |$SORT -u`
+nonenall=`(for LOC in $nonenall; do echo $LOC;done) |$SORT -u`
 
-sed_script=$sed_script"-e \"s@#AvailableLocales_USLocales#@$usall@g\" "
-sed_script=$sed_script"-e \"s@#AvailableLocales_NonUSLocales#@$nonusall@g\" "
+sed_script=$sed_script"-e \"s@#AvailableLocales_ENLocales#@$enall@g\" "
+sed_script=$sed_script"-e \"s@#AvailableLocales_NonENLocales#@$nonenall@g\" "
 
 sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE"
 eval $sed_script
--- a/make/java/security/Makefile	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/java/security/Makefile	Thu Oct 03 19:06:43 2013 +0100
@@ -70,9 +70,13 @@
 CACERTS_SRC =	$(CACERTS_FILE)
 CACERTS_BUILD = $(LIBDIR)/security/cacerts
 
+BLACKLISTED_CERTS_SRC =	$(TOPDIR)/src/share/lib/security/blacklisted.certs
+BLACKLISTED_CERTS_BUILD = $(LIBDIR)/security/blacklisted.certs
+
 ifndef OPENJDK
   BLACKLIST_SRC =	$(CLOSED_SHARE_SRC)/lib/security/blacklist
   BLACKLIST_BUILD = $(LIBDIR)/security/blacklist
+  BLACKLISTED_CERTS_SRC +=	$(wildcard $(CLOSED_SHARE_SRC)/lib/security/blacklisted.certs)
   TRUSTEDLIBS_SRC = $(CLOSED_SHARE_SRC)/lib/security/trusted.libraries
   TRUSTEDLIBS_BUILD = $(LIBDIR)/security/trusted.libraries
 endif
@@ -85,9 +89,9 @@
 include $(BUILDDIR)/common/Rules.gmk
 
 ifdef OPENJDK
-build: properties policy cacerts
+build: properties policy cacerts blacklisted-certs
 else
-build: properties policy cacerts blacklist trustedlibs
+build: properties policy cacerts blacklist blacklisted-certs trustedlibs
 endif
 
 install: all
@@ -100,6 +104,8 @@
 
 blacklist: classes $(BLACKLIST_BUILD)
 
+blacklisted-certs: classes $(BLACKLISTED_CERTS_BUILD)
+
 trustedlibs: classes $(TRUSTEDLIBS_BUILD)
 
 $(PROPS_BUILD): $(PROPS_SRC)
@@ -114,12 +120,25 @@
 $(BLACKLIST_BUILD): $(BLACKLIST_SRC)
 	$(install-file)
 
+$(BLACKLISTED_CERTS_BUILD): $(BLACKLISTED_CERTS_SRC)
+	$(MKDIR) -p $(@D)
+	$(CAT) $^ | $(SED) '/^$$/d' | $(SORT) | $(UNIQ) > $@.tmp
+	$(GREP) -i Algorithm $@.tmp > $@
+	if [ `$(SED) -n -e "$$=" $@` != 1 ]; then \
+	   $(ECHO) "Different algorithms defined in $^"; \
+	   $(RM) $@ $@.tmp; \
+	   false; \
+	fi
+	$(GREP) -iv Algorithm $@.tmp >> $@
+	$(RM) $@.tmp
+
 $(TRUSTEDLIBS_BUILD): $(TRUSTEDLIBS_SRC)
 	$(install-file)
 
 clean clobber:: .delete.classlist
 	$(RM) -r $(CLASSBINDIR)/java/security
-	$(RM) $(PROPS_BUILD) $(POLICY_BUILD) $(CACERTS_BUILD) $(BLACKLIST_BUILD) $(TRUSTEDLIBS_BUILD)
+	$(RM) $(PROPS_BUILD) $(POLICY_BUILD) $(CACERTS_BUILD) $(BLACKLIST_BUILD) \
+	      $(BLACKLISTED_CERTS_BUILD) $(TRUSTEDLIBS_BUILD)
 
 # Additional Rule for building sun.security.util
 $(CLASSBINDIR)/%.class: $(SHARE_SRC)/sun/%.java
--- a/make/java/text/base/FILES_java.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/java/text/base/FILES_java.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -107,5 +107,17 @@
         sun/text/resources/FormatData.java \
         sun/text/resources/JavaTimeSupplementary.java \
         sun/text/resources/en/FormatData_en.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_US.java \
+        sun/text/resources/en/FormatData_en_ZA.java \
         sun/text/resources/en/JavaTimeSupplementary_en.java \
+        sun/text/resources/en/JavaTimeSupplementary_en_GB.java \
+        sun/text/resources/en/JavaTimeSupplementary_en_SG.java
--- a/make/java/util/FILES_java.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/java/util/FILES_java.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -30,4 +30,7 @@
         sun/util/resources/LocaleNamesBundle.java \
         sun/util/resources/TimeZoneNamesBundle.java \
         sun/util/resources/TimeZoneNames.java \
-        sun/util/resources/en/TimeZoneNames_en.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
--- a/make/java/util/FILES_properties.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/java/util/FILES_properties.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -26,9 +26,25 @@
 FILES_compiled_properties = \
         sun/util/resources/LocaleNames.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/CalendarData.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/CurrencyNames.properties \
-        sun/util/resources/en/CurrencyNames_en_US.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
--- a/make/javax/sound/jsoundds/Makefile	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/javax/sound/jsoundds/Makefile	Thu Oct 03 19:06:43 2013 +0100
@@ -55,8 +55,7 @@
 LDLIBS += dsound.lib winmm.lib user32.lib ole32.lib
 CPPFLAGS += \
 	-DUSE_DAUDIO=TRUE \
-	-I$(SHARE_SRC)/native/com/sun/media/sound \
-	-I$(DXSDK_INCLUDE_PATH)
+	-I$(SHARE_SRC)/native/com/sun/media/sound
 
 #
 # Add to the ambient VPATH.
--- a/make/jdk_generic_profile.sh	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/jdk_generic_profile.sh	Thu Oct 03 19:06:43 2013 +0100
@@ -80,7 +80,6 @@
 #    ALT_BOOTDIR
 #    Windows Only:
 #      ALT_UNIXCOMMAND_PATH
-#      ALT_DXSDK_PATH
 #      ALT_MSVCRNN_DLL_PATH
 #
 #############################################################################
--- a/make/jprt.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/jprt.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -40,8 +40,8 @@
     linux_i586_2.6-{product|fastdebug}, 			\
     linux_x64_2.6-{product|fastdebug}, 				\
     macosx_x64_10.7-{product|fastdebug}, 			\
-    windows_i586_5.1-{product|fastdebug}, 			\
-    windows_x64_5.2-{product|fastdebug}
+    windows_i586_6.1-{product|fastdebug}, 			\
+    windows_x64_6.1-{product|fastdebug}
 
 # User can select the test set with jprt submit "-testset name" option
 jprt.my.test.set=${jprt.test.set}
@@ -55,8 +55,8 @@
     linux_i586_2.6-product-{c1|c2}-TESTNAME,                    \
     linux_x64_2.6-product-c2-TESTNAME,                          \
     macosx_x64_10.7-product-c2-TESTNAME,                        \
-    windows_i586_5.1-product-c1-TESTNAME,                       \
-    windows_x64_5.2-product-c2-TESTNAME
+    windows_i586_6.1-product-c1-TESTNAME,                       \
+    windows_x64_6.1-product-c2-TESTNAME
 
 # Default vm test targets (testset=default)
 jprt.vm.default.test.targets=					\
--- a/make/netbeans/awt2d/README	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/netbeans/awt2d/README	Thu Oct 03 19:06:43 2013 +0100
@@ -39,7 +39,6 @@
       (on Windows):
         #>env | grep ALT
         ALT_JDK_IMPORT_PATH=c:/devtools/java/jdk1.7.0
-        ALT_DXSDK_PATH=c:/devtools/DirectX/DXSDK_Dec06
         ALT_BOOTDIR=c:/DevTools/java/jdk1.6.0
 
       If your build is a FASTDEBUG build, don't forget
@@ -50,7 +49,6 @@
       accordingly:
         make.options=\
             ALT_JDK_IMPORT_PATH=c:/devtools/java/jdk1.7.0 \
-            ALT_DXSDK_PATH=c:/devtools/DirectX/DXSDK_Dec06 \
             ALT_BOOTDIR=c:/DevTools/java/jdk1.6.0 \
             FASTDEBUG=true
         make=c:/devtools/cygwin/bin/make
@@ -175,7 +173,6 @@
   ../../build/windows-i586/tmp/sun/sun.awt/splashscreen/CClassHeaders;
   ../../build/windows-i586/tmp/sun/sun.font/fontmanager/CClassHeaders;
   ../../build/windows-i586/tmp/sun/sun.font/t2k/CClassHeaders;
-  C:/DevTools/DirectX/DXSDK_Dec06/Include;
   C:/devtools/VS2003/SDK/v1.1/include;
   C:/devtools/VS2003/VC7/ATLMFC/INCLUDE;
   C:/devtools/VS2003/VC7/INCLUDE;
@@ -188,7 +185,7 @@
   Note that most paths are relative to the native project directory - 
   this helps if you decide to relocate the workspace later. The ones that 
   aren't relative are paths to external include directories, like those 
-  of the Platform SDK, DirectX SDK.
+  of the Platform SDK.
   On Unix platforms these may be directories like /usr/include.
 
   The parser must know some defines to correctly parse the source files,
--- a/make/sun/awt/Makefile	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/sun/awt/Makefile	Thu Oct 03 19:06:43 2013 +0100
@@ -562,7 +562,6 @@
 	-I$(OBJDIR) \
 	-I$(SHARE_SRC)/native/common \
 	-I$(WINAWT_native) \
-	-I$(DXSDK_INCLUDE_PATH) \
 	-I$(SHARE_SRC)/native/sun/awt/image/cvutils \
 	-I$(SHARE_SRC)/native/sun/awt/image \
 	-I$(SHARE_SRC)/native/sun/java2d/loops \
--- a/make/sun/cmm/lcms/mapfile-vers	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/sun/cmm/lcms/mapfile-vers	Thu Oct 03 19:06:43 2013 +0100
@@ -28,9 +28,8 @@
 SUNWprivate_1.1 {
 	global:
         Java_sun_java2d_cmm_lcms_LCMS_loadProfileNative;
-        Java_sun_java2d_cmm_lcms_LCMS_freeProfileNative;
-        Java_sun_java2d_cmm_lcms_LCMS_getProfileSize;
-        Java_sun_java2d_cmm_lcms_LCMS_getProfileData;
+        Java_sun_java2d_cmm_lcms_LCMS_getProfileSizeNative;
+        Java_sun_java2d_cmm_lcms_LCMS_getProfileDataNative;
         Java_sun_java2d_cmm_lcms_LCMS_getTagNative;
         Java_sun_java2d_cmm_lcms_LCMS_setTagDataNative;
         Java_sun_java2d_cmm_lcms_LCMS_colorConvert;
--- a/make/sun/jawt/Makefile	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/sun/jawt/Makefile	Thu Oct 03 19:06:43 2013 +0100
@@ -69,7 +69,6 @@
 # Other extra flags needed for compiling.
 #
 CPPFLAGS += -I$(SHARE_SRC)/native/common \
-	-I$(DXSDK_INCLUDE_PATH) \
 	-I$(PLATFORM_SRC)/native/sun/windows \
 	-I$(CLASSHDRDIR)/../../awt/CClassHeaders \
         -I$(SHARE_SRC)/native/sun/awt/debug \
--- a/make/sun/lwawt/FILES_export_macosx.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/sun/lwawt/FILES_export_macosx.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -110,7 +110,6 @@
         sun/lwawt/LWWindowPeer.java \
         sun/lwawt/PlatformWindow.java \
         sun/lwawt/SecurityWarningWindow.java \
-        sun/lwawt/SelectionClearListener.java \
         sun/lwawt/macosx/CPrinterDevice.java \
         sun/lwawt/macosx/CPrinterDialog.java \
         sun/lwawt/macosx/CPrinterDialogPeer.java \
@@ -141,7 +140,6 @@
         sun/lwawt/macosx/CMenuBar.java \
         sun/lwawt/macosx/CMenuComponent.java \
         sun/lwawt/macosx/CMenuItem.java \
-        sun/lwawt/macosx/CMouseInfoPeer.java \
         sun/lwawt/macosx/CPlatformView.java \
         sun/lwawt/macosx/CPlatformWindow.java \
         sun/lwawt/macosx/CWarningWindow.java \
--- a/make/sun/text/FILES_java.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/sun/text/FILES_java.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -96,16 +96,6 @@
                 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 \
@@ -214,9 +204,6 @@
                 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 \
@@ -237,8 +224,6 @@
                 sun/text/resources/da/JavaTimeSupplementary_da.java \
                 sun/text/resources/de/JavaTimeSupplementary_de.java \
                 sun/text/resources/el/JavaTimeSupplementary_el.java \
-                sun/text/resources/en/JavaTimeSupplementary_en_GB.java \
-                sun/text/resources/en/JavaTimeSupplementary_en_SG.java \
                 sun/text/resources/es/JavaTimeSupplementary_es.java \
                 sun/text/resources/et/JavaTimeSupplementary_et.java \
                 sun/text/resources/fi/JavaTimeSupplementary_fi.java \
--- a/make/sun/text/FILES_properties.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/sun/text/FILES_properties.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -33,9 +33,6 @@
         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 \
@@ -88,9 +85,6 @@
         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 \
@@ -164,16 +158,6 @@
         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 \
--- a/make/sun/xawt/mapfile-vers	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/sun/xawt/mapfile-vers	Thu Oct 03 19:06:43 2013 +0100
@@ -305,6 +305,7 @@
         Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap;
         Java_sun_awt_X11_XlibWrapper_XkbFreeKeyboard;
         Java_sun_awt_X11_XlibWrapper_XkbTranslateKeyCode;
+        Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat;
         Java_sun_awt_X11_XlibWrapper_XGetModifierMapping;
         Java_sun_awt_X11_XlibWrapper_XFreeModifiermap;
         Java_sun_awt_X11_XlibWrapper_XRefreshKeyboardMapping;
--- a/make/tools/src/build/tools/generatecharacter/CharacterName.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/make/tools/src/build/tools/generatecharacter/CharacterName.java	Thu Oct 03 19:06:43 2013 +0100
@@ -11,7 +11,7 @@
         FileReader reader = null;
         try {
             if (args.length != 2) {
-                System.err.println("Usage: java CharacterName UniocdeData.txt uniName.dat");
+                System.err.println("Usage: java CharacterName UnicodeData.txt uniName.dat");
                 System.exit(1);
             }
 
--- a/makefiles/CompileDemos.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/CompileDemos.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -65,14 +65,10 @@
 $(eval $(call SetupAppletDemo,DrawTest))
 $(eval $(call SetupAppletDemo,Fractal))
 $(eval $(call SetupAppletDemo,GraphicsTest))
-$(eval $(call SetupAppletDemo,MoleculeViewer))
 $(eval $(call SetupAppletDemo,NervousText))
 $(eval $(call SetupAppletDemo,SimpleGraph))
 $(eval $(call SetupAppletDemo,SortDemo))
 $(eval $(call SetupAppletDemo,SpreadSheet))
-# Build WireFrame without a server since it
-# has a class Matrix3D that also exists in MoleculeViewer.
-$(eval $(call SetupAppletDemo,WireFrame,true))
 
 ifndef OPENJDK
     $(eval $(call SetupAppletDemo,Animator,,closed/))
@@ -83,7 +79,7 @@
 
 ##################################################################################################
 
-PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf
+PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj
 
 define SetupDemo
     # Param 1 = Name of the demo
@@ -161,6 +157,8 @@
 
 BUILD_DEMOS+=$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
 
+$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html XYZApp.java))
+$(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html ThreeD.java))
 $(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*))
 $(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt))
 $(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*))
--- a/makefiles/CompileJavaClasses.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/CompileJavaClasses.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -62,6 +62,7 @@
 
       # AccessBridge is compiled separately below.
       EXFILES += AccessBridge.java \
+		 AccessBridgeLoader.java \
 		 com/sun/java/accessibility/util/java/awt/ChoiceTranslator.java
       # This seems to never be built
       EXCLUDES += com/sun/java/accessibility/extensions
--- a/makefiles/CompileLaunchers.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/CompileLaunchers.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -23,7 +23,7 @@
 # questions.
 #
 
-defalt: all
+default: all
 
 include $(SPEC)
 include MakeBase.gmk
--- a/makefiles/CompileNativeLibraries.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/CompileNativeLibraries.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -23,7 +23,7 @@
 # questions.
 #
 
-defalt: all
+default: all
 
 include $(SPEC)
 include MakeBase.gmk
@@ -211,6 +211,7 @@
 	LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
 else
 	BUILD_LIBJAVA_java_props_md.c_CFLAGS:=-x objective-c
+        BUILD_LIBJAVA_java_props_macosx.c_CFLAGS:=-x objective-c
 endif
 
 ifeq ($(OPENJDK_TARGET_OS),windows)
@@ -252,6 +253,7 @@
 		LDFLAGS_SUFFIX_linux:=$(LIBDL) $(BUILD_LIBFDLIBM),\
 		LDFLAGS_SUFFIX_macosx:=-L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
                                          -framework CoreFoundation \
+                                         -framework Foundation \
                                          -framework Security -framework SystemConfiguration, \
 		LDFLAGS_SUFFIX_windows:=-export:winFileHandleOpen -export:handleLseek \
 					jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
@@ -472,7 +474,6 @@
 	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
 	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
 	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/d3d
-    LIBAWT_CFLAGS+=-I$(DXSDK_INCLUDE_PATH)
 else
     LIBAWT_DIRS+=\
 	$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/x11
@@ -1478,8 +1479,7 @@
 		        -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
 		        -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
 			-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
-			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows \
-			-I$(DXSDK_INCLUDE_PATH), \
+			-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d/windows, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) $(KERNEL32_LIB) $(LDFLAGS_CXX_JDK) \
 			 advapi32.lib $(WIN_AWT_LIB),\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX),\
@@ -2957,8 +2957,7 @@
 		OPTIMIZATION:=LOW, \
 		CFLAGS:=$(CFLAGS_JDKLIB) \
 			$(LIBJSOUND_CFLAGS) \
-			-DUSE_DAUDIO=TRUE \
-                        -I$(DXSDK_INCLUDE_PATH), \
+			-DUSE_DAUDIO=TRUE, \
 		LDFLAGS:=$(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
 			 $(call SET_SHARED_LIBRARY_ORIGIN),\
 		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) dsound.lib winmm.lib user32.lib ole32.lib,\
--- a/makefiles/CopyFiles.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/CopyFiles.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -382,11 +382,16 @@
 
 ##########################################################################################
 
+BLACKLISTED_CERTS_SRC := $(JDK_TOPDIR)/src/share/lib/security/blacklisted.certs
+BLACKLISTED_CERTS_DST := $(JDK_OUTPUTDIR)/lib/security/blacklisted.certs
+
 ifndef OPENJDK
 
 BLACKLIST_SRC   := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
 BLACKLIST_DST   := $(JDK_OUTPUTDIR)/lib/security/blacklist
 
+BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/src/closed/share/lib/security/blacklisted.certs)
+
 TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
 TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
 
@@ -402,6 +407,20 @@
 
 endif
 
+$(BLACKLISTED_CERTS_DST): $(BLACKLISTED_CERTS_SRC)
+	$(MKDIR) -p $(@D)
+	$(CAT) $^ | $(SED) '/^$$/d' | $(SORT) | $(UNIQ) > $@.tmp
+	$(GREP) -i Algorithm $@.tmp > $@
+	if [ `$(SED) -n -e "$$=" $@` != 1 ]; then \
+	   $(ECHO) "Different algorithms defined in $^"; \
+	   $(RM) $@ $@.tmp; \
+	   false; \
+	fi
+	$(GREP) -iv Algorithm $@.tmp >> $@
+	$(RM) $@.tmp
+
+COPY_FILES += $(BLACKLISTED_CERTS_DST)
+
 ##########################################################################################
 
 ifndef OPENJDK
--- a/makefiles/CreateJars.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/CreateJars.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -80,39 +80,6 @@
 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,\
@@ -986,13 +953,13 @@
 
     ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
         $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/32bit $(JDK_OUTPUTDIR)/classes,\
+		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/32bit,\
 		INCLUDES:=com/sun/java/accessibility,\
 		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar,\
 		SKIP_METAINF:=true))
 
         $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/legacy $(JDK_OUTPUTDIR)/classes,\
+		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/legacy,\
 		INCLUDES:=com/sun/java/accessibility,\
 		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar,\
 		SKIP_METAINF:=true))
@@ -1001,9 +968,8 @@
 		$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
     else
         $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/64bit $(JDK_OUTPUTDIR)/classes,\
+		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/64bit,\
 		INCLUDES:=com/sun/java/accessibility,\
-		EXCLUDES:=com/sun/java/accessibility/util/java,\
 		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar,\
 		SKIP_METAINF:=true))
 
--- a/makefiles/GensrcLocaleDataMetaInfo.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/GensrcLocaleDataMetaInfo.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -50,27 +50,27 @@
     $(shell $(RM) $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java)
 endif
 
-# The US locales
-US_LOCALES:=en en-US
+# The EN locales
+EN_LOCALES:=en%
 
 # ja-JP-JP and th-TH-TH need to be manually added, as they don't have any resource files.
-ALL_NON_US_LOCALES:=ja-JP-JP th-TH-TH
+ALL_NON_EN_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_USLocales# with: en and/or en_US.
+# #FormatData_ENLocales# with: en% locales.
 define CaptureLocale
     $1_LOCALES := $$(subst _,-,$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES)))))
-    $1_US_LOCALES := $$(filter $(US_LOCALES),$$($1_LOCALES))
-    $1_NON_US_LOCALES := $$(filter-out $(US_LOCALES),$$($1_LOCALES))
+    $1_EN_LOCALES := $$(filter $(EN_LOCALES),$$($1_LOCALES))
+    $1_NON_EN_LOCALES := $$(filter-out $(EN_LOCALES),$$($1_LOCALES))
 
-    ALL_US_LOCALES += $$($1_US_LOCALES)
-    ALL_NON_US_LOCALES += $$($1_NON_US_LOCALES)
+    ALL_EN_LOCALES += $$($1_EN_LOCALES)
+    ALL_NON_EN_LOCALES += $$($1_NON_EN_LOCALES)
 
     # Don't sed in a space if there are no locales.
-    SED_ARGS+= -e 's/$$(HASH)$1_USLocales$$(HASH)/$$(if $$($1_US_LOCALES),$$(SPACE)$$($1_US_LOCALES),)/g'
-    SED_ARGS+= -e 's/$$(HASH)$1_NonUSLocales$$(HASH)/$$(if $$($1_NON_US_LOCALES),$$(SPACE)$$($1_NON_US_LOCALES),)/g'
+    SED_ARGS+= -e 's/$$(HASH)$1_ENLocales$$(HASH)/$$(if $$($1_EN_LOCALES),$$(SPACE)$$($1_EN_LOCALES),)/g'
+    SED_ARGS+= -e 's/$$(HASH)$1_NonENLocales$$(HASH)/$$(if $$($1_NON_EN_LOCALES),$$(SPACE)$$($1_NON_EN_LOCALES),)/g'
 endef
 
 #sun.text.resources.FormatData
@@ -91,8 +91,8 @@
 #sun.util.resources.CalendarData
 $(eval $(call CaptureLocale,CalendarData))
 
-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'
+SED_ARGS+= -e 's/$(HASH)AvailableLocales_ENLocales$(HASH)/$(sort $(ALL_EN_LOCALES))/g'
+SED_ARGS+= -e 's/$(HASH)AvailableLocales_NonENLocales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g'
 
 $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java: \
 		$(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
--- a/makefiles/GensrcMisc.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/GensrcMisc.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -200,26 +200,42 @@
     AB_SRC_DIR := $(JDK_TOPDIR)/src/closed/windows/classes/com/sun/java/accessibility
 
     ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+         $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
+			$(AB_SRC_DIR)/32bit/AccessBridgeLoader.java
+		$(install-file)
+
          $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/32bit/AccessBridge.java
+			$(AB_SRC_DIR)/AccessBridge.java
+		$(install-file)
+
+         $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java: \
+			$(AB_SRC_DIR)/legacy/AccessBridgeLoader.java
 		$(install-file)
 
          $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/legacy/AccessBridge.java
+			$(AB_SRC_DIR)/AccessBridge.java
 		$(install-file)
 
-        GENSRC_MISC += $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java \
-		       $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java
+        GENSRC_MISC += $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java \
+		       $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java \
+			   $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java \
+			   $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java
 
     else
-         $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/64bit/AccessBridge.java
+         $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
+			$(AB_SRC_DIR)/64bit/AccessBridgeLoader.java
 		$(install-file)
 
-         GENSRC_MISC += $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java
+         $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java: \
+			$(AB_SRC_DIR)/AccessBridge.java
+		$(install-file)
+
+         GENSRC_MISC += $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java \
+			$(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java
 
     endif
+
 endif
 endif
 
-##########################################################################################
\ No newline at end of file
+##########################################################################################
--- a/makefiles/GensrcProperties.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/GensrcProperties.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -253,6 +253,13 @@
 	$(call CacheFind,$(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)),\
 	ListResourceBundle,%zh_TW,%zh_HK))
 endif
+# os x specific awt properties
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+$(eval $(call add_properties_to_compile,SUN_AWT,\
+	$(filter $(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources/%.properties,\
+	$(call CacheFind,$(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources)),\
+	ListResourceBundle))
+endif
 
 #sun/launcher/resources
 $(eval $(call add_properties_to_compile,SUN_LAUNCHER,\
--- a/makefiles/Images.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/Images.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -190,6 +190,26 @@
 $(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)),\
     $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
 
+ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
+  define AddIsadirLink
+    # Param 1 - src file
+    # Param 2 - variable to add targets to
+
+    $1_LINK := $$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1)
+
+    $$($1_LINK):
+	$(ECHO) $(LOG_INFO) Creating link $$(patsubst $(OUTPUT_ROOT)/%,%,$$@)
+	$(MKDIR) -p $$(@D)
+	$(LN) -s ../$$(@F) $$@
+
+    $2 += $$($1_LINK)
+  endef
+
+  $(foreach f,$(JRE_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JRE_BIN_ISADIR_LINK_TARGETS)))
+  $(foreach f,$(JDK_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JDK_BIN_ISADIR_LINK_TARGETS)))
+  $(foreach f,$(JDKJRE_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JDKJRE_BIN_ISADIR_LINK_TARGETS)))
+endif
+
 ################################################################################
 # /lib dir
 ifneq ($(OPENJDK_TARGET_OS), macosx)
@@ -735,7 +755,8 @@
 
 jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \
 	$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \
-	$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST)
+	$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) \
+	$(JRE_BIN_ISADIR_LINK_TARGETS)
 
 jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \
 	$(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \
@@ -746,7 +767,8 @@
 	$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \
 	$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \
 	$(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \
-        $(JDK_IMAGE_DIR)/src.zip
+        $(JDK_IMAGE_DIR)/src.zip \
+	$(JDK_BIN_ISADIR_LINK_TARGETS) $(JDKJRE_BIN_ISADIR_LINK_TARGETS)
 
 jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \
 	 $(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST)
--- a/makefiles/Setup.gmk	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/Setup.gmk	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
 
 DISABLE_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
 
+# To build with all warnings enabled, do the following:
+# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000" 
+JAVAC_WARNINGS:=-Xlint:-unchecked,-deprecation,-overrides,classfile,dep-ann,divzero,varargs -Werror
+
 # The generate old bytecode javac setup uses the new compiler to compile for the
 # boot jdk to generate tools that need to be run with the boot jdk.
 # Thus we force the target bytecode to 7.
@@ -41,7 +45,7 @@
      JVM:=$(JAVA),\
      JAVAC:=$(NEW_JAVAC),\
      FLAGS:=-bootclasspath $(JDK_OUTPUTDIR)/classes -source 8 -target 8 \
-	    -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS) \
+	    -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS) \
 	    $(GENERATE_JDKBYTECODE_EXTRA_FLAGS),\
      SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
      SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
--- a/makefiles/jprt.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/jprt.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2013, 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
@@ -39,8 +39,8 @@
     solaris_x64_5.10-{product|fastdebug}, 			\
     linux_i586_2.6-{product|fastdebug}, 			\
     linux_x64_2.6-{product|fastdebug}, 				\
-    windows_i586_5.1-{product|fastdebug}, 			\
-    windows_x64_5.2-{product|fastdebug}
+    windows_i586_6.1-{product|fastdebug}, 			\
+    windows_x64_6.1-{product|fastdebug}
 
 # User can select the test set with jprt submit "-testset name" option
 jprt.my.test.set=${jprt.test.set}
@@ -53,8 +53,8 @@
     solaris_x64_5.10-product-c2-jvm98, 				\
     linux_i586_2.6-product-{c1|c2}-jvm98, 			\
     linux_x64_2.6-product-c2-jvm98, 				\
-    windows_i586_5.1-product-c1-jvm98, 				\
-    windows_x64_5.2-product-c2-jvm98
+    windows_i586_6.1-product-c1-jvm98, 				\
+    windows_x64_6.1-product-c2-jvm98
 
 # Select vm testlist to use (allow for testset to be empty too)
 jprt.vm.all.test.targets=${jprt.vm.default.test.targets}
@@ -70,8 +70,8 @@
     solaris_x64_5.10-product-c2-jdk_beans1, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_beans1, 			\
     linux_x64_2.6-product-c2-jdk_beans1, 			\
-    windows_i586_5.1-product-c1-jdk_beans1, 			\
-    windows_x64_5.2-product-c2-jdk_beans1, 			\
+    windows_i586_6.1-product-c1-jdk_beans1, 			\
+    windows_x64_6.1-product-c2-jdk_beans1, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_io, 			\
     solaris_sparcv9_5.10-product-c2-jdk_io, 			\
@@ -79,8 +79,8 @@
     solaris_x64_5.10-product-c2-jdk_io, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_io, 			\
     linux_x64_2.6-product-c2-jdk_io, 				\
-    windows_i586_5.1-product-c1-jdk_io, 			\
-    windows_x64_5.2-product-c2-jdk_io, 				\
+    windows_i586_6.1-product-c1-jdk_io, 			\
+    windows_x64_6.1-product-c2-jdk_io, 				\
     								\
     solaris_sparc_5.10-product-c1-jdk_lang, 			\
     solaris_sparcv9_5.10-product-c2-jdk_lang, 			\
@@ -88,8 +88,8 @@
     solaris_x64_5.10-product-c2-jdk_lang, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_lang, 			\
     linux_x64_2.6-product-c2-jdk_lang, 				\
-    windows_i586_5.1-product-c1-jdk_lang, 			\
-    windows_x64_5.2-product-c2-jdk_lang, 			\
+    windows_i586_6.1-product-c1-jdk_lang, 			\
+    windows_x64_6.1-product-c2-jdk_lang, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_math, 			\
     solaris_sparcv9_5.10-product-c2-jdk_math, 			\
@@ -97,8 +97,8 @@
     solaris_x64_5.10-product-c2-jdk_math, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_math, 			\
     linux_x64_2.6-product-c2-jdk_math, 				\
-    windows_i586_5.1-product-c1-jdk_math, 			\
-    windows_x64_5.2-product-c2-jdk_math, 			\
+    windows_i586_6.1-product-c1-jdk_math, 			\
+    windows_x64_6.1-product-c2-jdk_math, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_misc, 			\
     solaris_sparcv9_5.10-product-c2-jdk_misc, 			\
@@ -106,8 +106,8 @@
     solaris_x64_5.10-product-c2-jdk_misc, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_misc, 			\
     linux_x64_2.6-product-c2-jdk_misc, 				\
-    windows_i586_5.1-product-c1-jdk_misc, 			\
-    windows_x64_5.2-product-c2-jdk_misc, 			\
+    windows_i586_6.1-product-c1-jdk_misc, 			\
+    windows_x64_6.1-product-c2-jdk_misc, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_net, 			\
     solaris_sparcv9_5.10-product-c2-jdk_net, 			\
@@ -115,8 +115,8 @@
     solaris_x64_5.10-product-c2-jdk_net, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_net, 			\
     linux_x64_2.6-product-c2-jdk_net, 				\
-    windows_i586_5.1-product-c1-jdk_net, 			\
-    windows_x64_5.2-product-c2-jdk_net, 			\
+    windows_i586_6.1-product-c1-jdk_net, 			\
+    windows_x64_6.1-product-c2-jdk_net, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_nio1, 			\
     solaris_sparcv9_5.10-product-c2-jdk_nio1, 			\
@@ -124,8 +124,8 @@
     solaris_x64_5.10-product-c2-jdk_nio1, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_nio1, 			\
     linux_x64_2.6-product-c2-jdk_nio1, 				\
-    windows_i586_5.1-product-c1-jdk_nio1, 			\
-    windows_x64_5.2-product-c2-jdk_nio1, 			\
+    windows_i586_6.1-product-c1-jdk_nio1, 			\
+    windows_x64_6.1-product-c2-jdk_nio1, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_nio2, 			\
     solaris_sparcv9_5.10-product-c2-jdk_nio2, 			\
@@ -133,8 +133,8 @@
     solaris_x64_5.10-product-c2-jdk_nio2, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_nio2, 			\
     linux_x64_2.6-product-c2-jdk_nio2, 				\
-    windows_i586_5.1-product-c1-jdk_nio2, 			\
-    windows_x64_5.2-product-c2-jdk_nio2, 			\
+    windows_i586_6.1-product-c1-jdk_nio2, 			\
+    windows_x64_6.1-product-c2-jdk_nio2, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_nio3, 			\
     solaris_sparcv9_5.10-product-c2-jdk_nio3, 			\
@@ -142,8 +142,8 @@
     solaris_x64_5.10-product-c2-jdk_nio3, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_nio3, 			\
     linux_x64_2.6-product-c2-jdk_nio3, 				\
-    windows_i586_5.1-product-c1-jdk_nio3, 			\
-    windows_x64_5.2-product-c2-jdk_nio3, 			\
+    windows_i586_6.1-product-c1-jdk_nio3, 			\
+    windows_x64_6.1-product-c2-jdk_nio3, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_security1, 		\
     solaris_sparcv9_5.10-product-c2-jdk_security1, 		\
@@ -151,8 +151,8 @@
     solaris_x64_5.10-product-c2-jdk_security1, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_security1, 		\
     linux_x64_2.6-product-c2-jdk_security1, 			\
-    windows_i586_5.1-product-c1-jdk_security1, 			\
-    windows_x64_5.2-product-c2-jdk_security1, 			\
+    windows_i586_6.1-product-c1-jdk_security1, 			\
+    windows_x64_6.1-product-c2-jdk_security1, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_text, 			\
     solaris_sparcv9_5.10-product-c2-jdk_text, 			\
@@ -160,8 +160,8 @@
     solaris_x64_5.10-product-c2-jdk_text, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_text, 			\
     linux_x64_2.6-product-c2-jdk_text, 				\
-    windows_i586_5.1-product-c1-jdk_text, 			\
-    windows_x64_5.2-product-c2-jdk_text, 			\
+    windows_i586_6.1-product-c1-jdk_text, 			\
+    windows_x64_6.1-product-c2-jdk_text, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_tools1, 			\
     solaris_sparcv9_5.10-product-c2-jdk_tools1, 		\
@@ -169,8 +169,8 @@
     solaris_x64_5.10-product-c2-jdk_tools1, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_tools1, 			\
     linux_x64_2.6-product-c2-jdk_tools1, 			\
-    windows_i586_5.1-product-c1-jdk_tools1, 			\
-    windows_x64_5.2-product-c2-jdk_tools1, 			\
+    windows_i586_6.1-product-c1-jdk_tools1, 			\
+    windows_x64_6.1-product-c2-jdk_tools1, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_util, 			\
     solaris_sparcv9_5.10-product-c2-jdk_util, 			\
@@ -178,8 +178,8 @@
     solaris_x64_5.10-product-c2-jdk_util, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_util, 			\
     linux_x64_2.6-product-c2-jdk_util, 				\
-    windows_i586_5.1-product-c1-jdk_util, 			\
-    windows_x64_5.2-product-c2-jdk_util
+    windows_i586_6.1-product-c1-jdk_util, 			\
+    windows_x64_6.1-product-c2-jdk_util
 
 # All jdk test targets in test/Makefile (still no fastdebug & limited c2)
 jprt.make.rule.all.test.targets=    				\
@@ -192,8 +192,8 @@
     solaris_x64_5.10-product-c2-jdk_awt, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_awt, 			\
     linux_x64_2.6-product-c2-jdk_awt, 				\
-    windows_i586_5.1-product-c1-jdk_awt, 			\
-    windows_x64_5.2-product-c2-jdk_awt, 			\
+    windows_i586_6.1-product-c1-jdk_awt, 			\
+    windows_x64_6.1-product-c2-jdk_awt, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_beans2, 			\
     solaris_sparcv9_5.10-product-c2-jdk_beans2, 		\
@@ -201,8 +201,8 @@
     solaris_x64_5.10-product-c2-jdk_beans2, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_beans2, 			\
     linux_x64_2.6-product-c2-jdk_beans2, 			\
-    windows_i586_5.1-product-c1-jdk_beans2, 			\
-    windows_x64_5.2-product-c2-jdk_beans2, 			\
+    windows_i586_6.1-product-c1-jdk_beans2, 			\
+    windows_x64_6.1-product-c2-jdk_beans2, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_beans3, 			\
     solaris_sparcv9_5.10-product-c2-jdk_beans3, 		\
@@ -210,8 +210,8 @@
     solaris_x64_5.10-product-c2-jdk_beans3, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_beans3, 			\
     linux_x64_2.6-product-c2-jdk_beans3, 			\
-    windows_i586_5.1-product-c1-jdk_beans3, 			\
-    windows_x64_5.2-product-c2-jdk_beans3, 			\
+    windows_i586_6.1-product-c1-jdk_beans3, 			\
+    windows_x64_6.1-product-c2-jdk_beans3, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_management1, 		\
     solaris_sparcv9_5.10-product-c2-jdk_management1, 		\
@@ -219,8 +219,8 @@
     solaris_x64_5.10-product-c2-jdk_management1, 		\
     linux_i586_2.6-product-{c1|c2}-jdk_management1, 		\
     linux_x64_2.6-product-c2-jdk_management1, 			\
-    windows_i586_5.1-product-c1-jdk_management1, 		\
-    windows_x64_5.2-product-c2-jdk_management1, 		\
+    windows_i586_6.1-product-c1-jdk_management1, 		\
+    windows_x64_6.1-product-c2-jdk_management1, 		\
     								\
     solaris_sparc_5.10-product-c1-jdk_management2, 		\
     solaris_sparcv9_5.10-product-c2-jdk_management2, 		\
@@ -228,8 +228,8 @@
     solaris_x64_5.10-product-c2-jdk_management2, 		\
     linux_i586_2.6-product-{c1|c2}-jdk_management2, 		\
     linux_x64_2.6-product-c2-jdk_management2, 			\
-    windows_i586_5.1-product-c1-jdk_management2, 		\
-    windows_x64_5.2-product-c2-jdk_management2, 		\
+    windows_i586_6.1-product-c1-jdk_management2, 		\
+    windows_x64_6.1-product-c2-jdk_management2, 		\
     								\
     solaris_sparc_5.10-product-c1-jdk_rmi, 			\
     solaris_sparcv9_5.10-product-c2-jdk_rmi, 			\
@@ -237,8 +237,8 @@
     solaris_x64_5.10-product-c2-jdk_rmi, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_rmi, 			\
     linux_x64_2.6-product-c2-jdk_rmi, 				\
-    windows_i586_5.1-product-c1-jdk_rmi, 			\
-    windows_x64_5.2-product-c2-jdk_rmi, 			\
+    windows_i586_6.1-product-c1-jdk_rmi, 			\
+    windows_x64_6.1-product-c2-jdk_rmi, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_security2, 		\
     solaris_sparcv9_5.10-product-c2-jdk_security2, 		\
@@ -246,8 +246,8 @@
     solaris_x64_5.10-product-c2-jdk_security2, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_security2, 		\
     linux_x64_2.6-product-c2-jdk_security2, 			\
-    windows_i586_5.1-product-c1-jdk_security2, 			\
-    windows_x64_5.2-product-c2-jdk_security2, 			\
+    windows_i586_6.1-product-c1-jdk_security2, 			\
+    windows_x64_6.1-product-c2-jdk_security2, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_security3, 		\
     solaris_sparcv9_5.10-product-c2-jdk_security3, 		\
@@ -255,8 +255,8 @@
     solaris_x64_5.10-product-c2-jdk_security3, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_security3, 		\
     linux_x64_2.6-product-c2-jdk_security3, 			\
-    windows_i586_5.1-product-c1-jdk_security3, 			\
-    windows_x64_5.2-product-c2-jdk_security3, 			\
+    windows_i586_6.1-product-c1-jdk_security3, 			\
+    windows_x64_6.1-product-c2-jdk_security3, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_sound, 			\
     solaris_sparcv9_5.10-product-c2-jdk_sound, 			\
@@ -264,8 +264,8 @@
     solaris_x64_5.10-product-c2-jdk_sound, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_sound, 			\
     linux_x64_2.6-product-c2-jdk_sound, 			\
-    windows_i586_5.1-product-c1-jdk_sound, 			\
-    windows_x64_5.2-product-c2-jdk_sound, 			\
+    windows_i586_6.1-product-c1-jdk_sound, 			\
+    windows_x64_6.1-product-c2-jdk_sound, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_swing, 			\
     solaris_sparcv9_5.10-product-c2-jdk_swing, 			\
@@ -273,8 +273,8 @@
     solaris_x64_5.10-product-c2-jdk_swing, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_swing, 			\
     linux_x64_2.6-product-c2-jdk_swing, 			\
-    windows_i586_5.1-product-c1-jdk_swing, 			\
-    windows_x64_5.2-product-c2-jdk_swing, 			\
+    windows_i586_6.1-product-c1-jdk_swing, 			\
+    windows_x64_6.1-product-c2-jdk_swing, 			\
     								\
     solaris_sparc_5.10-product-c1-jdk_tools2, 			\
     solaris_sparcv9_5.10-product-c2-jdk_tools2, 		\
@@ -282,8 +282,8 @@
     solaris_x64_5.10-product-c2-jdk_tools2, 			\
     linux_i586_2.6-product-{c1|c2}-jdk_tools2, 			\
     linux_x64_2.6-product-c2-jdk_tools2, 			\
-    windows_i586_5.1-product-c1-jdk_tools2, 			\
-    windows_x64_5.2-product-c2-jdk_tools2
+    windows_i586_6.1-product-c1-jdk_tools2, 			\
+    windows_x64_6.1-product-c2-jdk_tools2
 
 # JCK test targets in test/Makefile (no fastdebug & limited c2, windows broken)
 jprt.my.jck.test.target.set=					\
--- a/makefiles/mapfiles/libawt_xawt/mapfile-vers	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/mapfiles/libawt_xawt/mapfile-vers	Thu Oct 03 19:06:43 2013 +0100
@@ -305,6 +305,7 @@
         Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap;
         Java_sun_awt_X11_XlibWrapper_XkbFreeKeyboard;
         Java_sun_awt_X11_XlibWrapper_XkbTranslateKeyCode;
+        Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat;
         Java_sun_awt_X11_XlibWrapper_XGetModifierMapping;
         Java_sun_awt_X11_XlibWrapper_XFreeModifiermap;
         Java_sun_awt_X11_XlibWrapper_XRefreshKeyboardMapping;
--- a/makefiles/mapfiles/liblcms/mapfile-vers	Sat Sep 14 19:21:07 2013 +0100
+++ b/makefiles/mapfiles/liblcms/mapfile-vers	Thu Oct 03 19:06:43 2013 +0100
@@ -28,9 +28,8 @@
 SUNWprivate_1.1 {
 	global:
         Java_sun_java2d_cmm_lcms_LCMS_loadProfileNative;
-        Java_sun_java2d_cmm_lcms_LCMS_freeProfileNative;
-        Java_sun_java2d_cmm_lcms_LCMS_getProfileSize;
-        Java_sun_java2d_cmm_lcms_LCMS_getProfileData;
+        Java_sun_java2d_cmm_lcms_LCMS_getProfileSizeNative;
+        Java_sun_java2d_cmm_lcms_LCMS_getProfileDataNative;
         Java_sun_java2d_cmm_lcms_LCMS_getTagNative;
         Java_sun_java2d_cmm_lcms_LCMS_setTagDataNative;
         Java_sun_java2d_cmm_lcms_LCMS_colorConvert;
--- a/src/macosx/classes/apple/applescript/AppleScriptEngineFactory.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/apple/applescript/AppleScriptEngineFactory.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,15 +30,10 @@
 import javax.script.*;
 
 public class AppleScriptEngineFactory implements ScriptEngineFactory {
+    private static volatile boolean initialized = false;
+
     private static native void initNative();
 
-    static {
-        java.awt.Toolkit.getDefaultToolkit();
-        System.loadLibrary("AppleScriptEngine");
-        initNative();
-        TRACE("<static-init>");
-    }
-
     static void TRACE(final String str) {
 //        System.out.println(AppleScriptEngineFactory.class.getName() + "." + str);
     }
@@ -80,6 +75,7 @@
      *
      * @return full name of the ScriptEngine
      */
+    @Override
     public String getEngineName() {
         TRACE("getEngineName()");
         return ENGINE_NAME;
@@ -90,6 +86,7 @@
      *
      * @return version of the ScriptEngine
      */
+    @Override
     public String getEngineVersion() {
         TRACE("getEngineVersion()");
         return ENGINE_VERSION;
@@ -100,6 +97,7 @@
      *
      * @return name of the language supported by the ScriptEngine(Factory)
      */
+    @Override
     public String getLanguageName() {
         TRACE("getLanguageName()");
         return LANGUAGE;
@@ -110,11 +108,12 @@
      *
      * @return language version supported by the ScriptEngine(Factory)
      */
+    @Override
     public String getLanguageVersion() {
         TRACE("getLanguageVersion()");
         return AccessController.doPrivileged(new PrivilegedAction<String>() {
             public String run() {
-                final AppleScriptEngine engine = new AppleScriptEngine(AppleScriptEngineFactory.this);
+                final AppleScriptEngine engine = getScriptEngine();
                 return engine.getLanguageVersion();
             }
         });
@@ -126,6 +125,7 @@
      *
      * @return ArrayList of file extensions AppleScript associates with
      */
+    @Override
     public List<String> getExtensions() {
         TRACE("getExtensions()");
         return Arrays.asList("scpt", "applescript", "app");
@@ -137,6 +137,7 @@
      *
      * @return ArrayList of mimetypes that AppleScript associates with
      */
+    @Override
     public List<String> getMimeTypes() {
         TRACE("getMimeTypes()");
         return Arrays.asList("application/x-applescript", "text/plain", "text/applescript");
@@ -148,6 +149,7 @@
      *
      * @return
      */
+    @Override
     public List<String> getNames() {
         TRACE("getNames()");
         return Arrays.asList("AppleScriptEngine", "AppleScript", "OSA");
@@ -165,6 +167,7 @@
      *            arguments to the function
      * @return the AppleScript string calling the method
      */
+    @Override
     public String getMethodCallSyntax(final String obj, final String fname, final String ... args) {
 //        StringBuilder builder = new StringBuilder();
 //        builder.append("my " + fname + "(");
@@ -181,6 +184,7 @@
      * @param toDisplay
      * @return
      */
+    @Override
     public String getOutputStatement(final String toDisplay) {
         // TODO -- this might even be good enough? XD
         return getMethodCallSyntax(null, "print", toDisplay);
@@ -193,8 +197,9 @@
      *            the key to look up
      * @return the static preseeded value for the key in the ScriptEngine, if it exists, otherwise <code>null</code>
      */
+    @Override
     public Object getParameter(final String key) {
-        final AppleScriptEngine engine = new AppleScriptEngine(this);
+        final AppleScriptEngine engine = getScriptEngine();
         if (!engine.getBindings(ScriptContext.ENGINE_SCOPE).containsKey(key)) return null;
         return engine.getBindings(ScriptContext.ENGINE_SCOPE).get(key);
     }
@@ -205,6 +210,7 @@
      * @param statements
      * @return
      */
+    @Override
     public String getProgram(final String ... statements) {
         final StringBuilder program = new StringBuilder();
         for (final String statement : statements) {
@@ -218,8 +224,21 @@
      *
      * @return new AppleScriptEngine with this factory as it's parent
      */
-    public ScriptEngine getScriptEngine() {
+    @Override
+    public AppleScriptEngine getScriptEngine() {
         AppleScriptEngine.checkSecurity();
+        ensureInitialized();
+
         return new AppleScriptEngine(this);
     }
+
+    private static synchronized void ensureInitialized() {
+        if (!initialized) {
+            initialized = true;
+
+            java.awt.Toolkit.getDefaultToolkit();
+            System.loadLibrary("AppleScriptEngine");
+            initNative();
+        }
+    }
 }
--- a/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java	Thu Oct 03 19:06:43 2013 +0100
@@ -42,6 +42,7 @@
 import javax.swing.plaf.*;
 import javax.swing.table.*;
 
+import sun.swing.AbstractFilterComboBoxModel;
 import sun.swing.SwingUtilities2;
 
 public class AquaFileChooserUI extends FileChooserUI {
@@ -1266,64 +1267,9 @@
     /**
      * Data model for a type-face selection combo-box.
      */
-    protected class FilterComboBoxModel extends DefaultListModel implements ComboBoxModel, PropertyChangeListener {
-        int selectedIndex = -1;
-
-        protected FilterComboBoxModel() {
-            super();
-            final FileFilter filters[] = getFileChooser().getChoosableFileFilters();
-            for (int i = 0; i < filters.length; i++) {
-                this.add(i, filters[i]);
-            }
-        }
-
-        public void propertyChange(final PropertyChangeEvent e) {
-            final String prop = e.getPropertyName();
-            if (prop == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
-                this.clear();
-                final FileFilter filters[] = (FileFilter[])e.getNewValue();
-
-                for (int i = 0; i < filters.length; i++) {
-                    this.add(i, filters[i]);
-                }
-
-                fireContentsChanged(this, -1, -1);
-            } else if (prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
-                final FileFilter currentFilter = (FileFilter)e.getNewValue();
-                FileFilter filters[] = getFileChooser().getChoosableFileFilters();
-
-                boolean found = false;
-                if (currentFilter != null) {
-                    for (final FileFilter element : filters) {
-                        if (element == currentFilter) {
-                            found = true;
-                        }
-                    }
-                    if (found == false) {
-                        getFileChooser().addChoosableFileFilter(currentFilter);
-                    }
-                }
-
-                filters = getFileChooser().getChoosableFileFilters();
-                setSelectedItem(e.getNewValue());
-            }
-        }
-
-        public void setSelectedItem(final Object filter) {
-            if (filter != null) {
-                selectedIndex = this.indexOf(filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            final Object returnValue = null;
-
-            if (this.size() > 0) {
-                if ((selectedIndex != -1) && (selectedIndex < size())) { return this.get(selectedIndex); }
-            }
-
-            return returnValue;
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return AquaFileChooserUI.this.getFileChooser();
         }
     }
 
--- a/src/macosx/classes/com/apple/laf/resources/aqua_ko.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/com/apple/laf/resources/aqua_ko.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -46,7 +46,7 @@
 FileChooser.openButton.textAndMnemonic=\uC5F4\uAE30
 FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
 FileChooser.openDialogTitle.textAndMnemonic=\uC5F4\uAE30
-FileChooser.updateButton.textAndMnemonic=\uAC31\uC2E0
+FileChooser.updateButton.textAndMnemonic=\uC5C5\uB370\uC774\uD2B8
 FileChooser.helpButton.textAndMnemonic=\uB3C4\uC6C0\uB9D0
 FileChooser.directoryOpenButton.textAndMnemonic=\uC5F4\uAE30
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/macosx/classes/sun/awt/resources/awtosx.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -0,0 +1,71 @@
+#
+# OS X specific AWT properties
+#
+
+# Modifier names
+AWT.shift=\u21e7
+AWT.control=\u2303
+AWT.alt=\u2325
+AWT.meta=\u2318
+AWT.altGraph=\u2325
+
+# Key names
+AWT.enter=\u23ce
+AWT.backSpace=\u232b
+AWT.tab=\u21e5
+AWT.cancel=\u238b
+AWT.clear=\u2327
+AWT.capsLock=\u21ea
+AWT.escape=\u238b
+AWT.space=\u2423
+AWT.pgup=\u21de
+AWT.pgdn=\u21df
+AWT.end=\u2198
+AWT.home=\u2196
+AWT.left=\u2190
+AWT.up=\u2191
+AWT.right=\u2192
+AWT.down=\u2193
+AWT.comma=,
+AWT.period=.
+AWT.slash=/
+AWT.semicolon=;
+AWT.equals=\u003d
+AWT.openBracket=[
+AWT.backSlash=\\
+AWT.closeBracket=]
+AWT.multiply=\u2328 *
+AWT.add=\u2328 +
+AWT.separator=\u2328 ,
+AWT.separater=\u2328 ,
+AWT.subtract=\u2328 -
+AWT.decimal=\u2328 .
+AWT.divide=\u2328 /
+AWT.delete=\u2326
+AWT.printScreen=\u2399
+AWT.backQuote=`
+AWT.quote='
+AWT.ampersand=&
+AWT.asterisk=*
+AWT.quoteDbl="
+AWT.Less=<
+AWT.greater=>
+AWT.braceLeft=[
+AWT.braceRight=]
+AWT.at=@
+AWT.colon=:
+AWT.circumflex=^
+AWT.dollar=$
+AWT.euro=\u20ac
+AWT.exclamationMark=!
+AWT.invertedExclamationMark=\u00a1
+AWT.leftParenthesis=(
+AWT.numberSign=#
+AWT.plus=+
+AWT.minus=-
+AWT.rightParenthesis=)
+AWT.underscore=_
+
+# Numeric Keypad
+AWT.numpad=\u2328
+
--- a/src/macosx/classes/sun/lwawt/LWButtonPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWButtonPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,10 @@
 
 import javax.swing.JButton;
 
+/**
+ * Lightweight implementation of {@link ButtonPeer}. Delegates most of the work
+ * to the {@link JButton}.
+ */
 final class LWButtonPeer extends LWComponentPeer<Button, JButton>
         implements ButtonPeer, ActionListener {
 
@@ -42,7 +46,7 @@
     }
 
     @Override
-    protected JButton createDelegate() {
+    JButton createDelegate() {
         return new JButtonDelegate();
     }
 
@@ -74,6 +78,7 @@
         return true;
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     private final class JButtonDelegate extends JButton {
 
         // Empty non private constructor was added because access to this
--- a/src/macosx/classes/sun/lwawt/LWCanvasPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWCanvasPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,10 @@
 
 import javax.swing.JComponent;
 
+/**
+ * Lightweight implementation of {@link CanvasPeer}. This peer is empty, because
+ * all the components in lwawt use graphic object from the top level window.
+ */
 class LWCanvasPeer<T extends Component, D extends JComponent>
         extends LWComponentPeer<T, D> implements CanvasPeer {
 
--- a/src/macosx/classes/sun/lwawt/LWCheckboxPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWCheckboxPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -41,6 +41,11 @@
 import javax.swing.JToggleButton;
 import javax.swing.SwingUtilities;
 
+/**
+ * Lightweight implementation of {@link CheckboxPeer}. Delegates most of the
+ * work to the {@link JCheckBox} and {@link JRadioButton}, which are placed
+ * inside an empty {@link JComponent}.
+ */
 final class LWCheckboxPeer
         extends LWComponentPeer<Checkbox, LWCheckboxPeer.CheckboxDelegate>
         implements CheckboxPeer, ItemListener {
@@ -51,12 +56,12 @@
     }
 
     @Override
-    protected CheckboxDelegate createDelegate() {
+    CheckboxDelegate createDelegate() {
         return new CheckboxDelegate();
     }
 
     @Override
-    protected Component getDelegateFocusOwner() {
+    Component getDelegateFocusOwner() {
         return getDelegate().getCurrentButton();
     }
 
@@ -137,6 +142,7 @@
         return true;
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     final class CheckboxDelegate extends JComponent {
 
         private final JCheckBox cb;
--- a/src/macosx/classes/sun/lwawt/LWChoicePeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWChoicePeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,18 @@
 
 package sun.lwawt;
 
-import java.awt.Choice;
-import java.awt.Point;
+import java.awt.*;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
 import java.awt.peer.ChoicePeer;
 
-import javax.swing.JComboBox;
+import javax.accessibility.Accessible;
+import javax.swing.*;
 
+/**
+ * Lightweight implementation of {@link ChoicePeer}. Delegates most of the work
+ * to the {@link JComboBox}.
+ */
 final class LWChoicePeer extends LWComponentPeer<Choice, JComboBox<String>>
         implements ChoicePeer, ItemListener {
 
@@ -50,7 +54,7 @@
     }
 
     @Override
-    protected JComboBox<String> createDelegate() {
+    JComboBox<String> createDelegate() {
         return new JComboBoxDelegate();
     }
 
@@ -128,6 +132,7 @@
         return true;
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     private final class JComboBoxDelegate extends JComboBox<String> {
 
         // Empty non private constructor was added because access to this
@@ -159,5 +164,32 @@
             }
             super.setSelectedItem(anObject);
         }
+
+        @Override
+        public void firePopupMenuWillBecomeVisible() {
+            super.firePopupMenuWillBecomeVisible();
+            SwingUtilities.invokeLater(new Runnable() {
+                @Override
+                public void run() {
+                    JPopupMenu popupMenu = getPopupMenu();
+                    if (popupMenu != null) {
+                        if (popupMenu.getInvoker() != LWChoicePeer.this.getTarget()) {
+                            popupMenu.setVisible(false);
+                            popupMenu.show(LWChoicePeer.this.getTarget(), 0, 0);
+                        }
+                    }
+                }
+            });
+        }
+
+        private JPopupMenu getPopupMenu() {
+            for (int i = 0; i < getAccessibleContext().getAccessibleChildrenCount(); i++) {
+                Accessible child = getAccessibleContext().getAccessibleChild(i);
+                if (child instanceof JPopupMenu) {
+                    return  (JPopupMenu) child;
+                }
+            }
+            return null;
+        }
     }
 }
--- a/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -72,19 +72,23 @@
 {
     private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWComponentPeer");
 
-    // State lock is to be used for modifications to this
-    // peer's fields (e.g. bounds, background, font, etc.)
-    // It should be the last lock in the lock chain
-    private final Object stateLock =
-            new StringBuilder("LWComponentPeer.stateLock");
+    /**
+     * State lock is to be used for modifications to this peer's fields (e.g.
+     * bounds, background, font, etc.) It should be the last lock in the lock
+     * chain
+     */
+    private final Object stateLock = new Object();
 
-    // The lock to operate with the peers hierarchy. AWT tree
-    // lock is not used as there are many peers related ops
-    // to be done on the toolkit thread, and we don't want to
-    // depend on a public lock on this thread
-    private static final Object peerTreeLock =
-            new StringBuilder("LWComponentPeer.peerTreeLock");
+    /**
+     * The lock to operate with the peers hierarchy. AWT tree lock is not used
+     * as there are many peers related ops to be done on the toolkit thread, and
+     * we don't want to depend on a public lock on this thread
+     */
+    private static final Object peerTreeLock = new Object();
 
+    /**
+     * The associated AWT object.
+     */
     private final T target;
 
     /**
@@ -95,7 +99,7 @@
      * the hierarchy. The exception is LWWindowPeers: their containers are
      * always null
      */
-    private final LWContainerPeer containerPeer;
+    private final LWContainerPeer<?, ?> containerPeer;
 
     /**
      * Handy reference to the top-level window peer. Window peer is borrowed
@@ -147,11 +151,18 @@
      */
     private Image backBuffer;
 
+    /**
+     * All Swing delegates use delegateContainer as a parent. This container
+     * intentionally do not use parent of the peer.
+     */
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     private final class DelegateContainer extends Container {
         {
             enableEvents(0xFFFFFFFF);
         }
 
+        // Empty non private constructor was added because access to this
+        // class shouldn't be emulated by a synthetic accessor method.
         DelegateContainer() {
             super();
         }
@@ -182,7 +193,7 @@
         }
     }
 
-    public LWComponentPeer(T target, PlatformComponent platformComponent) {
+    LWComponentPeer(final T target, final PlatformComponent platformComponent) {
         targetPaintArea = new LWRepaintArea();
         this.target = target;
         this.platformComponent = platformComponent;
@@ -276,15 +287,18 @@
      * This method is called under getDelegateLock().
      * Overridden in subclasses.
      */
-    protected D createDelegate() {
+    D createDelegate() {
         return null;
     }
 
-    protected final D getDelegate() {
+    final D getDelegate() {
         return delegate;
     }
 
-    protected Component getDelegateFocusOwner() {
+    /**
+     * This method should be called under getDelegateLock().
+     */
+    Component getDelegateFocusOwner() {
         return getDelegate();
     }
 
@@ -356,7 +370,7 @@
     }
 
     // Just a helper method
-    protected final LWContainerPeer getContainerPeer() {
+    protected final LWContainerPeer<?, ?> getContainerPeer() {
         return containerPeer;
     }
 
@@ -390,7 +404,7 @@
 
     protected void disposeImpl() {
         destroyBuffers();
-        LWContainerPeer cp = getContainerPeer();
+        LWContainerPeer<?, ?> cp = getContainerPeer();
         if (cp != null) {
             cp.removeChildPeer(this);
         }
@@ -462,12 +476,13 @@
         sg2d.constrain(size.x, size.y, size.width, size.height, getVisibleRegion());
     }
 
-    public Region getVisibleRegion() {
+    Region getVisibleRegion() {
         return computeVisibleRect(this, getRegion());
     }
 
-    static final Region computeVisibleRect(LWComponentPeer c, Region region) {
-        final LWContainerPeer p = c.getContainerPeer();
+    static final Region computeVisibleRect(final LWComponentPeer<?, ?> c,
+                                           Region region) {
+        final LWContainerPeer<?, ?> p = c.getContainerPeer();
         if (p != null) {
             final Rectangle r = c.getBounds();
             region = region.getTranslatedRegion(r.x, r.y);
@@ -612,7 +627,7 @@
      * @param p Point relative to the peer.
      * @return Cursor of the peer or null if default cursor should be used.
      */
-    protected Cursor getCursor(final Point p) {
+    Cursor getCursor(final Point p) {
         return getTarget().getCursor();
     }
 
@@ -717,7 +732,7 @@
     @Override
     public void setEnabled(final boolean e) {
         boolean status = e;
-        final LWComponentPeer cp = getContainerPeer();
+        final LWComponentPeer<?, ?> cp = getContainerPeer();
         if (cp != null) {
             status &= cp.isEnabled();
         }
@@ -802,12 +817,12 @@
     }
 
     @Override
-    public void setZOrder(ComponentPeer above) {
-        LWContainerPeer cp = getContainerPeer();
+    public void setZOrder(final ComponentPeer above) {
+        LWContainerPeer<?, ?> cp = getContainerPeer();
         // Don't check containerPeer for null as it can only happen
         // for windows, but this method is overridden in
         // LWWindowPeer and doesn't call super()
-        cp.setChildPeerZOrder(this, (LWComponentPeer) above);
+        cp.setChildPeerZOrder(this, (LWComponentPeer<?, ?>) above);
     }
 
     @Override
@@ -923,7 +938,9 @@
                     LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
                     return false;
                 }
-                LWWindowPeer parentPeer = (LWWindowPeer) parentWindow.getPeer();
+                final LWWindowPeer parentPeer =
+                        (LWWindowPeer) AWTAccessor.getComponentAccessor()
+                                                  .getPeer(parentWindow);
                 if (parentPeer == null) {
                     focusLog.fine("request rejected, parentPeer is null");
                     LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
@@ -1138,7 +1155,7 @@
     }
 
     protected final void repaintParent(final Rectangle oldB) {
-        final LWContainerPeer cp = getContainerPeer();
+        final LWContainerPeer<?, ?> cp = getContainerPeer();
         if (cp != null) {
             // Repaint unobscured part of the parent
             cp.repaintPeer(cp.getContentSize().intersection(oldB));
@@ -1254,6 +1271,8 @@
             KeyEvent ke = (KeyEvent) e;
             delegateEvent = new KeyEvent(getDelegateFocusOwner(), ke.getID(), ke.getWhen(),
                     ke.getModifiers(), ke.getKeyCode(), ke.getKeyChar(), ke.getKeyLocation());
+            AWTAccessor.getKeyEventAccessor().setExtendedKeyCode((KeyEvent) delegateEvent,
+                    ke.getExtendedKeyCode());
         } else if (e instanceof FocusEvent) {
             FocusEvent fe = (FocusEvent) e;
             delegateEvent = new FocusEvent(getDelegateFocusOwner(), fe.getID(), fe.isTemporary());
@@ -1273,7 +1292,7 @@
     /**
      * Handler for FocusEvents.
      */
-    protected void handleJavaFocusEvent(FocusEvent e) {
+    void handleJavaFocusEvent(final FocusEvent e) {
         // Note that the peer receives all the FocusEvents from
         // its lightweight children as well
         KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
@@ -1309,7 +1328,7 @@
      * Finds a top-most visible component for the given point. The location is
      * specified relative to the peer's parent.
      */
-    public LWComponentPeer findPeerAt(final int x, final int y) {
+    LWComponentPeer<?, ?> findPeerAt(final int x, final int y) {
         final Rectangle r = getBounds();
         final Region sh = getRegion();
         final boolean found = isVisible() && sh.contains(x - r.x, y - r.y);
@@ -1326,7 +1345,7 @@
     }
 
     public Point windowToLocal(Point p, LWWindowPeer wp) {
-        LWComponentPeer cp = this;
+        LWComponentPeer<?, ?> cp = this;
         while (cp != wp) {
             Rectangle cpb = cp.getBounds();
             p.x -= cpb.x;
@@ -1347,7 +1366,7 @@
     }
 
     public Point localToWindow(Point p) {
-        LWComponentPeer cp = getContainerPeer();
+        LWComponentPeer<?, ?> cp = getContainerPeer();
         Rectangle r = getBounds();
         while (cp != null) {
             p.x += r.x;
@@ -1368,7 +1387,7 @@
         repaintPeer(getSize());
     }
 
-    public void repaintPeer(final Rectangle r) {
+    void repaintPeer(final Rectangle r) {
         final Rectangle toPaint = getSize().intersection(r);
         if (!isShowing() || toPaint.isEmpty()) {
             return;
@@ -1387,7 +1406,7 @@
     protected final boolean isShowing() {
         synchronized (getPeerTreeLock()) {
             if (isVisible()) {
-                final LWContainerPeer container = getContainerPeer();
+                final LWContainerPeer<?, ?> container = getContainerPeer();
                 return (container == null) || container.isShowing();
             }
         }
@@ -1395,8 +1414,7 @@
     }
 
     /**
-     * Paints the peer. Overridden in subclasses to delegate the actual painting
-     * to Swing components.
+     * Paints the peer. Delegate the actual painting to Swing components.
      */
     protected final void paintPeer(final Graphics g) {
         final D delegate = getDelegate();
--- a/src/macosx/classes/sun/lwawt/LWContainerPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWContainerPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -41,32 +41,25 @@
 import javax.swing.JComponent;
 
 abstract class LWContainerPeer<T extends Container, D extends JComponent>
-    extends LWCanvasPeer<T, D>
-    implements ContainerPeer
-{
-    // List of child peers sorted by z-order from bottom-most
-    // to top-most
-    private List<LWComponentPeer> childPeers =
-        new LinkedList<LWComponentPeer>();
+        extends LWCanvasPeer<T, D> implements ContainerPeer {
 
-    LWContainerPeer(T target, PlatformComponent platformComponent) {
+    /**
+     * List of child peers sorted by z-order from bottom-most to top-most.
+     */
+    private final List<LWComponentPeer<?, ?>> childPeers = new LinkedList<>();
+
+    LWContainerPeer(final T target, final PlatformComponent platformComponent) {
         super(target, platformComponent);
     }
 
-    void addChildPeer(LWComponentPeer child) {
+    final void addChildPeer(final LWComponentPeer<?, ?> child) {
         synchronized (getPeerTreeLock()) {
-            addChildPeer(child, childPeers.size());
+            childPeers.add(childPeers.size(), child);
+            // TODO: repaint
         }
     }
 
-    void addChildPeer(LWComponentPeer child, int index) {
-        synchronized (getPeerTreeLock()) {
-            childPeers.add(index, child);
-        }
-        // TODO: repaint
-    }
-
-    void removeChildPeer(LWComponentPeer child) {
+    final void removeChildPeer(final LWComponentPeer<?, ?> child) {
         synchronized (getPeerTreeLock()) {
             childPeers.remove(child);
         }
@@ -74,7 +67,8 @@
     }
 
     // Used by LWComponentPeer.setZOrder()
-    void setChildPeerZOrder(LWComponentPeer peer, LWComponentPeer above) {
+    final void setChildPeerZOrder(final LWComponentPeer<?, ?> peer,
+                                  final LWComponentPeer<?, ?> above) {
         synchronized (getPeerTreeLock()) {
             childPeers.remove(peer);
             int index = (above != null) ? childPeers.indexOf(above) : childPeers.size();
@@ -98,25 +92,27 @@
     }
 
     @Override
-    public void beginValidate() {
-        // TODO: it seems that begin/endValidate() is only useful
-        // for heavyweight windows, when a batch movement for
-        // child windows  occurs. That's why no-op
-    }
-    @Override
-    public void endValidate() {
+    public final void beginValidate() {
         // TODO: it seems that begin/endValidate() is only useful
         // for heavyweight windows, when a batch movement for
         // child windows  occurs. That's why no-op
     }
 
     @Override
-    public void beginLayout() {
+    public final void endValidate() {
+        // TODO: it seems that begin/endValidate() is only useful
+        // for heavyweight windows, when a batch movement for
+        // child windows  occurs. That's why no-op
+    }
+
+    @Override
+    public final void beginLayout() {
         // Skip all painting till endLayout()
         setLayouting(true);
     }
+
     @Override
-    public void endLayout() {
+    public final void endLayout() {
         setLayouting(false);
 
         // Post an empty event to flush all the pending target paints
@@ -125,18 +121,19 @@
 
     // ---- PEER NOTIFICATIONS ---- //
 
-    /*
+    /**
      * Returns a copy of the childPeer collection.
      */
-    protected List<LWComponentPeer> getChildren() {
+    @SuppressWarnings("unchecked")
+    final List<LWComponentPeer<?, ?>> getChildren() {
         synchronized (getPeerTreeLock()) {
-            Object copy = ((LinkedList)childPeers).clone();
-            return (List<LWComponentPeer>)copy;
+            Object copy = ((LinkedList<?>) childPeers).clone();
+            return (List<LWComponentPeer<?, ?>>) copy;
         }
     }
 
     @Override
-    public final Region getVisibleRegion() {
+    final Region getVisibleRegion() {
         return cutChildren(super.getVisibleRegion(), null);
     }
 
@@ -144,9 +141,9 @@
      * Removes bounds of children above specific child from the region. If above
      * is null removes all bounds of children.
      */
-    protected final Region cutChildren(Region r, final LWComponentPeer above) {
+    final Region cutChildren(Region r, final LWComponentPeer<?, ?> above) {
         boolean aboveFound = above == null;
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             if (!aboveFound && child == above) {
                 aboveFound = true;
                 continue;
@@ -170,8 +167,8 @@
      * specified relative to the peer's parent.
      */
     @Override
-    public final LWComponentPeer findPeerAt(int x, int y) {
-        LWComponentPeer peer = super.findPeerAt(x, y);
+    final LWComponentPeer<?, ?> findPeerAt(int x, int y) {
+        LWComponentPeer<?, ?> peer = super.findPeerAt(x, y);
         final Rectangle r = getBounds();
         // Translate to this container's coordinates to pass to children
         x -= r.x;
@@ -179,7 +176,7 @@
         if (peer != null && getContentSize().contains(x, y)) {
             synchronized (getPeerTreeLock()) {
                 for (int i = childPeers.size() - 1; i >= 0; --i) {
-                    LWComponentPeer p = childPeers.get(i).findPeerAt(x, y);
+                    LWComponentPeer<?, ?> p = childPeers.get(i).findPeerAt(x, y);
                     if (p != null) {
                         peer = p;
                         break;
@@ -195,7 +192,7 @@
     * peers should be repainted
     */
     @Override
-    public final void repaintPeer(final Rectangle r) {
+    final void repaintPeer(final Rectangle r) {
         final Rectangle toPaint = getSize().intersection(r);
         if (!isShowing() || toPaint.isEmpty()) {
             return;
@@ -208,13 +205,13 @@
         repaintChildren(toPaint);
     }
 
-    /*
-    * Paints all the child peers in the straight z-order, so the
-    * bottom-most ones are painted first.
-    */
+    /**
+     * Paints all the child peers in the straight z-order, so the
+     * bottom-most ones are painted first.
+     */
     private void repaintChildren(final Rectangle r) {
         final Rectangle content = getContentSize();
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             final Rectangle childBounds = child.getBounds();
             Rectangle toPaint = r.intersection(childBounds);
             toPaint = toPaint.intersection(content);
@@ -223,21 +220,21 @@
         }
     }
 
-    protected Rectangle getContentSize() {
+    Rectangle getContentSize() {
         return getSize();
     }
 
     @Override
     public void setEnabled(final boolean e) {
         super.setEnabled(e);
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             child.setEnabled(e && child.getTarget().isEnabled());
         }
     }
 
     @Override
     public void setBackground(final Color c) {
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             if (!child.getTarget().isBackgroundSet()) {
                 child.setBackground(c);
             }
@@ -247,7 +244,7 @@
 
     @Override
     public void setForeground(final Color c) {
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             if (!child.getTarget().isForegroundSet()) {
                 child.setForeground(c);
             }
@@ -257,7 +254,7 @@
 
     @Override
     public void setFont(final Font f) {
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             if (!child.getTarget().isFontSet()) {
                 child.setFont(f);
             }
--- a/src/macosx/classes/sun/lwawt/LWCursorManager.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWCursorManager.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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,6 +32,7 @@
 
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
 
 public abstract class LWCursorManager {
@@ -105,11 +106,13 @@
             c = peer.getTarget();
             if (c instanceof Container) {
                 final Point p = peer.getLocationOnScreen();
-                c = ((Container) c).findComponentAt(cursorPos.x - p.x,
-                                                    cursorPos.y - p.y);
+                c = AWTAccessor.getContainerAccessor().findComponentAt(
+                    (Container) c, cursorPos.x - p.x, cursorPos.y - p.y, false);
+
             }
             while (c != null) {
-                if (c.isVisible() && c.isEnabled() && (c.getPeer() != null)) {
+                final Object p = AWTAccessor.getComponentAccessor().getPeer(c);
+                if (c.isVisible() && c.isEnabled() && p != null) {
                     break;
                 }
                 c = c.getParent();
--- a/src/macosx/classes/sun/lwawt/LWLabelPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWLabelPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -44,7 +44,7 @@
     }
 
     @Override
-    protected JLabel createDelegate() {
+    JLabel createDelegate() {
         return new JLabel();
     }
 
--- a/src/macosx/classes/sun/lwawt/LWLightweightFramePeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWLightweightFramePeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -34,6 +34,8 @@
 
 import sun.awt.CausedFocusEvent;
 import sun.awt.LightweightFrame;
+import sun.swing.JLightweightFrame;
+import sun.swing.SwingAccessor;
 
 public class LWLightweightFramePeer extends LWWindowPeer {
 
@@ -91,11 +93,6 @@
     }
 
     @Override
-    public void updateCursorImmediately() {
-        // TODO: tries to switch to the awt/fx toolkit thread and causes a deadlock on macosx
-    }
-
-    @Override
     public void addDropTarget(DropTarget dt) {
     }
 
@@ -112,4 +109,9 @@
     public void ungrab() {
         getLwTarget().ungrabFocus();
     }
+
+    @Override
+    public void updateCursorImmediately() {
+        SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
+    }
 }
--- a/src/macosx/classes/sun/lwawt/LWListPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWListPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,8 @@
 import java.util.Arrays;
 
 /**
- * Lightweight implementation of {@link ListPeer}.
+ * Lightweight implementation of {@link ListPeer}. Delegates most of the work to
+ * the {@link JList}, which is placed inside {@link JScrollPane}.
  */
 final class LWListPeer extends LWComponentPeer<List, LWListPeer.ScrollableJList>
         implements ListPeer {
@@ -56,7 +57,7 @@
     }
 
     @Override
-    protected ScrollableJList createDelegate() {
+    ScrollableJList createDelegate() {
         return new ScrollableJList();
     }
 
@@ -78,7 +79,7 @@
     }
 
     @Override
-    protected Component getDelegateFocusOwner() {
+    Component getDelegateFocusOwner() {
         return getDelegate().getView();
     }
 
@@ -193,6 +194,7 @@
         }
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     final class ScrollableJList extends JScrollPane implements ListSelectionListener {
 
         private boolean skipStateChangedEvent;
@@ -234,9 +236,10 @@
         }
 
         @Override
+        @SuppressWarnings("unchecked")
         public void valueChanged(final ListSelectionEvent e) {
             if (!e.getValueIsAdjusting() && !isSkipStateChangedEvent()) {
-                final JList source = (JList) e.getSource();
+                final JList<?> source = (JList<?>) e.getSource();
                 for(int i = 0 ; i < source.getModel().getSize(); i++) {
 
                     final boolean wasSelected = Arrays.binarySearch(oldSelectedIndices, i) >= 0;
@@ -255,6 +258,7 @@
             }
         }
 
+        @SuppressWarnings("unchecked")
         public JList<String> getView() {
             return (JList<String>) getViewport().getView();
         }
@@ -289,7 +293,7 @@
         private final class JListDelegate extends JList<String> {
 
             JListDelegate() {
-                super(ScrollableJList.this.model);
+                super(model);
             }
 
             @Override
--- a/src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,11 +30,10 @@
 
 import java.awt.peer.MouseInfoPeer;
 
+import sun.awt.AWTAccessor;
+
 public class LWMouseInfoPeer implements MouseInfoPeer {
 
-    public LWMouseInfoPeer() {
-    }
-
     @Override
     public int fillPointWithCoords(Point point) {
         LWCursorManager cursorManager =
@@ -52,7 +51,7 @@
             return false;
         }
 
-        LWWindowPeer windowPeer = (LWWindowPeer)w.getPeer();
+        final Object windowPeer = AWTAccessor.getComponentAccessor().getPeer(w);
         return LWWindowPeer.getWindowUnderCursor() == windowPeer;
     }
 
--- a/src/macosx/classes/sun/lwawt/LWPanelPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWPanelPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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,6 +31,10 @@
 
 import javax.swing.JPanel;
 
+/**
+ * Lightweight implementation of {@link PanelPeer}. Delegates most of the work
+ * to the {@link JPanel}.
+ */
 final class LWPanelPeer extends LWContainerPeer<Panel, JPanel>
         implements PanelPeer {
 
@@ -39,7 +43,7 @@
     }
 
     @Override
-    public JPanel createDelegate() {
+    JPanel createDelegate() {
         return new JPanel();
     }
 }
--- a/src/macosx/classes/sun/lwawt/LWRepaintArea.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWRepaintArea.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,39 +26,38 @@
 
 package sun.lwawt;
 
-import sun.awt.RepaintArea;
-
 import java.awt.Component;
 import java.awt.Graphics;
 
+import sun.awt.AWTAccessor;
+import sun.awt.RepaintArea;
+
 /**
+ * Emulates appearance of heavyweight components before call of the user code.
+ *
  * @author Sergey Bylokhov
  */
 final class LWRepaintArea extends RepaintArea {
 
     @Override
     protected void updateComponent(final Component comp, final Graphics g) {
+        // We shouldn't paint native component as a result of UPDATE events,
+        // just flush onscreen back-buffer.
         if (comp != null) {
             super.updateComponent(comp, g);
-            flushBuffers((LWComponentPeer) comp.getPeer());
+            LWComponentPeer.flushOnscreenGraphics();
         }
     }
 
     @Override
     protected void paintComponent(final Component comp, final Graphics g) {
         if (comp != null) {
-            final LWComponentPeer peer = (LWComponentPeer) comp.getPeer();
+            Object peer = AWTAccessor.getComponentAccessor().getPeer(comp);
             if (peer != null) {
-                peer.paintPeer(g);
+                ((LWComponentPeer<?, ?>) peer).paintPeer(g);
             }
             super.paintComponent(comp, g);
-            flushBuffers(peer);
-        }
-    }
-
-    private static void flushBuffers(final LWComponentPeer peer) {
-        if (peer != null) {
-            peer.flushOnscreenGraphics();
+            LWComponentPeer.flushOnscreenGraphics();
         }
     }
 }
--- a/src/macosx/classes/sun/lwawt/LWScrollBarPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWScrollBarPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -34,10 +34,14 @@
 
 import javax.swing.JScrollBar;
 
+/**
+ * Lightweight implementation of {@link ScrollbarPeer}. Delegates most of the
+ * work to the {@link JScrollBar}.
+ */
 final class LWScrollBarPeer extends LWComponentPeer<Scrollbar, JScrollBar>
         implements ScrollbarPeer, AdjustmentListener {
 
-    //JScrollBar fires two changes with firePropertyChange (one for old value
+    // JScrollBar fires two changes with firePropertyChange (one for old value
     // and one for new one.
     // We save the last value and don't fire event if not changed.
     private int currentValue;
@@ -48,7 +52,7 @@
     }
 
     @Override
-    protected JScrollBar createDelegate() {
+    JScrollBar createDelegate() {
         return new JScrollBar();
     }
 
--- a/src/macosx/classes/sun/lwawt/LWScrollPanePeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWScrollPanePeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,10 @@
 import java.awt.peer.ScrollPanePeer;
 import java.util.List;
 
+/**
+ * Lightweight implementation of {@link ScrollPanePeer}. Delegates most of the
+ * work to the {@link JScrollPane}.
+ */
 final class LWScrollPanePeer extends LWContainerPeer<ScrollPane, JScrollPane>
         implements ScrollPanePeer, ChangeListener {
 
@@ -41,7 +45,8 @@
         super(target, platformComponent);
     }
 
-    protected JScrollPane createDelegate() {
+    @Override
+    JScrollPane createDelegate() {
         final JScrollPane sp = new JScrollPane();
         final JPanel panel = new JPanel();
         panel.setOpaque(false);
@@ -72,7 +77,7 @@
         SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
-                final LWComponentPeer viewPeer = getViewPeer();
+                final LWComponentPeer<?, ?> viewPeer = getViewPeer();
                 if (viewPeer != null) {
                     final Rectangle r;
                     synchronized (getDelegateLock()) {
@@ -96,14 +101,13 @@
         }
     }
 
-    LWComponentPeer getViewPeer() {
-        List<LWComponentPeer> peerList = getChildren();
+    LWComponentPeer<?, ?> getViewPeer() {
+        final List<LWComponentPeer<?, ?>> peerList = getChildren();
         return peerList.isEmpty() ? null : peerList.get(0);
     }
 
-
     @Override
-    protected Rectangle getContentSize() {
+    Rectangle getContentSize() {
         Rectangle viewRect = getDelegate().getViewport().getViewRect();
         return new Rectangle(viewRect.width, viewRect.height);
     }
@@ -112,7 +116,7 @@
     public void layout() {
         super.layout();
         synchronized (getDelegateLock()) {
-            LWComponentPeer viewPeer = getViewPeer();
+            final LWComponentPeer<?, ?> viewPeer = getViewPeer();
             if (viewPeer != null) {
                 Component view = getDelegate().getViewport().getView();
                 view.setBounds(viewPeer.getBounds());
--- a/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -44,7 +44,7 @@
 
 /**
  * Lightweight implementation of {@link TextAreaPeer}. Delegates most of the
- * work to the {@link JTextArea} inside JScrollPane.
+ * work to the {@link JTextArea} inside {@link JScrollPane}.
  */
 final class LWTextAreaPeer
         extends LWTextComponentPeer<TextArea, LWTextAreaPeer.ScrollableJTextArea>
@@ -66,7 +66,7 @@
     }
 
     @Override
-    protected ScrollableJTextArea createDelegate() {
+    ScrollableJTextArea createDelegate() {
         return new ScrollableJTextArea();
     }
 
@@ -85,7 +85,7 @@
     }
 
     @Override
-    protected Cursor getCursor(final Point p) {
+    Cursor getCursor(final Point p) {
         final boolean isContains;
         synchronized (getDelegateLock()) {
             isContains = getDelegate().getViewport().getBounds().contains(p);
@@ -94,7 +94,7 @@
     }
 
     @Override
-    protected Component getDelegateFocusOwner() {
+    Component getDelegateFocusOwner() {
         return getTextComponent();
     }
 
@@ -200,7 +200,7 @@
         }
     }
 
-    @SuppressWarnings("serial")
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     final class ScrollableJTextArea extends JScrollPane {
 
         ScrollableJTextArea() {
@@ -218,7 +218,6 @@
             super.setEnabled(enabled);
         }
 
-        @SuppressWarnings("serial")
         private final class JTextAreaDelegate extends JTextArea {
 
             // Empty non private constructor was added because access to this
--- a/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -44,11 +44,14 @@
 import javax.swing.text.Document;
 import javax.swing.text.JTextComponent;
 
+/**
+ * Lightweight implementation of {@link TextComponentPeer}. Provides useful
+ * methods for {@link LWTextAreaPeer} and {@link LWTextFieldPeer}
+ */
 abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent>
         extends LWComponentPeer<T, D>
         implements DocumentListener, TextComponentPeer, InputMethodListener {
 
-
     private volatile boolean firstChangeSkipped;
 
     LWTextComponentPeer(final T target,
@@ -218,14 +221,14 @@
     }
 
     @Override
-    public void inputMethodTextChanged(InputMethodEvent event) {
+    public void inputMethodTextChanged(final InputMethodEvent event) {
         synchronized (getDelegateLock()) {
             AWTAccessor.getComponentAccessor().processEvent(getTextComponent(), event);
         }
     }
 
     @Override
-    public void caretPositionChanged(InputMethodEvent event) {
+    public void caretPositionChanged(final InputMethodEvent event) {
         synchronized (getDelegateLock()) {
             AWTAccessor.getComponentAccessor().processEvent(getTextComponent(), event);
         }
--- a/src/macosx/classes/sun/lwawt/LWTextFieldPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWTextFieldPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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,10 @@
 import javax.swing.*;
 import javax.swing.text.JTextComponent;
 
+/**
+ * Lightweight implementation of {@link TextFieldPeer}. Delegates most of the
+ * work to the {@link JPasswordField}.
+ */
 final class LWTextFieldPeer
         extends LWTextComponentPeer<TextField, JPasswordField>
         implements TextFieldPeer, ActionListener {
@@ -47,7 +51,7 @@
     }
 
     @Override
-    protected JPasswordField createDelegate() {
+    JPasswordField createDelegate() {
         return new JPasswordFieldDelegate();
     }
 
@@ -107,7 +111,7 @@
      * @param e the focus event
      */
     @Override
-    protected void handleJavaFocusEvent(final FocusEvent e) {
+    void handleJavaFocusEvent(final FocusEvent e) {
         if (e.getID() == FocusEvent.FOCUS_LOST) {
             // In order to de-select the selection
             setCaretPosition(0);
@@ -115,6 +119,7 @@
         super.handleJavaFocusEvent(e);
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     private final class JPasswordFieldDelegate extends JPasswordField {
 
         // Empty non private constructor was added because access to this
--- a/src/macosx/classes/sun/lwawt/LWToolkit.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWToolkit.java	Thu Oct 03 19:06:43 2013 +0100
@@ -38,6 +38,7 @@
 import sun.awt.*;
 import sun.lwawt.macosx.*;
 import sun.print.*;
+import sun.security.util.SecurityConstants;
 
 public abstract class LWToolkit extends SunToolkit implements Runnable {
 
@@ -502,7 +503,7 @@
     public Clipboard getSystemClipboard() {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-            security.checkSystemClipboardAccess();
+            security.checkPermission(SecurityConstants.AWT.ACCESS_CLIPBOARD_PERMISSION);
         }
 
         synchronized (this) {
@@ -556,16 +557,18 @@
     }
 
     @Override
-    public void grab(Window w) {
-        if (w.getPeer() != null) {
-            ((LWWindowPeer)w.getPeer()).grab();
+    public void grab(final Window w) {
+        final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
+        if (peer != null) {
+            ((LWWindowPeer) peer).grab();
         }
     }
 
     @Override
-    public void ungrab(Window w) {
-        if (w.getPeer() != null) {
-            ((LWWindowPeer)w.getPeer()).ungrab(false);
+    public void ungrab(final Window w) {
+        final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
+        if (peer != null) {
+            ((LWWindowPeer) peer).ungrab(false);
         }
     }
 
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -43,7 +43,7 @@
     extends LWContainerPeer<Window, JComponent>
     implements FramePeer, DialogPeer, FullScreenCapable, DisplayChangedListener, PlatformEventNotifier
 {
-    public static enum PeerType {
+    public enum PeerType {
         SIMPLEWINDOW,
         FRAME,
         DIALOG,
@@ -83,15 +83,15 @@
 
     // A peer where the last mouse event came to. Used by cursor manager to
     // find the component under cursor
-    private static volatile LWComponentPeer lastCommonMouseEventPeer = null;
+    private static volatile LWComponentPeer<?, ?> lastCommonMouseEventPeer;
 
     // A peer where the last mouse event came to. Used to generate
     // MOUSE_ENTERED/EXITED notifications
-    private volatile LWComponentPeer lastMouseEventPeer;
+    private volatile LWComponentPeer<?, ?> lastMouseEventPeer;
 
     // Peers where all dragged/released events should come to,
     // depending on what mouse button is being dragged according to Cocoa
-    private static LWComponentPeer mouseDownTarget[] = new LWComponentPeer[3];
+    private static final LWComponentPeer<?, ?>[] mouseDownTarget = new LWComponentPeer<?, ?>[3];
 
     // A bitmask that indicates what mouse buttons produce MOUSE_CLICKED events
     // on MOUSE_RELEASE. Click events are only generated if there were no drag
@@ -129,7 +129,8 @@
         this.peerType = peerType;
 
         Window owner = target.getOwner();
-        LWWindowPeer ownerPeer = (owner != null) ? (LWWindowPeer)owner.getPeer() : null;
+        LWWindowPeer ownerPeer = owner == null ? null :
+             (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(owner);
         PlatformWindow ownerDelegate = (ownerPeer != null) ? ownerPeer.getPlatformWindow() : null;
 
         // The delegate.initialize() needs a non-null GC on X11.
@@ -163,10 +164,10 @@
 
         // Init warning window(for applets)
         SecurityWarningWindow warn = null;
-        if (((Window)target).getWarningString() != null) {
+        if (target.getWarningString() != null) {
             // accessSystemTray permission allows to display TrayIcon, TrayIcon tooltip
             // and TrayIcon balloon windows without a warning window.
-            if (!AWTAccessor.getWindowAccessor().isTrayIconWindow((Window)target)) {
+            if (!AWTAccessor.getWindowAccessor().isTrayIconWindow(target)) {
                 LWToolkit toolkit = (LWToolkit)Toolkit.getDefaultToolkit();
                 warn = toolkit.createSecurityWarning(target, this);
             }
@@ -210,6 +211,7 @@
     }
 
     // Just a helper method
+    @Override
     public PlatformWindow getPlatformWindow() {
         return platformWindow;
     }
@@ -391,7 +393,8 @@
     @Override
     public void setModalBlocked(Dialog blocker, boolean blocked) {
         synchronized (getPeerTreeLock()) {
-            this.blocker = blocked ? (LWWindowPeer)blocker.getPeer() : null;
+            this.blocker = !blocked ? null :
+            (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(blocker);
         }
 
         platformWindow.setModalBlocked(blocked);
@@ -458,6 +461,7 @@
         textured = isTextured;
     }
 
+    @Override
     public final boolean isTranslucent() {
         synchronized (getStateLock()) {
             /*
@@ -537,7 +541,8 @@
     public void blockWindows(List<Window> windows) {
         //TODO: LWX will probably need some collectJavaToplevels to speed this up
         for (Window w : windows) {
-            WindowPeer wp = (WindowPeer)w.getPeer();
+            WindowPeer wp =
+                    (WindowPeer) AWTAccessor.getComponentAccessor().getPeer(w);
             if (wp != null) {
                 wp.setModalBlocked((Dialog)getTarget(), true);
             }
@@ -694,7 +699,7 @@
         // TODO: fill "bdata" member of AWTEvent
         Rectangle r = getBounds();
         // findPeerAt() expects parent coordinates
-        LWComponentPeer targetPeer = findPeerAt(r.x + x, r.y + y);
+        LWComponentPeer<?, ?> targetPeer = findPeerAt(r.x + x, r.y + y);
 
         if (id == MouseEvent.MOUSE_EXITED) {
             isMouseOver = false;
@@ -743,7 +748,7 @@
                         screenX, screenY, modifiers, clickCount, popupTrigger,
                         targetPeer);
             } else {
-                LWComponentPeer topmostTargetPeer =
+                LWComponentPeer<?, ?> topmostTargetPeer =
                         topmostWindowPeer != null ? topmostWindowPeer.findPeerAt(r.x + x, r.y + y) : null;
                 topmostWindowPeer.generateMouseEnterExitEventsForComponents(when, button, x, y,
                         screenX, screenY, modifiers, clickCount, popupTrigger,
@@ -840,7 +845,7 @@
     private void generateMouseEnterExitEventsForComponents(long when,
             int button, int x, int y, int screenX, int screenY,
             int modifiers, int clickCount, boolean popupTrigger,
-            LWComponentPeer targetPeer) {
+            final LWComponentPeer<?, ?> targetPeer) {
 
         if (!isMouseOver || targetPeer == lastMouseEventPeer) {
             return;
@@ -899,7 +904,7 @@
         // TODO: could we just use the last mouse event target here?
         Rectangle r = getBounds();
         // findPeerAt() expects parent coordinates
-        final LWComponentPeer targetPeer = findPeerAt(r.x + x, r.y + y);
+        final LWComponentPeer<?, ?> targetPeer = findPeerAt(r.x + x, r.y + y);
         if (targetPeer == null || !targetPeer.isEnabled()) {
             return;
         }
@@ -933,7 +938,12 @@
                 focusOwner = this.getTarget();
             }
         }
-        postEvent(new KeyEvent(focusOwner, id, when, modifiers, keyCode, keyChar, keyLocation));
+
+        KeyEvent keyEvent = new KeyEvent(focusOwner, id, when, modifiers,
+            keyCode, keyChar, keyLocation);
+        AWTAccessor.getKeyEventAccessor().setExtendedKeyCode(keyEvent,
+            ExtendedKeyCodes.getExtendedKeyCodeForChar(keyChar));
+        postEvent(keyEvent);
     }
 
     // ---- UTILITY METHODS ---- //
@@ -1152,8 +1162,9 @@
                 if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                     focusLog.fine("requesting native focus to the owner " + owner);
                 }
-                LWWindowPeer currentActivePeer = (currentActive != null ?
-                    (LWWindowPeer)currentActive.getPeer() : null);
+                LWWindowPeer currentActivePeer = currentActive == null ? null :
+                (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(
+                        currentActive);
 
                 // Ensure the opposite is natively active and suppress sending events.
                 if (currentActivePeer != null && currentActivePeer.platformWindow.isActive()) {
@@ -1265,7 +1276,8 @@
         while (owner != null && !(owner instanceof Frame || owner instanceof Dialog)) {
             owner = owner.getOwner();
         }
-        return owner != null ? (LWWindowPeer)owner.getPeer() : null;
+        return owner == null ? null :
+               (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(owner);
     }
 
     /**
@@ -1284,11 +1296,13 @@
         }
     }
 
+    @Override
     public void enterFullScreenMode() {
         platformWindow.enterFullScreenMode();
         updateSecurityWarningVisibility();
     }
 
+    @Override
     public void exitFullScreenMode() {
         platformWindow.exitFullScreenMode();
         updateSecurityWarningVisibility();
--- a/src/macosx/classes/sun/lwawt/SelectionClearListener.java	Sat Sep 14 19:21:07 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.lwawt;
-
-/*
- * Every time the TextField (or TextArea) change selection, every other text components
- * must immediately clear their selections.
- */
-interface SelectionClearListener {
-   void clearSelection();
-}
--- a/src/macosx/classes/sun/lwawt/macosx/CMenu.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/macosx/CMenu.java	Thu Oct 03 19:06:43 2013 +0100
@@ -26,9 +26,11 @@
 package sun.lwawt.macosx;
 
 import java.awt.*;
+import java.awt.peer.MenuItemPeer;
 import java.awt.peer.MenuPeer;
 
 public class CMenu extends CMenuItem implements MenuPeer {
+
     public CMenu(Menu target) {
         super(target);
     }
@@ -41,6 +43,20 @@
     }
 
     @Override
+    public final void setEnabled(final boolean b) {
+        super.setEnabled(b);
+        final Menu target = (Menu) getTarget();
+        final int count = target.getItemCount();
+        for (int i = 0; i < count; ++i) {
+            MenuItem item = target.getItem(i);
+            MenuItemPeer p = (MenuItemPeer) LWCToolkit.targetToPeer(item);
+            if (p != null) {
+                p.setEnabled(b && item.isEnabled());
+            }
+        }
+    }
+
+    @Override
     protected long createModel() {
         CMenuComponent parent = (CMenuComponent)
             LWCToolkit.targetToPeer(getTarget().getParent());
--- a/src/macosx/classes/sun/lwawt/macosx/CMenuItem.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/macosx/CMenuItem.java	Thu Oct 03 19:06:43 2013 +0100
@@ -28,17 +28,20 @@
 import sun.awt.SunToolkit;
 import sun.lwawt.LWToolkit;
 
+import java.awt.MenuContainer;
 import java.awt.MenuItem;
 import java.awt.MenuShortcut;
 import java.awt.event.*;
 import java.awt.peer.MenuItemPeer;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 public class CMenuItem extends CMenuComponent implements MenuItemPeer {
 
+    private final AtomicBoolean enabled = new AtomicBoolean(true);
+
     public CMenuItem(MenuItem target) {
         super(target);
         initialize(target);
-
     }
 
     // This way we avoiding invocation of the setters twice
@@ -124,9 +127,19 @@
         setEnabled(false);
     }
 
+    public final boolean isEnabled() {
+        return enabled.get();
+    }
+
     @Override
     public void setEnabled(boolean b) {
-        nativeSetEnabled(getModel(), b);
+        final Object parent = LWToolkit.targetToPeer(getTarget().getParent());
+        if (parent instanceof CMenuItem) {
+            b &= ((CMenuItem) parent).isEnabled();
+        }
+        if (enabled.compareAndSet(!b, b)) {
+            nativeSetEnabled(getModel(), b);
+        }
     }
 
     private native long nativeCreate(long parentMenu, boolean isSeparator);
--- a/src/macosx/classes/sun/lwawt/macosx/CMouseInfoPeer.java	Sat Sep 14 19:21:07 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.lwawt.macosx;
-
-import java.awt.Window;
-import sun.lwawt.LWMouseInfoPeer;
-import sun.lwawt.LWWindowPeer;
-
-public class CMouseInfoPeer extends LWMouseInfoPeer
-{
-    //If a new window is to appear under the cursor,
-    //we get wrong window.
-    //This is a workaround for macosx.
-    @Override
-    public boolean isWindowUnderMouse(Window w) {
-        if (w == null) {
-            return false;
-        }
-
-        return ((LWWindowPeer)w.getPeer()).getPlatformWindow().isUnderMouse();
-    }
-}
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Thu Oct 03 19:06:43 2013 +0100
@@ -820,6 +820,7 @@
         }
 
         nativeSetEnabled(getNSWindowPtr(), !blocked);
+        checkBlockingAndOrder();
     }
 
     public final void invalidateShadow(){
@@ -984,7 +985,7 @@
         setStyleBits(SHOULD_BECOME_KEY | SHOULD_BECOME_MAIN, isFocusable); // set both bits at once
     }
 
-    private boolean checkBlocking() {
+    private boolean checkBlockingAndOrder() {
         LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
         if (blocker == null) {
             return false;
@@ -1040,7 +1041,7 @@
     private void windowDidBecomeMain() {
         assert CThreading.assertAppKit();
 
-        if (checkBlocking()) return;
+        if (checkBlockingAndOrder()) return;
         // If it's not blocked, make sure it's above its siblings
         orderAboveSiblings();
     }
--- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Thu Oct 03 19:06:43 2013 +0100
@@ -44,6 +44,8 @@
 import sun.lwawt.LWWindowPeer.PeerType;
 import sun.security.action.GetBooleanAction;
 
+import sun.util.CoreResourceBundleControl;
+
 class NamedCursor extends Cursor {
     NamedCursor(String name) {
         super(name);
@@ -67,13 +69,28 @@
 
     static {
         System.err.flush();
-        java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() {
-            public Object run() {
+
+        ResourceBundle platformResources = java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction<ResourceBundle>() {
+            public ResourceBundle run() {
+                ResourceBundle platformResources = null;
+                try {
+                    platformResources =
+                            ResourceBundle.getBundle("sun.awt.resources.awtosx",
+                                    CoreResourceBundleControl.getRBControlInstance());
+                } catch (MissingResourceException e) {
+                    // No resource file; defaults will be used.
+                }
+
                 System.loadLibrary("awt");
                 System.loadLibrary("fontmanager");
-                return null;
+
+                return platformResources;
             }
         });
+
+        AWTAccessor.getToolkitAccessor().setPlatformResources(platformResources);
+
         if (!GraphicsEnvironment.isHeadless()) {
             initIDs();
         }
@@ -207,9 +224,9 @@
 
     @Override
     public MenuBarPeer createMenuBar(MenuBar target) {
-         MenuBarPeer peer = new CMenuBar(target);
-         targetCreatedPeer(target, peer);
-             return peer;
+        MenuBarPeer peer = new CMenuBar(target);
+        targetCreatedPeer(target, peer);
+        return peer;
     }
 
     @Override
@@ -303,11 +320,6 @@
     }
 
     @Override
-    protected MouseInfoPeer createMouseInfoPeerImpl() {
-        return new CMouseInfoPeer();
-    }
-
-    @Override
     protected int getScreenHeight() {
         return GraphicsEnvironment.getLocalGraphicsEnvironment()
                 .getDefaultScreenDevice().getDefaultConfiguration().getBounds().height;
--- a/src/macosx/native/sun/awt/AWTEvent.m	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/native/sun/awt/AWTEvent.m	Thu Oct 03 19:06:43 2013 +0100
@@ -759,7 +759,7 @@
  */
 JNIEXPORT jint JNICALL
 Java_sun_lwawt_macosx_event_NSEvent_nsToJavaChar
-(JNIEnv *env, jclass cls, char nsChar, jint modifierFlags)
+(JNIEnv *env, jclass cls, jchar nsChar, jint modifierFlags)
 {
     jchar javaChar = 0;
 
--- a/src/macosx/native/sun/awt/AWTView.m	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/native/sun/awt/AWTView.m	Thu Oct 03 19:06:43 2013 +0100
@@ -126,7 +126,7 @@
 
     self.cglLayer = nil;
 
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
     (*env)->DeleteGlobalRef(env, m_cPlatformView);
     m_cPlatformView = NULL;
 
@@ -387,7 +387,7 @@
         [rolloverTrackingArea release];
     }
 
-    int options = (NSTrackingActiveInActiveApp | NSTrackingMouseEnteredAndExited |
+    int options = (NSTrackingActiveAlways | NSTrackingMouseEnteredAndExited |
                    NSTrackingMouseMoved | NSTrackingEnabledDuringMouseDrag);
 
     rolloverTrackingArea = [[NSTrackingArea alloc] initWithRect:[self visibleRect]
--- a/src/macosx/native/sun/awt/AWTWindow.m	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/native/sun/awt/AWTWindow.m	Thu Oct 03 19:06:43 2013 +0100
@@ -350,7 +350,7 @@
 - (void) dealloc {
 AWT_ASSERT_APPKIT_THREAD;
 
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
     [self.javaPlatformWindow setJObject:nil withEnv:env];
 
     self.nsWindow = nil;
@@ -366,6 +366,22 @@
 
 - (BOOL) canBecomeMainWindow {
 AWT_ASSERT_APPKIT_THREAD;
+    if(!self.isEnabled){
+        // Native system can bring up the NSWindow to
+        // the top even if the window is not main.
+        // We should bring up the modal dialog manually
+        [AWTToolkit eventCountPlusPlus];
+
+        JNIEnv *env = [ThreadUtilities getJNIEnv];
+        jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
+        if (platformWindow != NULL) {
+            static JNF_MEMBER_CACHE(jm_checkBlockingAndOrder, jc_CPlatformWindow,
+                                    "checkBlockingAndOrder", "()Z");
+            JNFCallVoidMethod(env, platformWindow, jm_checkBlockingAndOrder);
+            (*env)->DeleteLocalRef(env, platformWindow);
+        }
+    }
+
     return self.isEnabled && IS(self.styleBits, SHOULD_BECOME_MAIN);
 }
 
--- a/src/macosx/native/sun/awt/CTextPipe.m	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/macosx/native/sun/awt/CTextPipe.m	Thu Oct 03 19:06:43 2013 +0100
@@ -145,11 +145,6 @@
 
     BOOL saved = false;
 
-    /* Save and restore of graphics context is done before the iteration.  
-       This seems to work using our test case (see bug ID 7158350) so we are restoring it at
-       the end of the for loop.  If we find out that save/restore outside the loop
-       doesn't work on all cases then we will move the Save/Restore inside the loop.*/
-    CGContextSaveGState(cgRef);
     CGAffineTransform invTx = CGAffineTransformInvert(strike->fTx);
 
     NSUInteger i;
@@ -226,7 +221,9 @@
 
     }
     // reset the font on the context after striking a unicode with CoreText
-    CGContextRestoreGState(cgRef);
+    if (saved) {
+        CGContextRestoreGState(cgRef);
+    }
 }
 
 // Using the Quartz Surface Data context, draw a hot-substituted character run
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggleexpand=ein-/ausblenden
+toggleexpand=einblenden umschalten
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_es.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_es.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggleexpand=activar/desactivar ampliaci\u00F3n
+toggleexpand=conmutar ampliaci\u00F3n
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_fr.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_fr.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggleexpand=basculer le d\u00E9veloppement
+toggleexpand=activer/d\u00E9sactiver d\u00E9veloppement
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_it.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_it.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggleexpand=abilita/disabilita espansione
+toggleexpand=attiva/disattiva espansione
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggleexpand=alternar expans\u00E3o
+toggleexpand=alternar expandir
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggleexpand=v\u00E4xla ut\u00F6ka
+toggleexpand=v\u00E4xla expandering
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -278,10 +278,11 @@
                         (JFIFMarkerSegment) findMarkerSegment
                         (JFIFMarkerSegment.class, true);
                     if (jfif == null) {
-                        throw new IIOException
-                            ("ICC APP2 encountered without prior JFIF!");
+                        newGuy = new MarkerSegment(buffer);
+                        newGuy.loadData(buffer);
+                    } else {
+                        jfif.addICC(buffer);
                     }
-                    jfif.addICC(buffer);
                     // newGuy remains null
                 } else {
                     newGuy = new MarkerSegment(buffer);
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Thu Oct 03 19:06:43 2013 +0100
@@ -41,6 +41,7 @@
 import javax.swing.table.*;
 import javax.accessibility.*;
 
+import sun.swing.AbstractFilterComboBoxModel;
 import sun.swing.SwingUtilities2;
 
 import sun.swing.plaf.synth.*;
@@ -1328,71 +1329,9 @@
     /**
      * Data model for filter combo-box.
      */
-    protected class FilterComboBoxModel extends AbstractListModel
-            implements ComboBoxModel, PropertyChangeListener {
-        protected FileFilter[] filters;
-
-        protected FilterComboBoxModel() {
-            super();
-            filters = getFileChooser().getChoosableFileFilters();
-        }
-
-        public void propertyChange(PropertyChangeEvent e) {
-            String prop = e.getPropertyName();
-            if (prop == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
-                filters = (FileFilter[]) e.getNewValue();
-                fireContentsChanged(this, -1, -1);
-            } else if (prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public void setSelectedItem(Object filter) {
-            if (filter != null) {
-                getFileChooser().setFileFilter((FileFilter) filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            // Ensure that the current filter is in the list.
-            // NOTE: we shouldnt' have to do this, since JFileChooser adds
-            // the filter to the choosable filters list when the filter
-            // is set. Lets be paranoid just in case someone overrides
-            // setFileFilter in JFileChooser.
-            FileFilter currentFilter = getFileChooser().getFileFilter();
-            boolean found = false;
-            if (currentFilter != null) {
-                for (FileFilter filter : filters) {
-                    if (filter == currentFilter) {
-                        found = true;
-                    }
-                }
-                if (found == false) {
-                    getFileChooser().addChoosableFileFilter(currentFilter);
-                }
-            }
-            return getFileChooser().getFileFilter();
-        }
-
-        public int getSize() {
-            if (filters != null) {
-                return filters.length;
-            } else {
-                return 0;
-            }
-        }
-
-        public Object getElementAt(int index) {
-            if (index > getSize() - 1) {
-                // This shouldn't happen. Try to recover gracefully.
-                return getFileChooser().getFileFilter();
-            }
-            if (filters != null) {
-                return filters[index];
-            } else {
-                return null;
-            }
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return GTKFileChooserUI.this.getFileChooser();
         }
     }
 }
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Thu Oct 03 19:06:43 2013 +0100
@@ -38,6 +38,7 @@
 import java.io.IOException;
 import java.util.*;
 import sun.awt.shell.ShellFolder;
+import sun.swing.AbstractFilterComboBoxModel;
 import sun.swing.SwingUtilities2;
 
 /**
@@ -777,70 +778,9 @@
     /**
      * Data model for a type-face selection combo-box.
      */
-    protected class FilterComboBoxModel extends AbstractListModel<FileFilter> implements ComboBoxModel<FileFilter>,
-            PropertyChangeListener {
-        protected FileFilter[] filters;
-        protected FilterComboBoxModel() {
-            super();
-            filters = getFileChooser().getChoosableFileFilters();
-        }
-
-        public void propertyChange(PropertyChangeEvent e) {
-            String prop = e.getPropertyName();
-            if(prop.equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY)) {
-                filters = (FileFilter[]) e.getNewValue();
-                fireContentsChanged(this, -1, -1);
-            } else if (prop.equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) {
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public void setSelectedItem(Object filter) {
-            if(filter != null) {
-                getFileChooser().setFileFilter((FileFilter) filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            // Ensure that the current filter is in the list.
-            // NOTE: we shouldnt' have to do this, since JFileChooser adds
-            // the filter to the choosable filters list when the filter
-            // is set. Lets be paranoid just in case someone overrides
-            // setFileFilter in JFileChooser.
-            FileFilter currentFilter = getFileChooser().getFileFilter();
-            boolean found = false;
-            if(currentFilter != null) {
-                for (FileFilter filter : filters) {
-                    if (filter == currentFilter) {
-                        found = true;
-                    }
-                }
-                if (!found) {
-                    getFileChooser().addChoosableFileFilter(currentFilter);
-                }
-            }
-            return getFileChooser().getFileFilter();
-        }
-
-        public int getSize() {
-            if(filters != null) {
-                return filters.length;
-            } else {
-                return 0;
-            }
-        }
-
-        public FileFilter getElementAt(int index) {
-            if(index > getSize() - 1) {
-                // This shouldn't happen. Try to recover gracefully.
-                return getFileChooser().getFileFilter();
-            }
-            if(filters != null) {
-                return filters[index];
-            } else {
-                return null;
-            }
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return MotifFileChooserUI.this.getFileChooser();
         }
     }
 
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_de.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_de.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -30,7 +30,7 @@
 FileChooser.filterLabel.textAndMnemonic=Filte&r
 FileChooser.foldersLabel.textAndMnemonic=Ord&ner
 FileChooser.filesLabel.textAndMnemonic=Date&ien
-FileChooser.enterFileNameLabel.textAndMnemonic=Dateiname ei&ngeben:
+FileChooser.enterFileNameLabel.textAndMnemonic=Dateina&me eingeben:
 FileChooser.enterFolderNameLabel.textAndMnemonic=Ordnernamen eingeben:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ko.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ko.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -24,7 +24,7 @@
 FileChooser.openButton.textAndMnemonic=\uD655\uC778
 FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
 FileChooser.openDialogTitle.textAndMnemonic=\uC5F4\uAE30
-FileChooser.updateButton.textAndMnemonic=\uAC31\uC2E0
+FileChooser.updateButton.textAndMnemonic=\uC5C5\uB370\uC774\uD2B8
 FileChooser.helpButton.textAndMnemonic=\uB3C4\uC6C0\uB9D0
 FileChooser.pathLabel.textAndMnemonic=\uACBD\uB85C \uB610\uB294 \uD3F4\uB354 \uC774\uB984 \uC785\uB825(&P):
 FileChooser.filterLabel.textAndMnemonic=\uD544\uD130(&R)
@@ -36,5 +36,5 @@
 FileChooser.cancelButtonToolTip.textAndMnemonic=\uD30C\uC77C \uC120\uD0DD\uAE30 \uB300\uD654\uC0C1\uC790\uB97C \uC911\uB2E8\uD569\uB2C8\uB2E4.
 FileChooser.saveButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uD30C\uC77C\uC744 \uC800\uC7A5\uD569\uB2C8\uB2E4.
 FileChooser.openButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uD30C\uC77C\uC744 \uC5FD\uB2C8\uB2E4.
-FileChooser.updateButtonToolTip.textAndMnemonic=\uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC744 \uAC31\uC2E0\uD569\uB2C8\uB2E4.
+FileChooser.updateButtonToolTip.textAndMnemonic=\uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.
 FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \uB3C4\uC6C0\uB9D0\uC785\uB2C8\uB2E4.
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1193,70 +1193,9 @@
     /**
      * Data model for a type-face selection combo-box.
      */
-    protected class FilterComboBoxModel extends AbstractListModel<FileFilter> implements ComboBoxModel<FileFilter>,
-            PropertyChangeListener {
-        protected FileFilter[] filters;
-        protected FilterComboBoxModel() {
-            super();
-            filters = getFileChooser().getChoosableFileFilters();
-        }
-
-        public void propertyChange(PropertyChangeEvent e) {
-            String prop = e.getPropertyName();
-            if(prop == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
-                filters = (FileFilter[]) e.getNewValue();
-                fireContentsChanged(this, -1, -1);
-            } else if (prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public void setSelectedItem(Object filter) {
-            if(filter != null) {
-                getFileChooser().setFileFilter((FileFilter) filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            // Ensure that the current filter is in the list.
-            // NOTE: we shouldnt' have to do this, since JFileChooser adds
-            // the filter to the choosable filters list when the filter
-            // is set. Lets be paranoid just in case someone overrides
-            // setFileFilter in JFileChooser.
-            FileFilter currentFilter = getFileChooser().getFileFilter();
-            boolean found = false;
-            if(currentFilter != null) {
-                for (FileFilter filter : filters) {
-                    if (filter == currentFilter) {
-                        found = true;
-                    }
-                }
-                if(found == false) {
-                    getFileChooser().addChoosableFileFilter(currentFilter);
-                }
-            }
-            return getFileChooser().getFileFilter();
-        }
-
-        public int getSize() {
-            if(filters != null) {
-                return filters.length;
-            } else {
-                return 0;
-            }
-        }
-
-        public FileFilter getElementAt(int index) {
-            if(index > getSize() - 1) {
-                // This shouldn't happen. Try to recover gracefully.
-                return getFileChooser().getFileFilter();
-            }
-            if(filters != null) {
-                return filters[index];
-            } else {
-                return null;
-            }
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return WindowsFileChooserUI.this.getFileChooser();
         }
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/DriverResource_ja.java	Thu Oct 03 19:06:43 2013 +0100
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.java.util.jar.pack;
+
+import java.util.ListResourceBundle;
+
+public class DriverResource_ja extends ListResourceBundle {
+        public static final String VERSION ="VERSION";
+        public static final String BAD_ARGUMENT ="BAD_ARGUMENT";
+        public static final String BAD_OPTION ="BAD_OPTION";
+        public static final String BAD_REPACK_OUTPUT="BAD_REPACK_OUTPUT";
+        public static final String DETECTED_ZIP_COMMENT="DETECTED_ZIP_COMMENT";
+        public static final String SKIP_FOR_REPACKED ="SKIP_FOR_REPACKED";
+        public static final String WRITE_PACK_FILE ="WRITE_PACK_FILE";
+        public static final String WIRTE_PACKGZ_FILE="WIRTE_PACKGZ_FILE";
+        public static final String SKIP_FOR_MOVE_FAILED="SKIP_FOR_MOVE_FAILED";
+        public static final String PACK_HELP="PACK_HELP";
+        public static final String UNPACK_HELP ="UNPACK_HELP";
+        public static final String MORE_INFO = "MORE_INFO";
+        public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
+        public static final String BAD_SPEC = "BAD_SPEC";
+
+        //The following string is duplicate in PACK and UNPACK comment,which was draw out to ruduce translation work.
+        private static final String PARAMETER_V = "  -v, --verbose                   increase program verbosity";
+        private static final String PARAMETER_Q = "  -q, --quiet                     set verbosity to lowest level";
+        private static final String PARAMETER_LF = "  -l{F}, --log-file={F}           output to the given log file, or '-' for System.out";
+        private static final String PARAMETER_H = "  -?, -h, --help                  print this message";
+        private static final String PARAMETER_VER = "  -V, --version                   print program version";
+        private static final String PARAMETER_J = "  -J{X}                           pass option X to underlying Java VM";
+
+
+        //The following are outputs of command 'pack200' and 'unpack200'.
+        //Don't translate command arguments ,words with a prefix of '-' or '--'.
+        //
+        private static final Object[][] resource= {
+                {VERSION,"{0}\u30D0\u30FC\u30B8\u30E7\u30F3{1}"},//parameter 0:class name;parameter 1: version value
+                {BAD_ARGUMENT,"\u7121\u52B9\u306A\u5F15\u6570: {0}"},
+                {BAD_OPTION,"\u7121\u52B9\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}={1}"},//parameter 0:option name;parameter 1:option value
+                {BAD_REPACK_OUTPUT,"\u7121\u52B9\u306A--repack\u51FA\u529B: {0}"},//parameter 0:filename
+                {DETECTED_ZIP_COMMENT,"\u691C\u51FA\u3055\u308C\u305FZIP\u30B3\u30E1\u30F3\u30C8: {0}"},//parameter 0:comment
+                {SKIP_FOR_REPACKED,"\u3059\u3067\u306B\u518D\u5727\u7E2E\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u30B9\u30AD\u30C3\u30D7\u3057\u3066\u3044\u307E\u3059: {0}"},//parameter 0:filename
+                {WRITE_PACK_FILE,"*.pack\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\u306B\u306F\u3001--no-gzip\u3092\u6307\u5B9A\u3057\u307E\u3059: {0}"},//parameter 0:filename
+                {WIRTE_PACKGZ_FILE,"*.pack.gz\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\u306B\u306F\u3001--gzip\u3092\u6307\u5B9A\u3057\u307E\u3059: {0}"},//parameter 0:filename
+                {SKIP_FOR_MOVE_FAILED,"\u79FB\u52D5\u304C\u5931\u6557\u3057\u305F\u305F\u3081\u89E3\u51CD\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u3066\u3044\u307E\u3059: {0}"},//parameter 0:filename
+                {PACK_HELP,new String[]{
+                                "\u4F7F\u7528\u65B9\u6CD5:  pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
+                                "",
+                                "\u5727\u7E2E\u30AA\u30D7\u30B7\u30E7\u30F3",
+                                "  -g\u3001--no-gzip                   \u30D7\u30EC\u30FC\u30F3\u306A*.pack\u30D5\u30A1\u30A4\u30EB\u3092\u5727\u7E2E\u305B\u305A\u306B\u51FA\u529B\u3057\u307E\u3059",
+                                "  --gzip                          (\u30C7\u30D5\u30A9\u30EB\u30C8)\u5727\u7E2E\u51FA\u529B\u3092gzip\u3067\u5F8C\u51E6\u7406\u3057\u307E\u3059",
+                                "  -G\u3001--strip-debug               \u5727\u7E2E\u4E2D\u306B\u30C7\u30D0\u30C3\u30B0\u5C5E\u6027\u3092\u524A\u9664\u3057\u307E\u3059",
+                                "  -O\u3001--no-keep-file-order        \u30D5\u30A1\u30A4\u30EB\u306E\u9806\u5E8F\u4ED8\u3051\u60C5\u5831\u3092\u8EE2\u9001\u3057\u307E\u305B\u3093",
+                                "  --keep-file-order               (\u30C7\u30D5\u30A9\u30EB\u30C8)\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u9806\u5E8F\u4ED8\u3051\u3092\u4FDD\u6301\u3057\u307E\u3059",
+                                "  -S{N}\u3001--segment-limit={N}       \u30BB\u30B0\u30E1\u30F3\u30C8\u5236\u9650\u3092\u51FA\u529B\u3057\u307E\u3059(\u30C7\u30D5\u30A9\u30EB\u30C8N=1Mb)",
+                                "  -E{N}\u3001--effort={N}             \u5727\u7E2E\u306E\u8A66\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8N=5)",
+                                "  -H{h}\u3001--deflate-hint={h}       \u30C7\u30D5\u30EC\u30FC\u30C8\u30FB\u30D2\u30F3\u30C8\u3092\u8EE2\u9001\u3057\u307E\u3059: true\u3001false\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
+                                "  -m{V}\u3001--modification-time={V}  \u5909\u66F4\u6642\u9593\u3092\u8EE2\u9001\u3057\u307E\u3059: latest\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
+                                "  -P{F}\u3001--pass-file={F}          \u6307\u5B9A\u3055\u308C\u305F\u5727\u7E2E\u3055\u308C\u3066\u3044\u306A\u3044\u5165\u529B\u8981\u7D20\u3092\u8EE2\u9001\u3057\u307E\u3059",
+                                "  -U{a}\u3001--unknown-attribute={a}  \u4E0D\u660E\u306E\u5C5E\u6027\u30A2\u30AF\u30B7\u30E7\u30F3: error\u3001strip\u307E\u305F\u306Fpass(\u30C7\u30D5\u30A9\u30EB\u30C8)",
+                                "  -C{N}={L}\u3001--class-attribute={N}={L}  (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
+                                "  -F{N}={L}\u3001--field-attribute={N}={L}  (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
+                                "  -M{N}={L}\u3001--method-attribute={N}={L} (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
+                                "  -D{N}={L}\u3001--code-attribute={N}={L}   (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
+                                "  -f{F}\u3001--config-file={F}        Pack200.Packer\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u30D5\u30A1\u30A4\u30EBF\u3092\u8AAD\u307F\u8FBC\u307F\u307E\u3059",
+                                PARAMETER_V ,
+                                PARAMETER_Q ,
+                                PARAMETER_LF ,
+                                PARAMETER_H ,
+                                PARAMETER_VER ,
+                                PARAMETER_J,
+                                "",
+                                "\u6CE8\u610F:",
+                                "  -P\u3001-C\u3001-F\u3001-M\u304A\u3088\u3073-D\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u7D2F\u7A4D\u3055\u308C\u307E\u3059\u3002",
+                                "  \u5C5E\u6027\u5B9A\u7FA9\u306E\u4F8B:  -C SourceFile=RUH .",
+                                "  Config.\u30D5\u30A1\u30A4\u30EB\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u3001Pack200 API\u306B\u3088\u3063\u3066\u5B9A\u7FA9\u3055\u308C\u307E\u3059\u3002",
+                                "  -S\u3001-E\u3001-H\u3001-m\u3001-U\u306E\u5024\u306E\u610F\u5473\u306F\u3001Pack200 API\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
+                                "  \u30EC\u30A4\u30A2\u30A6\u30C8\u5B9A\u7FA9(RUH\u306A\u3069)\u306FJSR 200\u306B\u3088\u3063\u3066\u5B9A\u7FA9\u3055\u308C\u307E\u3059\u3002",
+                                "",
+                                "\u518D\u5727\u7E2E\u30E2\u30FC\u30C9\u3067\u306F\u3001JAR\u30D5\u30A1\u30A4\u30EB\u304C\u5727\u7E2E/\u89E3\u51CD\u30B5\u30A4\u30AF\u30EB\u3067\u66F4\u65B0\u3055\u308C\u307E\u3059:",
+                                "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
+                                }
+                },
+                {UNPACK_HELP,new String[]{
+                                "\u4F7F\u7528\u65B9\u6CD5:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
+                                "",
+                                "\u89E3\u51CD\u30AA\u30D7\u30B7\u30E7\u30F3",
+                                "  -H{h}\u3001--deflate-hint={h}     \u8EE2\u9001\u3055\u308C\u305F\u30C7\u30D5\u30EC\u30FC\u30C8\u30FB\u30D2\u30F3\u30C8\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059: true\u3001false\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
+                                "  -r\u3001--remove-pack-file        \u89E3\u51CD\u5F8C\u306B\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u307E\u3059",
+                                PARAMETER_V ,
+                                PARAMETER_Q ,
+                                PARAMETER_LF ,
+                                PARAMETER_H ,
+                                PARAMETER_VER ,
+                                PARAMETER_J,
+                            }
+                },
+
+                {MORE_INFO,"(\u8A73\u7D30\u306F\u3001{0} --help\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002)"},//parameter 0:command name
+                {DUPLICATE_OPTION,"\u91CD\u8907\u30AA\u30D7\u30B7\u30E7\u30F3: {0}"},//parameter 0:option
+                {BAD_SPEC,"{0}\u306E\u7121\u52B9\u306A\u4ED5\u69D8: {1}"},//parameter 0:option;parameter 1:specifier
+        };
+
+        protected Object[][] getContents() {
+                return resource;
+        }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/java/util/jar/pack/DriverResource_zh_CN.java	Thu Oct 03 19:06:43 2013 +0100
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.java.util.jar.pack;
+
+import java.util.ListResourceBundle;
+
+public class DriverResource_zh_CN extends ListResourceBundle {
+        public static final String VERSION ="VERSION";
+        public static final String BAD_ARGUMENT ="BAD_ARGUMENT";
+        public static final String BAD_OPTION ="BAD_OPTION";
+        public static final String BAD_REPACK_OUTPUT="BAD_REPACK_OUTPUT";
+        public static final String DETECTED_ZIP_COMMENT="DETECTED_ZIP_COMMENT";
+        public static final String SKIP_FOR_REPACKED ="SKIP_FOR_REPACKED";
+        public static final String WRITE_PACK_FILE ="WRITE_PACK_FILE";
+        public static final String WIRTE_PACKGZ_FILE="WIRTE_PACKGZ_FILE";
+        public static final String SKIP_FOR_MOVE_FAILED="SKIP_FOR_MOVE_FAILED";
+        public static final String PACK_HELP="PACK_HELP";
+        public static final String UNPACK_HELP ="UNPACK_HELP";
+        public static final String MORE_INFO = "MORE_INFO";
+        public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
+        public static final String BAD_SPEC = "BAD_SPEC";
+
+        //The following string is duplicate in PACK and UNPACK comment,which was draw out to ruduce translation work.
+        private static final String PARAMETER_V = "  -v, --verbose                   increase program verbosity";
+        private static final String PARAMETER_Q = "  -q, --quiet                     set verbosity to lowest level";
+        private static final String PARAMETER_LF = "  -l{F}, --log-file={F}           output to the given log file, or '-' for System.out";
+        private static final String PARAMETER_H = "  -?, -h, --help                  print this message";
+        private static final String PARAMETER_VER = "  -V, --version                   print program version";
+        private static final String PARAMETER_J = "  -J{X}                           pass option X to underlying Java VM";
+
+
+        //The following are outputs of command 'pack200' and 'unpack200'.
+        //Don't translate command arguments ,words with a prefix of '-' or '--'.
+        //
+        private static final Object[][] resource= {
+                {VERSION,"{0}\u7248\u672C{1}"},//parameter 0:class name;parameter 1: version value
+                {BAD_ARGUMENT,"\u9519\u8BEF\u53C2\u6570: {0}"},
+                {BAD_OPTION,"\u9519\u8BEF\u9009\u9879: {0}={1}"},//parameter 0:option name;parameter 1:option value
+                {BAD_REPACK_OUTPUT,"--repack \u8F93\u51FA\u9519\u8BEF: {0}"},//parameter 0:filename
+                {DETECTED_ZIP_COMMENT,"\u68C0\u6D4B\u5230 ZIP \u6CE8\u91CA: {0}"},//parameter 0:comment
+                {SKIP_FOR_REPACKED,"\u7531\u4E8E\u5DF2\u91CD\u65B0\u6253\u5305\u800C\u8DF3\u8FC7: {0}"},//parameter 0:filename
+                {WRITE_PACK_FILE,"\u8981\u5199\u5165 *.pack \u6587\u4EF6, \u8BF7\u6307\u5B9A --no-gzip: {0}"},//parameter 0:filename
+                {WIRTE_PACKGZ_FILE,"\u8981\u5199\u5165 *.pack.gz \u6587\u4EF6, \u8BF7\u6307\u5B9A --gzip: {0}"},//parameter 0:filename
+                {SKIP_FOR_MOVE_FAILED,"\u7531\u4E8E\u79FB\u52A8\u5931\u8D25\u800C\u8DF3\u8FC7\u91CD\u65B0\u6253\u5305: {0}"},//parameter 0:filename
+                {PACK_HELP,new String[]{
+                                "\u7528\u6CD5:  pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
+                                "",
+                                "\u6253\u5305\u9009\u9879",
+                                "  -g, --no-gzip                   \u8F93\u51FA\u65E0\u683C\u5F0F\u7684 *.pack \u6587\u4EF6, \u4E0D\u538B\u7F29",
+                                "  --gzip                          (\u9ED8\u8BA4\u503C) \u4F7F\u7528 gzip \u5BF9\u6253\u5305\u8FDB\u884C\u540E\u5904\u7406",
+                                "  -G, --strip-debug               \u6253\u5305\u65F6\u5220\u9664\u8C03\u8BD5\u5C5E\u6027",
+                                "  -O, --no-keep-file-order        \u4E0D\u4F20\u8F93\u6587\u4EF6\u6392\u5E8F\u4FE1\u606F",
+                                "  --keep-file-order               (\u9ED8\u8BA4\u503C) \u4FDD\u7559\u8F93\u5165\u6587\u4EF6\u6392\u5E8F",
+                                "  -S{N}, --segment-limit={N}      \u8F93\u51FA\u6BB5\u9650\u5236 (\u9ED8\u8BA4\u503C N=1Mb)",
+                                "  -E{N}, --effort={N}             \u6253\u5305\u6548\u679C (\u9ED8\u8BA4\u503C N=5)",
+                                "  -H{h}, --deflate-hint={h}       \u4F20\u8F93\u538B\u7F29\u63D0\u793A: true, false \u6216 keep (\u9ED8\u8BA4\u503C)",
+                                "  -m{V}, --modification-time={V}  \u4F20\u8F93 modtimes: latest \u6216 keep (\u9ED8\u8BA4\u503C)",
+                                "  -P{F}, --pass-file={F}          \u4F20\u8F93\u672A\u89E3\u538B\u7F29\u7684\u7ED9\u5B9A\u8F93\u5165\u5143\u7D20",
+                                "  -U{a}, --unknown-attribute={a}  \u672A\u77E5\u5C5E\u6027\u64CD\u4F5C: error, strip \u6216 pass (\u9ED8\u8BA4\u503C)",
+                                "  -C{N}={L}, --class-attribute={N}={L}  (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
+                                "  -F{N}={L}, --field-attribute={N}={L}  (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
+                                "  -M{N}={L}, --method-attribute={N}={L} (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
+                                "  -D{N}={L}, --code-attribute={N}={L}   (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
+                                "  -f{F}, --config-file={F}        \u8BFB\u53D6\u6587\u4EF6 F \u7684 Pack200.Packer \u5C5E\u6027",
+                                PARAMETER_V ,
+                                PARAMETER_Q ,
+                                PARAMETER_LF ,
+                                PARAMETER_H ,
+                                PARAMETER_VER ,
+                                PARAMETER_J,
+                                "",
+                                "\u6CE8:",
+                                "  -P, -C, -F, -M \u548C -D \u9009\u9879\u7D2F\u8BA1\u3002",
+                                "  \u793A\u4F8B\u5C5E\u6027\u5B9A\u4E49:  -C SourceFile=RUH\u3002",
+                                "  Config. \u6587\u4EF6\u5C5E\u6027\u7531 Pack200 API \u5B9A\u4E49\u3002",
+                                "  \u6709\u5173 -S, -E, -H-, -m, -U \u503C\u7684\u542B\u4E49, \u8BF7\u53C2\u9605 Pack200 API\u3002",
+                                "  \u5E03\u5C40\u5B9A\u4E49 (\u4F8B\u5982 RUH) \u7531 JSR 200 \u5B9A\u4E49\u3002",
+                                "",
+                                "\u91CD\u65B0\u6253\u5305\u6A21\u5F0F\u901A\u8FC7\u6253\u5305/\u89E3\u5305\u5468\u671F\u66F4\u65B0 JAR \u6587\u4EF6:",
+                                "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
+                                }
+                },
+                {UNPACK_HELP,new String[]{
+                                "\u7528\u6CD5:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
+                                "",
+                                "\u89E3\u5305\u9009\u9879",
+                                "  -H{h}, --deflate-hint={h}     \u8986\u76D6\u5DF2\u4F20\u8F93\u7684\u538B\u7F29\u63D0\u793A: true, false \u6216 keep (\u9ED8\u8BA4\u503C)",
+                                "  -r, --remove-pack-file        \u89E3\u5305\u4E4B\u540E\u5220\u9664\u8F93\u5165\u6587\u4EF6",
+                                PARAMETER_V ,
+                                PARAMETER_Q ,
+                                PARAMETER_LF ,
+                                PARAMETER_H ,
+                                PARAMETER_VER ,
+                                PARAMETER_J,
+                            }
+                },
+
+                {MORE_INFO,"(\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u8FD0\u884C {0} --help\u3002)"},//parameter 0:command name
+                {DUPLICATE_OPTION,"\u91CD\u590D\u7684\u9009\u9879: {0}"},//parameter 0:option
+                {BAD_SPEC,"{0}\u7684\u89C4\u8303\u9519\u8BEF: {1}"},//parameter 0:option;parameter 1:specifier
+        };
+
+        protected Object[][] getContents() {
+                return resource;
+        }
+
+
+}
--- a/src/share/classes/com/sun/nio/sctp/Association.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/Association.java	Thu Oct 03 19:06:43 2013 +0100
@@ -58,6 +58,13 @@
 
     /**
      * Initializes a new instance of this class.
+     *
+     * @param  associationID
+     *         The association ID
+     * @param  maxInStreams
+     *         The maximum number of inbound streams
+     * @param  maxOutStreams
+     *         The maximum number of outbound streams
      */
     protected Association(int associationID,
                           int maxInStreams,
--- a/src/share/classes/com/sun/nio/sctp/IllegalReceiveException.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/IllegalReceiveException.java	Thu Oct 03 19:06:43 2013 +0100
@@ -41,6 +41,9 @@
 
     /**
      * Constructs an instance of this class with the specified message.
+     *
+     * @param  msg
+     *         The String that contains a detailed message
      */
     public IllegalReceiveException(String msg) {
         super(msg);
--- a/src/share/classes/com/sun/nio/sctp/IllegalUnbindException.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/IllegalUnbindException.java	Thu Oct 03 19:06:43 2013 +0100
@@ -41,6 +41,9 @@
 
     /**
      * Constructs an instance of this class with the specified detailed message.
+     *
+     * @param  msg
+     *         The String that contains a detailed message
      */
     public IllegalUnbindException(String msg) {
         super(msg);
--- a/src/share/classes/com/sun/nio/sctp/InvalidStreamException.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/InvalidStreamException.java	Thu Oct 03 19:06:43 2013 +0100
@@ -40,6 +40,9 @@
 
     /**
      * Constructs an instance of this class with the specified detailed message.
+     *
+     * @param  msg
+     *         The String that contains a detailed message
      */
     public InvalidStreamException(String msg) {
         super(msg);
--- a/src/share/classes/com/sun/nio/sctp/MessageInfo.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/MessageInfo.java	Thu Oct 03 19:06:43 2013 +0100
@@ -48,7 +48,7 @@
  * longer required to be sent after the time period expires. It is not a hard
  * timeout and may be influenced by whether the association supports the partial
  * reliability extension, <a href=http://www.ietf.org/rfc/rfc3758.txt>RFC 3758
- * <a>
+ * </a>.
  *
  * <P> {@code MessageInfo} instances are not safe for use by multiple concurrent
  * threads. If a MessageInfo is to be used by more than one thread then access
--- a/src/share/classes/com/sun/nio/sctp/Notification.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/Notification.java	Thu Oct 03 19:06:43 2013 +0100
@@ -40,6 +40,8 @@
 public interface Notification {
     /**
      * Returns the association that this notification is applicable to.
+     *
+     * @return  The association
      */
     public Association association();
 }
--- a/src/share/classes/com/sun/nio/sctp/SctpChannel.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/SctpChannel.java	Thu Oct 03 19:06:43 2013 +0100
@@ -59,7 +59,7 @@
  * {@link #setOption(SctpSocketOption,Object) setOption} method. An SCTP
  * channel support the following options:
  * <blockquote>
- * <table border>
+ * <table border summary="Socket options">
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
@@ -636,6 +636,9 @@
     /**
      * Returns the value of a socket option.
      *
+     * @param   <T>
+     *          The type of the socket option value
+     *
      * @param   name
      *          The socket option
      *
@@ -659,6 +662,9 @@
     /**
      * Sets the value of a socket option.
      *
+     * @param   <T>
+     *          The type of the socket option value
+     *
      * @param   name
      *          The socket option
      *
@@ -752,6 +758,9 @@
      * the {@code receive} method of this channel, if it does an
      * {@link IllegalReceiveException} will be thrown.
      *
+     * @param  <T>
+     *         The type of the attachment
+     *
      * @param  dst
      *         The buffer into which message bytes are to be transferred
      *
@@ -831,7 +840,7 @@
      *          there was insufficient room for the message in the underlying
      *          output buffer
      *
-     * @throws  InvalidStreamExcepton
+     * @throws  InvalidStreamException
      *          If {@code streamNumner} is negative or greater than or equal to
      *          the maximum number of outgoing streams
      *
--- a/src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java	Thu Oct 03 19:06:43 2013 +0100
@@ -63,7 +63,7 @@
  * {@link #setOption(SctpSocketOption,Object,Association) setOption} method. An
  * {@code SctpMultiChannel} supports the following options:
  * <blockquote>
- * <table border>
+ * <table border summary="Socket options">
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
@@ -394,6 +394,9 @@
      * Returns all of the remote addresses to which the given association on
      * this channel's socket is connected.
      *
+     * @param  association
+     *         The association
+     *
      * @return  All of the remote addresses for the given association, or
      *          an empty {@code Set} if the association has been shutdown
      *
@@ -431,6 +434,9 @@
      * ignored if given. However, if the option is association specific then the
      * association must be given.
      *
+     * @param  <T>
+     *         The type of the socket option value
+     *
      * @param  name
      *         The socket option
      *
@@ -464,6 +470,9 @@
      * ignored if given. However, if the option is association specific then the
      * association must be given.
      *
+     * @param   <T>
+     *          The type of the socket option value
+     *
      * @param   name
      *          The socket option
      *
@@ -567,6 +576,9 @@
      * the {@code receive} method of this channel, if it does an
      * {@link IllegalReceiveException} will be thrown.
      *
+     * @param  <T>
+     *         The type of the attachment
+     *
      * @param  buffer
      *         The buffer into which bytes are to be transferred
      *
@@ -673,7 +685,7 @@
      *          there was insufficient room for the message in the underlying
      *          output buffer
      *
-     * @throws  InvalidStreamExcepton
+     * @throws  InvalidStreamException
      *          If {@code streamNumber} is negative, or if an association already
      *          exists and {@code streamNumber} is greater than the maximum number
      *          of outgoing streams
--- a/src/share/classes/com/sun/nio/sctp/SctpServerChannel.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/nio/sctp/SctpServerChannel.java	Thu Oct 03 19:06:43 2013 +0100
@@ -47,7 +47,7 @@
  * {@link #setOption(SctpSocketOption,Object) setOption} method. SCTP server socket
  * channels support the following options:
  * <blockquote>
- * <table border>
+ * <table border summary="Socket options">
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
@@ -345,6 +345,9 @@
     /**
      * Returns the value of a socket option.
      *
+     * @param   <T>
+     *          The type of the socket option value
+     *
      * @param   name
      *          The socket option
      *
@@ -367,6 +370,9 @@
     /**
      * Sets the value of a socket option.
      *
+     * @param   <T>
+     *          The type of the socket option value
+     *
      * @param   name
      *          The socket option
      *
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -44,7 +44,7 @@
 cachedrowsetimpl.dtypemismt = \uB370\uC774\uD130 \uC720\uD615\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 
 cachedrowsetimpl.datefail = {1} \uC5F4\uC758 \uAC12({0})\uC5D0\uC11C getDate\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 cachedrowsetimpl.timefail = {1} \uC5F4\uC758 \uAC12({0})\uC5D0\uC11C getTime\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-cachedrowsetimpl.posupdate = \uC704\uCE58\uAC00 \uC9C0\uC815\uB41C \uAC31\uC2E0\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+cachedrowsetimpl.posupdate = \uC704\uCE58\uAC00 \uC9C0\uC815\uB41C \uC5C5\uB370\uC774\uD2B8\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 cachedrowsetimpl.unableins = \uC778\uC2A4\uD134\uC2A4\uD654\uD560 \uC218 \uC5C6\uC74C: {0}
 cachedrowsetimpl.beforefirst = beforeFirst: \uCEE4\uC11C \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
 cachedrowsetimpl.first = \uCC98\uC74C: \uCEE4\uC11C \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
@@ -110,7 +110,7 @@
 jdbcrowsetimpl.unsetmatch = \uC124\uC815\uC744 \uD574\uC81C\uD558\uB824\uB294 \uC5F4\uC774 \uC124\uC815\uB41C \uC5F4\uACFC \uB2E4\uB985\uB2C8\uB2E4.
 jdbcrowsetimpl.usecolname = \uC5F4 \uC774\uB984\uC744 unsetMatchColumn\uC758 \uC778\uC218\uB85C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
 jdbcrowsetimpl.usecolid = \uC5F4 ID\uB97C unsetMatchColumn\uC758 \uC778\uC218\uB85C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
-jdbcrowsetimpl.resnotupd = ResultSet\uB97C \uAC31\uC2E0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+jdbcrowsetimpl.resnotupd = ResultSet\uB97C \uC5C5\uB370\uC774\uD2B8\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 jdbcrowsetimpl.opnotysupp = \uC791\uC5C5\uC774 \uC544\uC9C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 jdbcrowsetimpl.featnotsupp = \uAE30\uB2A5\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 
@@ -157,7 +157,7 @@
 xmlrch.errinsert = insert \uD589\uC744 \uC0DD\uC131\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0}
 xmlrch.errinsdel = insdel \uD589\uC744 \uC0DD\uC131\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0}
 xmlrch.errupdate = update \uD589\uC744 \uC0DD\uC131\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0}
-xmlrch.errupdrow = \uD589\uC744 \uAC31\uC2E0\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0}
+xmlrch.errupdrow = \uD589\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0}
 xmlrch.chars = \uBB38\uC790:
 xmlrch.badvalue = \uC798\uBABB\uB41C \uAC12: \uB110\uC77C \uC218 \uC5C6\uB294 \uC18D\uC131\uC785\uB2C8\uB2E4.
 xmlrch.badvalue1 = \uC798\uBABB\uB41C \uAC12: \uB110\uC77C \uC218 \uC5C6\uB294 \uBA54\uD0C0 \uB370\uC774\uD130\uC785\uB2C8\uB2E4.
--- a/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -46,7 +46,7 @@
 FileChooser.openButton.textAndMnemonic=\uC5F4\uAE30(&O)
 FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
 FileChooser.openDialogTitle.textAndMnemonic=\uC5F4\uAE30
-FileChooser.updateButton.textAndMnemonic=\uAC31\uC2E0(&U)
+FileChooser.updateButton.textAndMnemonic=\uC5C5\uB370\uC774\uD2B8(&U)
 FileChooser.helpButton.textAndMnemonic=\uB3C4\uC6C0\uB9D0(&H)
 FileChooser.directoryOpenButton.textAndMnemonic=\uC5F4\uAE30(&O)
 
@@ -66,7 +66,7 @@
 FileChooser.cancelButtonToolTip.textAndMnemonic=\uD30C\uC77C \uC120\uD0DD\uAE30 \uB300\uD654\uC0C1\uC790 \uC911\uB2E8
 FileChooser.saveButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uD30C\uC77C \uC800\uC7A5
 FileChooser.openButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uD30C\uC77C \uC5F4\uAE30
-FileChooser.updateButtonToolTip.textAndMnemonic=\uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D \uAC31\uC2E0
+FileChooser.updateButtonToolTip.textAndMnemonic=\uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D \uC5C5\uB370\uC774\uD2B8
 FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \uB3C4\uC6C0\uB9D0
 FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uB514\uB809\uD1A0\uB9AC \uC5F4\uAE30
 
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	Thu Oct 03 19:06:43 2013 +0100
@@ -20,8 +20,8 @@
 
 FileChooser.lookInLabel.textAndMnemonic=Leta &i:
 FileChooser.saveInLabel.textAndMnemonic=Spara i:
-FileChooser.fileNameLabel.textAndMnemonic=Fil&namn:
-FileChooser.folderNameLabel.textAndMnemonic=Mapp&namn:
+FileChooser.fileNameLabel.textAndMnemonic=&Fil:
+FileChooser.folderNameLabel.textAndMnemonic=&Mapp:
 FileChooser.filesOfTypeLabel.textAndMnemonic=Mapp&namn:
 FileChooser.upFolderToolTip.textAndMnemonic=Upp en niv\u00E5
 FileChooser.upFolderAccessibleName=Upp
--- a/src/share/classes/com/sun/tools/jdi/SunCommandLineLauncher.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/com/sun/tools/jdi/SunCommandLineLauncher.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -196,19 +196,7 @@
 
         try {
             if (home.length() > 0) {
-                /*
-                 * A wrinkle in the environment:
-                 * 64-bit executables are stored under $JAVA_HOME/bin/os_arch
-                 * 32-bit executables are stored under $JAVA_HOME/bin
-                 */
-                String os_arch = System.getProperty("os.arch");
-                if ("SunOS".equals(System.getProperty("os.name")) &&
-                   ("sparcv9".equals(os_arch) || "amd64".equals(os_arch))) {
-                    exePath = home + File.separator + "bin" + File.separator +
-                        os_arch + File.separator + exe;
-                } else {
-                    exePath = home + File.separator + "bin" + File.separator + exe;
-                }
+                exePath = home + File.separator + "bin" + File.separator + exe;
             } else {
                 exePath = exe;
             }
--- a/src/share/classes/java/awt/AWTKeyStroke.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/AWTKeyStroke.java	Thu Oct 03 19:06:43 2013 +0100
@@ -67,7 +67,7 @@
 public class AWTKeyStroke implements Serializable {
     static final long serialVersionUID = -6430539691155161871L;
 
-    private static Map modifierKeywords;
+    private static Map<String, Integer> modifierKeywords;
     /**
      * Associates VK_XXX (as a String) with code (as Integer). This is
      * done to avoid the overhead of the reflective call to find the
@@ -85,8 +85,8 @@
      * AWTKeyStroke class.
      * Must be called under locked AWTKeyStro
      */
-    private static Class getAWTKeyStrokeClass() {
-        Class clazz = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
+    private static Class<AWTKeyStroke> getAWTKeyStrokeClass() {
+        Class<AWTKeyStroke> clazz = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
         if (clazz == null) {
             clazz = AWTKeyStroke.class;
             AppContext.getAppContext().put(AWTKeyStroke.class, AWTKeyStroke.class);
@@ -182,7 +182,7 @@
             throw new IllegalArgumentException("subclass cannot be null");
         }
         synchronized (AWTKeyStroke.class) {
-            Class keyStrokeClass = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
+            Class<AWTKeyStroke> keyStrokeClass = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
             if (keyStrokeClass != null && keyStrokeClass.equals(subclass)){
                 // Already registered
                 return;
@@ -229,8 +229,8 @@
      */
     private static Constructor getCtor(final Class clazz)
     {
-        Object ctor = AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+        Constructor ctor = AccessController.doPrivileged(new PrivilegedAction<Constructor>() {
+            public Constructor run() {
                 try {
                     Constructor ctor = clazz.getDeclaredConstructor((Class[]) null);
                     if (ctor != null) {
@@ -249,17 +249,17 @@
     private static synchronized AWTKeyStroke getCachedStroke
         (char keyChar, int keyCode, int modifiers, boolean onKeyRelease)
     {
-        Map cache = (Map)AppContext.getAppContext().get(APP_CONTEXT_CACHE_KEY);
+        Map<AWTKeyStroke, AWTKeyStroke> cache = (Map)AppContext.getAppContext().get(APP_CONTEXT_CACHE_KEY);
         AWTKeyStroke cacheKey = (AWTKeyStroke)AppContext.getAppContext().get(APP_CONTEXT_KEYSTROKE_KEY);
 
         if (cache == null) {
-            cache = new HashMap();
+            cache = new HashMap<>();
             AppContext.getAppContext().put(APP_CONTEXT_CACHE_KEY, cache);
         }
 
         if (cacheKey == null) {
             try {
-                Class clazz = getAWTKeyStrokeClass();
+                Class<AWTKeyStroke> clazz = getAWTKeyStrokeClass();
                 cacheKey = (AWTKeyStroke)getCtor(clazz).newInstance((Object[]) null);
                 AppContext.getAppContext().put(APP_CONTEXT_KEYSTROKE_KEY, cacheKey);
             } catch (InstantiationException e) {
@@ -485,11 +485,11 @@
      * If typed, pressed or released is not specified, pressed is assumed. Here
      * are some examples:
      * <pre>
-     *     "INSERT" => getAWTKeyStroke(KeyEvent.VK_INSERT, 0);
-     *     "control DELETE" => getAWTKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
-     *     "alt shift X" => getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
-     *     "alt shift released X" => getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
-     *     "typed a" => getAWTKeyStroke('a');
+     *     "INSERT" =&gt; getAWTKeyStroke(KeyEvent.VK_INSERT, 0);
+     *     "control DELETE" =&gt; getAWTKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
+     *     "alt shift X" =&gt; getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
+     *     "alt shift released X" =&gt; getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
+     *     "typed a" =&gt; getAWTKeyStroke('a');
      * </pre>
      *
      * @param s a String formatted as described above
@@ -513,7 +513,7 @@
 
         synchronized (AWTKeyStroke.class) {
             if (modifierKeywords == null) {
-                Map uninitializedMap = new HashMap(8, 1.0f);
+                Map<String, Integer> uninitializedMap = new HashMap<>(8, 1.0f);
                 uninitializedMap.put("shift",
                                      Integer.valueOf(InputEvent.SHIFT_DOWN_MASK
                                                      |InputEvent.SHIFT_MASK));
@@ -861,12 +861,12 @@
 }
 
 class VKCollection {
-    Map code2name;
-    Map name2code;
+    Map<Integer, String> code2name;
+    Map<String, Integer> name2code;
 
     public VKCollection() {
-        code2name = new HashMap();
-        name2code = new HashMap();
+        code2name = new HashMap<>();
+        name2code = new HashMap<>();
     }
 
     public synchronized void put(String name, Integer code) {
--- a/src/share/classes/java/awt/CardLayout.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/CardLayout.java	Thu Oct 03 19:06:43 2013 +0100
@@ -66,7 +66,7 @@
      * pairs of components and their names.
      * @see java.util.Vector
      */
-    Vector vector = new Vector();
+    Vector<Card> vector = new Vector<>();
 
     /*
      * A pair of Component and String that represents its name.
@@ -570,10 +570,10 @@
 
         if (f.defaulted("vector")) {
             //  pre-1.4 stream
-            Hashtable tab = (Hashtable)f.get("tab", null);
-            vector = new Vector();
+            Hashtable<String, Component> tab = (Hashtable)f.get("tab", null);
+            vector = new Vector<>();
             if (tab != null && !tab.isEmpty()) {
-                for (Enumeration e = tab.keys() ; e.hasMoreElements() ; ) {
+                for (Enumeration<String> e = tab.keys() ; e.hasMoreElements() ; ) {
                     String key = (String)e.nextElement();
                     Component comp = (Component)tab.get(key);
                     vector.add(new Card(key, comp));
@@ -594,7 +594,7 @@
     private void writeObject(ObjectOutputStream s)
         throws IOException
     {
-        Hashtable tab = new Hashtable();
+        Hashtable<String, Component> tab = new Hashtable<>();
         int ncomponents = vector.size();
         for (int i = 0; i < ncomponents; i++) {
             Card card = (Card)vector.get(i);
--- a/src/share/classes/java/awt/Component.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/Component.java	Thu Oct 03 19:06:43 2013 +0100
@@ -972,6 +972,10 @@
             public AccessControlContext getAccessControlContext(Component comp) {
                 return comp.getAccessControlContext();
             }
+
+            public void revalidateSynchronously(Component comp) {
+                comp.revalidateSynchronously();
+            }
         });
     }
 
@@ -2022,7 +2026,7 @@
      * @return an instance of <code>Point</code> representing
      *          the top-left corner of the component's bounds in the
      *          coordinate space of the screen
-     * @throws <code>IllegalComponentStateException</code> if the
+     * @throws IllegalComponentStateException if the
      *          component is not showing on the screen
      * @see #setLocation
      * @see #getLocation
@@ -2977,6 +2981,13 @@
      * @since 1.7
      */
     public void revalidate() {
+        revalidateSynchronously();
+    }
+
+    /**
+     * Revalidates the component synchronously.
+     */
+    final void revalidateSynchronously() {
         synchronized (getTreeLock()) {
             invalidate();
 
--- a/src/share/classes/java/awt/Container.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/Container.java	Thu Oct 03 19:06:43 2013 +0100
@@ -258,6 +258,12 @@
             public void validateUnconditionally(Container cont) {
                 cont.validateUnconditionally();
             }
+
+            @Override
+            public Component findComponentAt(Container cont, int x, int y,
+                    boolean ignoreEnabled) {
+                return cont.findComponentAt(x, y, ignoreEnabled);
+            }
         });
     }
 
@@ -2651,7 +2657,6 @@
      * behavior. Setting 'ignoreEnabled' to 'false' bypasses disabled
      * Components during the search. This behavior is used by the
      * lightweight cursor support in sun.awt.GlobalCursorManager.
-     * The cursor code calls this function directly via native code.
      *
      * The addition of this feature is temporary, pending the
      * adoption of new, public API which exports this feature.
--- a/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java	Thu Oct 03 19:06:43 2013 +0100
@@ -85,7 +85,7 @@
      * list should be reused if possible.
      */
     transient private Container cachedRoot;
-    transient private List cachedCycle;
+    transient private List<Component> cachedCycle;
 
     /*
      * We suppose to use getFocusTraversalCycle & getComponentIndex methods in order
@@ -111,7 +111,7 @@
         return cycle.indexOf(aComponent);
     }
 
-    private void enumerateCycle(Container container, List cycle) {
+    private void enumerateCycle(Container container, List<Component> cycle) {
         if (!(container.isVisible() && container.isDisplayable())) {
             return;
         }
--- a/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Thu Oct 03 19:06:43 2013 +0100
@@ -808,13 +808,13 @@
             }
         }
         boolean stopPostProcessing = false;
-        java.util.List processors = getKeyEventPostProcessors();
+        java.util.List<KeyEventPostProcessor> processors = getKeyEventPostProcessors();
         if (processors != null) {
-            for (java.util.Iterator iter = processors.iterator();
+            for (java.util.Iterator<KeyEventPostProcessor> iter = processors.iterator();
                  !stopPostProcessing && iter.hasNext(); )
             {
-                stopPostProcessing = (((KeyEventPostProcessor)(iter.next())).
-                            postProcessKeyEvent(e));
+                stopPostProcessing = iter.next().
+                            postProcessKeyEvent(e);
             }
         }
         if (!stopPostProcessing) {
@@ -1059,12 +1059,12 @@
             return true;
         }
 
-        java.util.List dispatchers = getKeyEventDispatchers();
+        java.util.List<KeyEventDispatcher> dispatchers = getKeyEventDispatchers();
         if (dispatchers != null) {
-            for (java.util.Iterator iter = dispatchers.iterator();
+            for (java.util.Iterator<KeyEventDispatcher> iter = dispatchers.iterator();
                  iter.hasNext(); )
              {
-                 if (((KeyEventDispatcher)(iter.next())).
+                 if (iter.next().
                      dispatchKeyEvent(ke))
                  {
                      return true;
@@ -1131,7 +1131,7 @@
                 oppStroke = AWTKeyStroke.getAWTKeyStroke(stroke.getKeyCode(),
                                                  stroke.getModifiers(),
                                                  !stroke.isOnKeyRelease());
-            Set toTest;
+            Set<AWTKeyStroke> toTest;
             boolean contains, containsOpp;
 
             toTest = focusedComponent.getFocusTraversalKeys(
@@ -1246,7 +1246,7 @@
      * any) should be cancelled.
      *
      * @param after the timestamp specified in the call to
-     *        <code>enqueueKeyEvents</code>, or any value < 0
+     *        <code>enqueueKeyEvents</code>, or any value &lt; 0
      * @param untilFocused the Component specified in the call to
      *        <code>enqueueKeyEvents</code>
      * @see #enqueueKeyEvents
--- a/src/share/classes/java/awt/Dialog.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/Dialog.java	Thu Oct 03 19:06:43 2013 +0100
@@ -61,7 +61,7 @@
  * <p>
  * The default layout for a dialog is <code>BorderLayout</code>.
  * <p>
- * A dialog may have its native decorations (i.e. Frame & Titlebar) turned off
+ * A dialog may have its native decorations (i.e. Frame &amp; Titlebar) turned off
  * with <code>setUndecorated</code>.  This can only be done while the dialog
  * is not {@link Component#isDisplayable() displayable}.
  * <p>
--- a/src/share/classes/java/awt/Event.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/Event.java	Thu Oct 03 19:06:43 2013 +0100
@@ -524,7 +524,7 @@
      * This field has been replaced by MouseEvent.getClickCount().
      *
      * @serial
-     * @see java.awt.event.MouseEvent#getClickCount().
+     * @see java.awt.event.MouseEvent#getClickCount()
      */
     public int clickCount;
 
--- a/src/share/classes/java/awt/EventQueue.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/EventQueue.java	Thu Oct 03 19:06:43 2013 +0100
@@ -690,7 +690,10 @@
         final Object src = event.getSource();
         final PrivilegedAction<Void> action = new PrivilegedAction<Void>() {
             public Void run() {
-                if (fwDispatcher == null) {
+                // In case fwDispatcher is installed and we're already on the
+                // dispatch thread (e.g. performing DefaultKeyboardFocusManager.sendMessage),
+                // dispatch the event straight away.
+                if (fwDispatcher == null || isDispatchThreadImpl()) {
                     dispatchEventImpl(event, src);
                 } else {
                     fwDispatcher.scheduleDispatch(new Runnable() {
--- a/src/share/classes/java/awt/Frame.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/Frame.java	Thu Oct 03 19:06:43 2013 +0100
@@ -265,12 +265,12 @@
      *
      * <p>Note that the correct test for frame being fully maximized is
      * <pre>
-     *     (state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
+     *     (state &amp; Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
      * </pre>
      *
      * <p>To test is frame is maximized in <em>some</em> direction use
      * <pre>
-     *     (state & Frame.MAXIMIZED_BOTH) != 0
+     *     (state &amp; Frame.MAXIMIZED_BOTH) != 0
      * </pre>
      *
      * @see #setExtendedState(int)
--- a/src/share/classes/java/awt/GradientPaintContext.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/GradientPaintContext.java	Thu Oct 03 19:06:43 2013 +0100
@@ -41,7 +41,7 @@
         new DirectColorModel(24, 0x000000ff, 0x0000ff00, 0x00ff0000);
 
     static ColorModel cachedModel;
-    static WeakReference cached;
+    static WeakReference<Raster> cached;
 
     static synchronized Raster getCachedRaster(ColorModel cm, int w, int h) {
         if (cm == cachedModel) {
@@ -76,7 +76,7 @@
             }
         }
         cachedModel = cm;
-        cached = new WeakReference(ras);
+        cached = new WeakReference<>(ras);
     }
 
     double x1;
--- a/src/share/classes/java/awt/GraphicsEnvironment.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/GraphicsEnvironment.java	Thu Oct 03 19:06:43 2013 +0100
@@ -95,18 +95,18 @@
         String nm = AccessController.doPrivileged(new GetPropertyAction("java.awt.graphicsenv", null));
         try {
 //          long t0 = System.currentTimeMillis();
-            Class geCls;
+            Class<GraphicsEnvironment> geCls;
             try {
                 // First we try if the bootclassloader finds the requested
                 // class. This way we can avoid to run in a privileged block.
-                geCls = Class.forName(nm);
+                geCls = (Class<GraphicsEnvironment>)Class.forName(nm);
             } catch (ClassNotFoundException ex) {
                 // If the bootclassloader fails, we try again with the
                 // application classloader.
                 ClassLoader cl = ClassLoader.getSystemClassLoader();
-                geCls = Class.forName(nm, true, cl);
+                geCls = (Class<GraphicsEnvironment>)Class.forName(nm, true, cl);
             }
-            ge = (GraphicsEnvironment) geCls.newInstance();
+            ge = geCls.newInstance();
 //          long t1 = System.currentTimeMillis();
 //          System.out.println("GE creation took " + (t1-t0)+ "ms.");
             if (isHeadless()) {
@@ -161,7 +161,7 @@
     private static boolean getHeadlessProperty() {
         if (headless == null) {
             java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction() {
+            new java.security.PrivilegedAction<Object>() {
                 public Object run() {
                     String nm = System.getProperty("java.awt.headless");
 
--- a/src/share/classes/java/awt/GridBagConstraints.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/GridBagConstraints.java	Thu Oct 03 19:06:43 2013 +0100
@@ -30,7 +30,7 @@
  * <code>GridBagLayout</code> class.
  *
  * @author Doug Stein
- * @author Bill Spitzak (orignial NeWS & OLIT implementation)
+ * @author Bill Spitzak (orignial NeWS &amp; OLIT implementation)
  * @see java.awt.GridBagLayout
  * @since JDK1.0
  */
--- a/src/share/classes/java/awt/GridBagLayout.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/GridBagLayout.java	Thu Oct 03 19:06:43 2013 +0100
@@ -120,9 +120,9 @@
  * Orientation relative values are interpreted relative to the container's
  * <code>ComponentOrientation</code> property while absolute values
  * are not.  Baseline relative values are calculated relative to the
- * baseline.  Valid values are:</dd>
+ * baseline.  Valid values are:
  * <p>
- * <center><table BORDER=0 COLS=3 WIDTH=800
+ * <center><table BORDER=0 WIDTH=800
  *        SUMMARY="absolute, relative and baseline values as described above">
  * <tr>
  * <th><P ALIGN="LEFT">Absolute Values</th>
@@ -131,6 +131,7 @@
  * </tr>
  * <tr>
  * <td>
+ * <ul style="list-style-type:none">
  * <li><code>GridBagConstraints.NORTH</code></li>
  * <li><code>GridBagConstraints.SOUTH</code></li>
  * <li><code>GridBagConstraints.WEST</code></li>
@@ -140,8 +141,10 @@
  * <li><code>GridBagConstraints.SOUTHWEST</code></li>
  * <li><code>GridBagConstraints.SOUTHEAST</code></li>
  * <li><code>GridBagConstraints.CENTER</code> (the default)</li>
+ * </ul>
  * </td>
  * <td>
+ * <ul style="list-style-type:none">
  * <li><code>GridBagConstraints.PAGE_START</code></li>
  * <li><code>GridBagConstraints.PAGE_END</code></li>
  * <li><code>GridBagConstraints.LINE_START</code></li>
@@ -150,8 +153,10 @@
  * <li><code>GridBagConstraints.FIRST_LINE_END</code></li>
  * <li><code>GridBagConstraints.LAST_LINE_START</code></li>
  * <li><code>GridBagConstraints.LAST_LINE_END</code></li>
+ * </ul>
  * </td>
  * <td>
+ * <ul style="list-style-type:none">
  * <li><code>GridBagConstraints.BASELINE</code></li>
  * <li><code>GridBagConstraints.BASELINE_LEADING</code></li>
  * <li><code>GridBagConstraints.BASELINE_TRAILING</code></li>
@@ -161,9 +166,10 @@
  * <li><code>GridBagConstraints.BELOW_BASELINE</code></li>
  * <li><code>GridBagConstraints.BELOW_BASELINE_LEADING</code></li>
  * <li><code>GridBagConstraints.BELOW_BASELINE_TRAILING</code></li>
+ * </ul>
  * </td>
  * </tr>
- * </table></center><p>
+ * </table></center>
  * <dt>{@link GridBagConstraints#weightx},
  * {@link GridBagConstraints#weighty}
  * <dd>Used to determine how to distribute space, which is
@@ -246,7 +252,7 @@
  * left-to-right container and Figure 3 shows the layout for a horizontal,
  * right-to-left container.
  * <p>
- * <center><table COLS=2 WIDTH=600 summary="layout">
+ * <center><table WIDTH=600 summary="layout">
  * <tr ALIGN=CENTER>
  * <td>
  * <img src="doc-files/GridBagLayout-1.gif" alt="The preceeding text describes this graphic (Figure 1)." ALIGN=center HSPACE=10 VSPACE=7>
@@ -349,7 +355,7 @@
  * </pre></blockquote><hr>
  * <p>
  * @author Doug Stein
- * @author Bill Spitzak (orignial NeWS & OLIT implementation)
+ * @author Bill Spitzak (orignial NeWS &amp; OLIT implementation)
  * @see       java.awt.GridBagConstraints
  * @see       java.awt.GridBagLayoutInfo
  * @see       java.awt.ComponentOrientation
--- a/src/share/classes/java/awt/GridLayout.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/GridLayout.java	Thu Oct 03 19:06:43 2013 +0100
@@ -55,7 +55,7 @@
  * If the container's <code>ComponentOrientation</code> property is horizontal
  * and right-to-left, the example produces the output shown in Figure 2.
  * <p>
- * <center><table COLS=2 WIDTH=600 summary="layout">
+ * <center><table WIDTH=600 summary="layout">
  * <tr ALIGN=CENTER>
  * <td><img SRC="doc-files/GridLayout-1.gif"
  *      alt="Shows 6 buttons in rows of 2. Row 1 shows buttons 1 then 2.
--- a/src/share/classes/java/awt/KeyboardFocusManager.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/KeyboardFocusManager.java	Thu Oct 03 19:06:43 2013 +0100
@@ -348,7 +348,7 @@
      * Component of those Windows that has no such array of its own explicitly
      * set.
      */
-    private Set[] defaultFocusTraversalKeys = new Set[4];
+    private Set<AWTKeyStroke>[] defaultFocusTraversalKeys = new Set[4];
 
     /**
      * The current focus cycle root. If the focus owner is itself a focus cycle
@@ -376,7 +376,7 @@
      * KeyEventDispatchers are registered, this field may be null or refer to
      * a List of length 0.
      */
-    private java.util.LinkedList keyEventDispatchers;
+    private java.util.LinkedList<KeyEventDispatcher> keyEventDispatchers;
 
     /**
      * This KeyboardFocusManager's KeyEventPostProcessor chain. The List does
@@ -385,12 +385,12 @@
      * If no other KeyEventPostProcessors are registered, this field may be
      * null or refer to a List of length 0.
      */
-    private java.util.LinkedList keyEventPostProcessors;
+    private java.util.LinkedList<KeyEventPostProcessor> keyEventPostProcessors;
 
     /**
      * Maps Windows to those Windows' most recent focus owners.
      */
-    private static java.util.Map mostRecentFocusOwners = new WeakHashMap();
+    private static java.util.Map<Window, WeakReference<Component>> mostRecentFocusOwners = new WeakHashMap<>();
 
     /**
      * We cache the permission used to verify that the calling thread is
@@ -431,7 +431,7 @@
      */
     public KeyboardFocusManager() {
         for (int i = 0; i < TRAVERSAL_KEY_LENGTH; i++) {
-            Set work_set = new HashSet();
+            Set<AWTKeyStroke> work_set = new HashSet<>();
             for (int j = 0; j < defaultFocusTraversalKeyStrokes[i].length; j++) {
                 work_set.add(defaultFocusTraversalKeyStrokes[i][j]);
             }
@@ -1125,7 +1125,7 @@
             throw new IllegalArgumentException("cannot set null Set of default focus traversal keys");
         }
 
-        Set oldKeys;
+        Set<AWTKeyStroke> oldKeys;
 
         synchronized (this) {
             for (AWTKeyStroke keystroke : keystrokes) {
@@ -1153,7 +1153,7 @@
 
             oldKeys = defaultFocusTraversalKeys[id];
             defaultFocusTraversalKeys[id] =
-                Collections.unmodifiableSet(new HashSet(keystrokes));
+                Collections.unmodifiableSet(new HashSet<>(keystrokes));
         }
 
         firePropertyChange(defaultFocusTraversalKeyPropertyNames[id],
@@ -1699,7 +1699,7 @@
         if (dispatcher != null) {
             synchronized (this) {
                 if (keyEventDispatchers == null) {
-                    keyEventDispatchers = new java.util.LinkedList();
+                    keyEventDispatchers = new java.util.LinkedList<>();
                 }
                 keyEventDispatchers.add(dispatcher);
             }
@@ -1787,7 +1787,7 @@
         if (processor != null) {
             synchronized (this) {
                 if (keyEventPostProcessors == null) {
-                    keyEventPostProcessors = new java.util.LinkedList();
+                    keyEventPostProcessors = new java.util.LinkedList<>();
                 }
                 keyEventPostProcessors.add(processor);
             }
@@ -1865,9 +1865,9 @@
         // of Component.parent fields.  Since WeakHasMap refers to its
         // values strongly, we need to break the strong link from the
         // value (component) back to its key (window).
-        WeakReference weakValue = null;
+        WeakReference<Component> weakValue = null;
         if (component != null) {
-            weakValue = new WeakReference(component);
+            weakValue = new WeakReference<>(component);
         }
         mostRecentFocusOwners.put(window, weakValue);
     }
@@ -1906,7 +1906,7 @@
      * javax.swing.JComponent.runInputVerifier() using reflection.
      */
     static synchronized Component getMostRecentFocusOwner(Window window) {
-        WeakReference weakValue =
+        WeakReference<Component> weakValue =
             (WeakReference)mostRecentFocusOwners.get(window);
         return weakValue == null ? null : (Component)weakValue.get();
     }
@@ -2034,7 +2034,7 @@
      * oldest</b> timestamp (if any) should be cancelled.
      *
      * @param after the timestamp specified in the call to
-     *        <code>enqueueKeyEvents</code>, or any value < 0
+     *        <code>enqueueKeyEvents</code>, or any value &lt; 0
      * @param untilFocused the Component specified in the call to
      *        <code>enqueueKeyEvents</code>
      * @see #enqueueKeyEvents
@@ -2649,11 +2649,11 @@
                 Component lastFocusOwner = null;
                 Component currentFocusOwner = null;
 
-                for (Iterator iter = localLightweightRequests.iterator(); iter.hasNext(); ) {
+                for (Iterator<KeyboardFocusManager.LightweightFocusRequest> iter = localLightweightRequests.iterator(); iter.hasNext(); ) {
 
                     currentFocusOwner = manager.getGlobalFocusOwner();
                     LightweightFocusRequest lwFocusRequest =
-                        (LightweightFocusRequest)iter.next();
+                        iter.next();
 
                     /*
                      * WARNING: This is based on DKFM's logic solely!
@@ -2978,12 +2978,12 @@
             if (hwFocusRequest != null) {
                 heavyweightRequests.removeFirst();
                 if (hwFocusRequest.lightweightRequests != null) {
-                    for (Iterator lwIter = hwFocusRequest.lightweightRequests.
+                    for (Iterator<KeyboardFocusManager.LightweightFocusRequest> lwIter = hwFocusRequest.lightweightRequests.
                              iterator();
                          lwIter.hasNext(); )
                     {
                         manager.dequeueKeyEvents
-                            (-1, ((LightweightFocusRequest)lwIter.next()).
+                            (-1, lwIter.next().
                              component);
                     }
                 }
@@ -3063,8 +3063,8 @@
     // Accessor to private field isProxyActive of KeyEvent
     private static boolean isProxyActiveImpl(KeyEvent e) {
         if (proxyActive == null) {
-            proxyActive = (Field) AccessController.doPrivileged(new PrivilegedAction() {
-                    public Object run() {
+            proxyActive =  AccessController.doPrivileged(new PrivilegedAction<Field>() {
+                    public Field run() {
                         Field field = null;
                         try {
                             field = KeyEvent.class.getDeclaredField("isProxyActive");
--- a/src/share/classes/java/awt/MenuBar.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/MenuBar.java	Thu Oct 03 19:06:43 2013 +0100
@@ -43,7 +43,7 @@
  * This is what a menu bar might look like:
  * <p>
  * <img src="doc-files/MenuBar-1.gif"
- * <alt="Diagram of MenuBar containing 2 menus: Examples and Options.
+ * alt="Diagram of MenuBar containing 2 menus: Examples and Options.
  * Examples menu is expanded showing items: Basic, Simple, Check, and More Examples."
  * ALIGN=center HSPACE=10 VSPACE=7>
  * <p>
--- a/src/share/classes/java/awt/ScrollPane.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/ScrollPane.java	Thu Oct 03 19:06:43 2013 +0100
@@ -247,7 +247,7 @@
      * component is removed and the new one is added.
      * @param comp the component to be added
      * @param constraints  not applicable
-     * @param index position of child component (must be <= 0)
+     * @param index position of child component (must be &lt;= 0)
      */
     protected final void addImpl(Component comp, Object constraints, int index) {
         synchronized (getTreeLock()) {
--- a/src/share/classes/java/awt/ScrollPaneAdjustable.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/ScrollPaneAdjustable.java	Thu Oct 03 19:06:43 2013 +0100
@@ -220,7 +220,7 @@
      * This method is public for this class to properly implement
      * <code>Adjustable</code> interface.
      *
-     * @throws <code>AWTError</code>  Always throws an error when called.
+     * @throws AWTError Always throws an error when called.
      */
     public void setMinimum(int min) {
         throw new AWTError(SCROLLPANE_ONLY);
@@ -237,7 +237,7 @@
      * This method is public for this class to properly implement
      * <code>Adjustable</code> interface.
      *
-     * @throws <code>AWTError</code>  Always throws an error when called.
+     * @throws AWTError Always throws an error when called.
      */
     public void setMaximum(int max) {
         throw new AWTError(SCROLLPANE_ONLY);
@@ -274,7 +274,7 @@
      * This method is public for this class to properly implement
      * <code>Adjustable</code> interface.
      *
-     * @throws <code>AWTError</code>  Always throws an error when called.
+     * @throws AWTError Always throws an error when called.
      */
     public void setVisibleAmount(int v) {
         throw new AWTError(SCROLLPANE_ONLY);
--- a/src/share/classes/java/awt/Scrollbar.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/Scrollbar.java	Thu Oct 03 19:06:43 2013 +0100
@@ -715,6 +715,9 @@
      * The unit increment must be greater than zero.
      * Attepts to set the unit increment to a value lower than 1
      * will result in a value of 1 being set.
+     * <p>
+     * In some operating systems, this property
+     * can be ignored by the underlying controls.
      *
      * @param        v  the amount by which to increment or decrement
      *                         the scroll bar's value
@@ -752,6 +755,9 @@
      * scroll bar, generally through a mouse or keyboard gesture
      * that the scroll bar receives as an adjustment event.
      * The unit increment must be greater than zero.
+     * <p>
+     * In some operating systems, this property
+     * can be ignored by the underlying controls.
      *
      * @return      the unit increment of this scroll bar
      * @see         java.awt.Scrollbar#setUnitIncrement
--- a/src/share/classes/java/awt/SequencedEvent.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/SequencedEvent.java	Thu Oct 03 19:06:43 2013 +0100
@@ -49,7 +49,7 @@
 
     private static final int ID =
         java.awt.event.FocusEvent.FOCUS_LAST + 1;
-    private static final LinkedList list = new LinkedList();
+    private static final LinkedList<SequencedEvent> list = new LinkedList<>();
 
     private final AWTEvent nested;
     private AppContext appContext;
--- a/src/share/classes/java/awt/SystemTray.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/SystemTray.java	Thu Oct 03 19:06:43 2013 +0100
@@ -63,8 +63,8 @@
  *
  * <p>The following code snippet demonstrates how to access
  * and customize the system tray:
+ * <pre>
  * <code>
- * <pre>
  *     {@link TrayIcon} trayIcon = null;
  *     if (SystemTray.isSupported()) {
  *         // get the SystemTray instance
@@ -109,8 +109,8 @@
  *         trayIcon.{@link TrayIcon#setImage(java.awt.Image) setImage}(updatedImage);
  *     }
  *     // ...
+ * </code>
  * </pre>
- * </code>
  *
  * @since 1.6
  * @see TrayIcon
--- a/src/share/classes/java/awt/TextComponent.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/TextComponent.java	Thu Oct 03 19:06:43 2013 +0100
@@ -35,6 +35,7 @@
 import javax.swing.text.AttributeSet;
 import javax.accessibility.*;
 import java.awt.im.InputMethodRequests;
+import sun.security.util.SecurityConstants;
 
 /**
  * The <code>TextComponent</code> class is the superclass of
@@ -728,7 +729,7 @@
         SecurityManager sm = System.getSecurityManager();
         if (sm == null) return true;
         try {
-            sm.checkSystemClipboardAccess();
+            sm.checkPermission(SecurityConstants.AWT.ACCESS_CLIPBOARD_PERMISSION);
             return true;
         } catch (SecurityException e) {}
         return false;
@@ -971,7 +972,7 @@
          * coordinates.  If the index is invalid a null rectangle
          * is returned.
          *
-         * @param i the index into the String >= 0
+         * @param i the index into the String &gt;= 0
          * @return the screen coordinates of the character's bounding box
          */
         public Rectangle getCharacterBounds(int i) {
@@ -981,7 +982,7 @@
         /**
          * Returns the number of characters (valid indicies)
          *
-         * @return the number of characters >= 0
+         * @return the number of characters &gt;= 0
          */
         public int getCharCount() {
             return TextComponent.this.getText().length();
@@ -1017,7 +1018,7 @@
          * Return 0 if the text is empty, or the caret position
          * if no selection.
          *
-         * @return the index into the text of the start of the selection >= 0
+         * @return the index into the text of the start of the selection &gt;= 0
          */
         public int getSelectionStart() {
             return TextComponent.this.getSelectionStart();
@@ -1030,7 +1031,7 @@
          * Return 0 if the text is empty, or the caret position
          * if no selection.
          *
-         * @return the index into teh text of the end of the selection >= 0
+         * @return the index into teh text of the end of the selection &gt;= 0
          */
         public int getSelectionEnd() {
             return TextComponent.this.getSelectionEnd();
@@ -1055,7 +1056,7 @@
          *
          * @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
          * or AccessibleText.SENTENCE to retrieve
-         * @param index an index within the text >= 0
+         * @param index an index within the text &gt;= 0
          * @return the letter, word, or sentence,
          *   null for an invalid index or part
          */
@@ -1121,7 +1122,7 @@
          *
          * @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
          * or AccessibleText.SENTENCE to retrieve
-         * @param index an index within the text >= 0
+         * @param index an index within the text &gt;= 0
          * @return the letter, word, or sentence, null for an invalid
          *  index or part
          */
@@ -1174,7 +1175,7 @@
          *
          * @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
          *   or AccessibleText.SENTENCE to retrieve
-         * @param index an index within the text >= 0
+         * @param index an index within the text &gt;= 0
          * @return the letter, word, or sentence, null for an invalid index
          *  or part
          */
--- a/src/share/classes/java/awt/TextField.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/TextField.java	Thu Oct 03 19:06:43 2013 +0100
@@ -503,7 +503,7 @@
      *
      * @see #addActionListener
      * @see #removeActionListener
-     * @see     java.awt.event#ActionListener
+     * @see java.awt.event.ActionListener
      * @since 1.4
      */
     public synchronized ActionListener[] getActionListeners() {
--- a/src/share/classes/java/awt/TexturePaintContext.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/TexturePaintContext.java	Thu Oct 03 19:06:43 2013 +0100
@@ -73,11 +73,11 @@
         WritableRaster raster = bufImg.getRaster();
         ColorModel cm = bufImg.getColorModel();
         int maxw = devBounds.width;
-        Object val = hints.get(hints.KEY_INTERPOLATION);
+        Object val = hints.get(RenderingHints.KEY_INTERPOLATION);
         boolean filter =
             (val == null
-             ? (hints.get(hints.KEY_RENDERING) == hints.VALUE_RENDER_QUALITY)
-             : (val != hints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR));
+             ? (hints.get(RenderingHints.KEY_RENDERING) == RenderingHints.VALUE_RENDER_QUALITY)
+             : (val != RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR));
         if (raster instanceof IntegerInterleavedRaster &&
             (!filter || isFilterableDCM(cm)))
         {
@@ -234,8 +234,8 @@
         return outRas;
     }
 
-    private static WeakReference xrgbRasRef;
-    private static WeakReference argbRasRef;
+    private static WeakReference<Raster> xrgbRasRef;
+    private static WeakReference<Raster> argbRasRef;
 
     synchronized static WritableRaster makeRaster(ColorModel cm,
                                                   Raster srcRas,
@@ -278,13 +278,13 @@
             return;
         }
         if (xrgbmodel == cm) {
-            xrgbRasRef = new WeakReference(outRas);
+            xrgbRasRef = new WeakReference<>(outRas);
         } else if (argbmodel == cm) {
-            argbRasRef = new WeakReference(outRas);
+            argbRasRef = new WeakReference<>(outRas);
         }
     }
 
-    private static WeakReference byteRasRef;
+    private static WeakReference<Raster> byteRasRef;
 
     synchronized static WritableRaster makeByteRaster(Raster srcRas,
                                                       int w, int h)
@@ -307,7 +307,7 @@
         if (outRas == null) {
             return;
         }
-        byteRasRef = new WeakReference(outRas);
+        byteRasRef = new WeakReference<>(outRas);
     }
 
     public abstract WritableRaster makeRaster(int w, int h);
--- a/src/share/classes/java/awt/Toolkit.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/Toolkit.java	Thu Oct 03 19:06:43 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, 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
@@ -56,6 +56,7 @@
 import sun.awt.NullComponentPeer;
 import sun.awt.PeerEvent;
 import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
 import sun.security.util.SecurityConstants;
 
 import sun.util.CoreResourceBundleControl;
@@ -467,7 +468,7 @@
         GraphicsEnvironment.checkHeadless();
     }
 
-/**
+    /**
      * Controls whether the layout of Containers is validated dynamically
      * during resizing, or statically, after resizing is complete.
      * Use {@code isDynamicLayoutActive()} to detect if this feature enabled
@@ -497,9 +498,12 @@
      * @see       java.awt.GraphicsEnvironment#isHeadless
      * @since     1.4
      */
-    public void setDynamicLayout(boolean dynamic)
+    public void setDynamicLayout(final boolean dynamic)
         throws HeadlessException {
         GraphicsEnvironment.checkHeadless();
+        if (this != getDefaultToolkit()) {
+            getDefaultToolkit().setDynamicLayout(dynamic);
+        }
     }
 
     /**
@@ -1239,7 +1243,8 @@
     }
 
     /**
-     * Emits an audio beep.
+     * Emits an audio beep depending on native system settings and hardware
+     * capabilities.
      * @since     JDK1.1
      */
     public abstract void beep();
@@ -1270,12 +1275,8 @@
      * <p>
      * Each actual implementation of this method should first check if there
      * is a security manager installed. If there is, the method should call
-     * the security manager's <code>checkSystemClipboardAccess</code> method
-     * to ensure it's ok to to access the system clipboard. If the default
-     * implementation of <code>checkSystemClipboardAccess</code> is used (that
-     * is, that method is not overriden), then this results in a call to the
-     * security manager's <code>checkPermission</code> method with an <code>
-     * AWTPermission("accessClipboard")</code> permission.
+     * the security manager's {@link SecurityManager#checkPermission
+     * checkPermission} method to check {@code AWTPermission("accessClipboard")}.
      *
      * @return    the system Clipboard
      * @exception HeadlessException if GraphicsEnvironment.isHeadless()
@@ -1318,14 +1319,9 @@
      * system selection <code>Clipboard</code> as described above.
      * <p>
      * Each actual implementation of this method should first check if there
-     * is a <code>SecurityManager</code> installed. If there is, the method
-     * should call the <code>SecurityManager</code>'s
-     * <code>checkSystemClipboardAccess</code> method to ensure that client
-     * code has access the system selection. If the default implementation of
-     * <code>checkSystemClipboardAccess</code> is used (that is, if the method
-     * is not overridden), then this results in a call to the
-     * <code>SecurityManager</code>'s <code>checkPermission</code> method with
-     * an <code>AWTPermission("accessClipboard")</code> permission.
+     * is a security manager installed. If there is, the method should call
+     * the security manager's {@link SecurityManager#checkPermission
+     * checkPermission} method to check {@code AWTPermission("accessClipboard")}.
      *
      * @return the system selection as a <code>Clipboard</code>, or
      *         <code>null</code> if the native platform does not support a
@@ -1607,6 +1603,12 @@
      * here, so that only one copy is maintained.
      */
     private static ResourceBundle resources;
+    private static ResourceBundle platformResources;
+
+    // called by platform toolkit
+    private static void setPlatformResources(ResourceBundle bundle) {
+        platformResources = bundle;
+    }
 
     /**
      * Initialize JNI field and method ids
@@ -1655,6 +1657,14 @@
     }
 
     static {
+        AWTAccessor.setToolkitAccessor(
+                new AWTAccessor.ToolkitAccessor() {
+                    @Override
+                    public void setPlatformResources(ResourceBundle bundle) {
+                        Toolkit.setPlatformResources(bundle);
+                    }
+                });
+
         java.security.AccessController.doPrivileged(
                                  new java.security.PrivilegedAction<Void>() {
             public Void run() {
@@ -1682,6 +1692,15 @@
      * This method returns defaultValue if the property is not found.
      */
     public static String getProperty(String key, String defaultValue) {
+        // first try platform specific bundle
+        if (platformResources != null) {
+            try {
+                return platformResources.getString(key);
+            }
+            catch (MissingResourceException e) {}
+        }
+
+        // then shared one
         if (resources != null) {
             try {
                 return resources.getString(key);
@@ -1699,25 +1718,20 @@
      * therefore not assume that the EventQueue instance returned
      * by this method will be shared by other applets or the system.
      *
-     * <p>First, if there is a security manager, its
-     * <code>checkAwtEventQueueAccess</code>
-     * method is called.
-     * If  the default implementation of <code>checkAwtEventQueueAccess</code>
-     * is used (that is, that method is not overriden), then this results in
-     * a call to the security manager's <code>checkPermission</code> method
-     * with an <code>AWTPermission("accessEventQueue")</code> permission.
+     * <p> If there is a security manager then its
+     * {@link SecurityManager#checkPermission checkPermission} method
+     * is called to check {@code AWTPermission("accessEventQueue")}.
      *
      * @return    the <code>EventQueue</code> object
      * @throws  SecurityException
-     *          if a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkAwtEventQueueAccess}</code>
-     *          method denies access to the <code>EventQueue</code>
+     *          if a security manager is set and it denies access to
+     *          the {@code EventQueue}
      * @see     java.awt.AWTPermission
     */
     public final EventQueue getSystemEventQueue() {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
-          security.checkAwtEventQueueAccess();
+            security.checkPermission(SecurityConstants.AWT.CHECK_AWT_EVENTQUEUE_PERMISSION);
         }
         return getSystemEventQueueImpl();
     }
--- a/src/share/classes/java/awt/WaitDispatchSupport.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/WaitDispatchSupport.java	Thu Oct 03 19:06:43 2013 +0100
@@ -224,8 +224,8 @@
             // starts. Thus, the enter() method will not hang.
             //
             // Event pump should be privileged. See 6300270.
-            AccessController.doPrivileged(new PrivilegedAction() {
-                public Object run() {
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                public Void run() {
                     run.run();
                     return null;
                 }
--- a/src/share/classes/java/awt/Window.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/Window.java	Thu Oct 03 19:06:43 2013 +0100
@@ -195,10 +195,9 @@
     /**
      * This represents the warning message that is
      * to be displayed in a non secure window. ie :
-     * a window that has a security manager installed for
-     * which calling SecurityManager.checkTopLevelWindow()
-     * is false.  This message can be displayed anywhere in
-     * the window.
+     * a window that has a security manager installed that denies
+     * {@code AWTPermission("showWindowWithoutWarningBanner")}.
+     * This message can be displayed anywhere in the window.
      *
      * @serial
      * @see #getWarningString
@@ -417,11 +416,10 @@
      * Constructs a new, initially invisible window in default size with the
      * specified {@code GraphicsConfiguration}.
      * <p>
-     * If there is a security manager, this method first calls
-     * the security manager's {@code checkTopLevelWindow}
-     * method with {@code this}
-     * as its argument to determine whether or not the window
-     * must be displayed with a warning banner.
+     * If there is a security manager, then it is invoked to check
+     * {@code AWTPermission("showWindowWithoutWarningBanner")}
+     * to determine whether or not the window must be displayed with
+     * a warning banner.
      *
      * @param gc the {@code GraphicsConfiguration} of the target screen
      *     device. If {@code gc} is {@code null}, the system default
@@ -432,7 +430,6 @@
      *     {@code GraphicsEnvironment.isHeadless()} returns {@code true}
      *
      * @see java.awt.GraphicsEnvironment#isHeadless
-     * @see java.lang.SecurityManager#checkTopLevelWindow
      */
     Window(GraphicsConfiguration gc) {
         init(gc);
@@ -511,25 +508,16 @@
 
     /**
      * Constructs a new, initially invisible window in the default size.
-     *
-     * <p>First, if there is a security manager, its
-     * {@code checkTopLevelWindow}
-     * method is called with {@code this}
-     * as its argument
-     * to see if it's ok to display the window without a warning banner.
-     * If the default implementation of {@code checkTopLevelWindow}
-     * is used (that is, that method is not overriden), then this results in
-     * a call to the security manager's {@code checkPermission} method
-     * with an {@code AWTPermission("showWindowWithoutWarningBanner")}
-     * permission. It that method raises a SecurityException,
-     * {@code checkTopLevelWindow} returns false, otherwise it
-     * returns true. If it returns false, a warning banner is created.
+     * <p>
+     * If there is a security manager set, it is invoked to check
+     * {@code AWTPermission("showWindowWithoutWarningBanner")}.
+     * If that check fails with a {@code SecurityException} then a warning
+     * banner is created.
      *
      * @exception HeadlessException when
      *     {@code GraphicsEnvironment.isHeadless()} returns {@code true}
      *
      * @see java.awt.GraphicsEnvironment#isHeadless
-     * @see java.lang.SecurityManager#checkTopLevelWindow
      */
     Window() throws HeadlessException {
         GraphicsEnvironment.checkHeadless();
@@ -541,11 +529,10 @@
      * {@code Frame} as its owner. The window will not be focusable
      * unless its owner is showing on the screen.
      * <p>
-     * If there is a security manager, this method first calls
-     * the security manager's {@code checkTopLevelWindow}
-     * method with {@code this}
-     * as its argument to determine whether or not the window
-     * must be displayed with a warning banner.
+     * If there is a security manager set, it is invoked to check
+     * {@code AWTPermission("showWindowWithoutWarningBanner")}.
+     * If that check fails with a {@code SecurityException} then a warning
+     * banner is created.
      *
      * @param owner the {@code Frame} to act as owner or {@code null}
      *    if this window has no owner
@@ -555,7 +542,6 @@
      *    {@code GraphicsEnvironment.isHeadless} returns {@code true}
      *
      * @see java.awt.GraphicsEnvironment#isHeadless
-     * @see java.lang.SecurityManager#checkTopLevelWindow
      * @see #isShowing
      */
     public Window(Frame owner) {
@@ -570,11 +556,10 @@
      * unless its nearest owning {@code Frame} or {@code Dialog}
      * is showing on the screen.
      * <p>
-     * If there is a security manager, this method first calls
-     * the security manager's {@code checkTopLevelWindow}
-     * method with {@code this}
-     * as its argument to determine whether or not the window
-     * must be displayed with a warning banner.
+     * If there is a security manager set, it is invoked to check
+     * {@code AWTPermission("showWindowWithoutWarningBanner")}.
+     * If that check fails with a {@code SecurityException} then a
+     * warning banner is created.
      *
      * @param owner the {@code Window} to act as owner or
      *     {@code null} if this window has no owner
@@ -585,7 +570,6 @@
      *     {@code true}
      *
      * @see       java.awt.GraphicsEnvironment#isHeadless
-     * @see       java.lang.SecurityManager#checkTopLevelWindow
      * @see       #isShowing
      *
      * @since     1.2
@@ -603,11 +587,10 @@
      * its nearest owning {@code Frame} or {@code Dialog}
      * is showing on the screen.
      * <p>
-     * If there is a security manager, this method first calls
-     * the security manager's {@code checkTopLevelWindow}
-     * method with {@code this}
-     * as its argument to determine whether or not the window
-     * must be displayed with a warning banner.
+     * If there is a security manager set, it is invoked to check
+     * {@code AWTPermission("showWindowWithoutWarningBanner")}. If that
+     * check fails with a {@code SecurityException} then a warning banner
+     * is created.
      *
      * @param owner the window to act as owner or {@code null}
      *     if this window has no owner
@@ -621,7 +604,6 @@
      *     {@code true}
      *
      * @see       java.awt.GraphicsEnvironment#isHeadless
-     * @see       java.lang.SecurityManager#checkTopLevelWindow
      * @see       GraphicsConfiguration#getBounds
      * @see       #isShowing
      * @since     1.3
@@ -1093,7 +1075,6 @@
      * Hide this Window, its subcomponents, and all of its owned children.
      * The Window and its subcomponents can be made visible again
      * with a call to {@code show}.
-     * </p>
      * @see #show
      * @see #dispose
      * @deprecated As of JDK version 1.5, replaced by
@@ -1362,10 +1343,9 @@
      * Gets the warning string that is displayed with this window.
      * If this window is insecure, the warning string is displayed
      * somewhere in the visible area of the window. A window is
-     * insecure if there is a security manager, and the security
-     * manager's {@code checkTopLevelWindow} method returns
-     * {@code false} when this window is passed to it as an
-     * argument.
+     * insecure if there is a security manager and the security
+     * manager denies
+     * {@code AWTPermission("showWindowWithoutWarningBanner")}.
      * <p>
      * If the window is secure, then {@code getWarningString}
      * returns {@code null}. If the window is insecure, this
@@ -1373,7 +1353,6 @@
      * {@code awt.appletWarning}
      * and returns the string value of that property.
      * @return    the warning string for this window.
-     * @see       java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object)
      */
     public final String getWarningString() {
         return warningString;
@@ -1383,10 +1362,12 @@
         warningString = null;
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
-            if (!sm.checkTopLevelWindow(this)) {
+            try {
+                sm.checkPermission(SecurityConstants.AWT.TOPLEVEL_WINDOW_PERMISSION);
+            } catch (SecurityException se) {
                 // make sure the privileged action is only
                 // for getting the property! We don't want the
-                // above checkTopLevelWindow call to always succeed!
+                // above checkPermission call to always succeed!
                 warningString = AccessController.doPrivileged(
                       new GetPropertyAction("awt.appletWarning",
                                             "Java Applet Window"));
@@ -3391,27 +3372,27 @@
      * this property of the Window.
      * <p>
      * For example, after the following code is executed:
-     * <pre><blockquote>
+     * <pre>
      * setLocationByPlatform(true);
      * setVisible(true);
      * boolean flag = isLocationByPlatform();
-     * </blockquote></pre>
+     * </pre>
      * The window will be shown at platform's default location and
      * {@code flag} will be {@code false}.
      * <p>
      * In the following sample:
-     * <pre><blockquote>
+     * <pre>
      * setLocationByPlatform(true);
      * setLocation(10, 10);
      * boolean flag = isLocationByPlatform();
      * setVisible(true);
-     * </blockquote></pre>
+     * </pre>
      * The window will be shown at (10, 10) and {@code flag} will be
      * {@code false}.
      *
      * @param locationByPlatform {@code true} if this Window should appear
      *        at the default location, {@code false} if at the current location
-     * @throws {@code IllegalComponentStateException} if the window
+     * @throws IllegalComponentStateException if the window
      *         is showing on screen and locationByPlatform is {@code true}.
      * @see #setLocation
      * @see #isShowing
--- a/src/share/classes/java/awt/color/ICC_Profile.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/color/ICC_Profile.java	Thu Oct 03 19:06:43 2013 +0100
@@ -37,6 +37,7 @@
 
 import sun.java2d.cmm.PCMM;
 import sun.java2d.cmm.CMSManager;
+import sun.java2d.cmm.Profile;
 import sun.java2d.cmm.ProfileDataVerifier;
 import sun.java2d.cmm.ProfileDeferralMgr;
 import sun.java2d.cmm.ProfileDeferralInfo;
@@ -94,7 +95,7 @@
 
     private static final long serialVersionUID = -3938515861990936766L;
 
-    transient long ID;
+    private transient Profile cmmProfile;
 
     private transient ProfileDeferralInfo deferralInfo;
     private transient ProfileActivator profileActivator;
@@ -727,8 +728,8 @@
     /**
      * Constructs an ICC_Profile object with a given ID.
      */
-    ICC_Profile(long ID) {
-        this.ID = ID;
+    ICC_Profile(Profile p) {
+        this.cmmProfile = p;
     }
 
 
@@ -751,8 +752,8 @@
      * Frees the resources associated with an ICC_Profile object.
      */
     protected void finalize () {
-        if (ID != 0) {
-            CMSManager.getModule().freeProfile(ID);
+        if (cmmProfile != null) {
+            CMSManager.getModule().freeProfile(cmmProfile);
         } else if (profileActivator != null) {
             ProfileDeferralMgr.unregisterDeferral(profileActivator);
         }
@@ -770,7 +771,7 @@
     public static ICC_Profile getInstance(byte[] data) {
     ICC_Profile thisProfile;
 
-        long theID;
+        Profile p = null;
 
         if (ProfileDeferralMgr.deferring) {
             ProfileDeferralMgr.activateProfiles();
@@ -779,32 +780,32 @@
         ProfileDataVerifier.verify(data);
 
         try {
-            theID = CMSManager.getModule().loadProfile(data);
+            p = CMSManager.getModule().loadProfile(data);
         } catch (CMMException c) {
             throw new IllegalArgumentException("Invalid ICC Profile Data");
         }
 
         try {
-            if ((getColorSpaceType (theID) == ColorSpace.TYPE_GRAY) &&
-                (getData (theID, icSigMediaWhitePointTag) != null) &&
-                (getData (theID, icSigGrayTRCTag) != null)) {
-                thisProfile = new ICC_ProfileGray (theID);
+            if ((getColorSpaceType (p) == ColorSpace.TYPE_GRAY) &&
+                (getData (p, icSigMediaWhitePointTag) != null) &&
+                (getData (p, icSigGrayTRCTag) != null)) {
+                thisProfile = new ICC_ProfileGray (p);
             }
-            else if ((getColorSpaceType (theID) == ColorSpace.TYPE_RGB) &&
-                (getData (theID, icSigMediaWhitePointTag) != null) &&
-                (getData (theID, icSigRedColorantTag) != null) &&
-                (getData (theID, icSigGreenColorantTag) != null) &&
-                (getData (theID, icSigBlueColorantTag) != null) &&
-                (getData (theID, icSigRedTRCTag) != null) &&
-                (getData (theID, icSigGreenTRCTag) != null) &&
-                (getData (theID, icSigBlueTRCTag) != null)) {
-                thisProfile = new ICC_ProfileRGB (theID);
+            else if ((getColorSpaceType (p) == ColorSpace.TYPE_RGB) &&
+                (getData (p, icSigMediaWhitePointTag) != null) &&
+                (getData (p, icSigRedColorantTag) != null) &&
+                (getData (p, icSigGreenColorantTag) != null) &&
+                (getData (p, icSigBlueColorantTag) != null) &&
+                (getData (p, icSigRedTRCTag) != null) &&
+                (getData (p, icSigGreenTRCTag) != null) &&
+                (getData (p, icSigBlueTRCTag) != null)) {
+                thisProfile = new ICC_ProfileRGB (p);
             }
             else {
-                thisProfile = new ICC_Profile (theID);
+                thisProfile = new ICC_Profile (p);
             }
         } catch (CMMException c) {
-            thisProfile = new ICC_Profile (theID);
+            thisProfile = new ICC_Profile (p);
         }
         return thisProfile;
     }
@@ -1119,7 +1120,7 @@
                 fileName);
         }
         try {
-            ID = CMSManager.getModule().loadProfile(profileData);
+            cmmProfile = CMSManager.getModule().loadProfile(profileData);
         } catch (CMMException c) {
             ProfileDataException pde = new
                 ProfileDataException("Invalid ICC Profile Data" + fileName);
@@ -1229,14 +1230,14 @@
                                                    causing a deferred profile
                                                    to be loaded */
         }
-        return    getColorSpaceType(ID);
+        return    getColorSpaceType(cmmProfile);
     }
 
-    static int getColorSpaceType(long profileID) {
+    static int getColorSpaceType(Profile p) {
     byte[] theHeader;
     int theColorSpaceSig, theColorSpace;
 
-        theHeader = getData(profileID, icSigHead);
+        theHeader = getData(p, icSigHead);
         theColorSpaceSig = intFromBigEndian(theHeader, icHdrColorSpace);
         theColorSpace = iccCStoJCS (theColorSpaceSig);
         return theColorSpace;
@@ -1258,15 +1259,15 @@
         if (ProfileDeferralMgr.deferring) {
             ProfileDeferralMgr.activateProfiles();
         }
-        return getPCSType(ID);
+        return getPCSType(cmmProfile);
     }
 
 
-    static int getPCSType(long profileID) {
+    static int getPCSType(Profile p) {
     byte[] theHeader;
     int thePCSSig, thePCS;
 
-        theHeader = getData(profileID, icSigHead);
+        theHeader = getData(p, icSigHead);
         thePCSSig = intFromBigEndian(theHeader, icHdrPcs);
         thePCS = iccCStoJCS(thePCSSig);
         return thePCS;
@@ -1326,12 +1327,12 @@
         PCMM mdl = CMSManager.getModule();
 
         /* get the number of bytes needed for this profile */
-        profileSize = mdl.getProfileSize(ID);
+        profileSize = mdl.getProfileSize(cmmProfile);
 
         profileData = new byte [profileSize];
 
         /* get the data for the profile */
-        mdl.getProfileData(ID, profileData);
+        mdl.getProfileData(cmmProfile, profileData);
 
         return profileData;
     }
@@ -1358,11 +1359,11 @@
             ProfileDeferralMgr.activateProfiles();
         }
 
-        return getData(ID, tagSignature);
+        return getData(cmmProfile, tagSignature);
     }
 
 
-    static byte[] getData(long profileID, int tagSignature) {
+    static byte[] getData(Profile p, int tagSignature) {
     int tagSize;
     byte[] tagData;
 
@@ -1370,12 +1371,12 @@
             PCMM mdl = CMSManager.getModule();
 
             /* get the number of bytes needed for this tag */
-            tagSize = mdl.getTagSize(profileID, tagSignature);
+            tagSize = mdl.getTagSize(p, tagSignature);
 
             tagData = new byte[tagSize]; /* get an array for the tag */
 
             /* get the tag's data */
-            mdl.getTagData(profileID, tagSignature, tagData);
+            mdl.getTagData(p, tagSignature, tagData);
         } catch(CMMException c) {
             tagData = null;
         }
@@ -1406,7 +1407,7 @@
             ProfileDeferralMgr.activateProfiles();
         }
 
-        CMSManager.getModule().setTagData(ID, tagSignature, tagData);
+        CMSManager.getModule().setTagData(cmmProfile, tagSignature, tagData);
     }
 
     /**
--- a/src/share/classes/java/awt/color/ICC_ProfileGray.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/color/ICC_ProfileGray.java	Thu Oct 03 19:06:43 2013 +0100
@@ -35,7 +35,7 @@
 
 package java.awt.color;
 
-import java.awt.image.LookupTable;
+import sun.java2d.cmm.Profile;
 import sun.java2d.cmm.ProfileDeferralInfo;
 
 /**
@@ -76,8 +76,8 @@
     /**
      * Constructs a new ICC_ProfileGray from a CMM ID.
      */
-    ICC_ProfileGray(long ID) {
-        super(ID);
+    ICC_ProfileGray(Profile p) {
+        super(p);
     }
 
     /**
--- a/src/share/classes/java/awt/color/ICC_ProfileRGB.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/color/ICC_ProfileRGB.java	Thu Oct 03 19:06:43 2013 +0100
@@ -35,7 +35,7 @@
 
 package java.awt.color;
 
-import java.awt.image.LookupTable;
+import sun.java2d.cmm.Profile;
 import sun.java2d.cmm.ProfileDeferralInfo;
 
 /**
@@ -114,8 +114,8 @@
      * @param ID The CMM ID for the profile.
      *
      */
-    ICC_ProfileRGB(long ID) {
-        super(ID);
+    ICC_ProfileRGB(Profile p) {
+        super(p);
     }
 
     /**
--- a/src/share/classes/java/awt/datatransfer/DataFlavor.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/datatransfer/DataFlavor.java	Thu Oct 03 19:06:43 2013 +0100
@@ -463,7 +463,7 @@
 
     /**
      * Constructs a <code>DataFlavor</code> from a <code>mimeType</code> string.
-     * The string can specify a "class=<fully specified Java class name>"
+     * The string can specify a "class=&lt;fully specified Java class name&gt;"
      * parameter to create a <code>DataFlavor</code> with the desired
      * representation class. If the string does not contain "class=" parameter,
      * <code>java.io.InputStream</code> is used as default.
--- a/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Thu Oct 03 19:06:43 2013 +0100
@@ -70,7 +70,7 @@
     /**
      * System singleton which maps a thread's ClassLoader to a SystemFlavorMap.
      */
-    private static final WeakHashMap flavorMaps = new WeakHashMap();
+    private static final WeakHashMap<ClassLoader, FlavorMap> flavorMaps = new WeakHashMap<>();
 
     /**
      * Copied from java.util.Properties.
@@ -139,7 +139,7 @@
      * native Strings.
      * Do not use the field directly, use getFlavorToNative() instead.
      */
-    private final Map flavorToNative = new HashMap();
+    private final Map<DataFlavor, List<String>> flavorToNative = new HashMap<>();
 
     /**
      * Accessor to flavorToNative map.  Since we use lazy initialization we must
@@ -148,7 +148,7 @@
      *
      * @return flavorToNative
      */
-    private synchronized Map getFlavorToNative() {
+    private synchronized Map<DataFlavor, List<String>> getFlavorToNative() {
         if (!isMapInitialized) {
             initSystemFlavorMap();
         }
@@ -164,13 +164,13 @@
      * Caches the result of getNativesForFlavor(). Maps DataFlavors to
      * SoftReferences which reference Lists of String natives.
      */
-    private Map getNativesForFlavorCache = new HashMap();
+    private Map<DataFlavor, SoftReference<List<String>>> getNativesForFlavorCache = new HashMap<>();
 
     /**
      * Caches the result getFlavorsForNative(). Maps String natives to
      * SoftReferences which reference Lists of DataFlavors.
      */
-    private Map getFlavorsForNativeCache = new HashMap();
+    private Map<String, SoftReference<List<DataFlavor>>> getFlavorsForNativeCache = new HashMap<>();
 
     /**
      * Dynamic mapping generation used for text mappings should not be applied
@@ -193,7 +193,7 @@
         FlavorMap fm;
 
         synchronized(flavorMaps) {
-            fm = (FlavorMap)flavorMaps.get(contextClassLoader);
+            fm = flavorMaps.get(contextClassLoader);
             if (fm == null) {
                 fm = new SystemFlavorMap();
                 flavorMaps.put(contextClassLoader, fm);
@@ -520,10 +520,10 @@
      * the appropriate Map location, but rather will be appended to a List
      * stored in that location.
      */
-    private void store(Object hashed, Object listed, Map map) {
-        List list = (List)map.get(hashed);
+    private <H, L> void store(H hashed, L listed, Map<H, List<L>> map) {
+        List<L> list = map.get(hashed);
         if (list == null) {
-            list = new ArrayList(1);
+            list = new ArrayList<>(1);
             map.put(hashed, list);
         }
         if (!list.contains(listed)) {
@@ -537,17 +537,17 @@
      * case, a new DataFlavor is synthesized, stored, and returned, if and
      * only if the specified native is encoded as a Java MIME type.
      */
-    private List nativeToFlavorLookup(String nat) {
+    private List<DataFlavor> nativeToFlavorLookup(String nat) {
         List<DataFlavor> flavors = getNativeToFlavor().get(nat);
 
         if (nat != null && !disabledMappingGenerationKeys.contains(nat)) {
             DataTransferer transferer = DataTransferer.getInstance();
             if (transferer != null) {
-                List platformFlavors =
+                List<DataFlavor> platformFlavors =
                     transferer.getPlatformMappingsForNative(nat);
                 if (!platformFlavors.isEmpty()) {
                     if (flavors != null) {
-                        platformFlavors.removeAll(new HashSet(flavors));
+                        platformFlavors.removeAll(new HashSet<>(flavors));
                         // Prepending the platform-specific mappings ensures
                         // that the flavors added with
                         // addFlavorForUnencodedNative() are at the end of
@@ -573,15 +573,15 @@
             }
 
             if (flavor != null) {
-                flavors = new ArrayList(1);
+                flavors = new ArrayList<>(1);
                 getNativeToFlavor().put(nat, flavors);
                 flavors.add(flavor);
                 getFlavorsForNativeCache.remove(nat);
                 getFlavorsForNativeCache.remove(null);
 
-                List natives = (List)getFlavorToNative().get(flavor);
+                List<String> natives = getFlavorToNative().get(flavor);
                 if (natives == null) {
-                    natives = new ArrayList(1);
+                    natives = new ArrayList<>(1);
                     getFlavorToNative().put(flavor, natives);
                 }
                 natives.add(nat);
@@ -590,7 +590,7 @@
             }
         }
 
-        return (flavors != null) ? flavors : new ArrayList(0);
+        return (flavors != null) ? flavors : new ArrayList<>(0);
     }
 
     /**
@@ -601,18 +601,18 @@
      * encoding the DataFlavor's MIME type. Otherwise an empty List is returned
      * and 'flavorToNative' remains unaffected.
      */
-    private List flavorToNativeLookup(final DataFlavor flav,
-                                      final boolean synthesize) {
-        List natives = (List)getFlavorToNative().get(flav);
+    private List<String> flavorToNativeLookup(final DataFlavor flav,
+                                              final boolean synthesize) {
+        List<String> natives = getFlavorToNative().get(flav);
 
         if (flav != null && !disabledMappingGenerationKeys.contains(flav)) {
             DataTransferer transferer = DataTransferer.getInstance();
             if (transferer != null) {
-                List platformNatives =
+                List<String> platformNatives =
                     transferer.getPlatformMappingsForFlavor(flav);
                 if (!platformNatives.isEmpty()) {
                     if (natives != null) {
-                        platformNatives.removeAll(new HashSet(natives));
+                        platformNatives.removeAll(new HashSet<>(natives));
                         // Prepend the platform-specific mappings to ensure
                         // that the natives added with
                         // addUnencodedNativeForFlavor() are at the end of
@@ -627,7 +627,7 @@
         if (natives == null) {
             if (synthesize) {
                 String encoded = encodeDataFlavor(flav);
-                natives = new ArrayList(1);
+                natives = new ArrayList<>(1);
                 getFlavorToNative().put(flav, natives);
                 natives.add(encoded);
                 getNativesForFlavorCache.remove(flav);
@@ -635,14 +635,14 @@
 
                 List<DataFlavor> flavors = getNativeToFlavor().get(encoded);
                 if (flavors == null) {
-                    flavors = new ArrayList(1);
+                    flavors = new ArrayList<>(1);
                     getNativeToFlavor().put(encoded, flavors);
                 }
                 flavors.add(flav);
                 getFlavorsForNativeCache.remove(encoded);
                 getFlavorsForNativeCache.remove(null);
             } else {
-                natives = new ArrayList(0);
+                natives = new ArrayList<>(0);
             }
         }
 
@@ -675,21 +675,21 @@
      * @since 1.4
      */
     public synchronized List<String> getNativesForFlavor(DataFlavor flav) {
-        List retval = null;
+        List<String> retval = null;
 
         // Check cache, even for null flav
-        SoftReference ref = (SoftReference)getNativesForFlavorCache.get(flav);
+        SoftReference<List<String>> ref = getNativesForFlavorCache.get(flav);
         if (ref != null) {
-            retval = (List)ref.get();
+            retval = ref.get();
             if (retval != null) {
                 // Create a copy, because client code can modify the returned
                 // list.
-                return new ArrayList(retval);
+                return new ArrayList<>(retval);
             }
         }
 
         if (flav == null) {
-            retval = new ArrayList<String>(getNativeToFlavor().keySet());
+            retval = new ArrayList<>(getNativeToFlavor().keySet());
         } else if (disabledMappingGenerationKeys.contains(flav)) {
             // In this case we shouldn't synthesize a native for this flavor,
             // since its mappings were explicitly specified.
@@ -699,7 +699,7 @@
             // For text/* flavors, flavor-to-native mappings specified in
             // flavormap.properties are stored per flavor's base type.
             if ("text".equals(flav.getPrimaryType())) {
-                retval = (List)getFlavorToNative().get(flav.mimeType.getBaseType());
+                retval = getAllNativesForType(flav.mimeType.getBaseType());
                 if (retval != null) {
                     // To prevent the List stored in the map from modification.
                     retval = new ArrayList(retval);
@@ -707,15 +707,15 @@
             }
 
             // Also include text/plain natives, but don't duplicate Strings
-            List textPlainList = (List)getFlavorToNative().get(TEXT_PLAIN_BASE_TYPE);
+            List<String> textPlainList = getAllNativesForType(TEXT_PLAIN_BASE_TYPE);
 
             if (textPlainList != null && !textPlainList.isEmpty()) {
                 // To prevent the List stored in the map from modification.
                 // This also guarantees that removeAll() is supported.
-                textPlainList = new ArrayList(textPlainList);
+                textPlainList = new ArrayList<>(textPlainList);
                 if (retval != null && !retval.isEmpty()) {
                     // Use HashSet to get constant-time performance for search.
-                    textPlainList.removeAll(new HashSet(retval));
+                    textPlainList.removeAll(new HashSet<>(retval));
                     retval.addAll(textPlainList);
                 } else {
                     retval = textPlainList;
@@ -728,7 +728,7 @@
                 // In this branch it is guaranteed that natives explicitly
                 // listed for flav's MIME type were added with
                 // addUnencodedNativeForFlavor(), so they have lower priority.
-                List explicitList =
+                List<String> explicitList =
                     flavorToNativeLookup(flav, !SYNTHESIZE_IF_NOT_FOUND);
 
                 // flavorToNativeLookup() never returns null.
@@ -736,14 +736,14 @@
                 if (!explicitList.isEmpty()) {
                     // To prevent the List stored in the map from modification.
                     // This also guarantees that removeAll() is supported.
-                    explicitList = new ArrayList(explicitList);
+                    explicitList = new ArrayList<>(explicitList);
                     // Use HashSet to get constant-time performance for search.
-                    explicitList.removeAll(new HashSet(retval));
+                    explicitList.removeAll(new HashSet<>(retval));
                     retval.addAll(explicitList);
                 }
             }
         } else if (DataTransferer.isFlavorNoncharsetTextType(flav)) {
-            retval = (List)getFlavorToNative().get(flav.mimeType.getBaseType());
+            retval = getAllNativesForType(flav.mimeType.getBaseType());
 
             if (retval == null || retval.isEmpty()) {
                 retval = flavorToNativeLookup(flav, SYNTHESIZE_IF_NOT_FOUND);
@@ -751,7 +751,7 @@
                 // In this branch it is guaranteed that natives explicitly
                 // listed for flav's MIME type were added with
                 // addUnencodedNativeForFlavor(), so they have lower priority.
-                List explicitList =
+                List<String> explicitList =
                     flavorToNativeLookup(flav, !SYNTHESIZE_IF_NOT_FOUND);
 
                 // flavorToNativeLookup() never returns null.
@@ -759,10 +759,10 @@
                 if (!explicitList.isEmpty()) {
                     // To prevent the List stored in the map from modification.
                     // This also guarantees that add/removeAll() are supported.
-                    retval = new ArrayList(retval);
-                    explicitList = new ArrayList(explicitList);
+                    retval = new ArrayList<>(retval);
+                    explicitList = new ArrayList<>(explicitList);
                     // Use HashSet to get constant-time performance for search.
-                    explicitList.removeAll(new HashSet(retval));
+                    explicitList.removeAll(new HashSet<>(retval));
                     retval.addAll(explicitList);
                 }
             }
@@ -770,9 +770,9 @@
             retval = flavorToNativeLookup(flav, SYNTHESIZE_IF_NOT_FOUND);
         }
 
-        getNativesForFlavorCache.put(flav, new SoftReference(retval));
+        getNativesForFlavorCache.put(flav, new SoftReference<>(retval));
         // Create a copy, because client code can modify the returned list.
-        return new ArrayList(retval);
+        return new ArrayList<>(retval);
     }
 
     /**
@@ -809,11 +809,11 @@
     public synchronized List<DataFlavor> getFlavorsForNative(String nat) {
 
         // Check cache, even for null nat
-        SoftReference ref = (SoftReference)getFlavorsForNativeCache.get(nat);
+        SoftReference<List<DataFlavor>> ref = getFlavorsForNativeCache.get(nat);
         if (ref != null) {
-            ArrayList retval = (ArrayList)ref.get();
+            List<DataFlavor> retval = ref.get();
             if (retval != null) {
-                return (List)retval.clone();
+                return new ArrayList<>(retval);
             }
         }
 
@@ -859,16 +859,15 @@
 
         }
 
-        final ArrayList arrayList = new ArrayList(returnValue);
-        getFlavorsForNativeCache.put(nat, new SoftReference(arrayList));
-        return (List)arrayList.clone();
+        final List<DataFlavor> arrayList = new ArrayList<>(returnValue);
+        getFlavorsForNativeCache.put(nat, new SoftReference<>(arrayList));
+        return new ArrayList<>(arrayList);
     }
 
-    private static LinkedHashSet<DataFlavor> convertMimeTypeToDataFlavors(
+    private static Set<DataFlavor> convertMimeTypeToDataFlavors(
         final String baseType) {
 
-        final LinkedHashSet<DataFlavor> returnValue =
-            new LinkedHashSet<DataFlavor>();
+        final Set<DataFlavor> returnValue = new LinkedHashSet<>();
 
         String subType = null;
 
@@ -1009,11 +1008,11 @@
             flavor_list.toArray(flavors);
         }
 
-        HashMap retval = new HashMap(flavors.length, 1.0f);
-        for (int i = 0; i < flavors.length; i++) {
-            List natives = getNativesForFlavor(flavors[i]);
-            String nat = (natives.isEmpty()) ? null : (String)natives.get(0);
-            retval.put(flavors[i], nat);
+        Map<DataFlavor, String> retval = new HashMap<>(flavors.length, 1.0f);
+        for (DataFlavor flavor : flavors) {
+            List<String> natives = getNativesForFlavor(flavor);
+            String nat = (natives.isEmpty()) ? null : natives.get(0);
+            retval.put(flavor, nat);
         }
 
         return retval;
@@ -1054,12 +1053,11 @@
             native_list.toArray(natives);
         }
 
-        HashMap retval = new HashMap(natives.length, 1.0f);
-        for (int i = 0; i < natives.length; i++) {
-            List flavors = getFlavorsForNative(natives[i]);
-            DataFlavor flav = (flavors.isEmpty())
-                ? null : (DataFlavor)flavors.get(0);
-            retval.put(natives[i], flav);
+        Map<String, DataFlavor> retval = new HashMap<>(natives.length, 1.0f);
+        for (String aNative : natives) {
+            List<DataFlavor> flavors = getFlavorsForNative(aNative);
+            DataFlavor flav = (flavors.isEmpty())? null : flavors.get(0);
+            retval.put(aNative, flav);
         }
 
         return retval;
@@ -1091,9 +1089,9 @@
             throw new NullPointerException("null arguments not permitted");
         }
 
-        List natives = (List)getFlavorToNative().get(flav);
+        List<String> natives = getFlavorToNative().get(flav);
         if (natives == null) {
-            natives = new ArrayList(1);
+            natives = new ArrayList<>(1);
             getFlavorToNative().put(flav, natives);
         } else if (natives.contains(nat)) {
             return;
@@ -1138,8 +1136,8 @@
         }
 
         getFlavorToNative().remove(flav);
-        for (int i = 0; i < natives.length; i++) {
-            addUnencodedNativeForFlavor(flav, natives[i]);
+        for (String aNative : natives) {
+            addUnencodedNativeForFlavor(flav, aNative);
         }
         disabledMappingGenerationKeys.add(flav);
         // Clear the cache to handle the case of empty natives.
@@ -1171,9 +1169,9 @@
             throw new NullPointerException("null arguments not permitted");
         }
 
-        List flavors = (List)getNativeToFlavor().get(nat);
+        List<DataFlavor> flavors = getNativeToFlavor().get(nat);
         if (flavors == null) {
-            flavors = new ArrayList(1);
+            flavors = new ArrayList<>(1);
             getNativeToFlavor().put(nat, flavors);
         } else if (flavors.contains(flav)) {
             return;
@@ -1217,8 +1215,8 @@
         }
 
         getNativeToFlavor().remove(nat);
-        for (int i = 0; i < flavors.length; i++) {
-            addFlavorForUnencodedNative(nat, flavors[i]);
+        for (DataFlavor flavor : flavors) {
+            addFlavorForUnencodedNative(nat, flavor);
         }
         disabledMappingGenerationKeys.add(nat);
         // Clear the cache to handle the case of empty flavors.
@@ -1321,4 +1319,18 @@
             ? new DataFlavor(retval_str)
             : null;
     }
+
+    private List<String> getAllNativesForType(String type) {
+        List<String> retval = null;
+        for (DataFlavor dataFlavor : convertMimeTypeToDataFlavors(type)) {
+            List<String> natives = getFlavorToNative().get(dataFlavor);
+            if (!natives.isEmpty()) {
+                if (retval == null) {
+                    retval = new ArrayList<>();
+                }
+                retval.addAll(natives);
+            }
+        }
+        return retval;
+    }
 }
--- a/src/share/classes/java/awt/dnd/DragGestureRecognizer.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DragGestureRecognizer.java	Thu Oct 03 19:06:43 2013 +0100
@@ -114,7 +114,7 @@
      * @param dgl the <code>DragGestureRecognizer</code>
      * to notify when a drag gesture is detected
      * <P>
-     * @throws <code>IllegalArgumentException</code>
+     * @throws IllegalArgumentException
      * if ds is <code>null</code>.
      */
 
@@ -157,7 +157,7 @@
      * @param sa the set (logical OR) of the <code>DnDConstants</code>
      * that this Drag and Drop operation will support
      * <P>
-     * @throws <code>IllegalArgumentException</code>
+     * @throws IllegalArgumentException
      * if ds is <code>null</code>.
      */
 
@@ -185,7 +185,7 @@
      * the <code>DragGestureRecognizer</code>
      * is not associated with any <code>Component</code>.
      * <P>
-     * @throws <code>IllegalArgumentException</code>
+     * @throws IllegalArgumentException
      * if ds is <code>null</code>.
      */
 
@@ -202,7 +202,7 @@
      * <code>DragGestureRecognizer</code> will
      * use to process the Drag and Drop operation
      * <P>
-     * @throws <code>IllegalArgumentException</code>
+     * @throws IllegalArgumentException
      * if ds is <code>null</code>.
      */
 
@@ -332,7 +332,7 @@
      * @param dgl the <code>DragGestureListener</code> to unregister
      * from this <code>DragGestureRecognizer</code>
      * <P>
-     * @throws <code>IllegalArgumentException</code> if
+     * @throws IllegalArgumentException if
      * dgl is not (equal to) the currently registered <code>DragGestureListener</code>.
      */
 
--- a/src/share/classes/java/awt/dnd/DragSource.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DragSource.java	Thu Oct 03 19:06:43 2013 +0100
@@ -676,7 +676,7 @@
      *          <code><em>Foo</em>Listener</code>s on this
      *          <code>DragSource</code>, or an empty array if no such listeners
      *          have been added
-     * @exception <code>ClassCastException</code> if <code>listenerType</code>
+     * @exception ClassCastException if <code>listenerType</code>
      *          doesn't specify a class or interface that implements
      *          <code>java.util.EventListener</code>
      *
--- a/src/share/classes/java/awt/dnd/DragSourceContext.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DragSourceContext.java	Thu Oct 03 19:06:43 2013 +0100
@@ -63,7 +63,7 @@
  * itself between the platform and the
  * listeners provided by the initiator of the drag operation.
  * <p>
- * <a name="defaultCursor" />
+ * <a name="defaultCursor"></a>
  * By default, {@code DragSourceContext} sets the cursor as appropriate
  * for the current state of the drag and drop operation. For example, if
  * the user has chosen {@linkplain DnDConstants#ACTION_MOVE the move action},
--- a/src/share/classes/java/awt/dnd/DragSourceDragEvent.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DragSourceDragEvent.java	Thu Oct 03 19:06:43 2013 +0100
@@ -47,9 +47,9 @@
  * source and the drop action selected by the user. The user can select a drop
  * action by pressing modifier keys during the drag operation:
  * <pre>
- *   Ctrl + Shift -> ACTION_LINK
- *   Ctrl         -> ACTION_COPY
- *   Shift        -> ACTION_MOVE
+ *   Ctrl + Shift -&gt; ACTION_LINK
+ *   Ctrl         -&gt; ACTION_COPY
+ *   Shift        -&gt; ACTION_MOVE
  * </pre>
  * If the user selects a drop action, the <i>user drop action</i> is one of
  * <code>DnDConstants</code> that represents the selected drop action if this
@@ -103,7 +103,7 @@
      *        in one event. Use of the extended modifiers is
      *        preferred.
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see java.awt.event.InputEvent
      * @see DragSourceEvent#getLocation
@@ -154,7 +154,7 @@
      * @param x   the horizontal coordinate for the cursor location
      * @param y   the vertical coordinate for the cursor location
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see java.awt.event.InputEvent
      * @since 1.4
--- a/src/share/classes/java/awt/dnd/DragSourceDropEvent.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DragSourceDropEvent.java	Thu Oct 03 19:06:43 2013 +0100
@@ -63,7 +63,7 @@
      * @param action the drop action
      * @param success a boolean indicating if the drop was successful
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see DragSourceEvent#getLocation
      */
@@ -91,7 +91,7 @@
      * @param x   the horizontal coordinate for the cursor location
      * @param y   the vertical coordinate for the cursor location
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @since 1.4
      */
@@ -112,7 +112,7 @@
      *
      * @param dsc the <code>DragSourceContext</code>
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see DragSourceEvent#getLocation
      */
--- a/src/share/classes/java/awt/dnd/DragSourceEvent.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DragSourceEvent.java	Thu Oct 03 19:06:43 2013 +0100
@@ -96,7 +96,7 @@
      *
      * @param dsc the <code>DragSourceContext</code>
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see #getLocation
      */
@@ -117,7 +117,7 @@
      * @param x   the horizontal coordinate for the cursor location
      * @param y   the vertical coordinate for the cursor location
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @since 1.4
      */
--- a/src/share/classes/java/awt/dnd/DropTarget.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DropTarget.java	Thu Oct 03 19:06:43 2013 +0100
@@ -305,7 +305,7 @@
      * <P>
      * @param dtl The new <code>DropTargetListener</code>
      * <P>
-     * @throws <code>TooManyListenersException</code> if a
+     * @throws TooManyListenersException if a
      * <code>DropTargetListener</code> is already added to this
      * <code>DropTarget</code>.
      */
@@ -351,6 +351,8 @@
      * @see #isActive
      */
     public synchronized void dragEnter(DropTargetDragEvent dtde) {
+        isDraggingInside = true;
+
         if (!active) return;
 
         if (dtListener != null) {
@@ -421,6 +423,8 @@
      * @see #isActive
      */
     public synchronized void dragExit(DropTargetEvent dte) {
+        isDraggingInside = false;
+
         if (!active) return;
 
         if (dtListener != null && active) dtListener.dragExit(dte);
@@ -444,6 +448,8 @@
      * @see #isActive
      */
     public synchronized void drop(DropTargetDropEvent dtde) {
+        isDraggingInside = false;
+
         clearAutoscroll();
 
         if (dtListener != null && active)
@@ -533,6 +539,12 @@
             ((DropTargetPeer)nativePeer).removeDropTarget(this);
 
         componentPeer = nativePeer = null;
+
+        synchronized (this) {
+            if (isDraggingInside) {
+                dragExit(new DropTargetEvent(getDropTargetContext()));
+            }
+        }
     }
 
     /**
@@ -832,7 +844,7 @@
     int     actions = DnDConstants.ACTION_COPY_OR_MOVE;
 
     /**
-     * <code>true</code> if the DropTarget is accepting Drag & Drop operations.
+     * <code>true</code> if the DropTarget is accepting Drag &amp; Drop operations.
      *
      * @serial
      */
@@ -855,4 +867,9 @@
      */
 
     private transient FlavorMap flavorMap;
+
+    /*
+     * If the dragging is currently inside this drop target
+     */
+    private transient boolean isDraggingInside;
 }
--- a/src/share/classes/java/awt/dnd/DropTargetDragEvent.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DropTargetDragEvent.java	Thu Oct 03 19:06:43 2013 +0100
@@ -49,9 +49,9 @@
  * source and the drop action selected by the user. The user can select a drop
  * action by pressing modifier keys during the drag operation:
  * <pre>
- *   Ctrl + Shift -> ACTION_LINK
- *   Ctrl         -> ACTION_COPY
- *   Shift        -> ACTION_MOVE
+ *   Ctrl + Shift -&gt; ACTION_LINK
+ *   Ctrl         -&gt; ACTION_COPY
+ *   Shift        -&gt; ACTION_MOVE
  * </pre>
  * If the user selects a drop action, the <i>user drop action</i> is one of
  * <code>DnDConstants</code> that represents the selected drop action if this
@@ -88,11 +88,11 @@
      * @param srcActions The source drop actions
      *
      * @throws NullPointerException if cursorLocn is null
-     * @throws <code>IllegalArgumentException</code> if dropAction is not one of
+     * @throws IllegalArgumentException if dropAction is not one of
      *         <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if srcActions is not
+     * @throws IllegalArgumentException if srcActions is not
      *         a bitwise mask of <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if dtc is <code>null</code>.
+     * @throws IllegalArgumentException if dtc is <code>null</code>.
      */
 
     public DropTargetDragEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)  {
--- a/src/share/classes/java/awt/dnd/DropTargetDropEvent.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/dnd/DropTargetDropEvent.java	Thu Oct 03 19:06:43 2013 +0100
@@ -48,9 +48,9 @@
  * source and the drop action selected by the user. The user can select a drop
  * action by pressing modifier keys during the drag operation:
  * <pre>
- *   Ctrl + Shift -> ACTION_LINK
- *   Ctrl         -> ACTION_COPY
- *   Shift        -> ACTION_MOVE
+ *   Ctrl + Shift -&gt; ACTION_LINK
+ *   Ctrl         -&gt; ACTION_COPY
+ *   Shift        -&gt; ACTION_MOVE
  * </pre>
  * If the user selects a drop action, the <i>user drop action</i> is one of
  * <code>DnDConstants</code> that represents the selected drop action if this
@@ -92,13 +92,13 @@
      * @param dropAction the user drop action.
      * @param srcActions the source drop actions.
      *
-     * @throws <code>NullPointerException</code>
+     * @throws NullPointerException
      * if cursorLocn is <code>null</code>
-     * @throws <code>IllegalArgumentException</code> if dropAction is not one of
-     *         <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if srcActions is not
-     *         a bitwise mask of <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if dtc is <code>null</code>.
+     * @throws IllegalArgumentException
+     *         if dropAction is not one of  <code>DnDConstants</code>.
+     * @throws IllegalArgumentException
+     *         if srcActions is not a bitwise mask of <code>DnDConstants</code>.
+     * @throws IllegalArgumentException if dtc is <code>null</code>.
      */
 
     public DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)  {
@@ -136,13 +136,12 @@
      * @param srcActions the source drop actions.
      * @param isLocal  True if the source is in the same JVM as the target
      *
-     * @throws <code>NullPointerException</code> if cursorLocn is
-     *         <code>null</code>
-     * @throws <code>IllegalArgumentException</code> if dropAction is not one of
-     *         <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if srcActions is not
-     *         a bitwise mask of <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if dtc is <code>null</code>.
+     * @throws NullPointerException
+     *         if cursorLocn is  <code>null</code>
+     * @throws IllegalArgumentException
+     *         if dropAction is not one of <code>DnDConstants</code>.
+     * @throws IllegalArgumentException if srcActions is not a bitwise mask of <code>DnDConstants</code>.
+     * @throws IllegalArgumentException  if dtc is <code>null</code>.
      */
 
     public DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions, boolean isLocal)  {
--- a/src/share/classes/java/awt/event/InputEvent.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/event/InputEvent.java	Thu Oct 03 19:06:43 2013 +0100
@@ -33,6 +33,7 @@
 
 import sun.awt.AWTAccessor;
 import sun.util.logging.PlatformLogger;
+import sun.security.util.SecurityConstants;
 
 /**
  * The root event class for all component-level input events.
@@ -350,7 +351,7 @@
             SecurityManager sm = System.getSecurityManager();
             if (sm != null) {
                 try {
-                    sm.checkSystemClipboardAccess();
+                    sm.checkPermission(SecurityConstants.AWT.ACCESS_CLIPBOARD_PERMISSION);
                     b = true;
                 } catch (SecurityException se) {
                     if (logger.isLoggable(PlatformLogger.Level.FINE)) {
--- a/src/share/classes/java/awt/event/MouseMotionListener.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/event/MouseMotionListener.java	Thu Oct 03 19:06:43 2013 +0100
@@ -60,9 +60,9 @@
      * mouse button is released (regardless of whether the mouse position
      * is within the bounds of the component).
      * <p>
-     * Due to platform-dependent Drag&Drop implementations,
+     * Due to platform-dependent Drag&amp;Drop implementations,
      * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
-     * Drag&Drop operation.
+     * Drag&amp;Drop operation.
      */
     public void mouseDragged(MouseEvent e);
 
--- a/src/share/classes/java/awt/font/TransformAttribute.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/awt/font/TransformAttribute.java	Thu Oct 03 19:06:43 2013 +0100
@@ -141,14 +141,16 @@
      * @since 1.6
      */
     public boolean equals(Object rhs) {
-        try {
-            TransformAttribute that = (TransformAttribute)rhs;
-            if (transform == null) {
-                return that.transform == null;
+        if (rhs != null) {
+            try {
+                TransformAttribute that = (TransformAttribute)rhs;
+                if (transform == null) {
+                    return that.transform == null;
+                }
+                return transform.equals(that.transform);
             }
-            return transform.equals(that.transform);
-        }
-        catch (ClassCastException e) {
+            catch (ClassCastException e) {
+            }
         }
         return false;
     }
--- a/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Thu Oct 03 19:06:43 2013 +0100
@@ -149,6 +149,7 @@
      * @return An expression whose value is <code>oldInstance</code>.
      *
      * @throws NullPointerException if {@code out} is {@code null}
+     *                              and this value is used in the method
      *
      * @see #DefaultPersistenceDelegate(String[])
      */
--- a/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Thu Oct 03 19:06:43 2013 +0100
@@ -41,8 +41,8 @@
 public class IndexedPropertyDescriptor extends PropertyDescriptor {
 
     private Reference<? extends Class<?>> indexedPropertyTypeRef;
-    private Reference<Method> indexedReadMethodRef;
-    private Reference<Method> indexedWriteMethodRef;
+    private final MethodRef indexedReadMethodRef = new MethodRef();
+    private final MethodRef indexedWriteMethodRef = new MethodRef();
 
     private String indexedReadMethodName;
     private String indexedWriteMethodName;
@@ -173,11 +173,11 @@
      * May return null if the property isn't indexed or is write-only.
      */
     public synchronized Method getIndexedReadMethod() {
-        Method indexedReadMethod = getIndexedReadMethod0();
+        Method indexedReadMethod = this.indexedReadMethodRef.get();
         if (indexedReadMethod == null) {
             Class<?> cls = getClass0();
             if (cls == null ||
-                (indexedReadMethodName == null && indexedReadMethodRef == null)) {
+                (indexedReadMethodName == null && !this.indexedReadMethodRef.isSet())) {
                 // the Indexed readMethod was explicitly set to null.
                 return null;
             }
@@ -215,20 +215,19 @@
 
         // the indexed property type is set by the reader.
         setIndexedPropertyType(findIndexedPropertyType(readMethod,
-                                                       getIndexedWriteMethod0()));
+                                                       this.indexedWriteMethodRef.get()));
         setIndexedReadMethod0(readMethod);
     }
 
     private void setIndexedReadMethod0(Method readMethod) {
+        this.indexedReadMethodRef.set(readMethod);
         if (readMethod == null) {
             indexedReadMethodName = null;
-            indexedReadMethodRef = null;
             return;
         }
         setClass0(readMethod.getDeclaringClass());
 
         indexedReadMethodName = readMethod.getName();
-        this.indexedReadMethodRef = getSoftReference(readMethod);
         setTransient(readMethod.getAnnotation(Transient.class));
     }
 
@@ -241,11 +240,11 @@
      * May return null if the property isn't indexed or is read-only.
      */
     public synchronized Method getIndexedWriteMethod() {
-        Method indexedWriteMethod = getIndexedWriteMethod0();
+        Method indexedWriteMethod = this.indexedWriteMethodRef.get();
         if (indexedWriteMethod == null) {
             Class<?> cls = getClass0();
             if (cls == null ||
-                (indexedWriteMethodName == null && indexedWriteMethodRef == null)) {
+                (indexedWriteMethodName == null && !this.indexedWriteMethodRef.isSet())) {
                 // the Indexed writeMethod was explicitly set to null.
                 return null;
             }
@@ -301,15 +300,14 @@
     }
 
     private void setIndexedWriteMethod0(Method writeMethod) {
+        this.indexedWriteMethodRef.set(writeMethod);
         if (writeMethod == null) {
             indexedWriteMethodName = null;
-            indexedWriteMethodRef = null;
             return;
         }
         setClass0(writeMethod.getDeclaringClass());
 
         indexedWriteMethodName = writeMethod.getName();
-        this.indexedWriteMethodRef = getSoftReference(writeMethod);
         setTransient(writeMethod.getAnnotation(Transient.class));
     }
 
@@ -349,18 +347,6 @@
                 : null;
     }
 
-    private Method getIndexedReadMethod0() {
-        return (this.indexedReadMethodRef != null)
-                ? this.indexedReadMethodRef.get()
-                : null;
-    }
-
-    private Method getIndexedWriteMethod0() {
-        return (this.indexedWriteMethodRef != null)
-                ? this.indexedWriteMethodRef.get()
-                : null;
-    }
-
     private Class<?> findIndexedPropertyType(Method indexedReadMethod,
                                           Method indexedWriteMethod)
         throws IntrospectionException {
@@ -492,8 +478,8 @@
      */
     IndexedPropertyDescriptor(IndexedPropertyDescriptor old) {
         super(old);
-        indexedReadMethodRef = old.indexedReadMethodRef;
-        indexedWriteMethodRef = old.indexedWriteMethodRef;
+        this.indexedReadMethodRef.set(old.indexedReadMethodRef.get());
+        this.indexedWriteMethodRef.set(old.indexedWriteMethodRef.get());
         indexedPropertyTypeRef = old.indexedPropertyTypeRef;
         indexedWriteMethodName = old.indexedWriteMethodName;
         indexedReadMethodName = old.indexedReadMethodName;
@@ -502,7 +488,7 @@
     void updateGenericsFor(Class<?> type) {
         super.updateGenericsFor(type);
         try {
-            setIndexedPropertyType(findIndexedPropertyType(getIndexedReadMethod0(), getIndexedWriteMethod0()));
+            setIndexedPropertyType(findIndexedPropertyType(this.indexedReadMethodRef.get(), this.indexedWriteMethodRef.get()));
         }
         catch (IntrospectionException exception) {
             setIndexedPropertyType(null);
@@ -532,7 +518,7 @@
     void appendTo(StringBuilder sb) {
         super.appendTo(sb);
         appendTo(sb, "indexedPropertyType", this.indexedPropertyTypeRef);
-        appendTo(sb, "indexedReadMethod", this.indexedReadMethodRef);
-        appendTo(sb, "indexedWriteMethod", this.indexedWriteMethodRef);
+        appendTo(sb, "indexedReadMethod", this.indexedReadMethodRef.get());
+        appendTo(sb, "indexedWriteMethod", this.indexedWriteMethodRef.get());
     }
 }
--- a/src/share/classes/java/beans/MethodDescriptor.java	Sat Sep 14 19:21:07 2013 +0100
+++ b/src/share/classes/java/beans/MethodDescriptor.java	Thu Oct 03 19:06:43 2013 +0100
@@ -38,7 +38,7 @@
 
 public class MethodDescriptor extends FeatureDescriptor {
 
-    private Reference<Method> methodRef;
+    private final MethodRef methodRef = new MethodRef();
 
     private String[] paramNames;
 
@@ -81,7 +81,7 @@
      * @return The low-level description of the method
      */
     public synchronized Method getMethod() {
-        Method method = getMethod0();
+        Method method = this.methodRef.get();
         if (method == null) {
             Class<?> cls = getClass0();
             String name = getName();