changeset 23017:e52291e0a2e1

Merge
author kvn
date Tue, 18 Feb 2014 15:48:14 -0800
parents 1805013d2034 309eaab8c853
children 2de83a4d6b0c
files jdk/make/gensrc/GensrcJObjC.gmk jdk/make/scripts/genCharsetProvider.sh jdk/src/macosx/native/java/util/MacOSXPreferencesFile.m jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m jdk/src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns jdk/src/share/classes/sun/misc/FpUtils.java jdk/src/share/classes/sun/misc/Service.java jdk/src/share/classes/sun/misc/ServiceConfigurationError.java jdk/src/share/classes/sun/nio/cs/standard-charsets jdk/src/solaris/native/java/util/FileSystemPreferences.c jdk/src/solaris/native/java/util/logging.c jdk/src/solaris/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c jdk/src/windows/native/java/util/WindowsPreferences.c jdk/src/windows/native/java/util/logging.c jdk/test/java/lang/Runtime/exec/CloseRace.java jdk/test/java/lang/management/ThreadMXBean/ThreadExecutionSynchronizer.java jdk/test/sun/security/krb5/ConfPlusProp.java jdk/test/sun/security/krb5/ConfigWithQuotations.java jdk/test/sun/security/krb5/DnsFallback.java jdk/test/sun/security/krb5/ParseCAPaths.java jdk/test/sun/security/krb5/ParseConfig.java jdk/test/sun/security/krb5/confplusprop.conf jdk/test/sun/security/krb5/confplusprop2.conf jdk/test/sun/security/krb5/edu.mit.Kerberos jdk/test/sun/security/krb5/krb5-capaths.conf jdk/test/sun/security/krb5/krb5.conf jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNamesTest.java jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_de.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_de_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_es.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_es_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_fr.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_fr_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_it.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_it_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_ja.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_ja_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_ko.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_ko_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_pt_BR.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_pt_BR_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_sv.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_sv_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_zh_CN.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_zh_CN_short.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_zh_TW.properties jdk/test/sun/util/resources/TimeZone/TimeZoneNames/TimeZoneNames_zh_TW_short.properties
diffstat 364 files changed, 9088 insertions(+), 33454 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/make/CompileJavaClasses.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/CompileJavaClasses.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -44,6 +44,10 @@
     com/sun/tools/example/debug/event \
     com/sun/tools/example/debug/gui
 
+ifeq ($(RMICONNECTOR_IIOP), false)
+  EXCLUDES += com/sun/jmx/remote/protocol/iiop
+endif
+
 ifdef OPENJDK
   EXCLUDES += sun/dc \
       com/sun/jmx/snmp \
@@ -409,7 +413,7 @@
 
 ##########################################################################################
 
-all: $(BUILD_JDK) $(BUILD_SECURITY) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \
+all: $(BUILD_JDK) $(BUILD_SECURITY) $(COPY_EXTRA) \
     $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
     $(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \
     $(BUILD_ACCESSBRIDGE_LEGACY)
--- a/jdk/make/GenerateClasses.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/GenerateClasses.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -52,7 +52,7 @@
 
 ##########################################################################################
 
-BTRMIC_CP := $(CORBA_OUTPUTDIR)/btjars/btcorba.jar$(PATH_SEP)$(JDK_OUTPUTDIR)/btclasses_rmic$(PATH_SEP)$(BOOTSTRAP_JAVAC_JAR)
+BTRMIC_CP := $(INTERIM_CORBA_JAR)$(PATH_SEP)$(JDK_OUTPUTDIR)/btclasses_rmic$(PATH_SEP)$(INTERIM_LANGTOOLS_JAR)
 BTRMIC_ARGS := "-Xbootclasspath/p:$(BTRMIC_CP)" -cp "$(BTRMIC_CP)"
 RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
 
@@ -89,21 +89,25 @@
 # For RMI/IIOP call rmic a second time with -standardPackage option
 # so that *_tie classes are generated in package without the prefix
 # org.omg.stub (6375696)
-JMAN_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
+JMX_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
     javax.management.remote.rmi.RMIServerImpl
+GENRMIIIOPCLASSES :=
+ifneq ($(RMICONNECTOR_IIOP), false)
+  GENRMIIIOPCLASSES := $(RMICONNECTOR_IIOP)
+endif
 $(eval $(call SetupRMICompilation,RMI_IIOP, \
-    CLASSES := $(JMAN_RMI_CLASSES), \
+    CLASSES := $(JMX_RMI_CLASSES), \
     CLASSES_DIR := $(CLASSES_DIR), \
     STUB_CLASSES_DIR := $(STUB_CLASSES_DIR), \
     RUN_V12 := true, \
-    RUN_IIOP := true, \
-    RUN_IIOP_STDPKG := true))
+    RUN_IIOP := $(GENRMIIIOPCLASSES), \
+    RUN_IIOP_STDPKG := $(GENRMIIIOPCLASSES)))
 GENCLASSES += $(RMI_IIOP)
 
 # Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR
 # so that javadoc can include them in the API (4997471)
 $(eval $(call SetupRMICompilation,RMI_SRC, \
-    CLASSES := $(JMAN_RMI_CLASSES), \
+    CLASSES := $(JMX_RMI_CLASSES), \
     CLASSES_DIR := $(CLASSES_DIR), \
     STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR), \
     RUN_V12 := true, \
--- a/jdk/make/GenerateSources.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/GenerateSources.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -29,6 +29,7 @@
 include MakeBase.gmk
 include JavaCompilation.gmk
 include NativeCompilation.gmk
+include TextFileProcessing.gmk
 
 # Setup the java compilers for the JDK build.
 include Setup.gmk
--- a/jdk/make/Tools.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/Tools.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -102,7 +102,7 @@
 
 # TODO: Lots of files in jdk/make/tools/CharsetMapping dir
 TOOL_CHARSETMAPPING = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
-    build.tools.charsetmapping.Main
+    build.tools.charsetmapping.Main $(LOG_INFO)
 
 TOOL_SPP = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
 
@@ -122,12 +122,12 @@
 TOOL_CLDRCONVERTER = $(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
     build.tools.cldrconverter.CLDRConverter
 
-TOOL_CHECKDEPS = $(JAVA) -Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+TOOL_CHECKDEPS = $(JAVA) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
     -cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
     build.tools.deps.CheckDeps
 
 TOOL_ADDTORESTRICTEDPKGS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
- 	build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
+    build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
 
 ##########################################################################################
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/data/charsetmapping/standard-charsets	Tue Feb 18 15:48:14 2014 -0800
@@ -0,0 +1,337 @@
+#
+# Copyright (c) 2000, 2014, 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.
+#
+
+# Standard charsets provided by StandardCharsets provider.
+#
+# Note that these "standard" charsets listed here are not
+# necessary to be the "Standard charsets" defined in the
+# specification of java.nio.charset.Charset. Instead these
+# are the charsets that this implementation believes should
+# be packaged into the charsets provider class "StandardCharsets"
+# which is initialized at startup time by java.nio.charset.Charset,
+# compared to the charsets packaged in "ExtendedCharsets" provider,
+# which is lazy initialized.
+
+charset US-ASCII US_ASCII
+
+    # IANA aliases
+    alias iso-ir-6
+    alias ANSI_X3.4-1986
+    alias ISO_646.irv:1991
+    alias ASCII
+    alias ISO646-US
+    alias us
+    alias IBM367
+    alias cp367
+    alias csASCII
+    alias default
+
+    # Other aliases
+    alias 646				# Solaris POSIX locale
+    alias iso_646.irv:1983
+    alias ANSI_X3.4-1968		# Linux POSIX locale (RedHat)
+    alias ascii7
+
+charset UTF-8 UTF_8
+    alias UTF8				# JDK historical
+    alias unicode-1-1-utf-8
+
+charset CESU-8 CESU_8
+    alias CESU8
+    alias csCESU-8
+
+charset UTF-16 UTF_16
+    alias UTF_16			# JDK historical
+    alias utf16
+    alias unicode
+    alias UnicodeBig
+
+charset UTF-16BE UTF_16BE
+    alias UTF_16BE
+    alias ISO-10646-UCS-2
+    alias X-UTF-16BE
+    alias UnicodeBigUnmarked
+
+charset UTF-16LE UTF_16LE
+    alias UTF_16LE
+    alias X-UTF-16LE
+    alias UnicodeLittleUnmarked
+
+charset x-UTF-16LE-BOM UTF_16LE_BOM
+    alias UnicodeLittle
+
+charset UTF-32 UTF_32
+    alias UTF_32
+    alias UTF32
+
+charset UTF-32LE UTF_32LE
+    alias UTF_32LE
+    alias X-UTF-32LE
+
+charset UTF-32BE UTF_32BE
+    alias UTF_32BE
+    alias X-UTF-32BE
+
+charset X-UTF-32LE-BOM UTF_32LE_BOM
+    alias UTF_32LE_BOM
+    alias UTF-32LE-BOM
+
+charset X-UTF-32BE-BOM UTF_32BE_BOM
+    alias UTF_32BE_BOM
+    alias UTF-32BE-BOM
+
+charset ISO-8859-1 ISO_8859_1
+
+    # IANA aliases
+    alias iso-ir-100
+    alias ISO_8859-1
+    alias latin1
+    alias l1
+    alias IBM819
+    alias cp819
+    alias csISOLatin1
+
+    # Other aliases
+    alias 819
+    alias IBM-819
+    alias ISO8859_1
+    alias ISO_8859-1:1987
+    alias ISO_8859_1
+    alias 8859_1
+    alias ISO8859-1
+
+charset ISO-8859-2 ISO_8859_2
+    alias iso8859_2			# JDK historical
+    alias 8859_2
+    alias iso-ir-101
+    alias ISO_8859-2
+    alias ISO_8859-2:1987
+    alias ISO8859-2
+    alias latin2
+    alias l2
+    alias ibm912
+    alias ibm-912
+    alias cp912
+    alias 912
+    alias csISOLatin2
+
+charset ISO-8859-4 ISO_8859_4
+    alias iso8859_4			# JDK historical
+    alias iso8859-4
+    alias 8859_4
+    alias iso-ir-110
+    alias ISO_8859-4
+    alias ISO_8859-4:1988
+    alias latin4
+    alias l4
+    alias ibm914
+    alias ibm-914
+    alias cp914
+    alias 914
+    alias csISOLatin4
+
+charset ISO-8859-5 ISO_8859_5
+    alias iso8859_5			# JDK historical
+    alias 8859_5
+    alias iso-ir-144
+    alias ISO_8859-5
+    alias ISO_8859-5:1988
+    alias ISO8859-5
+    alias cyrillic
+    alias ibm915
+    alias ibm-915
+    alias cp915
+    alias 915
+    alias csISOLatinCyrillic
+
+charset ISO-8859-7 ISO_8859_7
+    alias iso8859_7			# JDK historical
+    alias 8859_7
+    alias iso-ir-126
+    alias ISO_8859-7
+    alias ISO_8859-7:1987
+    alias ELOT_928
+    alias ECMA-118
+    alias greek
+    alias greek8
+    alias csISOLatinGreek
+    alias sun_eu_greek			# Solaris 7/8 compatibility
+    alias ibm813
+    alias ibm-813
+    alias 813
+    alias cp813
+    alias iso8859-7			# Solaris 9 compatibility
+
+charset ISO-8859-9 ISO_8859_9
+    alias iso8859_9			# JDK historical
+    alias 8859_9
+    alias iso-ir-148
+    alias ISO_8859-9
+    alias ISO_8859-9:1989
+    alias ISO8859-9
+    alias latin5
+    alias l5
+    alias ibm920
+    alias ibm-920
+    alias 920
+    alias cp920
+    alias csISOLatin5
+
+charset ISO-8859-13 ISO_8859_13
+    alias iso8859_13			# JDK historical
+    alias 8859_13
+    alias iso_8859-13
+    alias ISO8859-13
+
+charset ISO-8859-15 ISO_8859_15
+
+    # IANA alias
+    alias ISO_8859-15
+
+    # Other aliases
+    alias 8859_15
+    alias ISO-8859-15
+    alias ISO8859_15
+    alias ISO8859-15
+    alias IBM923
+    alias IBM-923
+    alias cp923
+    alias 923
+    alias LATIN0
+    alias LATIN9
+    alias L9
+    alias csISOlatin0
+    alias csISOlatin9
+    alias ISO8859_15_FDIS
+
+charset KOI8-R KOI8_R
+    alias koi8_r			# JDK historical
+    alias koi8
+    alias cskoi8r
+
+charset KOI8-U KOI8_U
+    alias koi8_u
+
+charset windows-1250 MS1250
+    alias cp1250			# JDK historical
+    alias cp5346			# Euro IBM CCSID
+
+charset windows-1251 MS1251
+    alias cp1251			# JDK historical
+    alias cp5347			# Euro IBM CCSID
+    alias ansi-1251			# Solaris compatibility
+
+charset windows-1252 MS1252
+    alias cp1252			# JDK historical
+    alias cp5348			# Euro IBM CCSID
+
+charset windows-1253 MS1253
+    alias cp1253			# JDK historical
+    alias cp5349			# Euro IBM CCSID
+
+charset windows-1254 MS1254
+    alias cp1254			# JDK historical
+    alias cp5350			# Euro IBM CCSID
+
+charset windows-1257 MS1257
+    alias cp1257			# JDK historical
+    alias cp5353			# Euro IBM CCSID
+
+
+charset IBM437 IBM437
+    alias cp437                         #JDK historical
+    alias ibm437
+    alias ibm-437
+    alias 437
+    alias cspc8codepage437
+    alias windows-437
+
+charset x-IBM737 IBM737
+    alias cp737                         #JDK historical
+    alias ibm737
+    alias ibm-737
+    alias 737
+
+charset IBM775 IBM775
+    alias cp775                         #JDK historical
+    alias ibm775
+    alias ibm-775
+    alias 775
+
+charset IBM850 IBM850
+    alias cp850                         #JDK historical
+    alias ibm-850
+    alias ibm850
+    alias 850
+    alias cspc850multilingual
+
+charset IBM852 IBM852
+    alias cp852                         #JDK historical
+    alias ibm852
+    alias ibm-852
+    alias 852
+    alias csPCp852
+
+charset IBM855 IBM855
+    alias cp855                         #JDK historical
+    alias ibm-855
+    alias ibm855
+    alias 855
+    alias cspcp855
+
+charset IBM857 IBM857
+    alias cp857                         #JDK historical
+    alias ibm857
+    alias ibm-857
+    alias 857
+    alias csIBM857
+
+charset IBM00858 IBM858
+    alias cp858                         #JDK historical
+    alias ccsid00858
+    alias cp00858
+    alias 858
+    alias PC-Multilingual-850+euro
+
+charset IBM862 IBM862
+    alias cp862                         #JDK historical
+    alias ibm862
+    alias ibm-862
+    alias 862
+    alias csIBM862
+    alias cspc862latinhebrew
+
+charset IBM866 IBM866
+    alias cp866                         #JDK historical
+    alias ibm866
+    alias ibm-866
+    alias 866
+    alias csIBM866
+
+charset x-IBM874 IBM874
+    alias cp874                         #JDK historical
+    alias ibm874
+    alias ibm-874
+    alias 874
Binary file jdk/make/data/macosxicons/JavaApp.icns has changed
--- a/jdk/make/data/tzdata/VERSION	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/data/tzdata/VERSION	Tue Feb 18 15:48:14 2014 -0800
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2013h
+tzdata2013i
--- a/jdk/make/data/tzdata/africa	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/data/tzdata/africa	Tue Feb 18 15:48:14 2014 -0800
@@ -500,14 +500,13 @@
 Rule	Libya	1997	only	-	Oct	 4	0:00	0	-
 Rule	Libya	2013	only	-	Mar	lastFri	1:00	1:00	S
 Rule	Libya	2013	only	-	Oct	lastFri	2:00	0	-
-
-# The 1996 and 1997 entries are from Shanks & Pottenger;
-# the IATA SSIM data contain some obvious errors.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Tripoli	0:52:44 -	LMT	1920
 			1:00	Libya	CE%sT	1959
 			2:00	-	EET	1982
 			1:00	Libya	CE%sT	1990 May  4
+# The 1996 and 1997 entries are from Shanks & Pottenger;
+# the IATA SSIM data contain some obvious errors.
 			2:00	-	EET	1996 Sep 30
 			1:00	Libya	CE%sT	1997 Oct  4
 			2:00	-	EET	2012 Nov 10 2:00
--- a/jdk/make/data/tzdata/asia	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/data/tzdata/asia	Tue Feb 18 15:48:14 2014 -0800
@@ -1403,12 +1403,22 @@
 # switch back to standard time this winter, so the will stay on DST
 # until about the same time next year (at least).
 # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950
-#
-# From Paul Eggert (2013-09-21):
-# It's looking like this change will be permanent; see
-# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20)
-# <http://www.albawaba.com/business/jordan-winter-electricity--472005>.
-# So move Jordan to UTC+3 as of the abovementioned date.
+
+# From Steffen Thorsen (2013-12-11):
+# Jordan Times and other sources say that Jordan is going back to
+# UTC+2 on 2013-12-19 at midnight:
+# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime
+# Official, in Arabic:
+# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=&Site_Id=2&lang=1&NewsID=133230&CatID=14
+# ... Our background/permalink about it
+# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
+# ...
+# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2&site_id=1&NewsID=133313&Type=P
+# ... says midnight for the coming one and 1:00 for the ones in the future
+# (and they will use DST again next year, using the normal schedule).
+
+# From Paul Eggert (2013-12-11):
+# As Steffen suggested, consider the past 21-month experiment to be DST.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Jordan	1973	only	-	Jun	6	0:00	1:00	S
@@ -1438,11 +1448,13 @@
 Rule	Jordan	2003	only	-	Oct	24	0:00s	0	-
 Rule	Jordan	2004	only	-	Oct	15	0:00s	0	-
 Rule	Jordan	2005	only	-	Sep	lastFri	0:00s	0	-
-Rule	Jordan	2006	2012	-	Oct	lastFri	0:00s	0	-
+Rule	Jordan	2006	2011	-	Oct	lastFri	0:00s	0	-
+Rule	Jordan	2013	only	-	Dec	20	0:00	0	-
+Rule	Jordan	2014	max	-	Mar	lastThu	24:00	1:00	S
+Rule	Jordan	2014	max	-	Oct	lastFri	0:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Amman	2:23:44 -	LMT	1931
-			2:00	Jordan	EE%sT	2012 Oct 26 0:00s
-			3:00	-	AST
+			2:00	Jordan	EE%sT
 
 
 # Kazakhstan
--- a/jdk/make/data/tzdata/northamerica	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/data/tzdata/northamerica	Tue Feb 18 15:48:14 2014 -0800
@@ -2688,6 +2688,11 @@
 # to DST--and one more hour on 1999-04-04--when the announcers will have
 # returned to Baltimore, which switches on that date.)
 
+# From Steffen Thorsen (2013-11-11):
+# DST start in Cuba in 2004 ... does not follow the same rules as the
+# years before.  The correct date should be Sunday 2004-03-28 00:00 ...
+# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html
+
 # From Evert van der Veer via Steffen Thorsen (2004-10-28):
 # Cuba is not going back to standard time this year.
 # From Paul Eggert (2006-03-22):
@@ -2877,7 +2882,8 @@
 Rule	Cuba	1997	only	-	Oct	12	0:00s	0	S
 Rule	Cuba	1998	1999	-	Mar	lastSun	0:00s	1:00	D
 Rule	Cuba	1998	2003	-	Oct	lastSun	0:00s	0	S
-Rule	Cuba	2000	2004	-	Apr	Sun>=1	0:00s	1:00	D
+Rule	Cuba	2000	2003	-	Apr	Sun>=1	0:00s	1:00	D
+Rule	Cuba	2004	only	-	Mar	lastSun	0:00s	1:00	D
 Rule	Cuba	2006	2010	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
 Rule	Cuba	2008	only	-	Mar	Sun>=15	0:00s	1:00	D
--- a/jdk/make/gensrc/GensrcCharsetMapping.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/gensrc/GensrcCharsetMapping.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, 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,80 +25,151 @@
 
 GENSRC_CHARSETMAPPING :=
 
-GENSRC_TMP := $(JDK_OUTPUTDIR)/gensrc
-GENSRC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
-
-GENSRC_DATA := $(JDK_TOPDIR)/make/data/charsetmapping
-GENSRC_JAVA_SRC := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
-
-GENSRC_TEMPLATES := $(GENSRC_DATA)/SingleByte-X.java.template $(GENSRC_DATA)/DoubleByte-X.java.template
+CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
 
 ###
+### Generate files using the charsetmapping tool
+###
 
-$(GENSRC_TMP)/_the.charsetmapping.dir:
-	$(ECHO) Generating charsetmapping classes
-	$(MKDIR) -p $(GENSRC_DST)/ext
-	$(TOUCH) $@
+CHARSET_GENSRC_JAVA_DIR := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
+CHARSET_DONE := $(CHARSET_GENSRC_JAVA_DIR)/_the.charsetmapping
+CHARSET_COPYRIGHT_HEADER_BASE := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
+CHARSET_TEMPLATES := \
+    $(CHARSET_DATA_DIR)/SingleByte-X.java.template \
+    $(CHARSET_DATA_DIR)/DoubleByte-X.java.template
+
+# This target should be referenced using the order-only operator (|)
+$(CHARSET_GENSRC_JAVA_DIR)/ext:
+	$(ECHO)	"Generating charset mappings"
+	$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR)/ext
+
+$(CHARSET_DONE)-sbcs: $(CHARSET_DATA_DIR)/sbcs \
+    $(CHARSET_TEMPLATES) $(BUILD_TOOLS) | $(CHARSET_GENSRC_JAVA_DIR)/ext
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR) sbcs
+	$(TOUCH) '$@'
+
+$(CHARSET_DONE)-extsbcs: $(CHARSET_DATA_DIR)/extsbcs  \
+    $(CHARSET_DONE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS) 
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext extsbcs
+	$(TOUCH) '$@'
+
+$(CHARSET_DONE)-dbcs: $(CHARSET_DATA_DIR)/dbcs \
+    $(CHARSET_DONE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS) 
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext dbcs
+	$(TOUCH) '$@'
+
+$(CHARSET_DONE)-hkscs: $(CHARSET_COPYRIGHT_HEADER_BASE)/HKSCS.java \
+    $(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext hkscs '$<'
+	$(TOUCH) '$@'
+
+$(CHARSET_DONE)-euctw: $(CHARSET_COPYRIGHT_HEADER_BASE)/EUC_TW.java \
+    $(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
+	$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext euctw '$<'
+	$(TOUCH) '$@'
+
+$(CHARSET_GENSRC_JAVA_DIR)/ext/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
+    $(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
+	$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
+
+GENSRC_CHARSETMAPPING += \
+    $(CHARSET_DONE)-sbcs \
+    $(CHARSET_DONE)-extsbcs \
+    $(CHARSET_DONE)-dbcs \
+    $(CHARSET_DONE)-hkscs \
+    $(CHARSET_DONE)-euctw \
+    $(CHARSET_GENSRC_JAVA_DIR)/ext/sjis0213.dat \
+    #
 
 ###
-
-GENSRC_SB := $(GENSRC_TMP)/_the.charsetmapping.sbcs
-
-$(GENSRC_SB): $(GENSRC_DATA)/sbcs $(GENSRC_TEMPLATES) $(GENSRC_TMP)/_the.charsetmapping.dir
-	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_DATA) $(GENSRC_DST) sbcs
-	$(TOUCH) $@
-
-GENSRC_CHARSETMAPPING += $(GENSRC_SB)
-
+### Generate the sun/nio/cs/StandardCharsets.java file
 ###
 
-$(GENSRC_DST)/ext/sjis0213.dat: $(GENSRC_DATA)/sjis0213.map $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $< $@ sjis0213
+CHARSET_STANDARD_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/standardcharsets
+CHARSET_STANDARD_DATA := $(CHARSET_DATA_DIR)/standard-charsets
+CHARSET_STANDARD_JAVA :=  sun/nio/cs/StandardCharsets.java
 
-GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/sjis0213.dat
+CHARSET_ALIASES_TABLES_AWK := ' \
+    BEGIN { n = 1; m = 1; } \
+    /^[ \t]*charset / { \
+      csn = $$2; cln = $$3; \
+      lcsn = tolower(csn); \
+      lcsns[n++] = lcsn; \
+      csns[lcsn] = csn; \
+      classMap[lcsn] = cln; \
+      if (n > 2) \
+        printf "    };\n\n"; \
+      printf "    static final String[] aliases_%s = new String[] {\n", cln; \
+    } \
+    /^[ \t]*alias / { \
+      acsns[m++] = tolower($$2); \
+      aliasMap[tolower($$2)] = lcsn; \
+      printf "        \"%s\",\n", $$2; \
+    } \
+    END { \
+      printf "    };\n\n"; \
+    } '
 
-###
+CHARSET_ALIASES_MAP_AWK := ' \
+    /^[ \t]*charset / { \
+      csn = $$2; \
+      lcsn = tolower(csn); \
+    } \
+    /^[ \t]*alias / { \
+      an = tolower($$2); \
+      printf "%-20s \"%s\"\n", an, lcsn; \
+    } '
 
-$(GENSRC_DST)/ext/EUC_TWMapping.java: $(GENSRC_JAVA_SRC)/EUC_TW.java $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_DATA) $(GENSRC_DST)/ext euctw $(GENSRC_JAVA_SRC)/EUC_TW.java
+CHARSET_CLASSES_MAP_AWK := ' \
+    /^[ \t]*charset / { \
+      csn = $$2; cln = $$3; \
+      lcsn = tolower(csn); \
+      printf "%-20s \"%s\"\n", lcsn, cln; \
+    } '
 
-GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/EUC_TWMapping.java
+# This target should be referenced using the order-only operator (|)
+$(CHARSET_STANDARD_GENSRC_DIR):
+	$(MKDIR) -p '$@'
 
-###
+$(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet: $(CHARSET_STANDARD_DATA) \
+    | $(CHARSET_STANDARD_GENSRC_DIR)
+	$(NAWK) < '$<' > '$@' $(CHARSET_ALIASES_TABLES_AWK)
 
-$(GENSRC_DST)/ext/HKSCSMapping.java: $(GENSRC_JAVA_SRC)/HKSCS.java $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(LOG_INFO) $(GENSRC_DATA) $(GENSRC_DST)/ext hkscs $(GENSRC_JAVA_SRC)/HKSCS.java
+$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map: $(CHARSET_STANDARD_DATA) \
+    | $(CHARSET_STANDARD_GENSRC_DIR)
+	$(NAWK) < '$<' > '$@' $(CHARSET_ALIASES_MAP_AWK)
 
-GENSRC_CHARSETMAPPING += $(GENSRC_DST)/ext/HKSCSMapping.java
+$(CHARSET_STANDARD_GENSRC_DIR)/classes-map: $(CHARSET_STANDARD_DATA) \
+    | $(CHARSET_STANDARD_GENSRC_DIR)
+	$(NAWK) < '$<' > '$@' $(CHARSET_CLASSES_MAP_AWK)
 
-###
+$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map \
+    $(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
+	$(TOOL_HASHER) -i Aliases < '$<' > '$@'
 
-$(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs: $(GENSRC_DATA)/extsbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(GENSRC_DATA) $(LOG_INFO) $(GENSRC_DST)/ext extsbcs
-	$(TOUCH) $@
+$(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
+    $(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
+	$(TOOL_HASHER) -i Classes < '$<' > '$@'
 
-GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.extsbcs
+$(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
+    $(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
+	$(TOOL_HASHER) -i -e Cache -t Charset < '$<' > '$@'
 
-###
+$(eval $(call SetupTextFileProcessing, BUILD_CHARSET_STANDARD, \
+    SOURCE_FILES := $(JDK_TOPDIR)/src/share/classes/$(CHARSET_STANDARD_JAVA).template, \
+    OUTPUT_FILE := $(JDK_OUTPUTDIR)/gensrc/$(CHARSET_STANDARD_JAVA), \
+    INCLUDES := \
+        _INCLUDE_ALIASES_TABLES_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet ; \
+        _INCLUDE_ALIASES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet ; \
+        _INCLUDE_CLASSES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet ; \
+        _INCLUDE_CACHE_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet ; , \
+))
 
-$(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs: $(GENSRC_DATA)/dbcs $(GENSRC_TEMPLATES) $(GENSRC_SB)
-	$(TOOL_CHARSETMAPPING) $(GENSRC_DATA) $(LOG_INFO) $(GENSRC_DST)/ext dbcs
-	$(TOUCH) $@
+# Processing of template depends on the snippets being generated first
+$(BUILD_CHARSET_STANDARD): \
+    $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet \
+    $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet \
+    $(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet \
+    $(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet
 
-GENSRC_CHARSETMAPPING += $(GENSRC_TMP)/gensrc_the.charsetmapping.dbcs
-
-###
-
-GENSRC_CHARSET_PROVIDER_CMD := $(JDK_TOPDIR)/make/scripts/genCharsetProvider.sh
-
-$(GENSRC_DST)/StandardCharsets.java: $(JDK_TOPDIR)/src/share/classes/sun/nio/cs/standard-charsets \
-    $(GENSRC_CHARSET_PROVIDER_CMD) \
-    $(GENSRC_TMP)/_the.charsetmapping.dir
-	NAWK="$(NAWK)" TEMPDIR="$(GENSRC_TMP)" SH="$(SH)" \
-	    HASHER="$(TOOL_HASHER)" \
-	    SCRIPTS="$(JDK_TOPDIR)/make/scripts" \
-	    $(SH) -e $(GENSRC_CHARSET_PROVIDER_CMD) $(LOG_INFO) $< $(@D)
-
-GENSRC_CHARSETMAPPING += $(GENSRC_DST)/StandardCharsets.java
-
-$(GENSRC_CHARSETMAPPING): $(BUILD_TOOLS)
+GENSRC_CHARSETMAPPING += $(BUILD_CHARSET_STANDARD)
--- a/jdk/make/gensrc/GensrcIcons.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/gensrc/GensrcIcons.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -109,17 +109,16 @@
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
 
-  GENSRC_OSX_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
-  GENSRC_OSX_ICONS_DST := $(GENSRC_OSX_ICONS_TMP)/sun/osxapp
+  GENSRC_OSX_ICONS_DST := $(JDK_OUTPUTDIR)/gensrc_headers_icons
   GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
 
   ifdef OPENJDK
-    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
+    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/data/macosxicons/JavaApp.icns
   else
-    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/src/closed/macosx/native/sun/osxapp/resource/icons/JavaApp.icns
+    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/closed/data/macosxicons/JavaApp.icns
   endif
 
-  $(GENSRC_OSX_ICONS_DST)/AWTIconData.h: $(GENSRC_OSX_ICONS_SRC)
+  $(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC)
 	$(RM) $@ $@.tmp
 	$(MKDIR) -p $(dir $@)
 	$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
--- a/jdk/make/gensrc/GensrcJObjC.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-#
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-GENSRC_JOBJC :=
-
-JOBJC_FRAMEWORKS := Foundation CoreFoundation AppKit
-FRAMEWORKS_DIR := /System/Library/Frameworks
-GBM := /usr/bin/gen_bridge_metadata
-
-JOBJC_SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc
-JOBJC_TMP := $(JDK_OUTPUTDIR)/gensrc_jobjc
-JOBJC_DST := $(JDK_OUTPUTDIR)/gensrc_jobjc/src
-
-#
-# Build generator
-#
-$(eval $(call SetupJavaCompilation,BUILD_JOBJC_PRIMITIVE_CODER, \
-    SETUP := GENERATE_OLDBYTECODE, \
-    DISABLE_SJAVAC := true, \
-    INCLUDES := core/java \
-        com/apple, \
-    SRC := $(JOBJC_SRC)/src \
-        $(JOBJC_SRC)/src/generator/java, \
-    BIN := $(JOBJC_TMP)/bin))
-
-GENSRC_JOBJC += $(BUILD_JOBJC_PRIMITIVE_CODER)
-
-#
-# Generate bridge support for select frameworks
-#
-BRIDGESUPPORT := $(addprefix $(JOBJC_TMP)/bridge/, $(addsuffix Full.bridgesupport, $(JOBJC_FRAMEWORKS)))
-
-#
-# Define macro for rules to create bridge support
-# Not sure why, but if the system has this framework bridge support,
-# we appear to copy that, otherwise we run GBM which can be very slow.
-#
-define CreateBridgeSupport # Framework
-	$(RM) $@ $@.tmp
-	$(MKDIR) -p $(@D)
-	if [ -f $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) ]; then \
-	  $(CP) $(FRAMEWORKS_DIR)/$1.framework/Resources/BridgeSupport/$(@F) $@.tmp ; \
-	else \
-	  $(GBM) $(LOG_INFO) -F complete --framework $1 -o $@.tmp ; \
-	fi
-	$(MV) $@.tmp $@
-endef
-
-#
-# Currently 3 frameworks, avoid pattern rule due to the names being conflicting
-#
-$(JOBJC_TMP)/bridge/FoundationFull.bridgesupport: \
-    $(wildcard $(FRAMEWORKS_DIR)/Foundation.framework/Headers/*.h)
-	$(call CreateBridgeSupport,Foundation)
-$(JOBJC_TMP)/bridge/CoreFoundationFull.bridgesupport: \
-    $(wildcard $(FRAMEWORKS_DIR)/CoreFoundation.framework/Headers/*.h)
-	$(call CreateBridgeSupport,CoreFoundation)
-$(JOBJC_TMP)/bridge/AppKitFull.bridgesupport: \
-    $(wildcard $(FRAMEWORKS_DIR)/AppKit.framework/Headers/*.h)
-	$(call CreateBridgeSupport,AppKit)
-
-#
-# Find Xbootclasspath, for some reason, this involves firing up Java just
-# so we can get the boot classpath, so we can remove anything in that
-# classpath that ends with "JObjC.jar", and emit the new bootclasspath.
-#
-$(JOBJC_TMP)/_the.generator_bootclasspath: $(BUILD_JOBJC_PRIMITIVE_CODER)
-	$(ECHO) Generating jobjc framework bridge
-	$(RM) $@
-	$(JAVA) $(LOG_INFO) -cp $(JOBJC_TMP)/bin com.apple.internal.jobjc.generator.BootClassPathMinus JObjC.jar > $@.tmp
-	$(MV) $@.tmp $@
-
-#
-# Run generator
-# Now we use bootclasspath to run java again, with the bridge support to
-# generate more source.
-#
-$(JOBJC_TMP)/_the.generator: $(JOBJC_TMP)/_the.generator_bootclasspath $(BRIDGESUPPORT)
-	$(RM) $@
-	$(JAVA) $(LOG_INFO) -d64 -Xbootclasspath:`$(CAT) $(JOBJC_TMP)/_the.generator_bootclasspath` -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator dst=$(JOBJC_DST) frameworks=$(JOBJC_TMP)/bridge
-	$(TOUCH) $@
-
-# The generator delets all files in the target dir so it has to work in its
-# own dir and have the files copied over to gensrc aftewards.
-$(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files: $(JOBJC_TMP)/_the.generator
-	$(MKDIR) -p $(@D)
-	$(CP) -rp $(JOBJC_DST)/* $(@D)
-	$(TOUCH) $@
-
-GENSRC_JOBJC += $(JDK_OUTPUTDIR)/gensrc/_the.jobjc.files
--- a/jdk/make/gensrc/GensrcLocaleDataMetaInfo.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/gensrc/GensrcLocaleDataMetaInfo.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -53,8 +53,8 @@
 # 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_EN_LOCALES := ja-JP-JP th-TH-TH
+# Locales that don't have any resource files should be included here.
+ALL_NON_EN_LOCALES := ja-JP-JP nb-NO nn-NO 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'
 
--- a/jdk/make/lib/Awt2dLibraries.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, 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
@@ -792,9 +792,9 @@
 endif
 
 BUILD_LIBFONTMANAGER_CFLAGS_COMMON := \
+    $(FONT_HEADERS) \
     $(X_CFLAGS) \
     -DLE_STANDALONE -DHEADLESS \
-    $(FONT_HEADERS) \
     -I$(JDK_TOPDIR)/src/share/native/sun/font \
     -I$(JDK_TOPDIR)/src/share/native/sun/font/layout \
     -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \
--- a/jdk/make/lib/CoreLibraries.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/lib/CoreLibraries.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -123,15 +123,16 @@
     $(JDK_TOPDIR)/src/share/native/java/security \
     $(JDK_TOPDIR)/src/share/native/common \
     $(JDK_TOPDIR)/src/share/native/sun/misc \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/misc \
     $(JDK_TOPDIR)/src/share/native/sun/reflect \
     $(JDK_TOPDIR)/src/share/native/java/util \
     $(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
 
-ifneq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(OPENJDK_TARGET_OS), windows)
   LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
-else
+else ifeq ($(OPENJDK_TARGET_OS), macosx)
   LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
 endif
 
@@ -187,7 +188,7 @@
     LIBRARY := java, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJAVA_SRC_DIRS), \
-    EXCLUDES := fdlibm/src zip, \
+    EXCLUDES := fdlibm/src zip prefs, \
     EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
     LANG := C, \
     OPTIMIZATION := HIGH, \
@@ -285,6 +286,41 @@
 
 ##########################################################################################
 
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+  LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/macosx/native/java/util/prefs
+else
+  LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util/prefs
+endif
+
+$(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
+    LIBRARY := prefs, \
+    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+    SRC := $(LIBPREF_SRC_DIRS), \
+    LANG := C, \
+    OPTIMIZATION := HIGH, \
+    CFLAGS := $(CFLAGS_JDKLIB), \
+    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libprefs/mapfile-vers, \
+    LDFLAGS := $(LDFLAGS_JDKLIB) \
+        $(call SET_SHARED_LIBRARY_ORIGIN), \
+    LDFLAGS_SUFFIX_linux := -ljvm -ljava, \
+    LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lc, \
+    LDFLAGS_SUFFIX_aix := -ljvm -ljava, \
+    LDFLAGS_SUFFIX_windows := advapi32.lib, \
+    LDFLAGS_SUFFIX_macosx := -ljvm -framework CoreFoundation, \
+    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+    RC_FLAGS := $(RC_FLAGS) \
+        -D "JDK_FNAME=prefs.dll" \
+        -D "JDK_INTERNAL_NAME=prefs" \
+        -D "JDK_FTYPE=0x2L", \
+    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libprefs, \
+    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+$(BUILD_LIBPREFS): $(BUILD_LIBJAVA)
+    
+BUILD_LIBRARIES += $(BUILD_LIBPREFS)
+
+##########################################################################################
+
 $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
     LIBRARY := unpack, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
--- a/jdk/make/lib/PlatformLibraries.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/lib/PlatformLibraries.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -63,7 +63,7 @@
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
-          -I$(JDK_OUTPUTDIR)/gensrc/sun/osxapp \
+          -I$(JDK_OUTPUTDIR)/gensrc_headers_icons \
           -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
           -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -95,7 +95,6 @@
 
   LIBOSX_DIRS := \
       $(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
-      $(JDK_TOPDIR)/src/macosx/native/java/util \
       $(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
       $(JDK_TOPDIR)/src/macosx/native/apple/security \
       $(JDK_TOPDIR)/src/macosx/native/apple/launcher
--- a/jdk/make/lib/SecurityLibraries.gmk	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/lib/SecurityLibraries.gmk	Tue Feb 18 15:48:14 2014 -0800
@@ -128,8 +128,13 @@
         ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
   else ifeq ($(OPENJDK_TARGET_OS), macosx)
     BUILD_LIBKRB5_NAME := osxkrb5
-    BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5
-    BUILD_LIBKRB5_LIBS := -framework Kerberos
+    BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
+        $(JDK_TOPDIR)/src/macosx/native/sun/security/krb5
+    BUILD_LIBKRB5_LIBS := -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
+        -framework JavaNativeFoundation \
+        -framework Cocoa \
+        -framework SystemConfiguration \
+        -framework Kerberos
   endif
 
   ifneq ($(BUILD_LIBKRB5_NAME), )
@@ -140,8 +145,9 @@
         LANG := C, \
         OPTIMIZATION := LOW, \
         CFLAGS := $(CFLAGS_JDKLIB) \
-            -I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
-            -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5, \
+            -I$(JDK_TOPDIR)/src/share/native/sun/security/krb5, \
+        CFLAGS_windows := -I$(JDK_TOPDIR)/src/windows/native/sun/security/krb5, \
+        CFLAGS_macosx := -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(call SET_SHARED_LIBRARY_ORIGIN), \
         LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
--- a/jdk/make/mapfiles/libjava/mapfile-vers	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/mapfiles/libjava/mapfile-vers	Tue Feb 18 15:48:14 2014 -0800
@@ -79,7 +79,7 @@
 		Java_java_io_FileInputStream_close0;
 		Java_java_io_FileInputStream_initIDs;
 		Java_java_io_FileInputStream_open;
-		Java_java_io_FileInputStream_read;
+		Java_java_io_FileInputStream_read0;
 		Java_java_io_FileInputStream_readBytes;
 		Java_java_io_FileInputStream_skip;
 		Java_java_io_FileOutputStream_close0;
@@ -98,11 +98,11 @@
 		Java_java_io_RandomAccessFile_initIDs;
 		Java_java_io_RandomAccessFile_length;
 		Java_java_io_RandomAccessFile_open;
-		Java_java_io_RandomAccessFile_read;
+		Java_java_io_RandomAccessFile_read0;
 		Java_java_io_RandomAccessFile_readBytes;
 		Java_java_io_RandomAccessFile_seek0;
 		Java_java_io_RandomAccessFile_setLength;
-		Java_java_io_RandomAccessFile_write;
+		Java_java_io_RandomAccessFile_write0;
 		Java_java_io_RandomAccessFile_writeBytes;
 		Java_java_io_UnixFileSystem_canonicalize0;
 		Java_java_io_UnixFileSystem_checkAccess;
@@ -236,10 +236,6 @@
 		Java_java_util_TimeZone_getSystemTimeZoneID;
 		Java_java_util_TimeZone_getSystemGMTOffsetID;
 		Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8;
-		Java_java_util_prefs_FileSystemPreferences_chmod;
-		Java_java_util_prefs_FileSystemPreferences_lockFile0;
-		Java_java_util_prefs_FileSystemPreferences_unlockFile0;
-		Java_java_util_logging_FileHandler_isSetUID;
 		Java_sun_misc_MessageUtils_toStderr;
 		Java_sun_misc_MessageUtils_toStdout;
 		Java_sun_misc_NativeSignalHandler_handle0;
@@ -274,19 +270,13 @@
                 Java_sun_misc_Version_getJvmVersionInfo;
                 Java_sun_misc_Version_getJvmSpecialVersion;
 		Java_sun_misc_VM_latestUserDefinedLoader;
+                Java_sun_misc_VM_isSetUID;
                 Java_sun_misc_VM_initialize;
 		Java_sun_misc_VMSupport_initAgentProperties;
 
                 # ZipFile.c needs this one
 		throwFileNotFoundException;
 
-#		Java_sun_misc_VM_getState;			threads.c
-#		Java_sun_misc_VM_threadsSuspended;		threads.c
-#		Java_sun_misc_VM_unsuspendSomeThreads;		threads.c
-#		Java_sun_misc_VM_unsuspendThreads;		threads.c
-
-		Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getPattern;
-
 	# Outcalls from libjvm done using dlsym().
 
 		VerifyClassCodes;
--- a/jdk/make/mapfiles/libjfr/mapfile-vers	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/mapfiles/libjfr/mapfile-vers	Tue Feb 18 15:48:14 2014 -0800
@@ -34,6 +34,7 @@
       Java_oracle_jrockit_jfr_VMJFR_getPeriod;
       Java_oracle_jrockit_jfr_VMJFR_descriptors;
       Java_oracle_jrockit_jfr_VMJFR_redefineClass0;
+      Java_oracle_jrockit_jfr_VMJFR_retransformClasses0;
       JNI_OnLoad;
   local:
       *;
--- a/jdk/make/mapfiles/libnet/mapfile-vers	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/mapfiles/libnet/mapfile-vers	Tue Feb 18 15:48:14 2014 -0800
@@ -105,6 +105,7 @@
 		NET_MapSocketOption;
 		NET_Wait;
                 ipv6_available;
+                initInetAddressIDs;
 
 	local:
 		*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/mapfiles/libprefs/mapfile-vers	Tue Feb 18 15:48:14 2014 -0800
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2014, 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.
+#
+
+# Define public interface.
+
+SUNWprivate_1.1 {
+	global:
+		Java_java_util_prefs_FileSystemPreferences_chmod;
+		Java_java_util_prefs_FileSystemPreferences_lockFile0;
+		Java_java_util_prefs_FileSystemPreferences_unlockFile0;
+
+	local:
+		*;
+};
--- a/jdk/make/profile-includes.txt	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/profile-includes.txt	Tue Feb 18 15:48:14 2014 -0800
@@ -130,6 +130,7 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \
+    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)prefs$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) \
     jvm.hprof.txt \
     management-agent.jar \
--- a/jdk/make/scripts/genCharsetProvider.sh	Wed Jan 29 20:41:33 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generate a charset provider class
-
-# Required environment variables
-#   NAWK    awk tool
-#   TEMPDIR temporary directory
-#   HASHER  Hasher program
-
-SPEC=$1; shift
-DST=$1; shift
-
-eval `$NAWK <$SPEC '
-    /^[ \t]*copyright / { printf "COPYRIGHT_YEARS=\"%s %s\"\n", $2, $3; }
-    /^[ \t]*package / { printf "PKG=%s\n", $2; }
-    /^[ \t]*class / { printf "CLASS=%s\n", $2; }
-'`
-
-OUT=$DST/$CLASS.java
-echo '-->' $OUT
-
-
-# Header
-#
-
-$SH ${SCRIPTS}/addNotices.sh "$COPYRIGHT_YEARS" > $OUT
-
-cat <<__END__ >>$OUT
-
-// -- This file was mechanically generated: Do not edit! -- //
-
-package $PKG;
-
-import java.nio.charset.*;
-
-
-public class $CLASS
-    extends FastCharsetProvider
-{
-
-__END__
-
-
-# Alias tables
-#
-$NAWK <$SPEC >>$OUT '
-    BEGIN { n = 1; m = 1; }
-
-    /^[ \t]*charset / {
-      csn = $2; cln = $3;
-      lcsn = tolower(csn);
-      lcsns[n++] = lcsn;
-      csns[lcsn] = csn;
-      classMap[lcsn] = cln;
-      if (n > 2)
-        printf "    };\n\n";
-      printf "    static final String[] aliases_%s = new String[] {\n", cln;
-    }
-
-    /^[ \t]*alias / {
-      acsns[m++] = tolower($2);
-      aliasMap[tolower($2)] = lcsn;
-      printf "        \"%s\",\n", $2;
-    }
-
-    END {
-      printf "    };\n\n";
-    }
-'
-
-
-# Prehashed alias and class maps
-#
-$NAWK <$SPEC >$TEMPDIR/aliases '
-    /^[ \t]*charset / {
-      csn = $2;
-      lcsn = tolower(csn);
-    }
-    /^[ \t]*alias / {
-      an = tolower($2);
-      printf "%-20s \"%s\"\n", an, lcsn;
-    }
-'
-
-$NAWK <$SPEC >$TEMPDIR/classes '
-    /^[ \t]*charset / {
-      csn = $2; cln = $3;
-      lcsn = tolower(csn);
-      printf "%-20s \"%s\"\n", lcsn, cln;
-    }
-'
-
-${HASHER} -i Aliases <$TEMPDIR/aliases >>$OUT
-${HASHER} -i Classes <$TEMPDIR/classes >>$OUT
-${HASHER} -i -e Cache -t Charset <$TEMPDIR/classes >>$OUT
-
-
-# Constructor
-#
-cat <<__END__ >>$OUT
-    public $CLASS() {
-        super("$PKG", new Aliases(), new Classes(), new Cache());
-    }
-
-}
-__END__
--- a/jdk/make/src/classes/build/tools/hasher/Hasher.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/make/src/classes/build/tools/hasher/Hasher.java	Tue Feb 18 15:48:14 2014 -0800
@@ -43,9 +43,6 @@
 
 public class Hasher {
 
-    // This class cannot, sadly, make use of 1.5 features since it must be
-    // compiled and run with the bootstrap JDK, which is 1.4.2.
-
     static final PrintStream out = System.out;
     static final PrintStream err = System.err;
 
@@ -184,11 +181,13 @@
                 if (md <= maxDepth) {
                     // Success
                     out.flush();
-                    if (cln != null)
-                        err.print(cln + ": ");
-                    err.println("Table size " + (1 << nb) + " (" + nb + " bits)"
-                                + ", shift " + shift
-                                + ", max chain depth " + md);
+                    if (verbose) {
+                        if (cln != null)
+                            err.print(cln + ": ");
+                        err.println("Table size " + (1 << nb) + " (" + nb + " bits)"
+                                    + ", shift " + shift
+                                    + ", max chain depth " + md);
+                    }
                     return this;
                 }
             }
--- a/jdk/src/aix/classes/sun/nio/fs/AixNativeDispatcher.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/aix/classes/sun/nio/fs/AixNativeDispatcher.java	Tue Feb 18 15:48:14 2014 -0800
@@ -43,7 +43,7 @@
     static native UnixMountEntry[] getmntctl() throws UnixException;
 
     // initialize
-    private static native int init();
+    private static native void init();
 
     static {
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
--- a/jdk/src/aix/native/sun/nio/fs/AixNativeDispatcher.c	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/aix/native/sun/nio/fs/AixNativeDispatcher.c	Tue Feb 18 15:48:14 2014 -0800
@@ -56,23 +56,26 @@
 /**
  * Initialization
  */
-JNIEXPORT jint JNICALL
+JNIEXPORT void JNICALL
 Java_sun_nio_fs_AixNativeDispatcher_init(JNIEnv* env, jclass this)
 {
-    jint flags = 0;
     jclass clazz;
 
     clazz = (*env)->FindClass(env, "sun/nio/fs/UnixMountEntry");
-    if (clazz == NULL) {
-        return 0;
+    CHECK_NULL(clazz);
+    entry_name = (*env)->GetFieldID(env, clazz, "name", "[B");
+    CHECK_NULL(entry_name);
+    entry_dir = (*env)->GetFieldID(env, clazz, "dir", "[B");
+    CHECK_NULL(entry_dir);
+    entry_fstype = (*env)->GetFieldID(env, clazz, "fstype", "[B");
+    CHECK_NULL(entry_fstype);
+    entry_options = (*env)->GetFieldID(env, clazz, "opts", "[B");
+    CHECK_NULL(entry_options);
+    entry_cls = (*env)->NewGlobalRef(env, clazz);
+    if (entry_cls == NULL) {
+        JNU_ThrowOutOfMemoryError(env, NULL);
+        return;
     }
-    entry_name = (*env)->GetFieldID(env, clazz, "name", "[B");
-    entry_dir = (*env)->GetFieldID(env, clazz, "dir", "[B");
-    entry_fstype = (*env)->GetFieldID(env, clazz, "fstype", "[B");
-    entry_options = (*env)->GetFieldID(env, clazz, "opts", "[B");
-    entry_cls = (*env)->NewGlobalRef(env, clazz);
-
-    return 0;
 }
 
 /**
--- a/jdk/src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/macosx/classes/java/util/prefs/MacOSXPreferencesFile.java	Tue Feb 18 15:48:14 2014 -0800
@@ -82,7 +82,7 @@
         java.security.AccessController.doPrivileged(
             new java.security.PrivilegedAction<Void>() {
                 public Void run() {
-                    System.loadLibrary("osx");
+                    System.loadLibrary("prefs");
                     return null;
                 }
             });
--- a/jdk/src/macosx/native/java/util/MacOSXPreferencesFile.m	Wed Jan 29 20:41:33 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,999 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
-   Hierarchical storage layout:
-
-   <dict>
-     <key>/</key>
-     <dict>
-       <key>foo</key>
-       <string>/foo's value</string>
-       <key>foo/</key>
-       <dict>
-         <key>bar</key>
-         <string>/foo/bar's value</string>
-       </dict>
-     </dict>
-   </dict>
-
-   Java pref nodes are stored in several different files. Pref nodes
-   with at least three components in the node name (e.g. /com/MyCompany/MyApp/)
-   are stored in a CF prefs file with the first three components as the name.
-   This way, all preferences for MyApp end up in com.MyCompany.MyApp.plist .
-   Pref nodes with shorter names are stored in com.apple.java.util.prefs.plist
-
-   The filesystem is assumed to be case-insensitive (like HFS+).
-   Java pref node names are case-sensitive. If two pref node names differ
-   only in case, they may end up in the same pref file. This is ok
-   because the CF keys identifying the node span the entire absolute path
-   to the node and are case-sensitive.
-
-   Java node names may contain '.' . When mapping to the CF file name,
-   these dots are left as-is, even though '/' is mapped to '.' .
-   This is ok because the CF key contains the correct node name.
-*/
-
-
-
-#include <CoreFoundation/CoreFoundation.h>
-
-#include "jni_util.h"
-#include "jlong.h"
-#include "jvm.h"
-
-
-// Throw an OutOfMemoryError with the given message.
-static void throwOutOfMemoryError(JNIEnv *env, const char *msg)
-{
-    static jclass exceptionClass = NULL;
-    jclass c;
-
-    if (exceptionClass) {
-        c = exceptionClass;
-    } else {
-        c = (*env)->FindClass(env, "java/lang/OutOfMemoryError");
-        if ((*env)->ExceptionOccurred(env)) return;
-        exceptionClass = (*env)->NewGlobalRef(env, c);
-    }
-
-    (*env)->ThrowNew(env, c, msg);
-}
-
-
-// throwIfNull macro
-// If var is NULL, throw an OutOfMemoryError and goto badvar.
-// var must be a variable. env must be the current JNIEnv.
-// fixme throw BackingStoreExceptions sometimes?
-#define throwIfNull(var, msg) \
-    do { \
-        if (var == NULL) { \
-            throwOutOfMemoryError(env, msg); \
-            goto bad##var; \
-        } \
-    } while (0)
-
-
-// Converts CFNumber, CFBoolean, CFString to CFString
-// returns NULL if value is of some other type
-// throws and returns NULL on memory error
-// result must be released (even if value was already a CFStringRef)
-// value must not be null
-static CFStringRef copyToCFString(JNIEnv *env, CFTypeRef value)
-{
-    CFStringRef result;
-    CFTypeID type;
-
-    type = CFGetTypeID(value);
-
-    if (type == CFStringGetTypeID()) {
-        result = (CFStringRef)CFRetain(value);
-    }
-    else if (type == CFBooleanGetTypeID()) {
-        // Java Preferences API expects "true" and "false" for boolean values.
-        result = CFStringCreateCopy(NULL, (value == kCFBooleanTrue) ? CFSTR("true") : CFSTR("false"));
-        throwIfNull(result, "copyToCFString failed");
-    }
-    else if (type == CFNumberGetTypeID()) {
-        CFNumberRef number = (CFNumberRef) value;
-        if (CFNumberIsFloatType(number)) {
-            double d;
-            CFNumberGetValue(number, kCFNumberDoubleType, &d);
-            result = CFStringCreateWithFormat(NULL, NULL, CFSTR("%g"), d);
-            throwIfNull(result, "copyToCFString failed");
-        }
-        else {
-            long l;
-            CFNumberGetValue(number, kCFNumberLongType, &l);
-            result = CFStringCreateWithFormat(NULL, NULL, CFSTR("%ld"), l);
-            throwIfNull(result, "copyToCFString failed");
-        }
-    }
-    else {
-        // unknown type - return NULL
-        result = NULL;
-    }
-
- badresult:
-    return result;
-}
-
-
-// Create a Java string from the given CF string.
-// returns NULL if cfString is NULL
-// throws and returns NULL on memory error
-static jstring toJavaString(JNIEnv *env, CFStringRef cfString)
-{
-    if (cfString == NULL) {
-        return NULL;
-    } else {
-        jstring javaString = NULL;
-
-        CFIndex length = CFStringGetLength(cfString);
-        const UniChar *constchars = CFStringGetCharactersPtr(cfString);
-        if (constchars) {
-            javaString = (*env)->NewString(env, constchars, length);
-        } else {
-            UniChar *chars = malloc(length * sizeof(UniChar));
-            throwIfNull(chars, "toJavaString failed");
-            CFStringGetCharacters(cfString, CFRangeMake(0, length), chars);
-            javaString = (*env)->NewString(env, chars, length);
-            free(chars);
-        }
-    badchars:
-        return javaString;
-    }
-}
-
-
-
-// Create a CF string from the given Java string.
-// returns NULL if javaString is NULL
-// throws and returns NULL on memory error
-static CFStringRef toCF(JNIEnv *env, jstring javaString)
-{
-    if (javaString == NULL) {
-        return NULL;
-    } else {
-        CFStringRef result = NULL;
-        jsize length = (*env)->GetStringLength(env, javaString);
-        const jchar *chars = (*env)->GetStringChars(env, javaString, NULL);
-        throwIfNull(chars, "toCF failed");
-        result =
-            CFStringCreateWithCharacters(NULL, (const UniChar *)chars, length);
-        (*env)->ReleaseStringChars(env, javaString, chars);
-        throwIfNull(result, "toCF failed");
-    badchars:
-    badresult:
-        return result;
-    }
-}
-
-
-// Create an empty Java string array of the given size.
-// Throws and returns NULL on error.
-static jarray createJavaStringArray(JNIEnv *env, CFIndex count)
-{
-    static jclass stringClass = NULL;
-    jclass c;
-
-    if (stringClass) {
-        c = stringClass;
-    } else {
-        c = (*env)->FindClass(env, "java/lang/String");
-        if ((*env)->ExceptionOccurred(env)) return NULL;
-        stringClass = (*env)->NewGlobalRef(env, c);
-    }
-
-    return (*env)->NewObjectArray(env, count, c, NULL); // AWT_THREADING Safe (known object)
-}
-
-
-// Java accessors for CF constants.
-JNIEXPORT jlong JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_currentUser(JNIEnv *env,
-                                                       jobject klass)
-{
-    return ptr_to_jlong(kCFPreferencesCurrentUser);
-}
-
-JNIEXPORT jlong JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_anyUser(JNIEnv *env, jobject klass)
-{
-    return ptr_to_jlong(kCFPreferencesAnyUser);
-}
-
-JNIEXPORT jlong JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_currentHost(JNIEnv *env,
-                                                       jobject klass)
-{
-    return ptr_to_jlong(kCFPreferencesCurrentHost);
-}
-
-JNIEXPORT jlong JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_anyHost(JNIEnv *env, jobject klass)
-{
-    return ptr_to_jlong(kCFPreferencesAnyHost);
-}
-
-
-// Create an empty node.
-// Does not store the node in any prefs file.
-// returns NULL on memory error
-static CFMutableDictionaryRef createEmptyNode(void)
-{
-    return CFDictionaryCreateMutable(NULL, 0,
-                                     &kCFTypeDictionaryKeyCallBacks,
-                                     &kCFTypeDictionaryValueCallBacks);
-}
-
-
-// Create a string that consists of path minus its last component.
-// path must end with '/'
-// The result will end in '/' (unless path itself is '/')
-static CFStringRef copyParentOf(CFStringRef path)
-{
-    CFRange searchRange;
-    CFRange slashRange;
-    CFRange parentRange;
-    Boolean found;
-
-    searchRange = CFRangeMake(0, CFStringGetLength(path) - 1);
-    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange,
-                                    kCFCompareBackwards, &slashRange);
-    if (!found) return CFSTR("");
-    parentRange = CFRangeMake(0, slashRange.location + 1); // include '/'
-    return CFStringCreateWithSubstring(NULL, path, parentRange);
-}
-
-
-// Create a string that consists of path's last component.
-// path must end with '/'
-// The result will end in '/'.
-// The result will not start with '/' (unless path itself is '/')
-static CFStringRef copyChildOf(CFStringRef path)
-{
-    CFRange searchRange;
-    CFRange slashRange;
-    CFRange childRange;
-    Boolean found;
-    CFIndex length = CFStringGetLength(path);
-
-    searchRange = CFRangeMake(0, length - 1);
-    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange,
-                                    kCFCompareBackwards, &slashRange);
-    if (!found) return CFSTR("");
-    childRange = CFRangeMake(slashRange.location + 1,
-                             length - slashRange.location - 1); // skip '/'
-    return CFStringCreateWithSubstring(NULL, path, childRange);
-}
-
-
-// Return the first three components of path, with leading and trailing '/'.
-// If path does not have three components, return NULL.
-// path must begin and end in '/'
-static CFStringRef copyFirstThreeComponentsOf(CFStringRef path)
-{
-    CFRange searchRange;
-    CFRange slashRange;
-    CFRange prefixRange;
-    CFStringRef prefix;
-    Boolean found;
-    CFIndex length = CFStringGetLength(path);
-
-    searchRange = CFRangeMake(1, length - 1);  // skip leading '/'
-    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange, 0,
-                                    &slashRange);
-    if (!found) return NULL;  // no second slash!
-
-    searchRange = CFRangeMake(slashRange.location + 1,
-                              length - slashRange.location - 1);
-    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange, 0,
-                                    &slashRange);
-    if (!found) return NULL;  // no third slash!
-
-    searchRange = CFRangeMake(slashRange.location + 1,
-                              length - slashRange.location - 1);
-    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange, 0,
-                                    &slashRange);
-    if (!found) return NULL;  // no fourth slash!
-
-    prefixRange = CFRangeMake(0, slashRange.location + 1); // keep last '/'
-    prefix = CFStringCreateWithSubstring(NULL, path, prefixRange);
-
-    return prefix;
-}
-
-
-// Copy the CFPreferences key and value at the base of path's tree.
-// path must end in '/'
-// topKey or topValue may be NULL
-// Returns NULL on error or if there is no tree for path in this file.
-static void copyTreeForPath(CFStringRef path, CFStringRef name,
-                            CFStringRef user, CFStringRef host,
-                            CFStringRef *topKey, CFDictionaryRef *topValue)
-{
-    CFStringRef key;
-    CFPropertyListRef value;
-
-    if (topKey) *topKey = NULL;
-    if (topValue) *topValue = NULL;
-
-    if (CFEqual(name, CFSTR("com.apple.java.util.prefs"))) {
-        // Top-level file. Only key "/" is an acceptable root.
-        key = (CFStringRef) CFRetain(CFSTR("/"));
-    } else {
-        // Second-level file. Key must be the first three components of path.
-        key = copyFirstThreeComponentsOf(path);
-        if (!key) return;
-    }
-
-    value = CFPreferencesCopyValue(key, name, user, host);
-    if (value) {
-        if (CFGetTypeID(value) == CFDictionaryGetTypeID()) {
-            // (key, value) is acceptable
-            if (topKey) *topKey = (CFStringRef)CFRetain(key);
-            if (topValue) *topValue = (CFDictionaryRef)CFRetain(value);
-        }
-        CFRelease(value);
-    }
-    CFRelease(key);
-}
-
-
-// Find the node for path in the given tree.
-// Returns NULL on error or if path doesn't have a node in this tree.
-// path must end in '/'
-static CFDictionaryRef copyNodeInTree(CFStringRef path, CFStringRef topKey,
-                                      CFDictionaryRef topValue)
-{
-    CFMutableStringRef p;
-    CFDictionaryRef result = NULL;
-
-    p = CFStringCreateMutableCopy(NULL, 0, path);
-    if (!p) return NULL;
-    CFStringDelete(p, CFRangeMake(0, CFStringGetLength(topKey)));
-    result = topValue;
-
-    while (CFStringGetLength(p) > 0) {
-        CFDictionaryRef child;
-        CFStringRef part = NULL;
-        CFRange slashRange = CFStringFind(p, CFSTR("/"), 0);
-        // guaranteed to succeed because path must end in '/'
-        CFRange partRange = CFRangeMake(0, slashRange.location + 1);
-        part = CFStringCreateWithSubstring(NULL, p, partRange);
-        if (!part) { result = NULL; break; }
-        CFStringDelete(p, partRange);
-
-        child = CFDictionaryGetValue(result, part);
-        CFRelease(part);
-        if (child  &&  CFGetTypeID(child) == CFDictionaryGetTypeID()) {
-            // continue search
-            result = child;
-        } else {
-            // didn't find target node
-            result = NULL;
-            break;
-        }
-    }
-
-    CFRelease(p);
-    if (result) return (CFDictionaryRef)CFRetain(result);
-    else return NULL;
-}
-
-
-// Return a retained copy of the node at path from the given file.
-// path must end in '/'
-// returns NULL if node doesn't exist.
-// returns NULL if the value for key "path" isn't a valid node.
-static CFDictionaryRef copyNodeIfPresent(CFStringRef path, CFStringRef name,
-                                         CFStringRef user, CFStringRef host)
-{
-    CFStringRef topKey;
-    CFDictionaryRef topValue;
-    CFDictionaryRef result;
-
-    copyTreeForPath(path, name, user, host, &topKey, &topValue);
-    if (!topKey) return NULL;
-
-    result = copyNodeInTree(path, topKey, topValue);
-
-    CFRelease(topKey);
-    if (topValue) CFRelease(topValue);
-    return result;
-}
-
-
-// Create a new tree that would store path in the given file.
-// Only the root of the tree is created, not all of the links leading to path.
-// returns NULL on error
-static void createTreeForPath(CFStringRef path, CFStringRef name,
-                              CFStringRef user, CFStringRef host,
-                              CFStringRef *outTopKey,
-                              CFMutableDictionaryRef *outTopValue)
-{
-    *outTopKey = NULL;
-    *outTopValue = NULL;
-
-    // if name is "com.apple.java.util.prefs" then create tree "/"
-    // else create tree "/foo/bar/baz/"
-    // "com.apple.java.util.prefs.plist" is also in MacOSXPreferences.java
-    if (CFEqual(name, CFSTR("com.apple.java.util.prefs"))) {
-        *outTopKey = CFSTR("/");
-        *outTopValue = createEmptyNode();
-    } else {
-        CFStringRef prefix = copyFirstThreeComponentsOf(path);
-        if (prefix) {
-            *outTopKey = prefix;
-            *outTopValue = createEmptyNode();
-        }
-    }
-}
-
-
-// Return a mutable copy of the tree containing path and the dict for
-//   path itself. *outTopKey and *outTopValue can be used to write the
-//   modified tree back to the prefs file.
-// *outTopKey and *outTopValue must be released iff the actual return
-//   value is not NULL.
-static CFMutableDictionaryRef
-copyMutableNode(CFStringRef path, CFStringRef name,
-                CFStringRef user, CFStringRef host,
-                CFStringRef *outTopKey,
-                CFMutableDictionaryRef *outTopValue)
-{
-    CFStringRef topKey = NULL;
-    CFDictionaryRef oldTopValue = NULL;
-    CFMutableDictionaryRef topValue;
-    CFMutableDictionaryRef result = NULL;
-    CFMutableStringRef p;
-
-    if (outTopKey) *outTopKey = NULL;
-    if (outTopValue) *outTopValue = NULL;
-
-    copyTreeForPath(path, name, user, host, &topKey, &oldTopValue);
-    if (!topKey) {
-        createTreeForPath(path, name, user, host, &topKey, &topValue);
-    } else {
-        topValue = (CFMutableDictionaryRef)
-            CFPropertyListCreateDeepCopy(NULL, (CFPropertyListRef)oldTopValue,
-                                         kCFPropertyListMutableContainers);
-    }
-    if (!topValue) goto badtopValue;
-
-    p = CFStringCreateMutableCopy(NULL, 0, path);
-    if (!p) goto badp;
-    CFStringDelete(p, CFRangeMake(0, CFStringGetLength(topKey)));
-    result = topValue;
-
-    while (CFStringGetLength(p) > 0) {
-        CFMutableDictionaryRef child;
-        CFStringRef part = NULL;
-        CFRange slashRange = CFStringFind(p, CFSTR("/"), 0);
-        // guaranteed to succeed because path must end in '/'
-        CFRange partRange = CFRangeMake(0, slashRange.location + 1);
-        part = CFStringCreateWithSubstring(NULL, p, partRange);
-        if (!part) { result = NULL; break; }
-        CFStringDelete(p, partRange);
-
-        child = (CFMutableDictionaryRef)CFDictionaryGetValue(result, part);
-        if (child  &&  CFGetTypeID(child) == CFDictionaryGetTypeID()) {
-            // continue search
-            result = child;
-        } else {
-            // didn't find target node - add it and continue
-            child = createEmptyNode();
-            if (!child) { CFRelease(part); result = NULL; break; }
-            CFDictionaryAddValue(result, part, child);
-            result = child;
-        }
-        CFRelease(part);
-    }
-
-    if (result) {
-        *outTopKey = (CFStringRef)CFRetain(topKey);
-        *outTopValue = (CFMutableDictionaryRef)CFRetain(topValue);
-        CFRetain(result);
-    }
-
-    CFRelease(p);
- badp:
-    CFRelease(topValue);
- badtopValue:
-    if (topKey) CFRelease(topKey);
-    if (oldTopValue) CFRelease(oldTopValue);
-    return result;
-}
-
-
-JNIEXPORT jboolean JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_addNode
-(JNIEnv *env, jobject klass, jobject jpath,
- jobject jname, jlong juser, jlong jhost)
-{
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    CFDictionaryRef node = NULL;
-    jboolean neededNewNode = false;
-
-    if (!path  ||  !name) goto badparams;
-
-    node = copyNodeIfPresent(path, name, user, host);
-
-    if (node) {
-        neededNewNode = false;
-        CFRelease(node);
-    } else {
-        CFStringRef topKey = NULL;
-        CFMutableDictionaryRef topValue = NULL;
-
-        neededNewNode = true;
-
-        // copyMutableNode creates the node if necessary
-        node = copyMutableNode(path, name, user, host, &topKey, &topValue);
-        throwIfNull(node, "copyMutableNode failed");
-
-        CFPreferencesSetValue(topKey, topValue, name, user, host);
-
-        CFRelease(node);
-        if (topKey) CFRelease(topKey);
-        if (topValue) CFRelease(topValue);
-    }
-
- badnode:
- badparams:
-    if (path) CFRelease(path);
-    if (name) CFRelease(name);
-
-    return neededNewNode;
-}
-
-
-JNIEXPORT void JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_removeNode
-(JNIEnv *env, jobject klass, jobject jpath,
- jobject jname, jlong juser, jlong jhost)
-{
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    CFStringRef parentName;
-    CFStringRef childName;
-    CFDictionaryRef constParent;
-
-    if (!path  ||  !name) goto badparams;
-
-    parentName = copyParentOf(path);
-    throwIfNull(parentName, "copyParentOf failed");
-    childName  = copyChildOf(path);
-    throwIfNull(childName, "copyChildOf failed");
-
-    // root node is not allowed to be removed, so parentName is never empty
-
-    constParent = copyNodeIfPresent(parentName, name, user, host);
-    if (constParent  &&  CFDictionaryContainsKey(constParent, childName)) {
-        CFStringRef topKey;
-        CFMutableDictionaryRef topValue;
-        CFMutableDictionaryRef parent;
-
-        parent = copyMutableNode(parentName, name, user, host,
-                                 &topKey, &topValue);
-        throwIfNull(parent, "copyMutableNode failed");
-
-        CFDictionaryRemoveValue(parent, childName);
-        CFPreferencesSetValue(topKey, topValue, name, user, host);
-
-        CFRelease(parent);
-        if (topKey) CFRelease(topKey);
-        if (topValue) CFRelease(topValue);
-    } else {
-        // might be trying to remove the root itself in a non-root file
-        CFStringRef topKey;
-        CFDictionaryRef topValue;
-        copyTreeForPath(path, name, user, host, &topKey, &topValue);
-        if (topKey) {
-            if (CFEqual(topKey, path)) {
-                CFPreferencesSetValue(topKey, NULL, name, user, host);
-            }
-
-            if (topKey) CFRelease(topKey);
-            if (topValue) CFRelease(topValue);
-        }
-    }
-
-
- badparent:
-    if (constParent) CFRelease(constParent);
-    CFRelease(childName);
- badchildName:
-    CFRelease(parentName);
- badparentName:
- badparams:
-    if (path) CFRelease(path);
-    if (name) CFRelease(name);
-}
-
-
-// child must end with '/'
-JNIEXPORT Boolean JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_addChildToNode
-(JNIEnv *env, jobject klass, jobject jpath, jobject jchild,
- jobject jname, jlong juser, jlong jhost)
-{
-    // like addNode, but can put a three-level-deep dict into the root file
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef child = toCF(env, jchild);
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    CFMutableDictionaryRef parent;
-    CFDictionaryRef node;
-    CFStringRef topKey;
-    CFMutableDictionaryRef topValue;
-    Boolean beforeAdd = false;
-
-    if (!path  ||  !child  ||  !name) goto badparams;
-
-    node = createEmptyNode();
-    throwIfNull(node, "createEmptyNode failed");
-
-    // copyMutableNode creates the node if necessary
-    parent = copyMutableNode(path, name, user, host, &topKey, &topValue);
-    throwIfNull(parent, "copyMutableNode failed");
-    beforeAdd = CFDictionaryContainsKey(parent, child);
-    CFDictionaryAddValue(parent, child, node);
-    if (!beforeAdd)
-        beforeAdd = CFDictionaryContainsKey(parent, child);
-    else
-        beforeAdd = false;
-    CFPreferencesSetValue(topKey, topValue, name, user, host);
-
-    CFRelease(parent);
-    if (topKey) CFRelease(topKey);
-    if (topValue) CFRelease(topValue);
- badparent:
-    CFRelease(node);
- badnode:
- badparams:
-    if (path) CFRelease(path);
-    if (child) CFRelease(child);
-    if (name) CFRelease(name);
-    return beforeAdd;
-}
-
-
-JNIEXPORT void JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_removeChildFromNode
-(JNIEnv *env, jobject klass, jobject jpath, jobject jchild,
- jobject jname, jlong juser, jlong jhost)
-{
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef child = toCF(env, jchild);
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    CFDictionaryRef constParent;
-
-    if (!path  ||  !child  ||  !name) goto badparams;
-
-    constParent = copyNodeIfPresent(path, name, user, host);
-    if (constParent  &&  CFDictionaryContainsKey(constParent, child)) {
-        CFStringRef topKey;
-        CFMutableDictionaryRef topValue;
-        CFMutableDictionaryRef parent;
-
-        parent = copyMutableNode(path, name, user, host, &topKey, &topValue);
-        throwIfNull(parent, "copyMutableNode failed");
-
-        CFDictionaryRemoveValue(parent, child);
-        CFPreferencesSetValue(topKey, topValue, name, user, host);
-
-        CFRelease(parent);
-        if (topKey) CFRelease(topKey);
-        if (topValue) CFRelease(topValue);
-    }
-
- badparent:
-    if (constParent) CFRelease(constParent);
- badparams:
-    if (path) CFRelease(path);
-    if (child) CFRelease(child);
-    if (name) CFRelease(name);
-}
-
-
-
-JNIEXPORT void JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_addKeyToNode
-(JNIEnv *env, jobject klass, jobject jpath, jobject jkey, jobject jvalue,
- jobject jname, jlong juser, jlong jhost)
-{
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef value = toCF(env, jvalue);
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    CFMutableDictionaryRef node = NULL;
-    CFStringRef topKey;
-    CFMutableDictionaryRef topValue;
-
-    if (!path  ||  !key  || !value  ||  !name) goto badparams;
-
-    // fixme optimization: check whether old value and new value are identical
-    node = copyMutableNode(path, name, user, host, &topKey, &topValue);
-    throwIfNull(node, "copyMutableNode failed");
-
-    CFDictionarySetValue(node, key, value);
-    CFPreferencesSetValue(topKey, topValue, name, user, host);
-
-    CFRelease(node);
-    if (topKey) CFRelease(topKey);
-    if (topValue) CFRelease(topValue);
-
- badnode:
- badparams:
-    if (path) CFRelease(path);
-    if (key) CFRelease(key);
-    if (value) CFRelease(value);
-    if (name) CFRelease(name);
-}
-
-
-JNIEXPORT void JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_removeKeyFromNode
-(JNIEnv *env, jobject klass, jobject jpath, jobject jkey,
- jobject jname, jlong juser, jlong jhost)
-{
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    CFDictionaryRef constNode;
-
-    if (!path  ||  !key  ||  !name) goto badparams;
-
-    constNode = copyNodeIfPresent(path, name, user, host);
-    if (constNode  &&  CFDictionaryContainsKey(constNode, key)) {
-        CFStringRef topKey;
-        CFMutableDictionaryRef topValue;
-        CFMutableDictionaryRef node;
-
-        node = copyMutableNode(path, name, user, host, &topKey, &topValue);
-        throwIfNull(node, "copyMutableNode failed");
-
-        CFDictionaryRemoveValue(node, key);
-        CFPreferencesSetValue(topKey, topValue, name, user, host);
-
-        CFRelease(node);
-        if (topKey) CFRelease(topKey);
-        if (topValue) CFRelease(topValue);
-    }
-
- badnode:
-    if (constNode) CFRelease(constNode);
- badparams:
-    if (path) CFRelease(path);
-    if (key) CFRelease(key);
-    if (name) CFRelease(name);
-}
-
-
-// path must end in '/'
-JNIEXPORT jstring JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_getKeyFromNode
-(JNIEnv *env, jobject klass, jobject jpath, jobject jkey,
- jobject jname, jlong juser, jlong jhost)
-{
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    CFPropertyListRef value;
-    CFDictionaryRef node;
-    jstring result = NULL;
-
-    if (!path  ||  !key  ||  !name) goto badparams;
-
-    node = copyNodeIfPresent(path, name, user, host);
-    if (node) {
-        value = (CFPropertyListRef)CFDictionaryGetValue(node, key);
-        if (!value) {
-            // key doesn't exist, or other error - no Java errors available
-            result = NULL;
-        } else {
-            CFStringRef cfString = copyToCFString(env, value);
-            if ((*env)->ExceptionOccurred(env)) {
-                // memory error in copyToCFString
-                result = NULL;
-            } else if (cfString == NULL) {
-                // bogus value type in prefs file - no Java errors available
-                result = NULL;
-            } else {
-                // good cfString
-                result = toJavaString(env, cfString);
-                CFRelease(cfString);
-            }
-        }
-        CFRelease(node);
-    }
-
- badparams:
-    if (path) CFRelease(path);
-    if (key) CFRelease(key);
-    if (name) CFRelease(name);
-
-    return result;
-}
-
-
-typedef struct {
-    jarray result;
-    JNIEnv *env;
-    CFIndex used;
-    Boolean allowSlash;
-} BuildJavaArrayArgs;
-
-// CFDictionary applier function that builds an array of Java strings
-//   from a CFDictionary of CFPropertyListRefs.
-// If args->allowSlash, only strings that end in '/' are added to the array,
-//   with the slash removed. Otherwise, only strings that do not end in '/'
-//   are added.
-// args->result must already exist and be large enough to hold all
-//   strings from the dictionary.
-// After complete application, args->result may not be full because
-//   some of the dictionary values weren't convertible to string. In
-//   this case, args->used will be the count of used elements.
-static void BuildJavaArrayFn(const void *key, const void *value, void *context)
-{
-    BuildJavaArrayArgs *args = (BuildJavaArrayArgs *)context;
-    CFPropertyListRef propkey = (CFPropertyListRef)key;
-    CFStringRef cfString = NULL;
-    JNIEnv *env = args->env;
-
-    if ((*env)->ExceptionOccurred(env)) return; // already failed
-
-    cfString = copyToCFString(env, propkey);
-    if ((*env)->ExceptionOccurred(env)) {
-        // memory error in copyToCFString
-    } else if (!cfString) {
-        // bogus value type in prefs file - no Java errors available
-    } else if (args->allowSlash != CFStringHasSuffix(cfString, CFSTR("/"))) {
-        // wrong suffix - ignore
-    } else {
-        // good cfString
-        jstring javaString;
-        if (args->allowSlash) {
-            CFRange range = CFRangeMake(0, CFStringGetLength(cfString) - 1);
-            CFStringRef s = CFStringCreateWithSubstring(NULL, cfString, range);
-            CFRelease(cfString);
-            cfString = s;
-        }
-        if (CFStringGetLength(cfString) <= 0) goto bad; // ignore empty
-        javaString = toJavaString(env, cfString);
-        if ((*env)->ExceptionOccurred(env)) goto bad;
-        (*env)->SetObjectArrayElement(env, args->result,args->used,javaString);
-        if ((*env)->ExceptionOccurred(env)) goto bad;
-        args->used++;
-    }
-
- bad:
-    if (cfString) CFRelease(cfString);
-}
-
-
-static jarray getStringsForNode(JNIEnv *env, jobject klass, jobject jpath,
-                                jobject jname, jlong juser, jlong jhost,
-                                Boolean allowSlash)
-{
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    CFDictionaryRef node;
-    jarray result = NULL;
-    CFIndex count;
-
-    if (!path  ||  !name) goto badparams;
-
-    node = copyNodeIfPresent(path, name, user, host);
-    if (!node) {
-        result = createJavaStringArray(env, 0);
-    } else {
-        count = CFDictionaryGetCount(node);
-        result = createJavaStringArray(env, count);
-        if (result) {
-            BuildJavaArrayArgs args;
-            args.result = result;
-            args.env = env;
-            args.used = 0;
-            args.allowSlash = allowSlash;
-            CFDictionaryApplyFunction(node, BuildJavaArrayFn, &args);
-            if (!(*env)->ExceptionOccurred(env)) {
-                // array construction succeeded
-                if (args.used < count) {
-                    // finished array is smaller than expected.
-                    // Make a new array of precisely the right size.
-                    jarray newresult = createJavaStringArray(env, args.used);
-                    if (newresult) {
-                        JVM_ArrayCopy(env,0, result,0, newresult,0, args.used);
-                        result = newresult;
-                    }
-                }
-            }
-        }
-
-        CFRelease(node);
-    }
-
- badparams:
-    if (path) CFRelease(path);
-    if (name) CFRelease(name);
-
-    return result;
-}
-
-
-JNIEXPORT jarray JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_getKeysForNode
-(JNIEnv *env, jobject klass, jobject jpath,
- jobject jname, jlong juser, jlong jhost)
-{
-    return getStringsForNode(env, klass, jpath, jname, juser, jhost, false);
-}
-
-JNIEXPORT jarray JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_getChildrenForNode
-(JNIEnv *env, jobject klass, jobject jpath,
- jobject jname, jlong juser, jlong jhost)
-{
-    return getStringsForNode(env, klass, jpath, jname, juser, jhost, true);
-}
-
-
-// Returns false on error instead of throwing.
-JNIEXPORT jboolean JNICALL
-Java_java_util_prefs_MacOSXPreferencesFile_synchronize
-(JNIEnv *env, jobject klass,
- jstring jname, jlong juser, jlong jhost)
-{
-    CFStringRef name = toCF(env, jname);
-    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
-    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
-    jboolean result = 0;
-
-    if (name) {
-        result = CFPreferencesSynchronize(name, user, host);
-        CFRelease(name);
-    }
-
-    return result;
-}
--- a/jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m	Wed Jan 29 20:41:33 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <SystemConfiguration/SystemConfiguration.h>
-
-
-@interface JNFVectorCoercion : NSObject <JNFTypeCoercion> { }
-@end
-
-@implementation JNFVectorCoercion
-
-- (jobject) coerceNSObject:(id)obj withEnv:(JNIEnv *)env usingCoercer:(JNFTypeCoercion *)coercer {
-    static JNF_CLASS_CACHE(jc_Vector, "java/util/Vector");
-    static JNF_CTOR_CACHE(jm_Vector_ctor, jc_Vector, "(I)V");
-    static JNF_MEMBER_CACHE(jm_Vector_add, jc_Vector, "add", "(Ljava/lang/Object;)Z");
-
-    NSArray *nsArray = (NSArray *)obj;
-    jobject javaArray = JNFNewObject(env, jm_Vector_ctor, (jint)[nsArray count]);
-
-    for (id obj in nsArray) {
-        jobject jobj = [coercer coerceNSObject:obj withEnv:env usingCoercer:coercer];
-        JNFCallBooleanMethod(env, javaArray, jm_Vector_add, jobj);
-        if (jobj != NULL) (*env)->DeleteLocalRef(env, jobj);
-    }
-
-    return javaArray;
-}
-
-- (id) coerceJavaObject:(jobject)obj withEnv:(JNIEnv *)env usingCoercer:(JNFTypeCoercion *)coercer {
-    return nil;
-}
-
-@end
-
-
-@interface JNFHashtableCoercion : NSObject <JNFTypeCoercion> { }
-@end
-
-@implementation JNFHashtableCoercion
-
-- (jobject) coerceNSObject:(id)obj withEnv:(JNIEnv *)env usingCoercer:(JNFTypeCoercion *)coercer {
-    static JNF_CLASS_CACHE(jc_Hashtable, "java/util/Hashtable");
-    static JNF_CTOR_CACHE(jm_Hashtable_ctor, jc_Hashtable, "()V");
-    static JNF_MEMBER_CACHE(jm_Hashtable_put, jc_Hashtable, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
-
-    NSDictionary *nsDict = (NSDictionary *)obj;
-    NSEnumerator *keyEnum = [nsDict keyEnumerator];
-
-    jobject jHashTable = JNFNewObject(env, jm_Hashtable_ctor);
-
-    id key = nil;
-    while ((key = [keyEnum nextObject]) != nil) {
-        jobject jkey = [coercer coerceNSObject:key withEnv:env usingCoercer:coercer];
-
-        id value = [nsDict objectForKey:key];
-        jobject jvalue = [coercer coerceNSObject:value withEnv:env usingCoercer:coercer];
-
-        JNFCallObjectMethod(env, jHashTable, jm_Hashtable_put, jkey, jvalue);
-
-        if (jkey != NULL) (*env)->DeleteLocalRef(env, jkey);
-        if (jvalue != NULL) (*env)->DeleteLocalRef(env, jvalue);
-    }
-
-    return jHashTable;
-}
-
-- (id) coerceJavaObject:(jobject)obj withEnv:(JNIEnv *)env usingCoercer:(JNFTypeCoercion *)coercer {
-    return nil;
-}
-
-@end
-
-
-
-NSDictionary *realmConfigsForRealms(SCDynamicStoreRef store, NSArray *realms) {
-    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
-
-    for (NSString *realm in realms) {
-        CFTypeRef realmInfo = SCDynamicStoreCopyValue(store, (CFStringRef) [NSString stringWithFormat:@"Kerberos:%@", realm]);
-
-        if (CFGetTypeID(realmInfo) != CFDictionaryGetTypeID()) {
-            return nil;
-        }
-
-        [dict setObject:(NSArray *)realmInfo forKey:realm];
-        CFRelease(realmInfo);
-    }
-
-    return dict;
-}
-
-
-#define KERBEROS_DEFAULT_REALMS @"Kerberos-Default-Realms"
-#define KERBEROS_DEFAULT_REALM_MAPPINGS @"Kerberos-Domain-Realm-Mappings"
-
-void _SCDynamicStoreCallBack(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) {
-   NSArray *keys = (NSArray *)changedKeys;
-    if ([keys count] == 0) return;
-    if (![keys containsObject:KERBEROS_DEFAULT_REALMS] && ![keys containsObject:KERBEROS_DEFAULT_REALM_MAPPINGS]) return;
-
-    JNFPerformEnvBlock(JNFThreadDetachOnThreadDeath | JNFThreadSetSystemClassLoaderOnAttach | JNFThreadAttachAsDaemon, ^(JNIEnv *env) {
-        static JNF_CLASS_CACHE(jc_Config, "sun/security/krb5/Config");
-        static JNF_STATIC_MEMBER_CACHE(jm_Config_refresh, jc_Config, "refresh", "()V");
-        JNFCallStaticVoidMethod(env, jm_Config_refresh);
-    });
-}
-
-/*
- * Class:     sun_security_krb5_SCDynamicStoreConfig
- * Method:    installNotificationCallback
- */
-JNIEXPORT void JNICALL Java_sun_security_krb5_SCDynamicStoreConfig_installNotificationCallback(JNIEnv *env, jclass klass) {
-
-JNF_COCOA_ENTER(env);
-
-    SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java"), _SCDynamicStoreCallBack, NULL);
-    if (store == NULL) {
-        return;
-    }
-
-    NSArray *keys = [NSArray arrayWithObjects:KERBEROS_DEFAULT_REALMS, KERBEROS_DEFAULT_REALM_MAPPINGS, nil];
-    SCDynamicStoreSetNotificationKeys(store, (CFArrayRef) keys, NULL);
-
-    CFRunLoopSourceRef rls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0);
-    if (rls != NULL) {
-        CFRunLoopAddSource(CFRunLoopGetMain(), rls, kCFRunLoopDefaultMode);
-        CFRelease(rls);
-    }
-
-    CFRelease(store);
-
-JNF_COCOA_EXIT(env);
-
-}
-
-/*
- * Class:     sun_security_krb5_SCDynamicStoreConfig
- * Method:    getKerberosConfig
- * Signature: ()Ljava/util/Hashtable;
- */
-JNIEXPORT jobject JNICALL Java_sun_security_krb5_SCDynamicStoreConfig_getKerberosConfig(JNIEnv *env, jclass klass) {
-    jobject jHashTable = NULL;
-
-JNF_COCOA_ENTER(env);
-
-    SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java-kerberos"), NULL, NULL);
-    if (store == NULL) {
-        return NULL;
-    }
-
-    CFTypeRef realms = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALMS);
-    if (realms == NULL || CFGetTypeID(realms) != CFArrayGetTypeID()) {
-        if (realms) CFRelease(realms);
-        CFRelease(store);
-        return NULL;
-    }
-
-    CFTypeRef realmMappings = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALM_MAPPINGS);
-
-    if (realmMappings == NULL || CFGetTypeID(realmMappings) != CFArrayGetTypeID()) {
-        if (realmMappings) CFRelease(realmMappings);
-        CFRelease(realms);
-        CFRelease(store);
-        return NULL;
-    }
-
-    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
-
-    if (CFArrayGetCount(realms) > 0) {
-        NSDictionary *defaultRealmsDict = [NSDictionary dictionaryWithObject:[(NSArray *)realms objectAtIndex:0] forKey:@"default_realm"];
-        [dict setObject:defaultRealmsDict forKey:@"libdefaults"];
-
-        NSDictionary *realmConfigs = realmConfigsForRealms(store, (NSArray *)realms);
-        [dict setObject:realmConfigs forKey:@"realms"];
-    }
-    CFRelease(realms);
-    CFRelease(store);
-
-    if (CFArrayGetCount(realmMappings) > 0) {
-        [dict setObject:[(NSArray *)realmMappings objectAtIndex:0] forKey:@"domain_realm"];
-    }
-    CFRelease(realmMappings);
-
-
-    // create and load a coercer with all of the different coercions to convert each type of object
-    JNFTypeCoercer *coercer = [[[JNFTypeCoercer alloc] init] autorelease];
-    [JNFDefaultCoercions addStringCoercionTo:coercer];
-    [JNFDefaultCoercions addNumberCoercionTo:coercer];
-    [coercer addCoercion:[[[JNFHashtableCoercion alloc] init] autorelease] forNSClass:[NSDictionary class] javaClass:@"java/util/Map"];
-    [coercer addCoercion:[[[JNFVectorCoercion alloc] init] autorelease] forNSClass:[NSArray class] javaClass:@"java/util/List"];
-
-    // convert Cocoa graph to Java graph
-    jHashTable = [coercer coerceNSObject:dict withEnv:env];
-
-JNF_COCOA_EXIT(env);
-
-    return jHashTable;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/macosx/native/java/util/prefs/MacOSXPreferencesFile.m	Tue Feb 18 15:48:14 2014 -0800
@@ -0,0 +1,999 @@
+/*
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+   Hierarchical storage layout:
+
+   <dict>
+     <key>/</key>
+     <dict>
+       <key>foo</key>
+       <string>/foo's value</string>
+       <key>foo/</key>
+       <dict>
+         <key>bar</key>
+         <string>/foo/bar's value</string>
+       </dict>
+     </dict>
+   </dict>
+
+   Java pref nodes are stored in several different files. Pref nodes
+   with at least three components in the node name (e.g. /com/MyCompany/MyApp/)
+   are stored in a CF prefs file with the first three components as the name.
+   This way, all preferences for MyApp end up in com.MyCompany.MyApp.plist .
+   Pref nodes with shorter names are stored in com.apple.java.util.prefs.plist
+
+   The filesystem is assumed to be case-insensitive (like HFS+).
+   Java pref node names are case-sensitive. If two pref node names differ
+   only in case, they may end up in the same pref file. This is ok
+   because the CF keys identifying the node span the entire absolute path
+   to the node and are case-sensitive.
+
+   Java node names may contain '.' . When mapping to the CF file name,
+   these dots are left as-is, even though '/' is mapped to '.' .
+   This is ok because the CF key contains the correct node name.
+*/
+
+
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#include "jni_util.h"
+#include "jlong.h"
+#include "jvm.h"
+
+
+// Throw an OutOfMemoryError with the given message.
+static void throwOutOfMemoryError(JNIEnv *env, const char *msg)
+{
+    static jclass exceptionClass = NULL;
+    jclass c;
+
+    if (exceptionClass) {
+        c = exceptionClass;
+    } else {
+        c = (*env)->FindClass(env, "java/lang/OutOfMemoryError");
+        if ((*env)->ExceptionOccurred(env)) return;
+        exceptionClass = (*env)->NewGlobalRef(env, c);
+    }
+
+    (*env)->ThrowNew(env, c, msg);
+}
+
+
+// throwIfNull macro
+// If var is NULL, throw an OutOfMemoryError and goto badvar.
+// var must be a variable. env must be the current JNIEnv.
+// fixme throw BackingStoreExceptions sometimes?
+#define throwIfNull(var, msg) \
+    do { \
+        if (var == NULL) { \
+            throwOutOfMemoryError(env, msg); \
+            goto bad##var; \
+        } \
+    } while (0)
+
+
+// Converts CFNumber, CFBoolean, CFString to CFString
+// returns NULL if value is of some other type
+// throws and returns NULL on memory error
+// result must be released (even if value was already a CFStringRef)
+// value must not be null
+static CFStringRef copyToCFString(JNIEnv *env, CFTypeRef value)
+{
+    CFStringRef result;
+    CFTypeID type;
+
+    type = CFGetTypeID(value);
+
+    if (type == CFStringGetTypeID()) {
+        result = (CFStringRef)CFRetain(value);
+    }
+    else if (type == CFBooleanGetTypeID()) {
+        // Java Preferences API expects "true" and "false" for boolean values.
+        result = CFStringCreateCopy(NULL, (value == kCFBooleanTrue) ? CFSTR("true") : CFSTR("false"));
+        throwIfNull(result, "copyToCFString failed");
+    }
+    else if (type == CFNumberGetTypeID()) {
+        CFNumberRef number = (CFNumberRef) value;
+        if (CFNumberIsFloatType(number)) {
+            double d;
+            CFNumberGetValue(number, kCFNumberDoubleType, &d);
+            result = CFStringCreateWithFormat(NULL, NULL, CFSTR("%g"), d);
+            throwIfNull(result, "copyToCFString failed");
+        }
+        else {
+            long l;
+            CFNumberGetValue(number, kCFNumberLongType, &l);
+            result = CFStringCreateWithFormat(NULL, NULL, CFSTR("%ld"), l);
+            throwIfNull(result, "copyToCFString failed");
+        }
+    }
+    else {
+        // unknown type - return NULL
+        result = NULL;
+    }
+
+ badresult:
+    return result;
+}
+
+
+// Create a Java string from the given CF string.
+// returns NULL if cfString is NULL
+// throws and returns NULL on memory error
+static jstring toJavaString(JNIEnv *env, CFStringRef cfString)
+{
+    if (cfString == NULL) {
+        return NULL;
+    } else {
+        jstring javaString = NULL;
+
+        CFIndex length = CFStringGetLength(cfString);
+        const UniChar *constchars = CFStringGetCharactersPtr(cfString);
+        if (constchars) {
+            javaString = (*env)->NewString(env, constchars, length);
+        } else {
+            UniChar *chars = malloc(length * sizeof(UniChar));
+            throwIfNull(chars, "toJavaString failed");
+            CFStringGetCharacters(cfString, CFRangeMake(0, length), chars);
+            javaString = (*env)->NewString(env, chars, length);
+            free(chars);
+        }
+    badchars:
+        return javaString;
+    }
+}
+
+
+
+// Create a CF string from the given Java string.
+// returns NULL if javaString is NULL
+// throws and returns NULL on memory error
+static CFStringRef toCF(JNIEnv *env, jstring javaString)
+{
+    if (javaString == NULL) {
+        return NULL;
+    } else {
+        CFStringRef result = NULL;
+        jsize length = (*env)->GetStringLength(env, javaString);
+        const jchar *chars = (*env)->GetStringChars(env, javaString, NULL);
+        throwIfNull(chars, "toCF failed");
+        result =
+            CFStringCreateWithCharacters(NULL, (const UniChar *)chars, length);
+        (*env)->ReleaseStringChars(env, javaString, chars);
+        throwIfNull(result, "toCF failed");
+    badchars:
+    badresult:
+        return result;
+    }
+}
+
+
+// Create an empty Java string array of the given size.
+// Throws and returns NULL on error.
+static jarray createJavaStringArray(JNIEnv *env, CFIndex count)
+{
+    static jclass stringClass = NULL;
+    jclass c;
+
+    if (stringClass) {
+        c = stringClass;
+    } else {
+        c = (*env)->FindClass(env, "java/lang/String");
+        if ((*env)->ExceptionOccurred(env)) return NULL;
+        stringClass = (*env)->NewGlobalRef(env, c);
+    }
+
+    return (*env)->NewObjectArray(env, count, c, NULL); // AWT_THREADING Safe (known object)
+}
+
+
+// Java accessors for CF constants.
+JNIEXPORT jlong JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_currentUser(JNIEnv *env,
+                                                       jobject klass)
+{
+    return ptr_to_jlong(kCFPreferencesCurrentUser);
+}
+
+JNIEXPORT jlong JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_anyUser(JNIEnv *env, jobject klass)
+{
+    return ptr_to_jlong(kCFPreferencesAnyUser);
+}
+
+JNIEXPORT jlong JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_currentHost(JNIEnv *env,
+                                                       jobject klass)
+{
+    return ptr_to_jlong(kCFPreferencesCurrentHost);
+}
+
+JNIEXPORT jlong JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_anyHost(JNIEnv *env, jobject klass)
+{
+    return ptr_to_jlong(kCFPreferencesAnyHost);
+}
+
+
+// Create an empty node.
+// Does not store the node in any prefs file.
+// returns NULL on memory error
+static CFMutableDictionaryRef createEmptyNode(void)
+{
+    return CFDictionaryCreateMutable(NULL, 0,
+                                     &kCFTypeDictionaryKeyCallBacks,
+                                     &kCFTypeDictionaryValueCallBacks);
+}
+
+
+// Create a string that consists of path minus its last component.
+// path must end with '/'
+// The result will end in '/' (unless path itself is '/')
+static CFStringRef copyParentOf(CFStringRef path)
+{
+    CFRange searchRange;
+    CFRange slashRange;
+    CFRange parentRange;
+    Boolean found;
+
+    searchRange = CFRangeMake(0, CFStringGetLength(path) - 1);
+    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange,
+                                    kCFCompareBackwards, &slashRange);
+    if (!found) return CFSTR("");
+    parentRange = CFRangeMake(0, slashRange.location + 1); // include '/'
+    return CFStringCreateWithSubstring(NULL, path, parentRange);
+}
+
+
+// Create a string that consists of path's last component.
+// path must end with '/'
+// The result will end in '/'.
+// The result will not start with '/' (unless path itself is '/')
+static CFStringRef copyChildOf(CFStringRef path)
+{
+    CFRange searchRange;
+    CFRange slashRange;
+    CFRange childRange;
+    Boolean found;
+    CFIndex length = CFStringGetLength(path);
+
+    searchRange = CFRangeMake(0, length - 1);
+    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange,
+                                    kCFCompareBackwards, &slashRange);
+    if (!found) return CFSTR("");
+    childRange = CFRangeMake(slashRange.location + 1,
+                             length - slashRange.location - 1); // skip '/'
+    return CFStringCreateWithSubstring(NULL, path, childRange);
+}
+
+
+// Return the first three components of path, with leading and trailing '/'.
+// If path does not have three components, return NULL.
+// path must begin and end in '/'
+static CFStringRef copyFirstThreeComponentsOf(CFStringRef path)
+{
+    CFRange searchRange;
+    CFRange slashRange;
+    CFRange prefixRange;
+    CFStringRef prefix;
+    Boolean found;
+    CFIndex length = CFStringGetLength(path);
+
+    searchRange = CFRangeMake(1, length - 1);  // skip leading '/'
+    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange, 0,
+                                    &slashRange);
+    if (!found) return NULL;  // no second slash!
+
+    searchRange = CFRangeMake(slashRange.location + 1,
+                              length - slashRange.location - 1);
+    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange, 0,
+                                    &slashRange);
+    if (!found) return NULL;  // no third slash!
+
+    searchRange = CFRangeMake(slashRange.location + 1,
+                              length - slashRange.location - 1);
+    found = CFStringFindWithOptions(path, CFSTR("/"), searchRange, 0,
+                                    &slashRange);
+    if (!found) return NULL;  // no fourth slash!
+
+    prefixRange = CFRangeMake(0, slashRange.location + 1); // keep last '/'
+    prefix = CFStringCreateWithSubstring(NULL, path, prefixRange);
+
+    return prefix;
+}
+
+
+// Copy the CFPreferences key and value at the base of path's tree.
+// path must end in '/'
+// topKey or topValue may be NULL
+// Returns NULL on error or if there is no tree for path in this file.
+static void copyTreeForPath(CFStringRef path, CFStringRef name,
+                            CFStringRef user, CFStringRef host,
+                            CFStringRef *topKey, CFDictionaryRef *topValue)
+{
+    CFStringRef key;
+    CFPropertyListRef value;
+
+    if (topKey) *topKey = NULL;
+    if (topValue) *topValue = NULL;
+
+    if (CFEqual(name, CFSTR("com.apple.java.util.prefs"))) {
+        // Top-level file. Only key "/" is an acceptable root.
+        key = (CFStringRef) CFRetain(CFSTR("/"));
+    } else {
+        // Second-level file. Key must be the first three components of path.
+        key = copyFirstThreeComponentsOf(path);
+        if (!key) return;
+    }
+
+    value = CFPreferencesCopyValue(key, name, user, host);
+    if (value) {
+        if (CFGetTypeID(value) == CFDictionaryGetTypeID()) {
+            // (key, value) is acceptable
+            if (topKey) *topKey = (CFStringRef)CFRetain(key);
+            if (topValue) *topValue = (CFDictionaryRef)CFRetain(value);
+        }
+        CFRelease(value);
+    }
+    CFRelease(key);
+}
+
+
+// Find the node for path in the given tree.
+// Returns NULL on error or if path doesn't have a node in this tree.
+// path must end in '/'
+static CFDictionaryRef copyNodeInTree(CFStringRef path, CFStringRef topKey,
+                                      CFDictionaryRef topValue)
+{
+    CFMutableStringRef p;
+    CFDictionaryRef result = NULL;
+
+    p = CFStringCreateMutableCopy(NULL, 0, path);
+    if (!p) return NULL;
+    CFStringDelete(p, CFRangeMake(0, CFStringGetLength(topKey)));
+    result = topValue;
+
+    while (CFStringGetLength(p) > 0) {
+        CFDictionaryRef child;
+        CFStringRef part = NULL;
+        CFRange slashRange = CFStringFind(p, CFSTR("/"), 0);
+        // guaranteed to succeed because path must end in '/'
+        CFRange partRange = CFRangeMake(0, slashRange.location + 1);
+        part = CFStringCreateWithSubstring(NULL, p, partRange);
+        if (!part) { result = NULL; break; }
+        CFStringDelete(p, partRange);
+
+        child = CFDictionaryGetValue(result, part);
+        CFRelease(part);
+        if (child  &&  CFGetTypeID(child) == CFDictionaryGetTypeID()) {
+            // continue search
+            result = child;
+        } else {
+            // didn't find target node
+            result = NULL;
+            break;
+        }
+    }
+
+    CFRelease(p);
+    if (result) return (CFDictionaryRef)CFRetain(result);
+    else return NULL;
+}
+
+
+// Return a retained copy of the node at path from the given file.
+// path must end in '/'
+// returns NULL if node doesn't exist.
+// returns NULL if the value for key "path" isn't a valid node.
+static CFDictionaryRef copyNodeIfPresent(CFStringRef path, CFStringRef name,
+                                         CFStringRef user, CFStringRef host)
+{
+    CFStringRef topKey;
+    CFDictionaryRef topValue;
+    CFDictionaryRef result;
+
+    copyTreeForPath(path, name, user, host, &topKey, &topValue);
+    if (!topKey) return NULL;
+
+    result = copyNodeInTree(path, topKey, topValue);
+
+    CFRelease(topKey);
+    if (topValue) CFRelease(topValue);
+    return result;
+}
+
+
+// Create a new tree that would store path in the given file.
+// Only the root of the tree is created, not all of the links leading to path.
+// returns NULL on error
+static void createTreeForPath(CFStringRef path, CFStringRef name,
+                              CFStringRef user, CFStringRef host,
+                              CFStringRef *outTopKey,
+                              CFMutableDictionaryRef *outTopValue)
+{
+    *outTopKey = NULL;
+    *outTopValue = NULL;
+
+    // if name is "com.apple.java.util.prefs" then create tree "/"
+    // else create tree "/foo/bar/baz/"
+    // "com.apple.java.util.prefs.plist" is also in MacOSXPreferences.java
+    if (CFEqual(name, CFSTR("com.apple.java.util.prefs"))) {
+        *outTopKey = CFSTR("/");
+        *outTopValue = createEmptyNode();
+    } else {
+        CFStringRef prefix = copyFirstThreeComponentsOf(path);
+        if (prefix) {
+            *outTopKey = prefix;
+            *outTopValue = createEmptyNode();
+        }
+    }
+}
+
+
+// Return a mutable copy of the tree containing path and the dict for
+//   path itself. *outTopKey and *outTopValue can be used to write the
+//   modified tree back to the prefs file.
+// *outTopKey and *outTopValue must be released iff the actual return
+//   value is not NULL.
+static CFMutableDictionaryRef
+copyMutableNode(CFStringRef path, CFStringRef name,
+                CFStringRef user, CFStringRef host,
+                CFStringRef *outTopKey,
+                CFMutableDictionaryRef *outTopValue)
+{
+    CFStringRef topKey = NULL;
+    CFDictionaryRef oldTopValue = NULL;
+    CFMutableDictionaryRef topValue;
+    CFMutableDictionaryRef result = NULL;
+    CFMutableStringRef p;
+
+    if (outTopKey) *outTopKey = NULL;
+    if (outTopValue) *outTopValue = NULL;
+
+    copyTreeForPath(path, name, user, host, &topKey, &oldTopValue);
+    if (!topKey) {
+        createTreeForPath(path, name, user, host, &topKey, &topValue);
+    } else {
+        topValue = (CFMutableDictionaryRef)
+            CFPropertyListCreateDeepCopy(NULL, (CFPropertyListRef)oldTopValue,
+                                         kCFPropertyListMutableContainers);
+    }
+    if (!topValue) goto badtopValue;
+
+    p = CFStringCreateMutableCopy(NULL, 0, path);
+    if (!p) goto badp;
+    CFStringDelete(p, CFRangeMake(0, CFStringGetLength(topKey)));
+    result = topValue;
+
+    while (CFStringGetLength(p) > 0) {
+        CFMutableDictionaryRef child;
+        CFStringRef part = NULL;
+        CFRange slashRange = CFStringFind(p, CFSTR("/"), 0);
+        // guaranteed to succeed because path must end in '/'
+        CFRange partRange = CFRangeMake(0, slashRange.location + 1);
+        part = CFStringCreateWithSubstring(NULL, p, partRange);
+        if (!part) { result = NULL; break; }
+        CFStringDelete(p, partRange);
+
+        child = (CFMutableDictionaryRef)CFDictionaryGetValue(result, part);
+        if (child  &&  CFGetTypeID(child) == CFDictionaryGetTypeID()) {
+            // continue search
+            result = child;
+        } else {
+            // didn't find target node - add it and continue
+            child = createEmptyNode();
+            if (!child) { CFRelease(part); result = NULL; break; }
+            CFDictionaryAddValue(result, part, child);
+            result = child;
+        }
+        CFRelease(part);
+    }
+
+    if (result) {
+        *outTopKey = (CFStringRef)CFRetain(topKey);
+        *outTopValue = (CFMutableDictionaryRef)CFRetain(topValue);
+        CFRetain(result);
+    }
+
+    CFRelease(p);
+ badp:
+    CFRelease(topValue);
+ badtopValue:
+    if (topKey) CFRelease(topKey);
+    if (oldTopValue) CFRelease(oldTopValue);
+    return result;
+}
+
+
+JNIEXPORT jboolean JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_addNode
+(JNIEnv *env, jobject klass, jobject jpath,
+ jobject jname, jlong juser, jlong jhost)
+{
+    CFStringRef path = toCF(env, jpath);
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    CFDictionaryRef node = NULL;
+    jboolean neededNewNode = false;
+
+    if (!path  ||  !name) goto badparams;
+
+    node = copyNodeIfPresent(path, name, user, host);
+
+    if (node) {
+        neededNewNode = false;
+        CFRelease(node);
+    } else {
+        CFStringRef topKey = NULL;
+        CFMutableDictionaryRef topValue = NULL;
+
+        neededNewNode = true;
+
+        // copyMutableNode creates the node if necessary
+        node = copyMutableNode(path, name, user, host, &topKey, &topValue);
+        throwIfNull(node, "copyMutableNode failed");
+
+        CFPreferencesSetValue(topKey, topValue, name, user, host);
+
+        CFRelease(node);
+        if (topKey) CFRelease(topKey);
+        if (topValue) CFRelease(topValue);
+    }
+
+ badnode:
+ badparams:
+    if (path) CFRelease(path);
+    if (name) CFRelease(name);
+
+    return neededNewNode;
+}
+
+
+JNIEXPORT void JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_removeNode
+(JNIEnv *env, jobject klass, jobject jpath,
+ jobject jname, jlong juser, jlong jhost)
+{
+    CFStringRef path = toCF(env, jpath);
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    CFStringRef parentName;
+    CFStringRef childName;
+    CFDictionaryRef constParent;
+
+    if (!path  ||  !name) goto badparams;
+
+    parentName = copyParentOf(path);
+    throwIfNull(parentName, "copyParentOf failed");
+    childName  = copyChildOf(path);
+    throwIfNull(childName, "copyChildOf failed");
+
+    // root node is not allowed to be removed, so parentName is never empty
+
+    constParent = copyNodeIfPresent(parentName, name, user, host);
+    if (constParent  &&  CFDictionaryContainsKey(constParent, childName)) {
+        CFStringRef topKey;
+        CFMutableDictionaryRef topValue;
+        CFMutableDictionaryRef parent;
+
+        parent = copyMutableNode(parentName, name, user, host,
+                                 &topKey, &topValue);
+        throwIfNull(parent, "copyMutableNode failed");
+
+        CFDictionaryRemoveValue(parent, childName);
+        CFPreferencesSetValue(topKey, topValue, name, user, host);
+
+        CFRelease(parent);
+        if (topKey) CFRelease(topKey);
+        if (topValue) CFRelease(topValue);
+    } else {
+        // might be trying to remove the root itself in a non-root file
+        CFStringRef topKey;
+        CFDictionaryRef topValue;
+        copyTreeForPath(path, name, user, host, &topKey, &topValue);
+        if (topKey) {
+            if (CFEqual(topKey, path)) {
+                CFPreferencesSetValue(topKey, NULL, name, user, host);
+            }
+
+            if (topKey) CFRelease(topKey);
+            if (topValue) CFRelease(topValue);
+        }
+    }
+
+
+ badparent:
+    if (constParent) CFRelease(constParent);
+    CFRelease(childName);
+ badchildName:
+    CFRelease(parentName);
+ badparentName:
+ badparams:
+    if (path) CFRelease(path);
+    if (name) CFRelease(name);
+}
+
+
+// child must end with '/'
+JNIEXPORT Boolean JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_addChildToNode
+(JNIEnv *env, jobject klass, jobject jpath, jobject jchild,
+ jobject jname, jlong juser, jlong jhost)
+{
+    // like addNode, but can put a three-level-deep dict into the root file
+    CFStringRef path = toCF(env, jpath);
+    CFStringRef child = toCF(env, jchild);
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    CFMutableDictionaryRef parent;
+    CFDictionaryRef node;
+    CFStringRef topKey;
+    CFMutableDictionaryRef topValue;
+    Boolean beforeAdd = false;
+
+    if (!path  ||  !child  ||  !name) goto badparams;
+
+    node = createEmptyNode();
+    throwIfNull(node, "createEmptyNode failed");
+
+    // copyMutableNode creates the node if necessary
+    parent = copyMutableNode(path, name, user, host, &topKey, &topValue);
+    throwIfNull(parent, "copyMutableNode failed");
+    beforeAdd = CFDictionaryContainsKey(parent, child);
+    CFDictionaryAddValue(parent, child, node);
+    if (!beforeAdd)
+        beforeAdd = CFDictionaryContainsKey(parent, child);
+    else
+        beforeAdd = false;
+    CFPreferencesSetValue(topKey, topValue, name, user, host);
+
+    CFRelease(parent);
+    if (topKey) CFRelease(topKey);
+    if (topValue) CFRelease(topValue);
+ badparent:
+    CFRelease(node);
+ badnode:
+ badparams:
+    if (path) CFRelease(path);
+    if (child) CFRelease(child);
+    if (name) CFRelease(name);
+    return beforeAdd;
+}
+
+
+JNIEXPORT void JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_removeChildFromNode
+(JNIEnv *env, jobject klass, jobject jpath, jobject jchild,
+ jobject jname, jlong juser, jlong jhost)
+{
+    CFStringRef path = toCF(env, jpath);
+    CFStringRef child = toCF(env, jchild);
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    CFDictionaryRef constParent;
+
+    if (!path  ||  !child  ||  !name) goto badparams;
+
+    constParent = copyNodeIfPresent(path, name, user, host);
+    if (constParent  &&  CFDictionaryContainsKey(constParent, child)) {
+        CFStringRef topKey;
+        CFMutableDictionaryRef topValue;
+        CFMutableDictionaryRef parent;
+
+        parent = copyMutableNode(path, name, user, host, &topKey, &topValue);
+        throwIfNull(parent, "copyMutableNode failed");
+
+        CFDictionaryRemoveValue(parent, child);
+        CFPreferencesSetValue(topKey, topValue, name, user, host);
+
+        CFRelease(parent);
+        if (topKey) CFRelease(topKey);
+        if (topValue) CFRelease(topValue);
+    }
+
+ badparent:
+    if (constParent) CFRelease(constParent);
+ badparams:
+    if (path) CFRelease(path);
+    if (child) CFRelease(child);
+    if (name) CFRelease(name);
+}
+
+
+
+JNIEXPORT void JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_addKeyToNode
+(JNIEnv *env, jobject klass, jobject jpath, jobject jkey, jobject jvalue,
+ jobject jname, jlong juser, jlong jhost)
+{
+    CFStringRef path = toCF(env, jpath);
+    CFStringRef key = toCF(env, jkey);
+    CFStringRef value = toCF(env, jvalue);
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    CFMutableDictionaryRef node = NULL;
+    CFStringRef topKey;
+    CFMutableDictionaryRef topValue;
+
+    if (!path  ||  !key  || !value  ||  !name) goto badparams;
+
+    // fixme optimization: check whether old value and new value are identical
+    node = copyMutableNode(path, name, user, host, &topKey, &topValue);
+    throwIfNull(node, "copyMutableNode failed");
+
+    CFDictionarySetValue(node, key, value);
+    CFPreferencesSetValue(topKey, topValue, name, user, host);
+
+    CFRelease(node);
+    if (topKey) CFRelease(topKey);
+    if (topValue) CFRelease(topValue);
+
+ badnode:
+ badparams:
+    if (path) CFRelease(path);
+    if (key) CFRelease(key);
+    if (value) CFRelease(value);
+    if (name) CFRelease(name);
+}
+
+
+JNIEXPORT void JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_removeKeyFromNode
+(JNIEnv *env, jobject klass, jobject jpath, jobject jkey,
+ jobject jname, jlong juser, jlong jhost)
+{
+    CFStringRef path = toCF(env, jpath);
+    CFStringRef key = toCF(env, jkey);
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    CFDictionaryRef constNode;
+
+    if (!path  ||  !key  ||  !name) goto badparams;
+
+    constNode = copyNodeIfPresent(path, name, user, host);
+    if (constNode  &&  CFDictionaryContainsKey(constNode, key)) {
+        CFStringRef topKey;
+        CFMutableDictionaryRef topValue;
+        CFMutableDictionaryRef node;
+
+        node = copyMutableNode(path, name, user, host, &topKey, &topValue);
+        throwIfNull(node, "copyMutableNode failed");
+
+        CFDictionaryRemoveValue(node, key);
+        CFPreferencesSetValue(topKey, topValue, name, user, host);
+
+        CFRelease(node);
+        if (topKey) CFRelease(topKey);
+        if (topValue) CFRelease(topValue);
+    }
+
+ badnode:
+    if (constNode) CFRelease(constNode);
+ badparams:
+    if (path) CFRelease(path);
+    if (key) CFRelease(key);
+    if (name) CFRelease(name);
+}
+
+
+// path must end in '/'
+JNIEXPORT jstring JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_getKeyFromNode
+(JNIEnv *env, jobject klass, jobject jpath, jobject jkey,
+ jobject jname, jlong juser, jlong jhost)
+{
+    CFStringRef path = toCF(env, jpath);
+    CFStringRef key = toCF(env, jkey);
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    CFPropertyListRef value;
+    CFDictionaryRef node;
+    jstring result = NULL;
+
+    if (!path  ||  !key  ||  !name) goto badparams;
+
+    node = copyNodeIfPresent(path, name, user, host);
+    if (node) {
+        value = (CFPropertyListRef)CFDictionaryGetValue(node, key);
+        if (!value) {
+            // key doesn't exist, or other error - no Java errors available
+            result = NULL;
+        } else {
+            CFStringRef cfString = copyToCFString(env, value);
+            if ((*env)->ExceptionOccurred(env)) {
+                // memory error in copyToCFString
+                result = NULL;
+            } else if (cfString == NULL) {
+                // bogus value type in prefs file - no Java errors available
+                result = NULL;
+            } else {
+                // good cfString
+                result = toJavaString(env, cfString);
+                CFRelease(cfString);
+            }
+        }
+        CFRelease(node);
+    }
+
+ badparams:
+    if (path) CFRelease(path);
+    if (key) CFRelease(key);
+    if (name) CFRelease(name);
+
+    return result;
+}
+
+
+typedef struct {
+    jarray result;
+    JNIEnv *env;
+    CFIndex used;
+    Boolean allowSlash;
+} BuildJavaArrayArgs;
+
+// CFDictionary applier function that builds an array of Java strings
+//   from a CFDictionary of CFPropertyListRefs.
+// If args->allowSlash, only strings that end in '/' are added to the array,
+//   with the slash removed. Otherwise, only strings that do not end in '/'
+//   are added.
+// args->result must already exist and be large enough to hold all
+//   strings from the dictionary.
+// After complete application, args->result may not be full because
+//   some of the dictionary values weren't convertible to string. In
+//   this case, args->used will be the count of used elements.
+static void BuildJavaArrayFn(const void *key, const void *value, void *context)
+{
+    BuildJavaArrayArgs *args = (BuildJavaArrayArgs *)context;
+    CFPropertyListRef propkey = (CFPropertyListRef)key;
+    CFStringRef cfString = NULL;
+    JNIEnv *env = args->env;
+
+    if ((*env)->ExceptionOccurred(env)) return; // already failed
+
+    cfString = copyToCFString(env, propkey);
+    if ((*env)->ExceptionOccurred(env)) {
+        // memory error in copyToCFString
+    } else if (!cfString) {
+        // bogus value type in prefs file - no Java errors available
+    } else if (args->allowSlash != CFStringHasSuffix(cfString, CFSTR("/"))) {
+        // wrong suffix - ignore
+    } else {
+        // good cfString
+        jstring javaString;
+        if (args->allowSlash) {
+            CFRange range = CFRangeMake(0, CFStringGetLength(cfString) - 1);
+            CFStringRef s = CFStringCreateWithSubstring(NULL, cfString, range);
+            CFRelease(cfString);
+            cfString = s;
+        }
+        if (CFStringGetLength(cfString) <= 0) goto bad; // ignore empty
+        javaString = toJavaString(env, cfString);
+        if ((*env)->ExceptionOccurred(env)) goto bad;
+        (*env)->SetObjectArrayElement(env, args->result,args->used,javaString);
+        if ((*env)->ExceptionOccurred(env)) goto bad;
+        args->used++;
+    }
+
+ bad:
+    if (cfString) CFRelease(cfString);
+}
+
+
+static jarray getStringsForNode(JNIEnv *env, jobject klass, jobject jpath,
+                                jobject jname, jlong juser, jlong jhost,
+                                Boolean allowSlash)
+{
+    CFStringRef path = toCF(env, jpath);
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    CFDictionaryRef node;
+    jarray result = NULL;
+    CFIndex count;
+
+    if (!path  ||  !name) goto badparams;
+
+    node = copyNodeIfPresent(path, name, user, host);
+    if (!node) {
+        result = createJavaStringArray(env, 0);
+    } else {
+        count = CFDictionaryGetCount(node);
+        result = createJavaStringArray(env, count);
+        if (result) {
+            BuildJavaArrayArgs args;
+            args.result = result;
+            args.env = env;
+            args.used = 0;
+            args.allowSlash = allowSlash;
+            CFDictionaryApplyFunction(node, BuildJavaArrayFn, &args);
+            if (!(*env)->ExceptionOccurred(env)) {
+                // array construction succeeded
+                if (args.used < count) {
+                    // finished array is smaller than expected.
+                    // Make a new array of precisely the right size.
+                    jarray newresult = createJavaStringArray(env, args.used);
+                    if (newresult) {
+                        JVM_ArrayCopy(env,0, result,0, newresult,0, args.used);
+                        result = newresult;
+                    }
+                }
+            }
+        }
+
+        CFRelease(node);
+    }
+
+ badparams:
+    if (path) CFRelease(path);
+    if (name) CFRelease(name);
+
+    return result;
+}
+
+
+JNIEXPORT jarray JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_getKeysForNode
+(JNIEnv *env, jobject klass, jobject jpath,
+ jobject jname, jlong juser, jlong jhost)
+{
+    return getStringsForNode(env, klass, jpath, jname, juser, jhost, false);
+}
+
+JNIEXPORT jarray JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_getChildrenForNode
+(JNIEnv *env, jobject klass, jobject jpath,
+ jobject jname, jlong juser, jlong jhost)
+{
+    return getStringsForNode(env, klass, jpath, jname, juser, jhost, true);
+}
+
+
+// Returns false on error instead of throwing.
+JNIEXPORT jboolean JNICALL
+Java_java_util_prefs_MacOSXPreferencesFile_synchronize
+(JNIEnv *env, jobject klass,
+ jstring jname, jlong juser, jlong jhost)
+{
+    CFStringRef name = toCF(env, jname);
+    CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
+    CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
+    jboolean result = 0;
+
+    if (name) {
+        result = CFPreferencesSynchronize(name, user, host);
+        CFRelease(name);
+    }
+
+    return result;
+}
Binary file jdk/src/macosx/native/sun/osxapp/resource/icons/JavaApp.icns has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/macosx/native/sun/security/krb5/SCDynamicStoreConfig.m	Tue Feb 18 15:48:14 2014 -0800
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import <SystemConfiguration/SystemConfiguration.h>
+
+
+@interface JNFVectorCoercion : NSObject <JNFTypeCoercion> { }
+@end
+
+@implementation JNFVectorCoercion
+
+- (jobject) coerceNSObject:(id)obj withEnv:(JNIEnv *)env usingCoercer:(JNFTypeCoercion *)coercer {
+    static JNF_CLASS_CACHE(jc_Vector, "java/util/Vector");
+    static JNF_CTOR_CACHE(jm_Vector_ctor, jc_Vector, "(I)V");
+    static JNF_MEMBER_CACHE(jm_Vector_add, jc_Vector, "add", "(Ljava/lang/Object;)Z");
+
+    NSArray *nsArray = (NSArray *)obj;
+    jobject javaArray = JNFNewObject(env, jm_Vector_ctor, (jint)[nsArray count]);
+
+    for (id obj in nsArray) {
+        jobject jobj = [coercer coerceNSObject:obj withEnv:env usingCoercer:coercer];
+        JNFCallBooleanMethod(env, javaArray, jm_Vector_add, jobj);
+        if (jobj != NULL) (*env)->DeleteLocalRef(env, jobj);
+    }
+
+    return javaArray;
+}
+
+- (id) coerceJavaObject:(jobject)obj withEnv:(JNIEnv *)env usingCoercer:(JNFTypeCoercion *)coercer {
+    return nil;
+}
+
+@end
+
+
+@interface JNFHashtableCoercion : NSObject <JNFTypeCoercion> { }
+@end
+
+@implementation JNFHashtableCoercion
+
+- (jobject) coerceNSObject:(id)obj withEnv:(JNIEnv *)env usingCoercer:(JNFTypeCoercion *)coercer {
+    static JNF_CLASS_CACHE(jc_Hashtable, "java/util/Hashtable");
+    static JNF_CTOR_CACHE(jm_Hashtable_ctor, jc_Hashtable, "()V");
+    static JNF_MEMBER_CACHE(jm_Hashtable_put, jc_Hashtable, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
+
+    NSDictionary *nsDict = (NSDictionary *)obj;
+    NSEnumerator *keyEnum = [nsDict keyEnumerator];
+
+    jobject jHashTable = JNFNewObject(env, jm_Hashtable_ctor);
+
+    id key = nil;
+    while ((key = [keyEnum nextObject]) != nil) {
+        jobject jkey = [coercer coerceNSObject:key withEnv:env usingCoercer:coercer];
+
+        id value = [nsDict objectForKey:key];
+        jobject jvalue = [coercer coerceNSObject:value withEnv:env usingCoercer:coercer];
+
+        JNFCallObjectMethod(env, jHashTable, jm_Hashtable_put, jkey, jvalue);
+
+        if (jkey != NULL) (*env)->DeleteLocalRef(env, jkey);
+        if (jvalue != NULL) (*env)->DeleteLocalRef(env, jvalue);
+    }
+
+    return jHashTable;
+}
+
+- (id) coerceJavaObject:(jobject)obj withEnv:(JNIEnv *)env usingCoercer:(JNFTypeCoercion *)coercer {
+    return nil;
+}
+
+@end
+
+
+
+NSDictionary *realmConfigsForRealms(SCDynamicStoreRef store, NSArray *realms) {
+    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
+
+    for (NSString *realm in realms) {
+        CFTypeRef realmInfo = SCDynamicStoreCopyValue(store, (CFStringRef) [NSString stringWithFormat:@"Kerberos:%@", realm]);
+
+        if (CFGetTypeID(realmInfo) != CFDictionaryGetTypeID()) {
+            return nil;
+        }
+
+        [dict setObject:(NSArray *)realmInfo forKey:realm];
+        CFRelease(realmInfo);
+    }
+
+    return dict;
+}
+
+
+#define KERBEROS_DEFAULT_REALMS @"Kerberos-Default-Realms"
+#define KERBEROS_DEFAULT_REALM_MAPPINGS @"Kerberos-Domain-Realm-Mappings"
+
+void _SCDynamicStoreCallBack(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) {
+   NSArray *keys = (NSArray *)changedKeys;
+    if ([keys count] == 0) return;
+    if (![keys containsObject:KERBEROS_DEFAULT_REALMS] && ![keys containsObject:KERBEROS_DEFAULT_REALM_MAPPINGS]) return;
+
+    JNFPerformEnvBlock(JNFThreadDetachOnThreadDeath | JNFThreadSetSystemClassLoaderOnAttach | JNFThreadAttachAsDaemon, ^(JNIEnv *env) {
+        static JNF_CLASS_CACHE(jc_Config, "sun/security/krb5/Config");
+        static JNF_STATIC_MEMBER_CACHE(jm_Config_refresh, jc_Config, "refresh", "()V");
+        JNFCallStaticVoidMethod(env, jm_Config_refresh);
+    });
+}
+
+/*
+ * Class:     sun_security_krb5_SCDynamicStoreConfig
+ * Method:    installNotificationCallback
+ */
+JNIEXPORT void JNICALL Java_sun_security_krb5_SCDynamicStoreConfig_installNotificationCallback(JNIEnv *env, jclass klass) {
+
+JNF_COCOA_ENTER(env);
+
+    SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java"), _SCDynamicStoreCallBack, NULL);
+    if (store == NULL) {
+        return;
+    }
+
+    NSArray *keys = [NSArray arrayWithObjects:KERBEROS_DEFAULT_REALMS, KERBEROS_DEFAULT_REALM_MAPPINGS, nil];
+    SCDynamicStoreSetNotificationKeys(store, (CFArrayRef) keys, NULL);
+
+    CFRunLoopSourceRef rls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0);
+    if (rls != NULL) {
+        CFRunLoopAddSource(CFRunLoopGetMain(), rls, kCFRunLoopDefaultMode);
+        CFRelease(rls);
+    }
+
+    CFRelease(store);
+
+JNF_COCOA_EXIT(env);
+
+}
+
+/*
+ * Class:     sun_security_krb5_SCDynamicStoreConfig
+ * Method:    getKerberosConfig
+ * Signature: ()Ljava/util/Hashtable;
+ */
+JNIEXPORT jobject JNICALL Java_sun_security_krb5_SCDynamicStoreConfig_getKerberosConfig(JNIEnv *env, jclass klass) {
+    jobject jHashTable = NULL;
+
+JNF_COCOA_ENTER(env);
+
+    SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java-kerberos"), NULL, NULL);
+    if (store == NULL) {
+        return NULL;
+    }
+
+    CFTypeRef realms = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALMS);
+    if (realms == NULL || CFGetTypeID(realms) != CFArrayGetTypeID()) {
+        if (realms) CFRelease(realms);
+        CFRelease(store);
+        return NULL;
+    }
+
+    CFTypeRef realmMappings = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALM_MAPPINGS);
+
+    if (realmMappings == NULL || CFGetTypeID(realmMappings) != CFArrayGetTypeID()) {
+        if (realmMappings) CFRelease(realmMappings);
+        CFRelease(realms);
+        CFRelease(store);
+        return NULL;
+    }
+
+    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
+
+    if (CFArrayGetCount(realms) > 0) {
+        NSDictionary *defaultRealmsDict = [NSDictionary dictionaryWithObject:[(NSArray *)realms objectAtIndex:0] forKey:@"default_realm"];
+        [dict setObject:defaultRealmsDict forKey:@"libdefaults"];
+
+        NSDictionary *realmConfigs = realmConfigsForRealms(store, (NSArray *)realms);
+        [dict setObject:realmConfigs forKey:@"realms"];
+    }
+    CFRelease(realms);
+    CFRelease(store);
+
+    if (CFArrayGetCount(realmMappings) > 0) {
+        [dict setObject:[(NSArray *)realmMappings objectAtIndex:0] forKey:@"domain_realm"];
+    }
+    CFRelease(realmMappings);
+
+
+    // create and load a coercer with all of the different coercions to convert each type of object
+    JNFTypeCoercer *coercer = [[[JNFTypeCoercer alloc] init] autorelease];
+    [JNFDefaultCoercions addStringCoercionTo:coercer];
+    [JNFDefaultCoercions addNumberCoercionTo:coercer];
+    [coercer addCoercion:[[[JNFHashtableCoercion alloc] init] autorelease] forNSClass:[NSDictionary class] javaClass:@"java/util/Map"];
+    [coercer addCoercion:[[[JNFVectorCoercion alloc] init] autorelease] forNSClass:[NSArray class] javaClass:@"java/util/List"];
+
+    // convert Cocoa graph to Java graph
+    jHashTable = [coercer coerceNSObject:dict withEnv:env];
+
+JNF_COCOA_EXIT(env);
+
+    return jHashTable;
+}
--- a/jdk/src/macosx/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/macosx/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c	Tue Feb 18 15:48:14 2014 -0800
@@ -24,6 +24,7 @@
  */
 
 #include "sun_util_locale_provider_HostLocaleProviderAdapterImpl.h"
+#include "jni_util.h"
 #include <CoreFoundation/CoreFoundation.h>
 #include <stdio.h>
 
@@ -63,6 +64,10 @@
     localeString = getMacOSXLocale(posixCat);
     if (localeString == NULL) {
         localeString = getPosixLocale(posixCat);
+        if (localeString == NULL) {
+            JNU_ThrowOutOfMemoryError(env, NULL);
+            return NULL;
+        }
     }
     ret = (*env)->NewStringUTF(env, localeString);
     free(localeString);
@@ -127,6 +132,7 @@
 JNIEXPORT jobjectArray JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getAmPmStrings
   (JNIEnv *env, jclass cls, jstring jlangtag, jobjectArray ampms) {
     CFLocaleRef cflocale = CFLocaleCopyCurrent();
+    jstring tmp_string;
     if (cflocale != NULL) {
         CFDateFormatterRef df = CFDateFormatterCreate(kCFAllocatorDefault,
                                                   cflocale,
@@ -138,13 +144,18 @@
             if (amStr != NULL) {
                 CFStringGetCString(amStr, buf, BUFLEN, kCFStringEncodingUTF8);
                 CFRelease(amStr);
-                (*env)->SetObjectArrayElement(env, ampms, 0, (*env)->NewStringUTF(env, buf));
+                tmp_string = (*env)->NewStringUTF(env, buf);
+                if (tmp_string != NULL) {
+                    (*env)->SetObjectArrayElement(env, ampms, 0, tmp_string);
+                }
             }
-            CFStringRef pmStr = CFDateFormatterCopyProperty(df, kCFDateFormatterPMSymbol);
-            if (pmStr != NULL) {
-                CFStringGetCString(pmStr, buf, BUFLEN, kCFStringEncodingUTF8);
-                CFRelease(pmStr);
-                (*env)->SetObjectArrayElement(env, ampms, 1, (*env)->NewStringUTF(env, buf));
+            if (!(*env)->ExceptionCheck(env)){
+                CFStringRef pmStr = CFDateFormatterCopyProperty(df, kCFDateFormatterPMSymbol);
+                if (pmStr != NULL) {
+                    CFStringGetCString(pmStr, buf, BUFLEN, kCFStringEncodingUTF8);
+                    CFRelease(pmStr);
+                    (*env)->SetObjectArrayElement(env, ampms, 1, (*env)->NewStringUTF(env, buf));
+                }
             }
             CFRelease(df);
         }
@@ -647,10 +658,16 @@
 
 static void copyArrayElements(JNIEnv *env, CFArrayRef cfarray, jobjectArray jarray, CFIndex sindex, int dindex, int count) {
     char buf[BUFLEN];
+    jstring tmp_string;
 
     for (; count > 0; sindex++, dindex++, count--) {
         CFStringGetCString(CFArrayGetValueAtIndex(cfarray, sindex), buf, BUFLEN, kCFStringEncodingUTF8);
-        (*env)->SetObjectArrayElement(env, jarray, dindex, (*env)->NewStringUTF(env, buf));
+        tmp_string = (*env)->NewStringUTF(env, buf);
+        if (tmp_string != NULL) {
+            (*env)->SetObjectArrayElement(env, jarray, dindex, tmp_string);
+        } else {
+            break;
+        }
     }
 }
 
--- a/jdk/src/share/back/ArrayTypeImpl.c	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/back/ArrayTypeImpl.c	Tue Feb 18 15:48:14 2014 -0800
@@ -112,7 +112,7 @@
     WITH_LOCAL_REFS(env, 1) {
 
         jarray array;
-        jclass componentClass;
+        jclass componentClass = NULL;
         jdwpError serror;
 
         serror = getComponentClass(env, arrayClass,
--- a/jdk/src/share/back/error_messages.c	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/back/error_messages.c	Tue Feb 18 15:48:14 2014 -0800
@@ -140,7 +140,7 @@
 const char *
 jvmtiErrorText(jvmtiError error)
 {
-    switch (error) {
+    switch ((int)error) {
         CASE_RETURN_TEXT(JVMTI_ERROR_NONE)
         CASE_RETURN_TEXT(JVMTI_ERROR_INVALID_THREAD)
         CASE_RETURN_TEXT(JVMTI_ERROR_INVALID_THREAD_GROUP)
--- a/jdk/src/share/back/util.c	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/back/util.c	Tue Feb 18 15:48:14 2014 -0800
@@ -2122,7 +2122,7 @@
 jdwpError
 map2jdwpError(jvmtiError error)
 {
-    switch ( error ) {
+    switch ( (int)error ) {
         case JVMTI_ERROR_NONE:
             return JDWP_ERROR(NONE);
         case AGENT_ERROR_INVALID_THREAD:
--- a/jdk/src/share/bin/java.c	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/bin/java.c	Tue Feb 18 15:48:14 2014 -0800
@@ -345,10 +345,10 @@
         } \
     } while (JNI_FALSE)
 
-#define CHECK_EXCEPTION_RETURN(CER_return_value) \
+#define CHECK_EXCEPTION_RETURN() \
     do { \
         if ((*env)->ExceptionOccurred(env)) { \
-            return CER_return_value; \
+            return; \
         } \
     } while (JNI_FALSE)
 
@@ -1258,7 +1258,6 @@
 GetApplicationClass(JNIEnv *env)
 {
     jmethodID mid;
-    jobject result;
     jclass cls = GetLauncherHelperClass(env);
     NULL_CHECK0(cls);
     NULL_CHECK0(mid = (*env)->GetStaticMethodID(env, cls,
--- a/jdk/src/share/bin/parse_manifest.c	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/bin/parse_manifest.c	Tue Feb 18 15:48:14 2014 -0800
@@ -233,7 +233,7 @@
     jlong base_offset;
     jlong offset;
     char buffer[MINREAD];
-    p = buffer;
+    p = (Byte*) buffer;
     /*
      * Read the END Header, which is the starting point for ZIP files.
      * (Clearly designed to make writing a zip file easier than reading
@@ -276,7 +276,7 @@
         if (JLI_Lseek(fd, offset, SEEK_SET) < (jlong)0) {
             return (-1);
         }
-        p = buffer;
+        p = (Byte*) buffer;
         base_offset = base_offset - ZIP64_ENDSIZ(p) - ZIP64_ENDOFF(p) - ZIP64_ENDHDR;
     } else {
         base_offset = base_offset - ENDSIZ(p) - ENDOFF(p);
--- a/jdk/src/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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,7 @@
  * A dummy <code>ColorSpace</code> to enable <code>ColorModel</code>
  * for image data which do not have an innate color representation.
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public class BogusColorSpace extends ColorSpace {
     /**
      * Return the type given the number of components.
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java	Tue Feb 18 15:48:14 2014 -0800
@@ -558,6 +558,7 @@
 
     // Could put reason codes in here to be parsed in writeJFXXSegment
     // in order to provide more meaningful warnings.
+    @SuppressWarnings("serial") // JDK-implementation class
     private class IllegalThumbException extends Exception {}
 
     /**
--- a/jdk/src/share/classes/java/awt/color/CMMException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/color/CMMException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -47,6 +47,7 @@
  */
 
 public class CMMException extends java.lang.RuntimeException {
+    private static final long serialVersionUID = 5775558044142994965L;
 
     /**
      *  Constructs a CMMException with the specified detail message.
--- a/jdk/src/share/classes/java/awt/color/ProfileDataException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/color/ProfileDataException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,7 @@
  */
 
 public class ProfileDataException extends java.lang.RuntimeException {
+    private static final long serialVersionUID = 7286140888240322498L;
 
     /**
      *  Constructs a ProfileDataException with the specified detail message.
--- a/jdk/src/share/classes/java/awt/datatransfer/FlavorEvent.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/datatransfer/FlavorEvent.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -38,6 +38,8 @@
  * @since 1.5
  */
 public class FlavorEvent extends EventObject {
+    private static final long serialVersionUID = -5842664112252414548L;
+
     /**
      * Constructs a <code>FlavorEvent</code> object.
      *
--- a/jdk/src/share/classes/java/awt/geom/IllegalPathStateException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/geom/IllegalPathStateException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
  */
 
 public class IllegalPathStateException extends RuntimeException {
+    private static final long serialVersionUID = -5158084205220481094L;
+
     /**
      * Constructs an <code>IllegalPathStateException</code> with no
      * detail message.
--- a/jdk/src/share/classes/java/awt/geom/NoninvertibleTransformException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/geom/NoninvertibleTransformException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,8 @@
  */
 
 public class NoninvertibleTransformException extends java.lang.Exception {
+    private static final long serialVersionUID = 6137225240503990466L;
+
     /**
      * Constructs an instance of
      * <code>NoninvertibleTransformException</code>
--- a/jdk/src/share/classes/java/awt/im/InputContext.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/im/InputContext.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -87,6 +87,7 @@
 
     /**
      * Returns a new InputContext instance.
+     * @return a new InputContext instance
      */
     public static InputContext getInstance() {
         return new sun.awt.im.InputMethodContext();
--- a/jdk/src/share/classes/java/awt/im/InputMethodHighlight.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/im/InputMethodHighlight.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -157,6 +157,7 @@
 
     /**
      * Returns whether the text range is selected.
+     * @return whether the text range is selected
      */
     public boolean isSelected() {
         return selected;
@@ -174,6 +175,7 @@
 
     /**
      * Returns the variation of the text range.
+     * @return the variation of the text range
      */
     public int getVariation() {
         return variation;
@@ -181,6 +183,7 @@
 
     /**
      * Returns the rendering style attributes for the text range, or null.
+     * @return the rendering style attributes for the text range, or null
      * @since 1.3
      */
     public Map<TextAttribute,?> getStyle() {
--- a/jdk/src/share/classes/java/awt/im/spi/InputMethodContext.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/im/spi/InputMethodContext.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -52,6 +52,14 @@
      * Creates an input method event from the arguments given
      * and dispatches it to the client component. For arguments,
      * see {@link java.awt.event.InputMethodEvent#InputMethodEvent}.
+     * @param id the event type
+     * @param text the combined committed and composed text
+     * @param committedCharacterCount the number of committed characters in the text
+     * @param caret the caret (a.k.a. insertion point); null if
+     * there's no caret within current composed text
+     * @param visiblePosition the position that's most important to be
+     * visible; null if there's no recommendation for a visible
+     * position within current composed text
      */
     public void dispatchInputMethodEvent(int id,
                 AttributedCharacterIterator text, int committedCharacterCount,
--- a/jdk/src/share/classes/java/awt/im/spi/InputMethodDescriptor.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/im/spi/InputMethodDescriptor.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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,6 +72,8 @@
      * Returns whether the list of available locales can change
      * at runtime. This may be the case, for example, for adapters
      * that access real input methods over the network.
+     * @return whether the list of available locales can change at
+     * runtime
      */
     boolean hasDynamicLocaleList();
 
@@ -92,6 +94,9 @@
      *
      * @param inputLocale the locale for which text input is supported, or null
      * @param displayLanguage the language in which the name will be displayed
+     * @return the user-visible name of the corresponding input method
+     * for the given input locale in the language in which the name
+     * will be displayed
      */
     String getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage);
 
--- a/jdk/src/share/classes/java/awt/image/ImagingOpException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/image/ImagingOpException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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 @@
  * process the image.
  */
 public class ImagingOpException extends java.lang.RuntimeException {
+    private static final long serialVersionUID = 8026288481846276658L;
 
     /**
      * Constructs an <code>ImagingOpException</code> object with the
--- a/jdk/src/share/classes/java/awt/image/RasterFormatException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/image/RasterFormatException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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,7 @@
  * invalid layout information in the {@link Raster}.
  */
 public class RasterFormatException extends java.lang.RuntimeException {
+    private static final long serialVersionUID = 96598996116164315L;
 
     /**
      * Constructs a new <code>RasterFormatException</code> with the
--- a/jdk/src/share/classes/java/awt/image/renderable/ParameterBlock.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/image/renderable/ParameterBlock.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -93,6 +93,8 @@
  * </pre>
  * */
 public class ParameterBlock implements Cloneable, Serializable {
+    private static final long serialVersionUID = -7577115551785240750L;
+
     /** A Vector of sources, stored as arbitrary Objects. */
     protected Vector<Object> sources = new Vector<Object>();
 
--- a/jdk/src/share/classes/java/awt/peer/CanvasPeer.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/CanvasPeer.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -42,6 +42,8 @@
      * from the requested GC passed as the argument to this method. This method
      * must return a non-null value (given the argument is non-null as well).
      *
+     * @param gc the requested graphics configuration
+     * @return a graphics configuration that best suits this Canvas
      * @since 1.7
      */
     GraphicsConfiguration getAppropriateGraphicsConfiguration(
--- a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -516,6 +516,7 @@
 
     /**
      * Applies the shape to the native component window.
+     * @param shape the shape to apply
      * @since 1.7
      *
      * @see Component#applyCompoundShape
@@ -525,12 +526,13 @@
     /**
      * Lowers this component at the bottom of the above HW peer. If the above parameter
      * is null then the method places this component at the top of the Z-order.
+     * @param above the peer to lower this component with respect to
      */
     void setZOrder(ComponentPeer above);
 
     /**
      * Updates internal data structures related to the component's GC.
-     *
+     * @param gc the reference graphics configuration
      * @return if the peer needs to be recreated for the changes to take effect
      * @since 1.7
      */
--- a/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -55,6 +55,10 @@
      * is located.
      * See java.awt.GraphicsConfiguration documentation for more
      * details about virtual screen devices.
+     * @param point holder for the current coordinates of the mouse
+     * cursor
+     * @return the number of the screen device where the pointer is
+     * located
      */
     int fillPointWithCoords(Point point);
 
@@ -63,6 +67,9 @@
      * pointer. The window is considered to be under the mouse pointer
      * if it is showing on the screen, and the mouse pointer is above
      * the part of the window that is not obscured by any other windows.
+     * @param w the window to check
+     * @return whether or not the window is located under the mouse
+     * pointer
      */
     boolean isWindowUnderMouse(Window w);
 
--- a/jdk/src/share/classes/java/awt/peer/WindowPeer.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/WindowPeer.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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
@@ -94,14 +94,15 @@
 
     /**
      * Sets the level of opacity for the window.
-     *
+     * @param opacity the level of opacity
      * @see Window#setOpacity(float)
      */
     void setOpacity(float opacity);
 
     /**
      * Enables the per-pixel alpha support for the window.
-     *
+     * @param isOpaque whether or not per-pixel alpha support is
+     * enabled
      * @see Window#setBackground(Color)
      */
     void setOpaque(boolean isOpaque);
--- a/jdk/src/share/classes/java/awt/print/PrinterAbortException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/print/PrinterAbortException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  */
 
 public class PrinterAbortException extends PrinterException {
+    private static final long serialVersionUID = 4725169026278854136L;
 
     /**
      * Constructs a new <code>PrinterAbortException</code> with no
--- a/jdk/src/share/classes/java/awt/print/PrinterException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/awt/print/PrinterException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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 @@
  */
 
 public class PrinterException extends Exception {
+    private static final long serialVersionUID = -3757589981158265819L;
 
     /**
      * Constructs a new <code>PrinterException</code> object
--- a/jdk/src/share/classes/java/io/FileInputStream.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/io/FileInputStream.java	Tue Feb 18 15:48:14 2014 -0800
@@ -51,6 +51,12 @@
     /* File Descriptor - handle to the open file */
     private final FileDescriptor fd;
 
+    /**
+     * The path of the referenced file
+     * (null if the stream is created with a file descriptor)
+     */
+    private final String path;
+
     private FileChannel channel = null;
 
     private final Object closeLock = new Object();
@@ -128,6 +134,7 @@
         }
         fd = new FileDescriptor();
         fd.attach(this);
+        path = name;
         open(name);
     }
 
@@ -164,6 +171,7 @@
             security.checkRead(fdObj);
         }
         fd = fdObj;
+        path = null;
 
         /*
          * FileDescriptor is being shared by streams.
@@ -186,7 +194,11 @@
      *             file is reached.
      * @exception  IOException  if an I/O error occurs.
      */
-    public native int read() throws IOException;
+    public int read() throws IOException {
+        return read0();
+    }
+
+    private native int read0() throws IOException;
 
     /**
      * Reads a subarray as a sequence of bytes.
@@ -345,7 +357,7 @@
     public FileChannel getChannel() {
         synchronized (this) {
             if (channel == null) {
-                channel = FileChannelImpl.open(fd, true, false, this);
+                channel = FileChannelImpl.open(fd, path, true, false, this);
             }
             return channel;
         }
--- a/jdk/src/share/classes/java/io/FileOutputStream.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/io/FileOutputStream.java	Tue Feb 18 15:48:14 2014 -0800
@@ -67,6 +67,12 @@
      */
     private FileChannel channel;
 
+    /**
+     * The path of the referenced file
+     * (null if the stream is created with a file descriptor)
+     */
+    private final String path;
+
     private final Object closeLock = new Object();
     private volatile boolean closed = false;
 
@@ -202,6 +208,7 @@
         this.fd = new FileDescriptor();
         fd.attach(this);
         this.append = append;
+        this.path = name;
 
         open(name, append);
     }
@@ -239,6 +246,7 @@
         }
         this.fd = fdObj;
         this.append = false;
+        this.path = null;
 
         fd.attach(this);
     }
@@ -376,7 +384,7 @@
     public FileChannel getChannel() {
         synchronized (this) {
             if (channel == null) {
-                channel = FileChannelImpl.open(fd, false, true, append, this);
+                channel = FileChannelImpl.open(fd, path, false, true, append, this);
             }
             return channel;
         }
--- a/jdk/src/share/classes/java/io/ObjectInputStream.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/io/ObjectInputStream.java	Tue Feb 18 15:48:14 2014 -0800
@@ -39,7 +39,6 @@
 import java.util.HashMap;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicBoolean;
 import static java.io.ObjectStreamClass.processQueue;
 import sun.reflect.misc.ReflectUtil;
 
@@ -534,7 +533,7 @@
         if (ctx == null) {
             throw new NotActiveException("not in call to readObject");
         }
-        Object curObj = ctx.getObj();
+        ctx.checkAndSetUsed();
         ObjectStreamClass curDesc = ctx.getDesc();
         bin.setBlockDataMode(false);
         GetFieldImpl getField = new GetFieldImpl(curDesc);
@@ -1597,7 +1596,7 @@
         int descHandle = handles.assign(unshared ? unsharedMarker : desc);
         passHandle = NULL_HANDLE;
 
-        ObjectStreamClass readDesc = null;
+        ObjectStreamClass readDesc;
         try {
             readDesc = readClassDescriptor();
         } catch (ClassNotFoundException ex) {
@@ -1976,29 +1975,34 @@
         }
 
         int primDataSize = desc.getPrimDataSize();
-        if (primVals == null || primVals.length < primDataSize) {
-            primVals = new byte[primDataSize];
-        }
-        bin.readFully(primVals, 0, primDataSize, false);
-        if (obj != null) {
-            desc.setPrimFieldValues(obj, primVals);
-        }
-
-        int objHandle = passHandle;
-        ObjectStreamField[] fields = desc.getFields(false);
-        Object[] objVals = new Object[desc.getNumObjFields()];
-        int numPrimFields = fields.length - objVals.length;
-        for (int i = 0; i < objVals.length; i++) {
-            ObjectStreamField f = fields[numPrimFields + i];
-            objVals[i] = readObject0(f.isUnshared());
-            if (f.getField() != null) {
-                handles.markDependency(objHandle, passHandle);
+        if (primDataSize > 0) {
+            if (primVals == null || primVals.length < primDataSize) {
+                primVals = new byte[primDataSize];
+            }
+            bin.readFully(primVals, 0, primDataSize, false);
+            if (obj != null) {
+                desc.setPrimFieldValues(obj, primVals);
             }
         }
-        if (obj != null) {
-            desc.setObjFieldValues(obj, objVals);
+
+        int numObjFields = desc.getNumObjFields();
+        if (numObjFields > 0) {
+            int objHandle = passHandle;
+            ObjectStreamField[] fields = desc.getFields(false);
+            Object[] objVals = new Object[numObjFields];
+            int numPrimFields = fields.length - objVals.length;
+            for (int i = 0; i < objVals.length; i++) {
+                ObjectStreamField f = fields[numPrimFields + i];
+                objVals[i] = readObject0(f.isUnshared());
+                if (f.getField() != null) {
+                    handles.markDependency(objHandle, passHandle);
+                }
+            }
+            if (obj != null) {
+                desc.setObjFieldValues(obj, objVals);
+            }
+            passHandle = objHandle;
         }
-        passHandle = objHandle;
     }
 
     /**
--- a/jdk/src/share/classes/java/io/ObjectOutputStream.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/io/ObjectOutputStream.java	Tue Feb 18 15:48:14 2014 -0800
@@ -35,7 +35,6 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import static java.io.ObjectStreamClass.processQueue;
-import java.io.SerialCallbackContext;
 import sun.reflect.misc.ReflectUtil;
 
 /**
@@ -458,7 +457,7 @@
             if (ctx == null) {
                 throw new NotActiveException("not in call to writeObject");
             }
-            Object curObj = ctx.getObj();
+            ctx.checkAndSetUsed();
             ObjectStreamClass curDesc = ctx.getDesc();
             curPut = new PutFieldImpl(curDesc);
         }
@@ -1527,29 +1526,34 @@
         desc.checkDefaultSerialize();
 
         int primDataSize = desc.getPrimDataSize();
-        if (primVals == null || primVals.length < primDataSize) {
-            primVals = new byte[primDataSize];
+        if (primDataSize > 0) {
+            if (primVals == null || primVals.length < primDataSize) {
+                primVals = new byte[primDataSize];
+            }
+            desc.getPrimFieldValues(obj, primVals);
+            bout.write(primVals, 0, primDataSize, false);
         }
-        desc.getPrimFieldValues(obj, primVals);
-        bout.write(primVals, 0, primDataSize, false);
 
-        ObjectStreamField[] fields = desc.getFields(false);
-        Object[] objVals = new Object[desc.getNumObjFields()];
-        int numPrimFields = fields.length - objVals.length;
-        desc.getObjFieldValues(obj, objVals);
-        for (int i = 0; i < objVals.length; i++) {
-            if (extendedDebugInfo) {
-                debugInfoStack.push(
-                    "field (class \"" + desc.getName() + "\", name: \"" +
-                    fields[numPrimFields + i].getName() + "\", type: \"" +
-                    fields[numPrimFields + i].getType() + "\")");
-            }
-            try {
-                writeObject0(objVals[i],
-                             fields[numPrimFields + i].isUnshared());
-            } finally {
+        int numObjFields = desc.getNumObjFields();
+        if (numObjFields > 0) {
+            ObjectStreamField[] fields = desc.getFields(false);
+            Object[] objVals = new Object[numObjFields];
+            int numPrimFields = fields.length - objVals.length;
+            desc.getObjFieldValues(obj, objVals);
+            for (int i = 0; i < objVals.length; i++) {
                 if (extendedDebugInfo) {
-                    debugInfoStack.pop();
+                    debugInfoStack.push(
+                        "field (class \"" + desc.getName() + "\", name: \"" +
+                        fields[numPrimFields + i].getName() + "\", type: \"" +
+                        fields[numPrimFields + i].getType() + "\")");
+                }
+                try {
+                    writeObject0(objVals[i],
+                                 fields[numPrimFields + i].isUnshared());
+                } finally {
+                    if (extendedDebugInfo) {
+                        debugInfoStack.pop();
+                    }
                 }
             }
         }
@@ -2464,7 +2468,9 @@
             StringBuilder buffer = new StringBuilder();
             if (!stack.isEmpty()) {
                 for(int i = stack.size(); i > 0; i-- ) {
-                    buffer.append(stack.get(i-1) + ((i != 1) ? "\n" : ""));
+                    buffer.append(stack.get(i - 1));
+                    if (i != 1)
+                        buffer.append('\n');
                 }
             }
             return buffer.toString();
--- a/jdk/src/share/classes/java/io/ObjectStreamClass.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/io/ObjectStreamClass.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1472,42 +1472,55 @@
     }
 
     /**
+     * Returns JVM type signature for given primitive.
+     */
+    private static String getPrimitiveSignature(Class<?> cl) {
+        if (cl == Integer.TYPE)
+            return "I";
+        else if (cl == Byte.TYPE)
+            return "B";
+        else if (cl == Long.TYPE)
+            return "J";
+        else if (cl == Float.TYPE)
+            return "F";
+        else if (cl == Double.TYPE)
+            return "D";
+        else if (cl == Short.TYPE)
+            return "S";
+        else if (cl == Character.TYPE)
+            return "C";
+        else if (cl == Boolean.TYPE)
+            return "Z";
+        else if (cl == Void.TYPE)
+            return "V";
+        else
+            throw new InternalError();
+    }
+
+    /**
      * Returns JVM type signature for given class.
      */
-    private static String getClassSignature(Class<?> cl) {
-        StringBuilder sbuf = new StringBuilder();
-        while (cl.isArray()) {
-            sbuf.append('[');
-            cl = cl.getComponentType();
-        }
-        if (cl.isPrimitive()) {
-            if (cl == Integer.TYPE) {
-                sbuf.append('I');
-            } else if (cl == Byte.TYPE) {
-                sbuf.append('B');
-            } else if (cl == Long.TYPE) {
-                sbuf.append('J');
-            } else if (cl == Float.TYPE) {
-                sbuf.append('F');
-            } else if (cl == Double.TYPE) {
-                sbuf.append('D');
-            } else if (cl == Short.TYPE) {
-                sbuf.append('S');
-            } else if (cl == Character.TYPE) {
-                sbuf.append('C');
-            } else if (cl == Boolean.TYPE) {
-                sbuf.append('Z');
-            } else if (cl == Void.TYPE) {
-                sbuf.append('V');
-            } else {
-                throw new InternalError();
-            }
-        } else {
-            sbuf.append('L' + cl.getName().replace('.', '/') + ';');
-        }
-        return sbuf.toString();
+    static String getClassSignature(Class<?> cl) {
+        if (cl.isPrimitive())
+            return getPrimitiveSignature(cl);
+        else
+            return appendClassSignature(new StringBuilder(), cl).toString();
     }
 
+    private static StringBuilder appendClassSignature(StringBuilder sbuf, Class<?> cl) {
+       while (cl.isArray()) {
+           sbuf.append('[');
+           cl = cl.getComponentType();
+       }
+
+       if (cl.isPrimitive())
+           sbuf.append(getPrimitiveSignature(cl));
+       else
+           sbuf.append('L').append(cl.getName().replace('.', '/')).append(';');
+
+       return sbuf;
+   }
+
     /**
      * Returns JVM type signature for given list of parameters and return type.
      */
@@ -1517,10 +1530,10 @@
         StringBuilder sbuf = new StringBuilder();
         sbuf.append('(');
         for (int i = 0; i < paramTypes.length; i++) {
-            sbuf.append(getClassSignature(paramTypes[i]));
+            appendClassSignature(sbuf, paramTypes[i]);
         }
         sbuf.append(')');
-        sbuf.append(getClassSignature(retType));
+        appendClassSignature(sbuf, retType);
         return sbuf.toString();
     }
 
--- a/jdk/src/share/classes/java/io/ObjectStreamField.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/io/ObjectStreamField.java	Tue Feb 18 15:48:14 2014 -0800
@@ -91,7 +91,7 @@
         this.name = name;
         this.type = type;
         this.unshared = unshared;
-        signature = getClassSignature(type).intern();
+        signature = ObjectStreamClass.getClassSignature(type).intern();
         field = null;
     }
 
@@ -137,7 +137,7 @@
         name = field.getName();
         Class<?> ftype = field.getType();
         type = (showType || ftype.isPrimitive()) ? ftype : Object.class;
-        signature = getClassSignature(ftype).intern();
+        signature = ObjectStreamClass.getClassSignature(ftype).intern();
     }
 
     /**
@@ -286,41 +286,4 @@
     String getSignature() {
         return signature;
     }
-
-    /**
-     * Returns JVM type signature for given class.
-     */
-    private static String getClassSignature(Class<?> cl) {
-        StringBuilder sbuf = new StringBuilder();
-        while (cl.isArray()) {
-            sbuf.append('[');
-            cl = cl.getComponentType();
-        }
-        if (cl.isPrimitive()) {
-            if (cl == Integer.TYPE) {
-                sbuf.append('I');
-            } else if (cl == Byte.TYPE) {
-                sbuf.append('B');
-            } else if (cl == Long.TYPE) {
-                sbuf.append('J');
-            } else if (cl == Float.TYPE) {
-                sbuf.append('F');
-            } else if (cl == Double.TYPE) {
-                sbuf.append('D');
-            } else if (cl == Short.TYPE) {
-                sbuf.append('S');
-            } else if (cl == Character.TYPE) {
-                sbuf.append('C');
-            } else if (cl == Boolean.TYPE) {
-                sbuf.append('Z');
-            } else if (cl == Void.TYPE) {
-                sbuf.append('V');
-            } else {
-                throw new InternalError();
-            }
-        } else {
-            sbuf.append('L' + cl.getName().replace('.', '/') + ';');
-        }
-        return sbuf.toString();
-    }
 }
--- a/jdk/src/share/classes/java/io/RandomAccessFile.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/io/RandomAccessFile.java	Tue Feb 18 15:48:14 2014 -0800
@@ -62,6 +62,12 @@
     private FileChannel channel = null;
     private boolean rw;
 
+    /**
+     * The path of the referenced file
+     * (null if the stream is created with a file descriptor)
+     */
+    private final String path;
+
     private Object closeLock = new Object();
     private volatile boolean closed = false;
 
@@ -233,6 +239,7 @@
         }
         fd = new FileDescriptor();
         fd.attach(this);
+        path = name;
         open(name, imode);
     }
 
@@ -272,7 +279,7 @@
     public final FileChannel getChannel() {
         synchronized (this) {
             if (channel == null) {
-                channel = FileChannelImpl.open(fd, true, rw, this);
+                channel = FileChannelImpl.open(fd, path, true, rw, this);
             }
             return channel;
         }
@@ -309,7 +316,11 @@
      * @exception  IOException  if an I/O error occurs. Not thrown if
      *                          end-of-file has been reached.
      */
-    public native int read() throws IOException;
+    public int read() throws IOException {
+        return read0();
+    }
+
+    private native int read0() throws IOException;
 
     /**
      * Reads a sub array as a sequence of bytes.
@@ -457,7 +468,11 @@
      * @param      b   the {@code byte} to be written.
      * @exception  IOException  if an I/O error occurs.
      */
-    public native void write(int b) throws IOException;
+    public void write(int b) throws IOException {
+        write0(b);
+    }
+
+    private native void write0(int b) throws IOException;
 
     /**
      * Writes a sub array as a sequence of bytes.
--- a/jdk/src/share/classes/java/io/SerialCallbackContext.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/io/SerialCallbackContext.java	Tue Feb 18 15:48:14 2014 -0800
@@ -60,7 +60,7 @@
         return desc;
     }
 
-    private void checkAndSetUsed() throws NotActiveException {
+    public void checkAndSetUsed() throws NotActiveException {
         if (thread != Thread.currentThread()) {
              throw new NotActiveException(
               "not in readObject invocation or fields already read");
--- a/jdk/src/share/classes/java/lang/Double.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/lang/Double.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2014, 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,7 +26,6 @@
 package java.lang;
 
 import sun.misc.FloatingDecimal;
-import sun.misc.FpUtils;
 import sun.misc.DoubleConsts;
 
 /**
--- a/jdk/src/share/classes/java/lang/String.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/lang/String.java	Tue Feb 18 15:48:14 2014 -0800
@@ -2549,87 +2549,88 @@
         if (locale == null) {
             throw new NullPointerException();
         }
-
-        int firstUpper;
+        int first;
+        boolean hasSurr = false;
         final int len = value.length;
 
-        /* Now check if there are any characters that need to be changed. */
-        scan: {
-            for (firstUpper = 0 ; firstUpper < len; ) {
-                char c = value[firstUpper];
-                if ((c >= Character.MIN_HIGH_SURROGATE)
-                        && (c <= Character.MAX_HIGH_SURROGATE)) {
-                    int supplChar = codePointAt(firstUpper);
-                    if (supplChar != Character.toLowerCase(supplChar)) {
-                        break scan;
-                    }
-                    firstUpper += Character.charCount(supplChar);
-                } else {
-                    if (c != Character.toLowerCase(c)) {
-                        break scan;
-                    }
-                    firstUpper++;
-                }
+        // Now check if there are any characters that need to be changed, or are surrogate
+        for (first = 0 ; first < len; first++) {
+            int cp = (int)value[first];
+            if (Character.isSurrogate((char)cp)) {
+                hasSurr = true;
+                break;
             }
+            if (cp != Character.toLowerCase(cp)) {  // no need to check Character.ERROR
+                break;
+            }
+        }
+        if (first == len)
             return this;
+        char[] result = new char[len];
+        System.arraycopy(value, 0, result, 0, first);  // Just copy the first few
+                                                       // lowerCase characters.
+        String lang = locale.getLanguage();
+        if (lang == "tr" || lang == "az" || lang == "lt") {
+            return toLowerCaseEx(result, first, locale, true);
         }
+        if (hasSurr) {
+            return toLowerCaseEx(result, first, locale, false);
+        }
+        for (int i = first; i < len; i++) {
+            int cp = (int)value[i];
+            if (cp == '\u03A3') {                       // GREEK CAPITAL LETTER SIGMA
+                return toLowerCaseEx(result, i, locale, false);
+            }
+            cp = Character.toLowerCase(cp);
+            if (!Character.isBmpCodePoint(cp)) {
+                return toLowerCaseEx(result, i, locale, false);
+            }
+            result[i] = (char)cp;
+        }
+        return new String(result, true);
+    }
 
-        char[] result = new char[len];
-        int resultOffset = 0;  /* result may grow, so i+resultOffset
-                                * is the write location in result */
-
-        /* Just copy the first few lowerCase characters. */
-        System.arraycopy(value, 0, result, 0, firstUpper);
-
-        String lang = locale.getLanguage();
-        boolean localeDependent =
-                (lang == "tr" || lang == "az" || lang == "lt");
-        char[] lowerCharArray;
-        int lowerChar;
-        int srcChar;
+    private String toLowerCaseEx(char[] result, int first, Locale locale, boolean localeDependent) {
+        int resultOffset = first;
         int srcCount;
-        for (int i = firstUpper; i < len; i += srcCount) {
-            srcChar = (int)value[i];
-            if ((char)srcChar >= Character.MIN_HIGH_SURROGATE
-                    && (char)srcChar <= Character.MAX_HIGH_SURROGATE) {
+        for (int i = first; i < value.length; i += srcCount) {
+            int srcChar = (int)value[i];
+            int lowerChar;
+            char[] lowerCharArray;
+            srcCount = 1;
+            if (Character.isSurrogate((char)srcChar)) {
                 srcChar = codePointAt(i);
                 srcCount = Character.charCount(srcChar);
-            } else {
-                srcCount = 1;
             }
             if (localeDependent || srcChar == '\u03A3') { // GREEK CAPITAL LETTER SIGMA
                 lowerChar = ConditionalSpecialCasing.toLowerCaseEx(this, i, locale);
             } else {
                 lowerChar = Character.toLowerCase(srcChar);
             }
-            if ((lowerChar == Character.ERROR)
-                    || (lowerChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
+            if (Character.isBmpCodePoint(lowerChar)) {    // Character.ERROR is not a bmp
+                result[resultOffset++] = (char)lowerChar;
+            } else {
                 if (lowerChar == Character.ERROR) {
-                    lowerCharArray =
-                            ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale);
+                    lowerCharArray = ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale);
                 } else if (srcCount == 2) {
-                    resultOffset += Character.toChars(lowerChar, result, i + resultOffset) - srcCount;
+                    resultOffset += Character.toChars(lowerChar, result, resultOffset);
                     continue;
                 } else {
                     lowerCharArray = Character.toChars(lowerChar);
                 }
-
                 /* Grow result if needed */
                 int mapLen = lowerCharArray.length;
                 if (mapLen > srcCount) {
                     char[] result2 = new char[result.length + mapLen - srcCount];
-                    System.arraycopy(result, 0, result2, 0, i + resultOffset);
+                    System.arraycopy(result, 0, result2, 0, resultOffset);
                     result = result2;
                 }
                 for (int x = 0; x < mapLen; ++x) {
-                    result[i + resultOffset + x] = lowerCharArray[x];
+                    result[resultOffset++] = lowerCharArray[x];
                 }
-                resultOffset += (mapLen - srcCount);
-            } else {
-                result[i + resultOffset] = (char)lowerChar;
             }
         }
-        return new String(result, 0, len + resultOffset);
+        return new String(result, 0, resultOffset);
     }
 
     /**
@@ -2707,92 +2708,91 @@
         if (locale == null) {
             throw new NullPointerException();
         }
-
-        int firstLower;
+        int first;
+        boolean hasSurr = false;
         final int len = value.length;
 
-        /* Now check if there are any characters that need to be changed. */
-        scan: {
-            for (firstLower = 0 ; firstLower < len; ) {
-                int c = (int)value[firstLower];
-                int srcCount;
-                if ((c >= Character.MIN_HIGH_SURROGATE)
-                        && (c <= Character.MAX_HIGH_SURROGATE)) {
-                    c = codePointAt(firstLower);
-                    srcCount = Character.charCount(c);
-                } else {
-                    srcCount = 1;
-                }
-                int upperCaseChar = Character.toUpperCaseEx(c);
-                if ((upperCaseChar == Character.ERROR)
-                        || (c != upperCaseChar)) {
-                    break scan;
-                }
-                firstLower += srcCount;
+        // Now check if there are any characters that need to be changed, or are surrogate
+        for (first = 0 ; first < len; first++ ) {
+            int cp = (int)value[first];
+            if (Character.isSurrogate((char)cp)) {
+                hasSurr = true;
+                break;
             }
+            if (cp != Character.toUpperCaseEx(cp)) {   // no need to check Character.ERROR
+                break;
+            }
+        }
+        if (first == len) {
             return this;
         }
+        char[] result = new char[len];
+        System.arraycopy(value, 0, result, 0, first);  // Just copy the first few
+                                                       // upperCase characters.
+        String lang = locale.getLanguage();
+        if (lang == "tr" || lang == "az" || lang == "lt") {
+            return toUpperCaseEx(result, first, locale, true);
+        }
+        if (hasSurr) {
+            return toUpperCaseEx(result, first, locale, false);
+        }
+        for (int i = first; i < len; i++) {
+            int cp = Character.toUpperCaseEx((int)value[i]);
+            if (!Character.isBmpCodePoint(cp)) {    // Character.ERROR is not bmp
+                return toUpperCaseEx(result, i, locale, false);
+            }
+            result[i] = (char)cp;
+        }
+        return new String(result, true);
+    }
 
-        /* result may grow, so i+resultOffset is the write location in result */
-        int resultOffset = 0;
-        char[] result = new char[len]; /* may grow */
-
-        /* Just copy the first few upperCase characters. */
-        System.arraycopy(value, 0, result, 0, firstLower);
-
-        String lang = locale.getLanguage();
-        boolean localeDependent =
-                (lang == "tr" || lang == "az" || lang == "lt");
-        char[] upperCharArray;
-        int upperChar;
-        int srcChar;
+    private String toUpperCaseEx(char[] result, int first, Locale locale,
+                                 boolean localeDependent) {
+        int resultOffset = first;
         int srcCount;
-        for (int i = firstLower; i < len; i += srcCount) {
-            srcChar = (int)value[i];
-            if ((char)srcChar >= Character.MIN_HIGH_SURROGATE &&
-                (char)srcChar <= Character.MAX_HIGH_SURROGATE) {
+        for (int i = first; i < value.length; i += srcCount) {
+            int srcChar = (int)value[i];
+            int upperChar;
+            char[] upperCharArray;
+            srcCount = 1;
+            if (Character.isSurrogate((char)srcChar)) {
                 srcChar = codePointAt(i);
                 srcCount = Character.charCount(srcChar);
-            } else {
-                srcCount = 1;
             }
             if (localeDependent) {
                 upperChar = ConditionalSpecialCasing.toUpperCaseEx(this, i, locale);
             } else {
                 upperChar = Character.toUpperCaseEx(srcChar);
             }
-            if ((upperChar == Character.ERROR)
-                    || (upperChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
+            if (Character.isBmpCodePoint(upperChar)) {
+                result[resultOffset++] = (char)upperChar;
+            } else {
                 if (upperChar == Character.ERROR) {
                     if (localeDependent) {
                         upperCharArray =
-                                ConditionalSpecialCasing.toUpperCaseCharArray(this, i, locale);
+                            ConditionalSpecialCasing.toUpperCaseCharArray(this, i, locale);
                     } else {
                         upperCharArray = Character.toUpperCaseCharArray(srcChar);
                     }
                 } else if (srcCount == 2) {
-                    resultOffset += Character.toChars(upperChar, result, i + resultOffset) - srcCount;
+                    resultOffset += Character.toChars(upperChar, result, resultOffset);
                     continue;
                 } else {
                     upperCharArray = Character.toChars(upperChar);
                 }
-
                 /* Grow result if needed */
                 int mapLen = upperCharArray.length;
                 if (mapLen > srcCount) {
                     char[] result2 = new char[result.length + mapLen - srcCount];
-                    System.arraycopy(result, 0, result2, 0, i + resultOffset);
+                    System.arraycopy(result, 0, result2, 0, resultOffset);
                     result = result2;
-                }
-                for (int x = 0; x < mapLen; ++x) {
-                    result[i + resultOffset + x] = upperCharArray[x];
-                }
-                resultOffset += (mapLen - srcCount);
-            } else {
-                result[i + resultOffset] = (char)upperChar;
+                 }
+                 for (int x = 0; x < mapLen; ++x) {
+                    result[resultOffset++] = upperCharArray[x];
+                 }
             }
         }
-        return new String(result, 0, len + resultOffset);
+        return new String(result, 0, resultOffset);
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java	Tue Feb 18 15:48:14 2014 -0800
@@ -226,6 +226,13 @@
                         String.format("Invalid receiver type %s; not a subtype of implementation type %s",
                                       receiverClass, implDefiningClass));
             }
+
+           Class<?> implReceiverClass = implMethod.type().parameterType(0);
+           if (implReceiverClass != implDefiningClass && !implReceiverClass.isAssignableFrom(receiverClass)) {
+               throw new LambdaConversionException(
+                       String.format("Invalid receiver type %s; not a subtype of implementation receiver type %s",
+                                     receiverClass, implReceiverClass));
+             }
         } else {
             // no receiver
             capturedStart = 0;
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandle.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandle.java	Tue Feb 18 15:48:14 2014 -0800
@@ -31,8 +31,6 @@
 import sun.misc.Unsafe;
 
 import static java.lang.invoke.MethodHandleStatics.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 /**
  * A method handle is a typed, directly executable reference to an underlying method,
--- a/jdk/src/share/classes/java/lang/invoke/SimpleMethodHandle.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/lang/invoke/SimpleMethodHandle.java	Tue Feb 18 15:48:14 2014 -0800
@@ -27,8 +27,6 @@
 
 import static java.lang.invoke.LambdaForm.*;
 import static java.lang.invoke.MethodHandleNatives.Constants.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 /**
  * A method handle whose behavior is determined only by its LambdaForm.
--- a/jdk/src/share/classes/java/lang/ref/Reference.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/lang/ref/Reference.java	Tue Feb 18 15:48:14 2014 -0800
@@ -111,7 +111,7 @@
      * therefore critical that any code holding this lock complete as quickly
      * as possible, allocate no new objects, and avoid calling user code.
      */
-    static private class Lock { };
+    static private class Lock { }
     private static Lock lock = new Lock();
 
 
@@ -126,6 +126,22 @@
      */
     private static class ReferenceHandler extends Thread {
 
+        private static void ensureClassInitialized(Class<?> clazz) {
+            try {
+                Class.forName(clazz.getName(), true, clazz.getClassLoader());
+            } catch (ClassNotFoundException e) {
+                throw (Error) new NoClassDefFoundError(e.getMessage()).initCause(e);
+            }
+        }
+
+        static {
+            // pre-load and initialize InterruptedException and Cleaner classes
+            // so that we don't get into trouble later in the run loop if there's
+            // memory shortage while loading/initializing them lazily.
+            ensureClassInitialized(InterruptedException.class);
+            ensureClassInitialized(Cleaner.class);
+        }
+
         ReferenceHandler(ThreadGroup g, String name) {
             super(g, name);
         }
@@ -133,37 +149,40 @@
         public void run() {
             for (;;) {
                 Reference<Object> r;
-                synchronized (lock) {
-                    if (pending != null) {
-                        r = pending;
-                        pending = r.discovered;
-                        r.discovered = null;
-                    } else {
-                        // The waiting on the lock may cause an OOME because it may try to allocate
-                        // exception objects, so also catch OOME here to avoid silent exit of the
-                        // reference handler thread.
-                        //
-                        // Explicitly define the order of the two exceptions we catch here
-                        // when waiting for the lock.
-                        //
-                        // We do not want to try to potentially load the InterruptedException class
-                        // (which would be done if this was its first use, and InterruptedException
-                        // were checked first) in this situation.
-                        //
-                        // This may lead to the VM not ever trying to load the InterruptedException
-                        // class again.
-                        try {
-                            try {
-                                lock.wait();
-                            } catch (OutOfMemoryError x) { }
-                        } catch (InterruptedException x) { }
-                        continue;
+                Cleaner c;
+                try {
+                    synchronized (lock) {
+                        if (pending != null) {
+                            r = pending;
+                            // 'instanceof' might throw OutOfMemoryError sometimes
+                            // so do this before un-linking 'r' from the 'pending' chain...
+                            c = r instanceof Cleaner ? (Cleaner) r : null;
+                            // unlink 'r' from 'pending' chain
+                            pending = r.discovered;
+                            r.discovered = null;
+                        } else {
+                            // The waiting on the lock may cause an OutOfMemoryError
+                            // because it may try to allocate exception objects.
+                            lock.wait();
+                            continue;
+                        }
                     }
+                } catch (OutOfMemoryError x) {
+                    // Give other threads CPU time so they hopefully drop some live references
+                    // and GC reclaims some space.
+                    // Also prevent CPU intensive spinning in case 'r instanceof Cleaner' above
+                    // persistently throws OOME for some time...
+                    Thread.yield();
+                    // retry
+                    continue;
+                } catch (InterruptedException x) {
+                    // retry
+                    continue;
                 }
 
                 // Fast path for cleaners
-                if (r instanceof Cleaner) {
-                    ((Cleaner)r).clean();
+                if (c != null) {
+                    c.clean();
                     continue;
                 }
 
--- a/jdk/src/share/classes/java/net/SocketPermission.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/net/SocketPermission.java	Tue Feb 18 15:48:14 2014 -0800
@@ -235,13 +235,11 @@
     private static Debug debug = null;
     private static boolean debugInit = false;
 
-    // ephemeral port range for this system
-    private static final int ephemeralLow = initEphemeralPorts(
-        "low", DEF_EPH_LOW
-    );
-    private static final int ephemeralHigh = initEphemeralPorts(
-        "high", PORT_MAX
-    );
+    // lazy initializer
+    private static class EphemeralRange {
+        static final int low = initEphemeralPorts("low", DEF_EPH_LOW);
+            static final int high = initEphemeralPorts("high", PORT_MAX);
+    };
 
     static {
         Boolean tmp = java.security.AccessController.doPrivileged(
@@ -1235,6 +1233,9 @@
         int policyLow, int policyHigh, int targetLow, int targetHigh
     )
     {
+        final int ephemeralLow = EphemeralRange.low;
+        final int ephemeralHigh = EphemeralRange.high;
+
         if (targetLow == 0) {
             // check policy includes ephemeral range
             if (!inRange(policyLow, policyHigh, ephemeralLow, ephemeralHigh)) {
--- a/jdk/src/share/classes/java/time/Clock.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/time/Clock.java	Tue Feb 18 15:48:14 2014 -0800
@@ -104,7 +104,7 @@
  * resolution clock if one is available.
  *
  * @implSpec
- * This abstract class must be implemented with care to ensure other operate correctly.
+ * This abstract class must be implemented with care to ensure other classes operate correctly.
  * All implementations that can be instantiated must be final, immutable and thread-safe.
  * <p>
  * The principal methods are defined to allow the throwing of an exception.
--- a/jdk/src/share/classes/java/time/Instant.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/time/Instant.java	Tue Feb 18 15:48:14 2014 -0800
@@ -100,11 +100,6 @@
  * This class models a single instantaneous point on the time-line.
  * This might be used to record event time-stamps in the application.
  * <p>
- * For practicality, the instant is stored with some constraints.
- * The measurable time-line is restricted to the number of seconds that can be held
- * in a {@code long}. This is greater than the current estimated age of the universe.
- * The instant is stored to nanosecond resolution.
- * <p>
  * The range of an instant requires the storage of a number larger than a {@code long}.
  * To achieve this, the class stores a {@code long} representing epoch-seconds and an
  * {@code int} representing nanosecond-of-second, which will always be between 0 and 999,999,999.
--- a/jdk/src/share/classes/java/time/format/DateTimeFormatter.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/time/format/DateTimeFormatter.java	Tue Feb 18 15:48:14 2014 -0800
@@ -344,10 +344,7 @@
  * <b>Fraction</b>: Outputs the nano-of-second field as a fraction-of-second.
  * The nano-of-second value has nine digits, thus the count of pattern letters
  * is from 1 to 9. If it is less than 9, then the nano-of-second value is
- * truncated, with only the most significant digits being output. When parsing
- * in strict mode, the number of parsed digits must match the count of pattern
- * letters. When parsing in lenient mode, the number of parsed digits must be at
- * least the count of pattern letters, up to 9 digits.
+ * truncated, with only the most significant digits being output.
  * <p>
  * <b>Year</b>: The count of letters determines the minimum field width below
  * which padding is used. If the count of letters is two, then a
--- a/jdk/src/share/classes/java/time/temporal/TemporalAccessor.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/time/temporal/TemporalAccessor.java	Tue Feb 18 15:48:14 2014 -0800
@@ -217,7 +217,7 @@
     default int get(TemporalField field) {
         ValueRange range = range(field);
         if (range.isIntValue() == false) {
-            throw new UnsupportedTemporalTypeException("Invalid field " + field + " + for get() method, use getLong() instead");
+            throw new UnsupportedTemporalTypeException("Invalid field " + field + " for get() method, use getLong() instead");
         }
         long value = getLong(field);
         if (range.isValidValue(value) == false) {
--- a/jdk/src/share/classes/java/util/Arrays.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/util/Arrays.java	Tue Feb 18 15:48:14 2014 -0800
@@ -50,7 +50,7 @@
  * if the specified array reference is null, except where noted.
  *
  * <p>The documentation for the methods contained in this class includes
- * briefs description of the <i>implementations</i>. Such descriptions should
+ * brief descriptions of the <i>implementations</i>. Such descriptions should
  * be regarded as <i>implementation notes</i>, rather than parts of the
  * <i>specification</i>. Implementors should feel free to substitute other
  * algorithms, so long as the specification itself is adhered to. (For
--- a/jdk/src/share/classes/java/util/Comparator.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/util/Comparator.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -235,7 +235,7 @@
      * @see #thenComparing(Comparator)
      * @since 1.8
      */
-    default <U extends Comparable<? super U>> Comparator<T> thenComparing(
+    default <U> Comparator<T> thenComparing(
             Function<? super T, ? extends U> keyExtractor,
             Comparator<? super U> keyComparator)
     {
--- a/jdk/src/share/classes/java/util/Date.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/util/Date.java	Tue Feb 18 15:48:14 2014 -0800
@@ -41,20 +41,20 @@
 import sun.util.calendar.ZoneInfo;
 
 /**
- * The class <code>Date</code> represents a specific instant
+ * The class {@code Date} represents a specific instant
  * in time, with millisecond precision.
  * <p>
- * Prior to JDK&nbsp;1.1, the class <code>Date</code> had two additional
+ * Prior to JDK&nbsp;1.1, the class {@code Date} had two additional
  * functions.  It allowed the interpretation of dates as year, month, day, hour,
  * minute, and second values.  It also allowed the formatting and parsing
  * of date strings.  Unfortunately, the API for these functions was not
  * amenable to internationalization.  As of JDK&nbsp;1.1, the
- * <code>Calendar</code> class should be used to convert between dates and time
- * fields and the <code>DateFormat</code> class should be used to format and
+ * {@code Calendar} class should be used to convert between dates and time
+ * fields and the {@code DateFormat} class should be used to format and
  * parse date strings.
- * The corresponding methods in <code>Date</code> are deprecated.
+ * The corresponding methods in {@code Date} are deprecated.
  * <p>
- * Although the <code>Date</code> class is intended to reflect
+ * Although the {@code Date} class is intended to reflect
  * coordinated universal time (UTC), it may not do so exactly,
  * depending on the host environment of the Java Virtual Machine.
  * Nearly all modern operating systems assume that 1&nbsp;day&nbsp;=
@@ -93,12 +93,12 @@
  *     <a href=http://tycho.usno.navy.mil/systime.html>http://tycho.usno.navy.mil/systime.html</a>
  * </pre></blockquote>
  * <p>
- * In all methods of class <code>Date</code> that accept or return
+ * In all methods of class {@code Date} that accept or return
  * year, month, date, hours, minutes, and seconds values, the
  * following representations are used:
  * <ul>
  * <li>A year <i>y</i> is represented by the integer
- *     <i>y</i>&nbsp;<code>-&nbsp;1900</code>.
+ *     <i>y</i>&nbsp;{@code - 1900}.
  * <li>A month is represented by an integer from 0 to 11; 0 is January,
  *     1 is February, and so forth; thus 11 is December.
  * <li>A date (day of month) is represented by an integer from 1 to 31
@@ -155,7 +155,7 @@
     private static final long serialVersionUID = 7523967970034938905L;
 
     /**
-     * Allocates a <code>Date</code> object and initializes it so that
+     * Allocates a {@code Date} object and initializes it so that
      * it represents the time at which it was allocated, measured to the
      * nearest millisecond.
      *
@@ -166,7 +166,7 @@
     }
 
     /**
-     * Allocates a <code>Date</code> object and initializes it to
+     * Allocates a {@code Date} object and initializes it to
      * represent the specified number of milliseconds since the
      * standard base time known as "the epoch", namely January 1,
      * 1970, 00:00:00 GMT.
@@ -179,18 +179,18 @@
     }
 
     /**
-     * Allocates a <code>Date</code> object and initializes it so that
+     * Allocates a {@code Date} object and initializes it so that
      * it represents midnight, local time, at the beginning of the day
-     * specified by the <code>year</code>, <code>month</code>, and
-     * <code>date</code> arguments.
+     * specified by the {@code year}, {@code month}, and
+     * {@code date} arguments.
      *
      * @param   year    the year minus 1900.
      * @param   month   the month between 0-11.
      * @param   date    the day of the month between 1-31.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(year + 1900, month, date)</code>
-     * or <code>GregorianCalendar(year + 1900, month, date)</code>.
+     * replaced by {@code Calendar.set(year + 1900, month, date)}
+     * or {@code GregorianCalendar(year + 1900, month, date)}.
      */
     @Deprecated
     public Date(int year, int month, int date) {
@@ -198,10 +198,10 @@
     }
 
     /**
-     * Allocates a <code>Date</code> object and initializes it so that
+     * Allocates a {@code Date} object and initializes it so that
      * it represents the instant at the start of the minute specified by
-     * the <code>year</code>, <code>month</code>, <code>date</code>,
-     * <code>hrs</code>, and <code>min</code> arguments, in the local
+     * the {@code year}, {@code month}, {@code date},
+     * {@code hrs}, and {@code min} arguments, in the local
      * time zone.
      *
      * @param   year    the year minus 1900.
@@ -211,9 +211,8 @@
      * @param   min     the minutes between 0-59.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(year + 1900, month, date,
-     * hrs, min)</code> or <code>GregorianCalendar(year + 1900,
-     * month, date, hrs, min)</code>.
+     * replaced by {@code Calendar.set(year + 1900, month, date, hrs, min)}
+     * or {@code GregorianCalendar(year + 1900, month, date, hrs, min)}.
      */
     @Deprecated
     public Date(int year, int month, int date, int hrs, int min) {
@@ -221,10 +220,10 @@
     }
 
     /**
-     * Allocates a <code>Date</code> object and initializes it so that
+     * Allocates a {@code Date} object and initializes it so that
      * it represents the instant at the start of the second specified
-     * by the <code>year</code>, <code>month</code>, <code>date</code>,
-     * <code>hrs</code>, <code>min</code>, and <code>sec</code> arguments,
+     * by the {@code year}, {@code month}, {@code date},
+     * {@code hrs}, {@code min}, and {@code sec} arguments,
      * in the local time zone.
      *
      * @param   year    the year minus 1900.
@@ -235,9 +234,8 @@
      * @param   sec     the seconds between 0-59.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(year + 1900, month, date,
-     * hrs, min, sec)</code> or <code>GregorianCalendar(year + 1900,
-     * month, date, hrs, min, sec)</code>.
+     * replaced by {@code Calendar.set(year + 1900, month, date, hrs, min, sec)}
+     * or {@code GregorianCalendar(year + 1900, month, date, hrs, min, sec)}.
      */
     @Deprecated
     public Date(int year, int month, int date, int hrs, int min, int sec) {
@@ -258,16 +256,16 @@
     }
 
     /**
-     * Allocates a <code>Date</code> object and initializes it so that
+     * Allocates a {@code Date} object and initializes it so that
      * it represents the date and time indicated by the string
-     * <code>s</code>, which is interpreted as if by the
+     * {@code s}, which is interpreted as if by the
      * {@link Date#parse} method.
      *
      * @param   s   a string representation of the date.
      * @see     java.text.DateFormat
      * @see     java.util.Date#parse(java.lang.String)
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>DateFormat.parse(String s)</code>.
+     * replaced by {@code DateFormat.parse(String s)}.
      */
     @Deprecated
     public Date(String s) {
@@ -292,7 +290,7 @@
      * Determines the date and time based on the arguments. The
      * arguments are interpreted as a year, month, day of the month,
      * hour of the day, minute within the hour, and second within the
-     * minute, exactly as for the <tt>Date</tt> constructor with six
+     * minute, exactly as for the {@code Date} constructor with six
      * arguments, except that the arguments are interpreted relative
      * to UTC rather than to the local time zone. The time indicated is
      * returned represented as the distance, measured in milliseconds,
@@ -308,10 +306,9 @@
      *          the date and time specified by the arguments.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(year + 1900, month, date,
-     * hrs, min, sec)</code> or <code>GregorianCalendar(year + 1900,
-     * month, date, hrs, min, sec)</code>, using a UTC
-     * <code>TimeZone</code>, followed by <code>Calendar.getTime().getTime()</code>.
+     * replaced by {@code Calendar.set(year + 1900, month, date, hrs, min, sec)}
+     * or {@code GregorianCalendar(year + 1900, month, date, hrs, min, sec)}, using a UTC
+     * {@code TimeZone}, followed by {@code Calendar.getTime().getTime()}.
      */
     @Deprecated
     public static long UTC(int year, int month, int date,
@@ -338,12 +335,12 @@
     }
 
     /**
-     * Attempts to interpret the string <tt>s</tt> as a representation
+     * Attempts to interpret the string {@code s} as a representation
      * of a date and time. If the attempt is successful, the time
      * indicated is returned represented as the distance, measured in
      * milliseconds, of that time from the epoch (00:00:00 GMT on
      * January 1, 1970). If the attempt fails, an
-     * <tt>IllegalArgumentException</tt> is thrown.
+     * {@code IllegalArgumentException} is thrown.
      * <p>
      * It accepts many syntaxes; in particular, it recognizes the IETF
      * standard date syntax: "Sat, 12 Aug 1995 13:30:00 GMT". It also
@@ -353,11 +350,11 @@
      * meridian). If no time zone is specified, the local time zone is
      * assumed. GMT and UTC are considered equivalent.
      * <p>
-     * The string <tt>s</tt> is processed from left to right, looking for
-     * data of interest. Any material in <tt>s</tt> that is within the
-     * ASCII parenthesis characters <tt>(</tt> and <tt>)</tt> is ignored.
+     * The string {@code s} is processed from left to right, looking for
+     * data of interest. Any material in {@code s} that is within the
+     * ASCII parenthesis characters {@code (} and {@code )} is ignored.
      * Parentheses may be nested. Otherwise, the only characters permitted
-     * within <tt>s</tt> are these ASCII characters:
+     * within {@code s} are these ASCII characters:
      * <blockquote><pre>
      * abcdefghijklmnopqrstuvwxyz
      * ABCDEFGHIJKLMNOPQRSTUVWXYZ
@@ -365,18 +362,18 @@
      * and whitespace characters.<p>
      * A consecutive sequence of decimal digits is treated as a decimal
      * number:<ul>
-     * <li>If a number is preceded by <tt>+</tt> or <tt>-</tt> and a year
+     * <li>If a number is preceded by {@code +} or {@code -} and a year
      *     has already been recognized, then the number is a time-zone
      *     offset. If the number is less than 24, it is an offset measured
      *     in hours. Otherwise, it is regarded as an offset in minutes,
      *     expressed in 24-hour time format without punctuation. A
-     *     preceding <tt>-</tt> means a westward offset. Time zone offsets
+     *     preceding {@code -} means a westward offset. Time zone offsets
      *     are always relative to UTC (Greenwich). Thus, for example,
-     *     <tt>-5</tt> occurring in the string would mean "five hours west
-     *     of Greenwich" and <tt>+0430</tt> would mean "four hours and
+     *     {@code -5} occurring in the string would mean "five hours west
+     *     of Greenwich" and {@code +0430} would mean "four hours and
      *     thirty minutes east of Greenwich." It is permitted for the
-     *     string to specify <tt>GMT</tt>, <tt>UT</tt>, or <tt>UTC</tt>
-     *     redundantly-for example, <tt>GMT-5</tt> or <tt>utc+0430</tt>.
+     *     string to specify {@code GMT}, {@code UT}, or {@code UTC}
+     *     redundantly-for example, {@code GMT-5} or {@code utc+0430}.
      * <li>The number is regarded as a year number if one of the
      *     following conditions is true:
      * <ul>
@@ -399,8 +396,8 @@
      *     unless an hour has already been recognized, in which case it is
      *     regarded as a minute.
      * <li>If the number is followed by a slash, it is regarded as a month
-     *     (it is decreased by 1 to produce a number in the range <tt>0</tt>
-     *     to <tt>11</tt>), unless a month has already been recognized, in
+     *     (it is decreased by 1 to produce a number in the range {@code 0}
+     *     to {@code 11}), unless a month has already been recognized, in
      *     which case it is regarded as a day of the month.
      * <li>If the number is followed by whitespace, a comma, a hyphen, or
      *     end of string, then if an hour has been recognized but not a
@@ -409,31 +406,31 @@
      *     otherwise, it is regarded as a day of the month. </ul><p>
      * A consecutive sequence of letters is regarded as a word and treated
      * as follows:<ul>
-     * <li>A word that matches <tt>AM</tt>, ignoring case, is ignored (but
+     * <li>A word that matches {@code AM}, ignoring case, is ignored (but
      *     the parse fails if an hour has not been recognized or is less
-     *     than <tt>1</tt> or greater than <tt>12</tt>).
-     * <li>A word that matches <tt>PM</tt>, ignoring case, adds <tt>12</tt>
+     *     than {@code 1} or greater than {@code 12}).
+     * <li>A word that matches {@code PM}, ignoring case, adds {@code 12}
      *     to the hour (but the parse fails if an hour has not been
-     *     recognized or is less than <tt>1</tt> or greater than <tt>12</tt>).
-     * <li>Any word that matches any prefix of <tt>SUNDAY, MONDAY, TUESDAY,
-     *     WEDNESDAY, THURSDAY, FRIDAY</tt>, or <tt>SATURDAY</tt>, ignoring
-     *     case, is ignored. For example, <tt>sat, Friday, TUE</tt>, and
-     *     <tt>Thurs</tt> are ignored.
-     * <li>Otherwise, any word that matches any prefix of <tt>JANUARY,
+     *     recognized or is less than {@code 1} or greater than {@code 12}).
+     * <li>Any word that matches any prefix of {@code SUNDAY, MONDAY, TUESDAY,
+     *     WEDNESDAY, THURSDAY, FRIDAY}, or {@code SATURDAY}, ignoring
+     *     case, is ignored. For example, {@code sat, Friday, TUE}, and
+     *     {@code Thurs} are ignored.
+     * <li>Otherwise, any word that matches any prefix of {@code JANUARY,
      *     FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER,
-     *     OCTOBER, NOVEMBER</tt>, or <tt>DECEMBER</tt>, ignoring case, and
+     *     OCTOBER, NOVEMBER}, or {@code DECEMBER}, ignoring case, and
      *     considering them in the order given here, is recognized as
-     *     specifying a month and is converted to a number (<tt>0</tt> to
-     *     <tt>11</tt>). For example, <tt>aug, Sept, april</tt>, and
-     *     <tt>NOV</tt> are recognized as months. So is <tt>Ma</tt>, which
-     *     is recognized as <tt>MARCH</tt>, not <tt>MAY</tt>.
-     * <li>Any word that matches <tt>GMT, UT</tt>, or <tt>UTC</tt>, ignoring
+     *     specifying a month and is converted to a number ({@code 0} to
+     *     {@code 11}). For example, {@code aug, Sept, april}, and
+     *     {@code NOV} are recognized as months. So is {@code Ma}, which
+     *     is recognized as {@code MARCH}, not {@code MAY}.
+     * <li>Any word that matches {@code GMT, UT}, or {@code UTC}, ignoring
      *     case, is treated as referring to UTC.
-     * <li>Any word that matches <tt>EST, CST, MST</tt>, or <tt>PST</tt>,
+     * <li>Any word that matches {@code EST, CST, MST}, or {@code PST},
      *     ignoring case, is recognized as referring to the time zone in
      *     North America that is five, six, seven, or eight hours west of
-     *     Greenwich, respectively. Any word that matches <tt>EDT, CDT,
-     *     MDT</tt>, or <tt>PDT</tt>, ignoring case, is recognized as
+     *     Greenwich, respectively. Any word that matches {@code EDT, CDT,
+     *     MDT}, or {@code PDT}, ignoring case, is recognized as
      *     referring to the same time zone, respectively, during daylight
      *     saving time.</ul><p>
      * Once the entire string s has been scanned, it is converted to a time
@@ -448,7 +445,7 @@
      *          represented by the string argument.
      * @see     java.text.DateFormat
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>DateFormat.parse(String s)</code>.
+     * replaced by {@code DateFormat.parse(String s)}.
      */
     @Deprecated
     public static long parse(String s) {
@@ -638,13 +635,13 @@
     /**
      * Returns a value that is the result of subtracting 1900 from the
      * year that contains or begins with the instant in time represented
-     * by this <code>Date</code> object, as interpreted in the local
+     * by this {@code Date} object, as interpreted in the local
      * time zone.
      *
      * @return  the year represented by this date, minus 1900.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.get(Calendar.YEAR) - 1900</code>.
+     * replaced by {@code Calendar.get(Calendar.YEAR) - 1900}.
      */
     @Deprecated
     public int getYear() {
@@ -652,8 +649,8 @@
     }
 
     /**
-     * Sets the year of this <tt>Date</tt> object to be the specified
-     * value plus 1900. This <code>Date</code> object is modified so
+     * Sets the year of this {@code Date} object to be the specified
+     * value plus 1900. This {@code Date} object is modified so
      * that it represents a point in time within the specified year,
      * with the month, date, hour, minute, and second the same as
      * before, as interpreted in the local time zone. (Of course, if
@@ -664,7 +661,7 @@
      * @param   year    the year value.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(Calendar.YEAR, year + 1900)</code>.
+     * replaced by {@code Calendar.set(Calendar.YEAR, year + 1900)}.
      */
     @Deprecated
     public void setYear(int year) {
@@ -673,14 +670,14 @@
 
     /**
      * Returns a number representing the month that contains or begins
-     * with the instant in time represented by this <tt>Date</tt> object.
-     * The value returned is between <code>0</code> and <code>11</code>,
-     * with the value <code>0</code> representing January.
+     * with the instant in time represented by this {@code Date} object.
+     * The value returned is between {@code 0} and {@code 11},
+     * with the value {@code 0} representing January.
      *
      * @return  the month represented by this date.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.get(Calendar.MONTH)</code>.
+     * replaced by {@code Calendar.get(Calendar.MONTH)}.
      */
     @Deprecated
     public int getMonth() {
@@ -689,7 +686,7 @@
 
     /**
      * Sets the month of this date to the specified value. This
-     * <tt>Date</tt> object is modified so that it represents a point
+     * {@code Date} object is modified so that it represents a point
      * in time within the specified month, with the year, date, hour,
      * minute, and second the same as before, as interpreted in the
      * local time zone. If the date was October 31, for example, and
@@ -699,7 +696,7 @@
      * @param   month   the month value between 0-11.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(Calendar.MONTH, int month)</code>.
+     * replaced by {@code Calendar.set(Calendar.MONTH, int month)}.
      */
     @Deprecated
     public void setMonth(int month) {
@@ -719,16 +716,16 @@
     }
 
     /**
-     * Returns the day of the month represented by this <tt>Date</tt> object.
-     * The value returned is between <code>1</code> and <code>31</code>
+     * Returns the day of the month represented by this {@code Date} object.
+     * The value returned is between {@code 1} and {@code 31}
      * representing the day of the month that contains or begins with the
-     * instant in time represented by this <tt>Date</tt> object, as
+     * instant in time represented by this {@code Date} object, as
      * interpreted in the local time zone.
      *
      * @return  the day of the month represented by this date.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.get(Calendar.DAY_OF_MONTH)</code>.
+     * replaced by {@code Calendar.get(Calendar.DAY_OF_MONTH)}.
      * @deprecated
      */
     @Deprecated
@@ -737,8 +734,8 @@
     }
 
     /**
-     * Sets the day of the month of this <tt>Date</tt> object to the
-     * specified value. This <tt>Date</tt> object is modified so that
+     * Sets the day of the month of this {@code Date} object to the
+     * specified value. This {@code Date} object is modified so that
      * it represents a point in time within the specified day of the
      * month, with the year, month, hour, minute, and second the same
      * as before, as interpreted in the local time zone. If the date
@@ -749,7 +746,7 @@
      * @param   date   the day of the month value between 1-31.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(Calendar.DAY_OF_MONTH, int date)</code>.
+     * replaced by {@code Calendar.set(Calendar.DAY_OF_MONTH, int date)}.
      */
     @Deprecated
     public void setDate(int date) {
@@ -758,17 +755,17 @@
 
     /**
      * Returns the day of the week represented by this date. The
-     * returned value (<tt>0</tt> = Sunday, <tt>1</tt> = Monday,
-     * <tt>2</tt> = Tuesday, <tt>3</tt> = Wednesday, <tt>4</tt> =
-     * Thursday, <tt>5</tt> = Friday, <tt>6</tt> = Saturday)
+     * returned value ({@code 0} = Sunday, {@code 1} = Monday,
+     * {@code 2} = Tuesday, {@code 3} = Wednesday, {@code 4} =
+     * Thursday, {@code 5} = Friday, {@code 6} = Saturday)
      * represents the day of the week that contains or begins with
-     * the instant in time represented by this <tt>Date</tt> object,
+     * the instant in time represented by this {@code Date} object,
      * as interpreted in the local time zone.
      *
      * @return  the day of the week represented by this date.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.get(Calendar.DAY_OF_WEEK)</code>.
+     * replaced by {@code Calendar.get(Calendar.DAY_OF_WEEK)}.
      */
     @Deprecated
     public int getDay() {
@@ -776,16 +773,16 @@
     }
 
     /**
-     * Returns the hour represented by this <tt>Date</tt> object. The
-     * returned value is a number (<tt>0</tt> through <tt>23</tt>)
+     * Returns the hour represented by this {@code Date} object. The
+     * returned value is a number ({@code 0} through {@code 23})
      * representing the hour within the day that contains or begins
-     * with the instant in time represented by this <tt>Date</tt>
+     * with the instant in time represented by this {@code Date}
      * object, as interpreted in the local time zone.
      *
      * @return  the hour represented by this date.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.get(Calendar.HOUR_OF_DAY)</code>.
+     * replaced by {@code Calendar.get(Calendar.HOUR_OF_DAY)}.
      */
     @Deprecated
     public int getHours() {
@@ -793,8 +790,8 @@
     }
 
     /**
-     * Sets the hour of this <tt>Date</tt> object to the specified value.
-     * This <tt>Date</tt> object is modified so that it represents a point
+     * Sets the hour of this {@code Date} object to the specified value.
+     * This {@code Date} object is modified so that it represents a point
      * in time within the specified hour of the day, with the year, month,
      * date, minute, and second the same as before, as interpreted in the
      * local time zone.
@@ -802,7 +799,7 @@
      * @param   hours   the hour value.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(Calendar.HOUR_OF_DAY, int hours)</code>.
+     * replaced by {@code Calendar.set(Calendar.HOUR_OF_DAY, int hours)}.
      */
     @Deprecated
     public void setHours(int hours) {
@@ -812,12 +809,12 @@
     /**
      * Returns the number of minutes past the hour represented by this date,
      * as interpreted in the local time zone.
-     * The value returned is between <code>0</code> and <code>59</code>.
+     * The value returned is between {@code 0} and {@code 59}.
      *
      * @return  the number of minutes past the hour represented by this date.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.get(Calendar.MINUTE)</code>.
+     * replaced by {@code Calendar.get(Calendar.MINUTE)}.
      */
     @Deprecated
     public int getMinutes() {
@@ -825,8 +822,8 @@
     }
 
     /**
-     * Sets the minutes of this <tt>Date</tt> object to the specified value.
-     * This <tt>Date</tt> object is modified so that it represents a point
+     * Sets the minutes of this {@code Date} object to the specified value.
+     * This {@code Date} object is modified so that it represents a point
      * in time within the specified minute of the hour, with the year, month,
      * date, hour, and second the same as before, as interpreted in the
      * local time zone.
@@ -834,7 +831,7 @@
      * @param   minutes   the value of the minutes.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(Calendar.MINUTE, int minutes)</code>.
+     * replaced by {@code Calendar.set(Calendar.MINUTE, int minutes)}.
      */
     @Deprecated
     public void setMinutes(int minutes) {
@@ -843,14 +840,14 @@
 
     /**
      * Returns the number of seconds past the minute represented by this date.
-     * The value returned is between <code>0</code> and <code>61</code>. The
-     * values <code>60</code> and <code>61</code> can only occur on those
+     * The value returned is between {@code 0} and {@code 61}. The
+     * values {@code 60} and {@code 61} can only occur on those
      * Java Virtual Machines that take leap seconds into account.
      *
      * @return  the number of seconds past the minute represented by this date.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.get(Calendar.SECOND)</code>.
+     * replaced by {@code Calendar.get(Calendar.SECOND)}.
      */
     @Deprecated
     public int getSeconds() {
@@ -858,8 +855,8 @@
     }
 
     /**
-     * Sets the seconds of this <tt>Date</tt> to the specified value.
-     * This <tt>Date</tt> object is modified so that it represents a
+     * Sets the seconds of this {@code Date} to the specified value.
+     * This {@code Date} object is modified so that it represents a
      * point in time within the specified second of the minute, with
      * the year, month, date, hour, and minute the same as before, as
      * interpreted in the local time zone.
@@ -867,7 +864,7 @@
      * @param   seconds   the seconds value.
      * @see     java.util.Calendar
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>Calendar.set(Calendar.SECOND, int seconds)</code>.
+     * replaced by {@code Calendar.set(Calendar.SECOND, int seconds)}.
      */
     @Deprecated
     public void setSeconds(int seconds) {
@@ -876,7 +873,7 @@
 
     /**
      * Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT
-     * represented by this <tt>Date</tt> object.
+     * represented by this {@code Date} object.
      *
      * @return  the number of milliseconds since January 1, 1970, 00:00:00 GMT
      *          represented by this date.
@@ -893,8 +890,8 @@
     }
 
     /**
-     * Sets this <code>Date</code> object to represent a point in time that is
-     * <code>time</code> milliseconds after January 1, 1970 00:00:00 GMT.
+     * Sets this {@code Date} object to represent a point in time that is
+     * {@code time} milliseconds after January 1, 1970 00:00:00 GMT.
      *
      * @param   time   the number of milliseconds.
      */
@@ -907,11 +904,11 @@
      * Tests if this date is before the specified date.
      *
      * @param   when   a date.
-     * @return  <code>true</code> if and only if the instant of time
-     *            represented by this <tt>Date</tt> object is strictly
-     *            earlier than the instant represented by <tt>when</tt>;
-     *          <code>false</code> otherwise.
-     * @exception NullPointerException if <code>when</code> is null.
+     * @return  {@code true} if and only if the instant of time
+     *            represented by this {@code Date} object is strictly
+     *            earlier than the instant represented by {@code when};
+     *          {@code false} otherwise.
+     * @exception NullPointerException if {@code when} is null.
      */
     public boolean before(Date when) {
         return getMillisOf(this) < getMillisOf(when);
@@ -921,11 +918,11 @@
      * Tests if this date is after the specified date.
      *
      * @param   when   a date.
-     * @return  <code>true</code> if and only if the instant represented
-     *          by this <tt>Date</tt> object is strictly later than the
-     *          instant represented by <tt>when</tt>;
-     *          <code>false</code> otherwise.
-     * @exception NullPointerException if <code>when</code> is null.
+     * @return  {@code true} if and only if the instant represented
+     *          by this {@code Date} object is strictly later than the
+     *          instant represented by {@code when};
+     *          {@code false} otherwise.
+     * @exception NullPointerException if {@code when} is null.
      */
     public boolean after(Date when) {
         return getMillisOf(this) > getMillisOf(when);
@@ -933,17 +930,17 @@
 
     /**
      * Compares two dates for equality.
-     * The result is <code>true</code> if and only if the argument is
-     * not <code>null</code> and is a <code>Date</code> object that
+     * The result is {@code true} if and only if the argument is
+     * not {@code null} and is a {@code Date} object that
      * represents the same point in time, to the millisecond, as this object.
      * <p>
-     * Thus, two <code>Date</code> objects are equal if and only if the
-     * <code>getTime</code> method returns the same <code>long</code>
+     * Thus, two {@code Date} objects are equal if and only if the
+     * {@code getTime} method returns the same {@code long}
      * value for both.
      *
      * @param   obj   the object to compare with.
-     * @return  <code>true</code> if the objects are the same;
-     *          <code>false</code> otherwise.
+     * @return  {@code true} if the objects are the same;
+     *          {@code false} otherwise.
      * @see     java.util.Date#getTime()
      */
     public boolean equals(Object obj) {
@@ -951,7 +948,7 @@
     }
 
     /**
-     * Returns the millisecond value of this <code>Date</code> object
+     * Returns the millisecond value of this {@code Date} object
      * without affecting its internal state.
      */
     static final long getMillisOf(Date date) {
@@ -965,13 +962,13 @@
     /**
      * Compares two Dates for ordering.
      *
-     * @param   anotherDate   the <code>Date</code> to be compared.
-     * @return  the value <code>0</code> if the argument Date is equal to
-     *          this Date; a value less than <code>0</code> if this Date
+     * @param   anotherDate   the {@code Date} to be compared.
+     * @return  the value {@code 0} if the argument Date is equal to
+     *          this Date; a value less than {@code 0} if this Date
      *          is before the Date argument; and a value greater than
-     *      <code>0</code> if this Date is after the Date argument.
+     *      {@code 0} if this Date is after the Date argument.
      * @since   1.2
-     * @exception NullPointerException if <code>anotherDate</code> is null.
+     * @exception NullPointerException if {@code anotherDate} is null.
      */
     public int compareTo(Date anotherDate) {
         long thisTime = getMillisOf(this);
@@ -981,7 +978,7 @@
 
     /**
      * Returns a hash code value for this object. The result is the
-     * exclusive OR of the two halves of the primitive <tt>long</tt>
+     * exclusive OR of the two halves of the primitive {@code long}
      * value returned by the {@link Date#getTime}
      * method. That is, the hash code is the value of the expression:
      * <blockquote><pre>{@code
@@ -996,29 +993,29 @@
     }
 
     /**
-     * Converts this <code>Date</code> object to a <code>String</code>
+     * Converts this {@code Date} object to a {@code String}
      * of the form:
      * <blockquote><pre>
      * dow mon dd hh:mm:ss zzz yyyy</pre></blockquote>
      * where:<ul>
-     * <li><tt>dow</tt> is the day of the week (<tt>Sun, Mon, Tue, Wed,
-     *     Thu, Fri, Sat</tt>).
-     * <li><tt>mon</tt> is the month (<tt>Jan, Feb, Mar, Apr, May, Jun,
-     *     Jul, Aug, Sep, Oct, Nov, Dec</tt>).
-     * <li><tt>dd</tt> is the day of the month (<tt>01</tt> through
-     *     <tt>31</tt>), as two decimal digits.
-     * <li><tt>hh</tt> is the hour of the day (<tt>00</tt> through
-     *     <tt>23</tt>), as two decimal digits.
-     * <li><tt>mm</tt> is the minute within the hour (<tt>00</tt> through
-     *     <tt>59</tt>), as two decimal digits.
-     * <li><tt>ss</tt> is the second within the minute (<tt>00</tt> through
-     *     <tt>61</tt>, as two decimal digits.
-     * <li><tt>zzz</tt> is the time zone (and may reflect daylight saving
+     * <li>{@code dow} is the day of the week ({@code Sun, Mon, Tue, Wed,
+     *     Thu, Fri, Sat}).
+     * <li>{@code mon} is the month ({@code Jan, Feb, Mar, Apr, May, Jun,
+     *     Jul, Aug, Sep, Oct, Nov, Dec}).
+     * <li>{@code dd} is the day of the month ({@code 01} through
+     *     {@code 31}), as two decimal digits.
+     * <li>{@code hh} is the hour of the day ({@code 00} through
+     *     {@code 23}), as two decimal digits.
+     * <li>{@code mm} is the minute within the hour ({@code 00} through
+     *     {@code 59}), as two decimal digits.
+     * <li>{@code ss} is the second within the minute ({@code 00} through
+     *     {@code 61}, as two decimal digits.
+     * <li>{@code zzz} is the time zone (and may reflect daylight saving
      *     time). Standard time zone abbreviations include those
-     *     recognized by the method <tt>parse</tt>. If time zone
-     *     information is not available, then <tt>zzz</tt> is empty -
+     *     recognized by the method {@code parse}. If time zone
+     *     information is not available, then {@code zzz} is empty -
      *     that is, it consists of no characters at all.
-     * <li><tt>yyyy</tt> is the year, as four decimal digits.
+     * <li>{@code yyyy} is the year, as four decimal digits.
      * </ul>
      *
      * @return  a string representation of this date.
@@ -1053,7 +1050,7 @@
     /**
      * Converts the given name to its 3-letter abbreviation (e.g.,
      * "monday" -> "Mon") and stored the abbreviation in the given
-     * <code>StringBuilder</code>.
+     * {@code StringBuilder}.
      */
     private static final StringBuilder convertToAbbr(StringBuilder sb, String name) {
         sb.append(Character.toUpperCase(name.charAt(0)));
@@ -1062,11 +1059,11 @@
     }
 
     /**
-     * Creates a string representation of this <tt>Date</tt> object in an
+     * Creates a string representation of this {@code Date} object in an
      * implementation-dependent form. The intent is that the form should
      * be familiar to the user of the Java application, wherever it may
      * happen to be running. The intent is comparable to that of the
-     * "<code>%c</code>" format supported by the <code>strftime()</code>
+     * "{@code %c}" format supported by the {@code strftime()}
      * function of ISO&nbsp;C.
      *
      * @return  a string representation of this date, using the locale
@@ -1075,7 +1072,7 @@
      * @see     java.util.Date#toString()
      * @see     java.util.Date#toGMTString()
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>DateFormat.format(Date date)</code>.
+     * replaced by {@code DateFormat.format(Date date)}.
      */
     @Deprecated
     public String toLocaleString() {
@@ -1084,23 +1081,23 @@
     }
 
     /**
-     * Creates a string representation of this <tt>Date</tt> object of
+     * Creates a string representation of this {@code Date} object of
      * the form:
      * <blockquote><pre>
      * d mon yyyy hh:mm:ss GMT</pre></blockquote>
      * where:<ul>
-     * <li><i>d</i> is the day of the month (<tt>1</tt> through <tt>31</tt>),
+     * <li><i>d</i> is the day of the month ({@code 1} through {@code 31}),
      *     as one or two decimal digits.
-     * <li><i>mon</i> is the month (<tt>Jan, Feb, Mar, Apr, May, Jun, Jul,
-     *     Aug, Sep, Oct, Nov, Dec</tt>).
+     * <li><i>mon</i> is the month ({@code Jan, Feb, Mar, Apr, May, Jun, Jul,
+     *     Aug, Sep, Oct, Nov, Dec}).
      * <li><i>yyyy</i> is the year, as four decimal digits.
-     * <li><i>hh</i> is the hour of the day (<tt>00</tt> through <tt>23</tt>),
+     * <li><i>hh</i> is the hour of the day ({@code 00} through {@code 23}),
      *     as two decimal digits.
-     * <li><i>mm</i> is the minute within the hour (<tt>00</tt> through
-     *     <tt>59</tt>), as two decimal digits.
-     * <li><i>ss</i> is the second within the minute (<tt>00</tt> through
-     *     <tt>61</tt>), as two decimal digits.
-     * <li><i>GMT</i> is exactly the ASCII letters "<tt>GMT</tt>" to indicate
+     * <li><i>mm</i> is the minute within the hour ({@code 00} through
+     *     {@code 59}), as two decimal digits.
+     * <li><i>ss</i> is the second within the minute ({@code 00} through
+     *     {@code 61}), as two decimal digits.
+     * <li><i>GMT</i> is exactly the ASCII letters "{@code GMT}" to indicate
      *     Greenwich Mean Time.
      * </ul><p>
      * The result does not depend on the local time zone.
@@ -1111,8 +1108,8 @@
      * @see     java.util.Date#toString()
      * @see     java.util.Date#toLocaleString()
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>DateFormat.format(Date date)</code>, using a
-     * GMT <code>TimeZone</code>.
+     * replaced by {@code DateFormat.format(Date date)}, using a
+     * GMT {@code TimeZone}.
      */
     @Deprecated
     public String toGMTString() {
@@ -1135,7 +1132,7 @@
     /**
      * Returns the offset, measured in minutes, for the local time zone
      * relative to UTC that is appropriate for the time represented by
-     * this <code>Date</code> object.
+     * this {@code Date} object.
      * <p>
      * For example, in Massachusetts, five time zones west of Greenwich:
      * <blockquote><pre>
@@ -1161,8 +1158,8 @@
      * @see     java.util.Calendar#DST_OFFSET
      * @see     java.util.TimeZone#getDefault
      * @deprecated As of JDK version 1.1,
-     * replaced by <code>-(Calendar.get(Calendar.ZONE_OFFSET) +
-     * Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000)</code>.
+     * replaced by {@code -(Calendar.get(Calendar.ZONE_OFFSET) +
+     * Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000)}.
      */
     @Deprecated
     public int getTimezoneOffset() {
@@ -1313,7 +1310,7 @@
     /**
      * Save the state of this object to a stream (i.e., serialize it).
      *
-     * @serialData The value returned by <code>getTime()</code>
+     * @serialData The value returned by {@code getTime()}
      *             is emitted (long).  This represents the offset from
      *             January 1, 1970, 00:00:00 GMT in milliseconds.
      */
@@ -1336,7 +1333,7 @@
      * Obtains an instance of {@code Date} from an {@code Instant} object.
      * <p>
      * {@code Instant} uses a precision of nanoseconds, whereas {@code Date}
-     * uses a precision of milliseconds.  The conversion will trancate any
+     * uses a precision of milliseconds.  The conversion will truncate any
      * excess precision information as though the amount in nanoseconds was
      * subject to integer division by one million.
      * <p>
--- a/jdk/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1400,7 +1400,7 @@
             lock.lock();
             try {
                 checkForComodification();
-                if (fromIndex < 0 || toIndex > size)
+                if (fromIndex < 0 || toIndex > size || fromIndex > toIndex)
                     throw new IndexOutOfBoundsException();
                 return new COWSubList<E>(l, fromIndex + offset,
                                          toIndex + offset);
--- a/jdk/src/share/classes/java/util/logging/FileHandler.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/java/util/logging/FileHandler.java	Tue Feb 18 15:48:14 2014 -0800
@@ -535,7 +535,7 @@
                     continue;
                 } else if (ch2 == 'h') {
                     file = new File(System.getProperty("user.home"));
-                    if (isSetUID()) {
+                    if (sun.misc.VM.isSetUID()) {
                         // Ok, we are in a set UID program.  For safety's sake
                         // we disallow attempts to open files relative to %h.
                         throw new IOException("can't use %h in set UID program");
@@ -669,9 +669,4 @@
             lastException = ex;
         }
     }
-
-    /**
-     * check if we are in a set UID program.
-     */
-    private static native boolean isSetUID();
 }
--- a/jdk/src/share/classes/javax/imageio/IIOException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/imageio/IIOException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,7 @@
  *
  */
 public class IIOException extends IOException {
+    private static final long serialVersionUID = -3216210718638985251L;
 
     /**
      * Constructs an <code>IIOException</code> with a given message
--- a/jdk/src/share/classes/javax/imageio/metadata/IIOInvalidTreeException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/imageio/metadata/IIOInvalidTreeException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,6 +44,7 @@
  *
  */
 public class IIOInvalidTreeException extends IIOException {
+    private static final long serialVersionUID = -1314083172544132777L;
 
     /**
      * The <code>Node</code> that led to the parsing error, or
--- a/jdk/src/share/classes/javax/imageio/metadata/IIOMetadataNode.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/imageio/metadata/IIOMetadataNode.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 @@
 
 
 class IIODOMException extends DOMException {
+    private static final long serialVersionUID = -4369510142067447468L;
 
     public IIODOMException(short code, String message) {
         super(code, message);
--- a/jdk/src/share/classes/javax/imageio/spi/DigraphNode.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/imageio/spi/DigraphNode.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,7 @@
  *
  */
 class DigraphNode implements Cloneable, Serializable {
+    private static final long serialVersionUID = 5308261378582246841L;
 
     /** The data associated with this node. */
     protected Object data;
--- a/jdk/src/share/classes/javax/imageio/spi/ServiceRegistry.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/imageio/spi/ServiceRegistry.java	Tue Feb 18 15:48:14 2014 -0800
@@ -123,15 +123,6 @@
         }
     }
 
-    // The following two methods expose functionality from
-    // sun.misc.Service.  If that class is made public, they may be
-    // removed.
-    //
-    // The sun.misc.ServiceConfigurationError class may also be
-    // exposed, in which case the references to 'an
-    // <code>Error</code>' below should be changed to 'a
-    // <code>ServiceConfigurationError</code>'.
-
     /**
      * Searches for implementations of a particular service class
      * using the given class loader.
--- a/jdk/src/share/classes/javax/print/DocFlavor.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/print/DocFlavor.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1045,6 +1045,7 @@
      * @author  Alan Kaminsky
      */
     public static class URL extends DocFlavor {
+        private static final long serialVersionUID = 2936725788144902062L;
 
         /**
          * Constructs a new doc flavor with the given MIME type and a print
--- a/jdk/src/share/classes/javax/print/PrintException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/print/PrintException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 @@
  *
  */
 public class PrintException extends Exception {
-
+    private static final long serialVersionUID = -5932531546705242471L;
 
     /**
      * Construct a print exception with no detail message.
--- a/jdk/src/share/classes/javax/print/attribute/AttributeSetUtilities.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/print/attribute/AttributeSetUtilities.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -77,6 +77,7 @@
       */
     private static class UnmodifiableAttributeSet
         implements AttributeSet, Serializable {
+        private static final long serialVersionUID = -6131802583863447813L;
 
         private AttributeSet attrset;
 
@@ -147,6 +148,7 @@
     private static class UnmodifiableDocAttributeSet
         extends UnmodifiableAttributeSet
         implements DocAttributeSet, Serializable {
+        private static final long serialVersionUID = -6349408326066898956L;
 
         public UnmodifiableDocAttributeSet(DocAttributeSet attributeSet) {
 
@@ -161,6 +163,7 @@
         extends UnmodifiableAttributeSet
         implements PrintRequestAttributeSet, Serializable
     {
+        private static final long serialVersionUID = 7799373532614825073L;
         public UnmodifiablePrintRequestAttributeSet
             (PrintRequestAttributeSet attributeSet) {
 
@@ -175,6 +178,7 @@
         extends UnmodifiableAttributeSet
         implements PrintJobAttributeSet, Serializable
     {
+        private static final long serialVersionUID = -8002245296274522112L;
         public UnmodifiablePrintJobAttributeSet
             (PrintJobAttributeSet attributeSet) {
 
@@ -189,6 +193,7 @@
         extends UnmodifiableAttributeSet
         implements PrintServiceAttributeSet, Serializable
     {
+        private static final long serialVersionUID = -7112165137107826819L;
         public UnmodifiablePrintServiceAttributeSet
             (PrintServiceAttributeSet attributeSet) {
 
@@ -291,6 +296,7 @@
       */
     private static class SynchronizedAttributeSet
                         implements AttributeSet, Serializable {
+        private static final long serialVersionUID = 8365731020128564925L;
 
         private AttributeSet attrset;
 
@@ -357,6 +363,7 @@
     private static class SynchronizedDocAttributeSet
         extends SynchronizedAttributeSet
         implements DocAttributeSet, Serializable {
+        private static final long serialVersionUID = 6455869095246629354L;
 
         public SynchronizedDocAttributeSet(DocAttributeSet attributeSet) {
             super(attributeSet);
@@ -369,6 +376,7 @@
     private static class SynchronizedPrintRequestAttributeSet
         extends SynchronizedAttributeSet
         implements PrintRequestAttributeSet, Serializable {
+        private static final long serialVersionUID = 5671237023971169027L;
 
         public SynchronizedPrintRequestAttributeSet
             (PrintRequestAttributeSet attributeSet) {
@@ -382,6 +390,7 @@
     private static class SynchronizedPrintJobAttributeSet
         extends SynchronizedAttributeSet
         implements PrintJobAttributeSet, Serializable {
+        private static final long serialVersionUID = 2117188707856965749L;
 
         public SynchronizedPrintJobAttributeSet
             (PrintJobAttributeSet attributeSet) {
@@ -395,6 +404,8 @@
     private static class SynchronizedPrintServiceAttributeSet
         extends SynchronizedAttributeSet
         implements PrintServiceAttributeSet, Serializable {
+        private static final long serialVersionUID = -2830705374001675073L;
+
         public SynchronizedPrintServiceAttributeSet
             (PrintServiceAttributeSet attributeSet) {
             super(attributeSet);
--- a/jdk/src/share/classes/javax/print/attribute/UnmodifiableSetException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/print/attribute/UnmodifiableSetException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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,8 @@
  * @since   1.4
  */
 public class UnmodifiableSetException extends RuntimeException {
+    private static final long serialVersionUID = 2255250308571511731L;
+
     /**
      * Constructs an UnsupportedOperationException with no detail message.
      */
--- a/jdk/src/share/classes/javax/sound/midi/InvalidMidiDataException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/sound/midi/InvalidMidiDataException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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,6 +39,7 @@
  * @author Kara Kytle
  */
 public class InvalidMidiDataException extends Exception {
+    private static final long serialVersionUID = 2780771756789932067L;
 
     /**
      * Constructs an <code>InvalidMidiDataException</code> with
@@ -49,7 +50,6 @@
         super();
     }
 
-
     /**
      *  Constructs an <code>InvalidMidiDataException</code> with the
      * specified detail message.
--- a/jdk/src/share/classes/javax/sound/midi/MidiSystem.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/sound/midi/MidiSystem.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1475,7 +1475,7 @@
 
     /**
      * Obtains the set of services currently installed on the system
-     * using sun.misc.Service, the SPI mechanism in 1.3.
+     * using the SPI mechanism in 1.3.
      * @return a List of instances of providers for the requested service.
      * If no providers are available, a List of length 0 will be returned.
      */
--- a/jdk/src/share/classes/javax/sound/midi/MidiUnavailableException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/sound/midi/MidiUnavailableException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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,6 +39,7 @@
  * @author Kara Kytle
  */
 public class MidiUnavailableException extends Exception {
+    private static final long serialVersionUID = 6093809578628944323L;
 
     /**
      * Constructs a <code>MidiUnavailableException</code> that has
@@ -49,7 +50,6 @@
         super();
     }
 
-
     /**
      *  Constructs a <code>MidiUnavailableException</code> with the
      * specified detail message.
--- a/jdk/src/share/classes/javax/sound/sampled/AudioPermission.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioPermission.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,6 @@
 
 import java.security.BasicPermission;
 
-
 /**
  * The <code>AudioPermission</code> class represents access rights to the audio
  * system resources.  An <code>AudioPermission</code> contains a target name
@@ -76,134 +75,8 @@
  * @author Kara Kytle
  * @since 1.3
  */
-/*
- * (OLD PERMISSIONS TAKEN OUT FOR 1.2 BETA)
- *
- * <tr>
- * <td>playback device access</td>
- * <td>Direct access to the audio playback device(s), including configuration of the
- * playback format, volume, and balance, explicit opening and closing of the device,
- * etc.</td>
- * <td>Changes the properties of a shared system device and therefore
- * can affect other applications.</td>
- * </tr>
- *
- * <tr>
- * <td>playback device override</td>
- * <td>Manipulation of the audio playback device(s) in a way that directly conflicts
- * with use by other applications.  This includes closing the device while it is in
- * use by another application, changing the device format while another application
- * is using it, etc. </td>
- * <td>Changes the properties of a shared system device and therefore
- * can affect other applications.</td>
- * </tr>
- *
- * <tr>
- * <td>record device access</td>
- * <td>Direct access to the audio recording device(s), including configuration of the
- * the record format, volume, and balance, explicit opening and closing of the device,
- * etc.</td>
- * <td>Changes the properties of a shared system device and therefore
- * can affect other applications.</td>
- * </tr>
- *
- * <tr>
- * <td>record device override</td>
- * <td>Manipulation of the audio recording device(s) in a way that directly conflicts
- * with use by other applications.  This includes closing the device while it is in
- * use by another application, changing the device format while another application
- * is using it, etc. </td>
- * <td>Changes the properties of a shared system device and therefore
- * can affect other applications.</td>
- * </tr>
- *
- * </table>
- *<p>
- *
- * @author Kara Kytle
- * @since 1.3
- */
-
-/*
- * The <code>AudioPermission</code> class represents access rights to the audio
- * system resources.  An <code>AudioPermission</code> contains a target name
- * but no actions list; you either have the named permission or you don't.
- * <p>
- * The target name is the name of the audio permission (see the table below).
- * The names follow the hierarchical property-naming convention. Also, an asterisk
- * can be used to represent all the audio permissions.
- * <p>
- * The following table lists all the possible AudioPermission target names.
- * For each name, the table provides a description of exactly what that permission
- * allows, as well as a discussion of the risks of granting code the permission.
- * <p>
- *
- * <table border=1 cellpadding=5>
- * <tr>
- * <th>Permission Target Name</th>
- * <th>What the Permission Allows</th>
- * <th>Risks of Allowing this Permission</th>
- * </tr>
- *
- * <tr>
- * <td>play</td>
- * <td>Audio playback through the audio device or devices on the system.</td>
- * <td>Allows the application to use a system device.  Can affect other applications,
- * because the result will be mixed with other audio being played on the system.</td>
- *</tr>
- *
- * <tr>
- * <td>record</td>
- * <td>Recording audio from the audio device or devices on the system,
- * commonly through a microphone.</td>
- * <td>Can enable an applet or application to eavesdrop on a user.</td>
- * </tr>
- *
- * <tr>
- * <td>playback device access</td>
- * <td>Direct access to the audio playback device(s), including configuration of the
- * playback format, volume, and balance, explicit opening and closing of the device,
- * etc.</td>
- * <td>Changes the properties of a shared system device and therefore
- * can affect other applications.</td>
- * </tr>
- *
- * <tr>
- * <td>playback device override</td>
- * <td>Manipulation of the audio playback device(s) in a way that directly conflicts
- * with use by other applications.  This includes closing the device while it is in
- * use by another application, changing the device format while another application
- * is using it, etc. </td>
- * <td>Changes the properties of a shared system device and therefore
- * can affect other applications.</td>
- * </tr>
- *
- * <tr>
- * <td>record device access</td>
- * <td>Direct access to the audio recording device(s), including configuration of the
- * the record format, volume, and balance, explicit opening and closing of the device,
- * etc.</td>
- * <td>Changes the properties of a shared system device and therefore
- * can affect other applications.</td>
- * </tr>
- *
- * <tr>
- * <td>record device override</td>
- * <td>Manipulation of the audio recording device(s) in a way that directly conflicts
- * with use by other applications.  This includes closing the device while it is in
- * use by another application, changing the device format while another application
- * is using it, etc. </td>
- * <td>Changes the properties of a shared system device and therefore
- * can affect other applications.</td>
- * </tr>
- *
- * </table>
- *<p>
- *
- * @author Kara Kytle
- */
-
 public class AudioPermission extends BasicPermission {
+    private static final long serialVersionUID = -5518053473477801126L;
 
     /**
      * Creates a new <code>AudioPermission</code> object that has the specified
--- a/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1622,7 +1622,7 @@
 
     /**
      * Obtains the set of services currently installed on the system
-     * using sun.misc.Service, the SPI mechanism in 1.3.
+     * using the SPI mechanism in 1.3.
      * @return a List of instances of providers for the requested service.
      * If no providers are available, a vector of length 0 will be returned.
      */
--- a/jdk/src/share/classes/javax/sound/sampled/LineEvent.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/sound/sampled/LineEvent.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -46,6 +46,7 @@
  * @serial exclude
  */
 public class LineEvent extends java.util.EventObject {
+    private static final long serialVersionUID = -1274246333383880410L;
 
     // INSTANCE VARIABLES
 
--- a/jdk/src/share/classes/javax/sound/sampled/LineUnavailableException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/sound/sampled/LineUnavailableException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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,6 +44,7 @@
  */
 
 public class LineUnavailableException extends Exception {
+    private static final long serialVersionUID = -2046718279487432130L;
 
     /**
      * Constructs a <code>LineUnavailableException</code> that has
@@ -54,7 +55,6 @@
         super();
     }
 
-
     /**
      * Constructs a <code>LineUnavailableException</code> that has
      * the specified detail message.
--- a/jdk/src/share/classes/javax/sound/sampled/UnsupportedAudioFileException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/javax/sound/sampled/UnsupportedAudioFileException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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,15 +33,8 @@
  * @author Kara Kytle
  * @since 1.3
  */
-/*
- * An <code>UnsupportedAudioFileException</code> is an exception indicating that an
- * operation failed because a file did not contain valid data of a recognized file
- * type and format.
- *
- * @author Kara Kytle
- */
-
 public class UnsupportedAudioFileException extends Exception {
+    private static final long serialVersionUID = -139127412623160368L;
 
     /**
      * Constructs a <code>UnsupportedAudioFileException</code> that has
@@ -52,7 +45,6 @@
         super();
     }
 
-
     /**
      * Constructs a <code>UnsupportedAudioFileException</code> that has
      * the specified detail message.
--- a/jdk/src/share/classes/sun/applet/AppletViewerPanel.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/applet/AppletViewerPanel.java	Tue Feb 18 15:48:14 2014 -0800
@@ -31,7 +31,6 @@
 import java.net.MalformedURLException;
 import java.awt.*;
 import java.applet.*;
-import sun.tools.jar.*;
 
 
 /**
--- a/jdk/src/share/classes/sun/awt/CustomCursor.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/CustomCursor.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  *
  * @author      ThomasBall
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public abstract class CustomCursor extends Cursor {
 
     protected Image image;
--- a/jdk/src/share/classes/sun/awt/FontConfiguration.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java	Tue Feb 18 15:48:14 2014 -0800
@@ -2109,6 +2109,7 @@
             return ret;
         }
 
+        @SuppressWarnings("serial") // JDK-implementation class
         class FontProperties extends Properties {
             public synchronized Object put(Object k, Object v) {
                 parseProperty((String)k, (String)v);
--- a/jdk/src/share/classes/sun/awt/TimedWindowEvent.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/TimedWindowEvent.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, 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
@@ -28,6 +28,7 @@
 import java.awt.event.WindowEvent;
 import java.awt.Window;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class TimedWindowEvent extends WindowEvent {
 
     private long time;
--- a/jdk/src/share/classes/sun/awt/dnd/SunDropTargetEvent.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/dnd/SunDropTargetEvent.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
 import java.awt.dnd.InvalidDnDOperationException;
 import java.awt.event.MouseEvent;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class SunDropTargetEvent extends MouseEvent {
 
     public static final int MOUSE_DROPPED = MouseEvent.MOUSE_RELEASED;
--- a/jdk/src/share/classes/sun/awt/event/IgnorePaintEvent.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/event/IgnorePaintEvent.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,7 @@
  * Look at <code>javax.swing.SwingPaintEventDispatcher</code> for more.
  *
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public class IgnorePaintEvent extends PaintEvent {
     public IgnorePaintEvent(Component source, int id, Rectangle updateRect) {
         super(source, id, updateRect);
--- a/jdk/src/share/classes/sun/awt/image/BadDepthException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/image/BadDepthException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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,7 @@
 
 package sun.awt.image;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class BadDepthException extends Exception {
     public BadDepthException() {
     }
--- a/jdk/src/share/classes/sun/awt/image/ImageAccessException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/image/ImageAccessException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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,7 @@
 
 package sun.awt.image;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class ImageAccessException extends Exception {
     public ImageAccessException(String s) {
         super(s);
--- a/jdk/src/share/classes/sun/awt/image/ImageFormatException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/image/ImageFormatException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, 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,7 @@
 
 package sun.awt.image;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class ImageFormatException extends Exception {
     public ImageFormatException(String s) {
         super(s);
--- a/jdk/src/share/classes/sun/awt/image/PNGImageDecoder.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/image/PNGImageDecoder.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, 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
@@ -231,6 +231,7 @@
         }
         return true;
     }
+    @SuppressWarnings("serial") // JDK-implementation class
     public class PNGException extends IOException {
         PNGException(String s) { super(s); }
     }
--- a/jdk/src/share/classes/sun/awt/shell/DefaultShellFolder.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/shell/DefaultShellFolder.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
  * @author Michael Martak
  * @since 1.4
  */
-
+@SuppressWarnings("serial") // JDK-implementation class
 class DefaultShellFolder extends ShellFolder {
 
     /**
--- a/jdk/src/share/classes/sun/awt/shell/ShellFolder.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/awt/shell/ShellFolder.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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,7 +37,7 @@
  * @author Michael Martak
  * @since 1.4
  */
-
+@SuppressWarnings("serial") // JDK-implementation class
 public abstract class ShellFolder extends File {
     private static final String COLUMN_NAME = "FileChooser.fileNameHeaderText";
     private static final String COLUMN_SIZE = "FileChooser.fileSizeHeaderText";
--- a/jdk/src/share/classes/sun/font/FontScalerException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/font/FontScalerException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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,7 @@
 
 package sun.font;
 
+@SuppressWarnings("serial") // JDK-implementation class
 public class FontScalerException extends Exception {
     public FontScalerException() {
       super("Font scaler encountered runtime problem.");
--- a/jdk/src/share/classes/sun/java2d/InvalidPipeException.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/java2d/InvalidPipeException.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
  * windows which toggle the need to use platform graphics or direct
  * graphics access.
  */
+@SuppressWarnings("serial") // JDK-implementation class
 public class InvalidPipeException extends IllegalStateException {
     /**
      * Constructs an InvalidPipeException with no detail message.
--- a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -376,6 +376,7 @@
         return (int)res;
     }
 
+    @SuppressWarnings("serial") // JDK-implementation class
     public static class ImageLayoutException extends Exception {
         public ImageLayoutException(String message) {
             super(message);
--- a/jdk/src/share/classes/sun/misc/DoubleConsts.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/misc/DoubleConsts.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -77,9 +77,7 @@
 
     /**
      * The exponent the smallest positive <code>double</code>
-     * subnormal value would have if it could be normalized.  It is
-     * equal to the value returned by
-     * <code>FpUtils.ilogb(Double.MIN_VALUE)</code>.
+     * subnormal value would have if it could be normalized..
      */
     public static final int     MIN_SUB_EXPONENT = MIN_EXPONENT -
                                                    (SIGNIFICAND_WIDTH - 1);
--- a/jdk/src/share/classes/sun/misc/FloatConsts.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/misc/FloatConsts.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -73,8 +73,7 @@
 
     /**
      * The exponent the smallest positive <code>float</code> subnormal
-     * value would have if it could be normalized.  It is equal to the
-     * value returned by <code>FpUtils.ilogb(Float.MIN_VALUE)</code>.
+     * value would have if it could be normalized.
      */
     public static final int     MIN_SUB_EXPONENT = MIN_EXPONENT -
                                                    (SIGNIFICAND_WIDTH - 1);
--- a/jdk/src/share/classes/sun/misc/FpUtils.java	Wed Jan 29 20:41:33 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,931 +0,0 @@
-/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.misc;
-
-import sun.misc.FloatConsts;
-import sun.misc.DoubleConsts;
-
-/**
- * The class {@code FpUtils} contains static utility methods for
- * manipulating and inspecting {@code float} and
- * {@code double} floating-point numbers.  These methods include
- * functionality recommended or required by the IEEE 754
- * floating-point standard.
- *
- * @author Joseph D. Darcy
- */
-
-public class FpUtils {
-    /*
-     * The methods in this class are reasonably implemented using
-     * direct or indirect bit-level manipulation of floating-point
-     * values.  However, having access to the IEEE 754 recommended
-     * functions would obviate the need for most programmers to engage
-     * in floating-point bit-twiddling.
-     *
-     * An IEEE 754 number has three fields, from most significant bit
-     * to to least significant, sign, exponent, and significand.
-     *
-     *  msb                                lsb
-     * [sign|exponent|  fractional_significand]
-     *
-     * Using some encoding cleverness, explained below, the high order
-     * bit of the logical significand does not need to be explicitly
-     * stored, thus "fractional_significand" instead of simply
-     * "significand" in the figure above.
-     *
-     * For finite normal numbers, the numerical value encoded is
-     *
-     * (-1)^sign * 2^(exponent)*(1.fractional_significand)
-     *
-     * Most finite floating-point numbers are normalized; the exponent
-     * value is reduced until the leading significand bit is 1.
-     * Therefore, the leading 1 is redundant and is not explicitly
-     * stored.  If a numerical value is so small it cannot be
-     * normalized, it has a subnormal representation. Subnormal
-     * numbers don't have a leading 1 in their significand; subnormals
-     * are encoding using a special exponent value.  In other words,
-     * the high-order bit of the logical significand can be elided in
-     * from the representation in either case since the bit's value is
-     * implicit from the exponent value.
-     *
-     * The exponent field uses a biased representation; if the bits of
-     * the exponent are interpreted as a unsigned integer E, the
-     * exponent represented is E - E_bias where E_bias depends on the
-     * floating-point format.  E can range between E_min and E_max,
-     * constants which depend on the floating-point format.  E_min and
-     * E_max are -126 and +127 for float, -1022 and +1023 for double.
-     *
-     * The 32-bit float format has 1 sign bit, 8 exponent bits, and 23
-     * bits for the significand (which is logically 24 bits wide
-     * because of the implicit bit).  The 64-bit double format has 1
-     * sign bit, 11 exponent bits, and 52 bits for the significand
-     * (logically 53 bits).
-     *
-     * Subnormal numbers and zero have the special exponent value
-     * E_min -1; the numerical value represented by a subnormal is:
-     *
-     * (-1)^sign * 2^(E_min)*(0.fractional_significand)
-     *
-     * Zero is represented by all zero bits in the exponent and all
-     * zero bits in the significand; zero can have either sign.
-     *
-     * Infinity and NaN are encoded using the exponent value E_max +
-     * 1.  Signed infinities have all significand bits zero; NaNs have
-     * at least one non-zero significand bit.
-     *
-     * The details of IEEE 754 floating-point encoding will be used in
-     * the methods below without further comment.  For further
-     * exposition on IEEE 754 numbers, see "IEEE Standard for Binary
-     * Floating-Point Arithmetic" ANSI/IEEE Std 754-1985 or William
-     * Kahan's "Lecture Notes on the Status of IEEE Standard 754 for
-     * Binary Floating-Point Arithmetic",
-     * http://www.cs.berkeley.edu/~wkahan/ieee754status/ieee754.ps.
-     *
-     * Many of this class's methods are members of the set of IEEE 754
-     * recommended functions or similar functions recommended or
-     * required by IEEE 754R.  Discussion of various implementation
-     * techniques for these functions have occurred in:
-     *
-     * W.J. Cody and Jerome T. Coonen, "Algorithm 772 Functions to
-     * Support the IEEE Standard for Binary Floating-Point
-     * Arithmetic," ACM Transactions on Mathematical Software,
-     * vol. 19, no. 4, December 1993, pp. 443-451.
-     *
-     * Joseph D. Darcy, "Writing robust IEEE recommended functions in
-     * ``100% Pure Java''(TM)," University of California, Berkeley
-     * technical report UCB//CSD-98-1009.
-     */
-
-    /**
-     * Don't let anyone instantiate this class.
-     */
-    private FpUtils() {}
-
-    // Helper Methods
-
-    // The following helper methods are used in the implementation of
-    // the public recommended functions; they generally omit certain
-    // tests for exception cases.
-
-    /**
-     * Returns unbiased exponent of a {@code double}.
-     * @deprecated Use Math.getExponent.
-     */
-    @Deprecated
-    public static int getExponent(double d){
-        return Math.getExponent(d);
-    }
-
-    /**
-     * Returns unbiased exponent of a {@code float}.
-     * @deprecated Use Math.getExponent.
-     */
-    @Deprecated
-    public static int getExponent(float f){
-        return Math.getExponent(f);
-    }
-
-
-    /**
-     * Returns the first floating-point argument with the sign of the
-     * second floating-point argument.  Note that unlike the {@link
-     * FpUtils#copySign(double, double) copySign} method, this method
-     * does not require NaN {@code sign} arguments to be treated
-     * as positive values; implementations are permitted to treat some
-     * NaN arguments as positive and other NaN arguments as negative
-     * to allow greater performance.
-     *
-     * @param magnitude  the parameter providing the magnitude of the result
-     * @param sign   the parameter providing the sign of the result
-     * @return a value with the magnitude of {@code magnitude}
-     * and the sign of {@code sign}.
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.copySign.
-     */
-    @Deprecated
-    public static double rawCopySign(double magnitude, double sign) {
-        return Math.copySign(magnitude, sign);
-    }
-
-    /**
-     * Returns the first floating-point argument with the sign of the
-     * second floating-point argument.  Note that unlike the {@link
-     * FpUtils#copySign(float, float) copySign} method, this method
-     * does not require NaN {@code sign} arguments to be treated
-     * as positive values; implementations are permitted to treat some
-     * NaN arguments as positive and other NaN arguments as negative
-     * to allow greater performance.
-     *
-     * @param magnitude  the parameter providing the magnitude of the result
-     * @param sign   the parameter providing the sign of the result
-     * @return a value with the magnitude of {@code magnitude}
-     * and the sign of {@code sign}.
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.copySign.
-     */
-    @Deprecated
-    public static float rawCopySign(float magnitude, float sign) {
-        return Math.copySign(magnitude, sign);
-    }
-
-    /* ***************************************************************** */
-
-    /**
-     * Returns {@code true} if the argument is a finite
-     * floating-point value; returns {@code false} otherwise (for
-     * NaN and infinity arguments).
-     *
-     * @param d the {@code double} value to be tested
-     * @return {@code true} if the argument is a finite
-     * floating-point value, {@code false} otherwise.
-     * @deprecated Use Double.isFinite.
-     */
-    @Deprecated
-    public static boolean isFinite(double d) {
-        return Double.isFinite(d);
-    }
-
-    /**
-     * Returns {@code true} if the argument is a finite
-     * floating-point value; returns {@code false} otherwise (for
-     * NaN and infinity arguments).
-     *
-     * @param f the {@code float} value to be tested
-     * @return {@code true} if the argument is a finite
-     * floating-point value, {@code false} otherwise.
-     * @deprecated Use Float.isFinite.
-     */
-     @Deprecated
-     public static boolean isFinite(float f) {
-         return Float.isFinite(f);
-    }
-
-    /**
-     * Returns {@code true} if the specified number is infinitely
-     * large in magnitude, {@code false} otherwise.
-     *
-     * <p>Note that this method is equivalent to the {@link
-     * Double#isInfinite(double) Double.isInfinite} method; the
-     * functionality is included in this class for convenience.
-     *
-     * @param   d   the value to be tested.
-     * @return  {@code true} if the value of the argument is positive
-     *          infinity or negative infinity; {@code false} otherwise.
-     */
-    public static boolean isInfinite(double d) {
-        return Double.isInfinite(d);
-    }
-
-    /**
-     * Returns {@code true} if the specified number is infinitely
-     * large in magnitude, {@code false} otherwise.
-     *
-     * <p>Note that this method is equivalent to the {@link
-     * Float#isInfinite(float) Float.isInfinite} method; the
-     * functionality is included in this class for convenience.
-     *
-     * @param   f   the value to be tested.
-     * @return  {@code true} if the argument is positive infinity or
-     *          negative infinity; {@code false} otherwise.
-     */
-     public static boolean isInfinite(float f) {
-         return Float.isInfinite(f);
-    }
-
-    /**
-     * Returns {@code true} if the specified number is a
-     * Not-a-Number (NaN) value, {@code false} otherwise.
-     *
-     * <p>Note that this method is equivalent to the {@link
-     * Double#isNaN(double) Double.isNaN} method; the functionality is
-     * included in this class for convenience.
-     *
-     * @param   d   the value to be tested.
-     * @return  {@code true} if the value of the argument is NaN;
-     *          {@code false} otherwise.
-     */
-    public static boolean isNaN(double d) {
-        return Double.isNaN(d);
-    }
-
-    /**
-     * Returns {@code true} if the specified number is a
-     * Not-a-Number (NaN) value, {@code false} otherwise.
-     *
-     * <p>Note that this method is equivalent to the {@link
-     * Float#isNaN(float) Float.isNaN} method; the functionality is
-     * included in this class for convenience.
-     *
-     * @param   f   the value to be tested.
-     * @return  {@code true} if the argument is NaN;
-     *          {@code false} otherwise.
-     */
-     public static boolean isNaN(float f) {
-        return Float.isNaN(f);
-    }
-
-    /**
-     * Returns {@code true} if the unordered relation holds
-     * between the two arguments.  When two floating-point values are
-     * unordered, one value is neither less than, equal to, nor
-     * greater than the other.  For the unordered relation to be true,
-     * at least one argument must be a {@code NaN}.
-     *
-     * @param arg1      the first argument
-     * @param arg2      the second argument
-     * @return {@code true} if at least one argument is a NaN,
-     * {@code false} otherwise.
-     */
-    public static boolean isUnordered(double arg1, double arg2) {
-        return isNaN(arg1) || isNaN(arg2);
-    }
-
-    /**
-     * Returns {@code true} if the unordered relation holds
-     * between the two arguments.  When two floating-point values are
-     * unordered, one value is neither less than, equal to, nor
-     * greater than the other.  For the unordered relation to be true,
-     * at least one argument must be a {@code NaN}.
-     *
-     * @param arg1      the first argument
-     * @param arg2      the second argument
-     * @return {@code true} if at least one argument is a NaN,
-     * {@code false} otherwise.
-     */
-     public static boolean isUnordered(float arg1, float arg2) {
-        return isNaN(arg1) || isNaN(arg2);
-    }
-
-    /**
-     * Returns unbiased exponent of a {@code double}; for
-     * subnormal values, the number is treated as if it were
-     * normalized.  That is for all finite, non-zero, positive numbers
-     * <i>x</i>, <code>scalb(<i>x</i>, -ilogb(<i>x</i>))</code> is
-     * always in the range [1, 2).
-     * <p>
-     * Special cases:
-     * <ul>
-     * <li> If the argument is NaN, then the result is 2<sup>30</sup>.
-     * <li> If the argument is infinite, then the result is 2<sup>28</sup>.
-     * <li> If the argument is zero, then the result is -(2<sup>28</sup>).
-     * </ul>
-     *
-     * @param d floating-point number whose exponent is to be extracted
-     * @return unbiased exponent of the argument.
-     * @author Joseph D. Darcy
-     */
-    public static int ilogb(double d) {
-        int exponent = getExponent(d);
-
-        switch (exponent) {
-        case DoubleConsts.MAX_EXPONENT+1:       // NaN or infinity
-            if( isNaN(d) )
-                return (1<<30);         // 2^30
-            else // infinite value
-                return (1<<28);         // 2^28
-
-        case DoubleConsts.MIN_EXPONENT-1:       // zero or subnormal
-            if(d == 0.0) {
-                return -(1<<28);        // -(2^28)
-            }
-            else {
-                long transducer = Double.doubleToRawLongBits(d);
-
-                /*
-                 * To avoid causing slow arithmetic on subnormals,
-                 * the scaling to determine when d's significand
-                 * is normalized is done in integer arithmetic.
-                 * (there must be at least one "1" bit in the
-                 * significand since zero has been screened out.
-                 */
-
-                // isolate significand bits
-                transducer &= DoubleConsts.SIGNIF_BIT_MASK;
-                assert(transducer != 0L);
-
-                // This loop is simple and functional. We might be
-                // able to do something more clever that was faster;
-                // e.g. number of leading zero detection on
-                // (transducer << (# exponent and sign bits).
-                while (transducer <
-                       (1L << (DoubleConsts.SIGNIFICAND_WIDTH - 1))) {
-                    transducer *= 2;
-                    exponent--;
-                }
-                exponent++;
-                assert( exponent >=
-                        DoubleConsts.MIN_EXPONENT - (DoubleConsts.SIGNIFICAND_WIDTH-1) &&
-                        exponent < DoubleConsts.MIN_EXPONENT);
-                return exponent;
-            }
-
-        default:
-            assert( exponent >= DoubleConsts.MIN_EXPONENT &&
-                    exponent <= DoubleConsts.MAX_EXPONENT);
-            return exponent;
-        }
-    }
-
-    /**
-     * Returns unbiased exponent of a {@code float}; for
-     * subnormal values, the number is treated as if it were
-     * normalized.  That is for all finite, non-zero, positive numbers
-     * <i>x</i>, <code>scalb(<i>x</i>, -ilogb(<i>x</i>))</code> is
-     * always in the range [1, 2).
-     * <p>
-     * Special cases:
-     * <ul>
-     * <li> If the argument is NaN, then the result is 2<sup>30</sup>.
-     * <li> If the argument is infinite, then the result is 2<sup>28</sup>.
-     * <li> If the argument is zero, then the result is -(2<sup>28</sup>).
-     * </ul>
-     *
-     * @param f floating-point number whose exponent is to be extracted
-     * @return unbiased exponent of the argument.
-     * @author Joseph D. Darcy
-     */
-     public static int ilogb(float f) {
-        int exponent = getExponent(f);
-
-        switch (exponent) {
-        case FloatConsts.MAX_EXPONENT+1:        // NaN or infinity
-            if( isNaN(f) )
-                return (1<<30);         // 2^30
-            else // infinite value
-                return (1<<28);         // 2^28
-
-        case FloatConsts.MIN_EXPONENT-1:        // zero or subnormal
-            if(f == 0.0f) {
-                return -(1<<28);        // -(2^28)
-            }
-            else {
-                int transducer = Float.floatToRawIntBits(f);
-
-                /*
-                 * To avoid causing slow arithmetic on subnormals,
-                 * the scaling to determine when f's significand
-                 * is normalized is done in integer arithmetic.
-                 * (there must be at least one "1" bit in the
-                 * significand since zero has been screened out.
-                 */
-
-                // isolate significand bits
-                transducer &= FloatConsts.SIGNIF_BIT_MASK;
-                assert(transducer != 0);
-
-                // This loop is simple and functional. We might be
-                // able to do something more clever that was faster;
-                // e.g. number of leading zero detection on
-                // (transducer << (# exponent and sign bits).
-                while (transducer <
-                       (1 << (FloatConsts.SIGNIFICAND_WIDTH - 1))) {
-                    transducer *= 2;
-                    exponent--;
-                }
-                exponent++;
-                assert( exponent >=
-                        FloatConsts.MIN_EXPONENT - (FloatConsts.SIGNIFICAND_WIDTH-1) &&
-                        exponent < FloatConsts.MIN_EXPONENT);
-                return exponent;
-            }
-
-        default:
-            assert( exponent >= FloatConsts.MIN_EXPONENT &&
-                    exponent <= FloatConsts.MAX_EXPONENT);
-            return exponent;
-        }
-    }
-
-
-    /*
-     * The scalb operation should be reasonably fast; however, there
-     * are tradeoffs in writing a method to minimize the worst case
-     * performance and writing a method to minimize the time for
-     * expected common inputs.  Some processors operate very slowly on
-     * subnormal operands, taking hundreds or thousands of cycles for
-     * one floating-point add or multiply as opposed to, say, four
-     * cycles for normal operands.  For processors with very slow
-     * subnormal execution, scalb would be fastest if written entirely
-     * with integer operations; in other words, scalb would need to
-     * include the logic of performing correct rounding of subnormal
-     * values.  This could be reasonably done in at most a few hundred
-     * cycles.  However, this approach may penalize normal operations
-     * since at least the exponent of the floating-point argument must
-     * be examined.
-     *
-     * The approach taken in this implementation is a compromise.
-     * Floating-point multiplication is used to do most of the work;
-     * but knowingly multiplying by a subnormal scaling factor is
-     * avoided.  However, the floating-point argument is not examined
-     * to see whether or not it is subnormal since subnormal inputs
-     * are assumed to be rare.  At most three multiplies are needed to
-     * scale from the largest to smallest exponent ranges (scaling
-     * down, at most two multiplies are needed if subnormal scaling
-     * factors are allowed).  However, in this implementation an
-     * expensive integer remainder operation is avoided at the cost of
-     * requiring five floating-point multiplies in the worst case,
-     * which should still be a performance win.
-     *
-     * If scaling of entire arrays is a concern, it would probably be
-     * more efficient to provide a double[] scalb(double[], int)
-     * version of scalb to avoid having to recompute the needed
-     * scaling factors for each floating-point value.
-     */
-
-    /**
-     * Return {@code d} &times;
-     * 2<sup>{@code scale_factor}</sup> rounded as if performed
-     * by a single correctly rounded floating-point multiply to a
-     * member of the double value set.  See section 4.2.3 of
-     * <cite>The Java&trade; Language Specification</cite>
-     * for a discussion of floating-point
-     * value sets.  If the exponent of the result is between the
-     * {@code double}'s minimum exponent and maximum exponent,
-     * the answer is calculated exactly.  If the exponent of the
-     * result would be larger than {@code doubles}'s maximum
-     * exponent, an infinity is returned.  Note that if the result is
-     * subnormal, precision may be lost; that is, when {@code scalb(x,
-     * n)} is subnormal, {@code scalb(scalb(x, n), -n)} may
-     * not equal <i>x</i>.  When the result is non-NaN, the result has
-     * the same sign as {@code d}.
-     *
-     *<p>
-     * Special cases:
-     * <ul>
-     * <li> If the first argument is NaN, NaN is returned.
-     * <li> If the first argument is infinite, then an infinity of the
-     * same sign is returned.
-     * <li> If the first argument is zero, then a zero of the same
-     * sign is returned.
-     * </ul>
-     *
-     * @param d number to be scaled by a power of two.
-     * @param scale_factor power of 2 used to scale {@code d}
-     * @return {@code d * }2<sup>{@code scale_factor}</sup>
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.scalb.
-     */
-    @Deprecated
-    public static double scalb(double d, int scale_factor) {
-        return Math.scalb(d, scale_factor);
-    }
-
-    /**
-     * Return {@code f} &times;
-     * 2<sup>{@code scale_factor}</sup> rounded as if performed
-     * by a single correctly rounded floating-point multiply to a
-     * member of the float value set.  See section 4.2.3 of
-     * <cite>The Java&trade; Language Specification</cite>
-     * for a discussion of floating-point
-     * value sets. If the exponent of the result is between the
-     * {@code float}'s minimum exponent and maximum exponent, the
-     * answer is calculated exactly.  If the exponent of the result
-     * would be larger than {@code float}'s maximum exponent, an
-     * infinity is returned.  Note that if the result is subnormal,
-     * precision may be lost; that is, when {@code scalb(x, n)}
-     * is subnormal, {@code scalb(scalb(x, n), -n)} may not equal
-     * <i>x</i>.  When the result is non-NaN, the result has the same
-     * sign as {@code f}.
-     *
-     *<p>
-     * Special cases:
-     * <ul>
-     * <li> If the first argument is NaN, NaN is returned.
-     * <li> If the first argument is infinite, then an infinity of the
-     * same sign is returned.
-     * <li> If the first argument is zero, then a zero of the same
-     * sign is returned.
-     * </ul>
-     *
-     * @param f number to be scaled by a power of two.
-     * @param scale_factor power of 2 used to scale {@code f}
-     * @return {@code f * }2<sup>{@code scale_factor}</sup>
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.scalb.
-     */
-    @Deprecated
-    public static float scalb(float f, int scale_factor) {
-        return Math.scalb(f, scale_factor);
-    }
-
-    /**
-     * Returns the floating-point number adjacent to the first
-     * argument in the direction of the second argument.  If both
-     * arguments compare as equal the second argument is returned.
-     *
-     * <p>
-     * Special cases:
-     * <ul>
-     * <li> If either argument is a NaN, then NaN is returned.
-     *
-     * <li> If both arguments are signed zeros, {@code direction}
-     * is returned unchanged (as implied by the requirement of
-     * returning the second argument if the arguments compare as
-     * equal).
-     *
-     * <li> If {@code start} is
-     * &plusmn;{@code Double.MIN_VALUE} and {@code direction}
-     * has a value such that the result should have a smaller
-     * magnitude, then a zero with the same sign as {@code start}
-     * is returned.
-     *
-     * <li> If {@code start} is infinite and
-     * {@code direction} has a value such that the result should
-     * have a smaller magnitude, {@code Double.MAX_VALUE} with the
-     * same sign as {@code start} is returned.
-     *
-     * <li> If {@code start} is equal to &plusmn;
-     * {@code Double.MAX_VALUE} and {@code direction} has a
-     * value such that the result should have a larger magnitude, an
-     * infinity with same sign as {@code start} is returned.
-     * </ul>
-     *
-     * @param start     starting floating-point value
-     * @param direction value indicating which of
-     * {@code start}'s neighbors or {@code start} should
-     * be returned
-     * @return The floating-point number adjacent to {@code start} in the
-     * direction of {@code direction}.
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.nextAfter
-     */
-    @Deprecated
-    public static double nextAfter(double start, double direction) {
-        return Math.nextAfter(start, direction);
-    }
-
-    /**
-     * Returns the floating-point number adjacent to the first
-     * argument in the direction of the second argument.  If both
-     * arguments compare as equal, the second argument is returned.
-     *
-     * <p>
-     * Special cases:
-     * <ul>
-     * <li> If either argument is a NaN, then NaN is returned.
-     *
-     * <li> If both arguments are signed zeros, a {@code float}
-     * zero with the same sign as {@code direction} is returned
-     * (as implied by the requirement of returning the second argument
-     * if the arguments compare as equal).
-     *
-     * <li> If {@code start} is
-     * &plusmn;{@code Float.MIN_VALUE} and {@code direction}
-     * has a value such that the result should have a smaller
-     * magnitude, then a zero with the same sign as {@code start}
-     * is returned.
-     *
-     * <li> If {@code start} is infinite and
-     * {@code direction} has a value such that the result should
-     * have a smaller magnitude, {@code Float.MAX_VALUE} with the
-     * same sign as {@code start} is returned.
-     *
-     * <li> If {@code start} is equal to &plusmn;
-     * {@code Float.MAX_VALUE} and {@code direction} has a
-     * value such that the result should have a larger magnitude, an
-     * infinity with same sign as {@code start} is returned.
-     * </ul>
-     *
-     * @param start     starting floating-point value
-     * @param direction value indicating which of
-     * {@code start}'s neighbors or {@code start} should
-     * be returned
-     * @return The floating-point number adjacent to {@code start} in the
-     * direction of {@code direction}.
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.nextAfter.
-     */
-    @Deprecated
-    public static float nextAfter(float start, double direction) {
-        return Math.nextAfter(start, direction);
-    }
-
-    /**
-     * Returns the floating-point value adjacent to {@code d} in
-     * the direction of positive infinity.  This method is
-     * semantically equivalent to {@code nextAfter(d,
-     * Double.POSITIVE_INFINITY)}; however, a {@code nextUp}
-     * implementation may run faster than its equivalent
-     * {@code nextAfter} call.
-     *
-     * <p>Special Cases:
-     * <ul>
-     * <li> If the argument is NaN, the result is NaN.
-     *
-     * <li> If the argument is positive infinity, the result is
-     * positive infinity.
-     *
-     * <li> If the argument is zero, the result is
-     * {@code Double.MIN_VALUE}
-     *
-     * </ul>
-     *
-     * @param d  starting floating-point value
-     * @return The adjacent floating-point value closer to positive
-     * infinity.
-     * @author Joseph D. Darcy
-     * @deprecated use Math.nextUp.
-     */
-    @Deprecated
-    public static double nextUp(double d) {
-        return Math.nextUp(d);
-    }
-
-    /**
-     * Returns the floating-point value adjacent to {@code f} in
-     * the direction of positive infinity.  This method is
-     * semantically equivalent to {@code nextAfter(f,
-     * Double.POSITIVE_INFINITY)}; however, a {@code nextUp}
-     * implementation may run faster than its equivalent
-     * {@code nextAfter} call.
-     *
-     * <p>Special Cases:
-     * <ul>
-     * <li> If the argument is NaN, the result is NaN.
-     *
-     * <li> If the argument is positive infinity, the result is
-     * positive infinity.
-     *
-     * <li> If the argument is zero, the result is
-     * {@code Float.MIN_VALUE}
-     *
-     * </ul>
-     *
-     * @param f  starting floating-point value
-     * @return The adjacent floating-point value closer to positive
-     * infinity.
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.nextUp.
-     */
-    @Deprecated
-    public static float nextUp(float f) {
-        return Math.nextUp(f);
-    }
-
-    /**
-     * Returns the floating-point value adjacent to {@code d} in
-     * the direction of negative infinity.  This method is
-     * semantically equivalent to {@code nextAfter(d,
-     * Double.NEGATIVE_INFINITY)}; however, a
-     * {@code nextDown} implementation may run faster than its
-     * equivalent {@code nextAfter} call.
-     *
-     * <p>Special Cases:
-     * <ul>
-     * <li> If the argument is NaN, the result is NaN.
-     *
-     * <li> If the argument is negative infinity, the result is
-     * negative infinity.
-     *
-     * <li> If the argument is zero, the result is
-     * {@code -Double.MIN_VALUE}
-     *
-     * </ul>
-     *
-     * @param d  starting floating-point value
-     * @return The adjacent floating-point value closer to negative
-     * infinity.
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.nextDown.
-     */
-    @Deprecated
-    public static double nextDown(double d) {
-        return Math.nextDown(d);
-    }
-
-    /**
-     * Returns the floating-point value adjacent to {@code f} in
-     * the direction of negative infinity.  This method is
-     * semantically equivalent to {@code nextAfter(f,
-     * Float.NEGATIVE_INFINITY)}; however, a
-     * {@code nextDown} implementation may run faster than its
-     * equivalent {@code nextAfter} call.
-     *
-     * <p>Special Cases:
-     * <ul>
-     * <li> If the argument is NaN, the result is NaN.
-     *
-     * <li> If the argument is negative infinity, the result is
-     * negative infinity.
-     *
-     * <li> If the argument is zero, the result is
-     * {@code -Float.MIN_VALUE}
-     *
-     * </ul>
-     *
-     * @param f  starting floating-point value
-     * @return The adjacent floating-point value closer to negative
-     * infinity.
-     * @author Joseph D. Darcy
-     * @deprecated Use Math.nextDown.
-     */
-    @Deprecated
-    public static double nextDown(float f) {
-        return Math.nextDown(f);
-    }
-
-    /**
-     * Returns the first floating-point argument with the sign of the
-     * second floating-point argument.  For this method, a NaN
-     * {@code sign} argument is always treated as if it were
-     * positive.
-     *
-     * @param magnitude  the parameter providing the magnitude of the result
-     * @param sign   the parameter providing the sign of the result
-     * @return a value with the magnitude of {@code magnitude}
-     * and the sign of {@code sign}.
-     * @author Joseph D. Darcy
-     * @since 1.5
-     * @deprecated Use StrictMath.copySign.
-     */
-    @Deprecated
-    public static double copySign(double magnitude, double sign) {
-        return StrictMath.copySign(magnitude, sign);
-    }
-
-    /**
-     * Returns the first floating-point argument with the sign of the
-     * second floating-point argument.  For this method, a NaN
-     * {@code sign} argument is always treated as if it were
-     * positive.
-     *
-     * @param magnitude  the parameter providing the magnitude of the result
-     * @param sign   the parameter providing the sign of the result
-     * @return a value with the magnitude of {@code magnitude}
-     * and the sign of {@code sign}.
-     * @author Joseph D. Darcy
-     * @deprecated Use StrictMath.copySign.
-     */
-    @Deprecated
-    public static float copySign(float magnitude, float sign) {
-        return StrictMath.copySign(magnitude, sign);
-    }
-
-    /**
-     * Returns the size of an ulp of the argument.  An ulp of a
-     * {@code double} value is the positive distance between this
-     * floating-point value and the {@code double} value next
-     * larger in magnitude.  Note that for non-NaN <i>x</i>,
-     * <code>ulp(-<i>x</i>) == ulp(<i>x</i>)</code>.
-     *
-     * <p>Special Cases:
-     * <ul>
-     * <li> If the argument is NaN, then the result is NaN.
-     * <li> If the argument is positive or negative infinity, then the
-     * result is positive infinity.
-     * <li> If the argument is positive or negative zero, then the result is
-     * {@code Double.MIN_VALUE}.
-     * <li> If the argument is &plusmn;{@code Double.MAX_VALUE}, then
-     * the result is equal to 2<sup>971</sup>.
-     * </ul>
-     *
-     * @param d the floating-point value whose ulp is to be returned
-     * @return the size of an ulp of the argument
-     * @author Joseph D. Darcy
-     * @since 1.5
-     * @deprecated Use Math.ulp.
-     */
-    @Deprecated
-    public static double ulp(double d) {
-        return Math.ulp(d);
-    }
-
-    /**
-     * Returns the size of an ulp of the argument.  An ulp of a
-     * {@code float} value is the positive distance between this
-     * floating-point value and the {@code float} value next
-     * larger in magnitude.  Note that for non-NaN <i>x</i>,
-     * <code>ulp(-<i>x</i>) == ulp(<i>x</i>)</code>.
-     *
-     * <p>Special Cases:
-     * <ul>
-     * <li> If the argument is NaN, then the result is NaN.
-     * <li> If the argument is positive or negative infinity, then the
-     * result is positive infinity.
-     * <li> If the argument is positive or negative zero, then the result is
-     * {@code Float.MIN_VALUE}.
-     * <li> If the argument is &plusmn;{@code Float.MAX_VALUE}, then
-     * the result is equal to 2<sup>104</sup>.
-     * </ul>
-     *
-     * @param f the floating-point value whose ulp is to be returned
-     * @return the size of an ulp of the argument
-     * @author Joseph D. Darcy
-     * @since 1.5
-     * @deprecated Use Math.ulp.
-     */
-     @Deprecated
-     public static float ulp(float f) {
-        return Math.ulp(f);
-     }
-
-    /**
-     * Returns the signum function of the argument; zero if the argument
-     * is zero, 1.0 if the argument is greater than zero, -1.0 if the
-     * argument is less than zero.
-     *
-     * <p>Special Cases:
-     * <ul>
-     * <li> If the argument is NaN, then the result is NaN.
-     * <li> If the argument is positive zero or negative zero, then the
-     *      result is the same as the argument.
-     * </ul>
-     *
-     * @param d the floating-point value whose signum is to be returned
-     * @return the signum function of the argument
-     * @author Joseph D. Darcy
-     * @since 1.5
-     * @deprecated Use Math.signum.
-     */
-    @Deprecated
-    public static double signum(double d) {
-        return Math.signum(d);
-    }
-
-    /**
-     * Returns the signum function of the argument; zero if the argument
-     * is zero, 1.0f if the argument is greater than zero, -1.0f if the
-     * argument is less than zero.
-     *
-     * <p>Special Cases:
-     * <ul>
-     * <li> If the argument is NaN, then the result is NaN.
-     * <li> If the argument is positive zero or negative zero, then the
-     *      result is the same as the argument.
-     * </ul>
-     *
-     * @param f the floating-point value whose signum is to be returned
-     * @return the signum function of the argument
-     * @author Joseph D. Darcy
-     * @since 1.5
-     * @deprecated Use Math.signum.
-     */
-    @Deprecated
-    public static float signum(float f) {
-        return Math.signum(f);
-    }
-}
--- a/jdk/src/share/classes/sun/misc/Service.java	Wed Jan 29 20:41:33 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,434 +0,0 @@
-/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.TreeSet;
-
-
-/**
- * A simple service-provider lookup mechanism.  A <i>service</i> is a
- * well-known set of interfaces and (usually abstract) classes.  A <i>service
- * provider</i> is a specific implementation of a service.  The classes in a
- * provider typically implement the interfaces and subclass the classes defined
- * in the service itself.  Service providers may be installed in an
- * implementation of the Java platform in the form of extensions, that is, jar
- * files placed into any of the usual extension directories.  Providers may
- * also be made available by adding them to the applet or application class
- * path or by some other platform-specific means.
- *
- * <p> In this lookup mechanism a service is represented by an interface or an
- * abstract class.  (A concrete class may be used, but this is not
- * recommended.)  A provider of a given service contains one or more concrete
- * classes that extend this <i>service class</i> with data and code specific to
- * the provider.  This <i>provider class</i> will typically not be the entire
- * provider itself but rather a proxy that contains enough information to
- * decide whether the provider is able to satisfy a particular request together
- * with code that can create the actual provider on demand.  The details of
- * provider classes tend to be highly service-specific; no single class or
- * interface could possibly unify them, so no such class has been defined.  The
- * only requirement enforced here is that provider classes must have a
- * zero-argument constructor so that they may be instantiated during lookup.
- *
- * <p> A service provider identifies itself by placing a provider-configuration
- * file in the resource directory <tt>META-INF/services</tt>.  The file's name
- * should consist of the fully-qualified name of the abstract service class.
- * The file should contain a list of fully-qualified concrete provider-class
- * names, one per line.  Space and tab characters surrounding each name, as
- * well as blank lines, are ignored.  The comment character is <tt>'#'</tt>
- * (<tt>0x23</tt>); on each line all characters following the first comment
- * character are ignored.  The file must be encoded in UTF-8.
- *
- * <p> If a particular concrete provider class is named in more than one
- * configuration file, or is named in the same configuration file more than
- * once, then the duplicates will be ignored.  The configuration file naming a
- * particular provider need not be in the same jar file or other distribution
- * unit as the provider itself.  The provider must be accessible from the same
- * class loader that was initially queried to locate the configuration file;
- * note that this is not necessarily the class loader that found the file.
- *
- * <p> <b>Example:</b> Suppose we have a service class named
- * <tt>java.io.spi.CharCodec</tt>.  It has two abstract methods:
- *
- * <pre>
- *   public abstract CharEncoder getEncoder(String encodingName);
- *   public abstract CharDecoder getDecoder(String encodingName);
- * </pre>
- *
- * Each method returns an appropriate object or <tt>null</tt> if it cannot
- * translate the given encoding.  Typical <tt>CharCodec</tt> providers will
- * support more than one encoding.
- *
- * <p> If <tt>sun.io.StandardCodec</tt> is a provider of the <tt>CharCodec</tt>
- * service then its jar file would contain the file
- * <tt>META-INF/services/java.io.spi.CharCodec</tt>.  This file would contain
- * the single line:
- *
- * <pre>
- *   sun.io.StandardCodec    # Standard codecs for the platform
- * </pre>
- *
- * To locate an encoder for a given encoding name, the internal I/O code would
- * do something like this:
- *
- * <pre>
- *   CharEncoder getEncoder(String encodingName) {
- *       Iterator ps = Service.providers(CharCodec.class);
- *       while (ps.hasNext()) {
- *           CharCodec cc = (CharCodec)ps.next();
- *           CharEncoder ce = cc.getEncoder(encodingName);
- *           if (ce != null)
- *               return ce;
- *       }
- *       return null;
- *   }
- * </pre>
- *
- * The provider-lookup mechanism always executes in the security context of the
- * caller.  Trusted system code should typically invoke the methods in this
- * class from within a privileged security context.
- *
- * @author Mark Reinhold
- * @since 1.3
- */
-
-public final class Service<S> {
-
-    private static final String prefix = "META-INF/services/";
-
-    private Service() { }
-
-    private static void fail(Class<?> service, String msg, Throwable cause)
-        throws ServiceConfigurationError
-    {
-        ServiceConfigurationError sce
-            = new ServiceConfigurationError(service.getName() + ": " + msg);
-        sce.initCause(cause);
-        throw sce;
-    }
-
-    private static void fail(Class<?> service, String msg)
-        throws ServiceConfigurationError
-    {
-        throw new ServiceConfigurationError(service.getName() + ": " + msg);
-    }
-
-    private static void fail(Class<?> service, URL u, int line, String msg)
-        throws ServiceConfigurationError
-    {
-        fail(service, u + ":" + line + ": " + msg);
-    }
-
-    /**
-     * Parse a single line from the given configuration file, adding the name
-     * on the line to both the names list and the returned set iff the name is
-     * not already a member of the returned set.
-     */
-    private static int parseLine(Class<?> service, URL u, BufferedReader r, int lc,
-                                 List<String> names, Set<String> returned)
-        throws IOException, ServiceConfigurationError
-    {
-        String ln = r.readLine();
-        if (ln == null) {
-            return -1;
-        }
-        int ci = ln.indexOf('#');
-        if (ci >= 0) ln = ln.substring(0, ci);
-        ln = ln.trim();
-        int n = ln.length();
-        if (n != 0) {
-            if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0))
-                fail(service, u, lc, "Illegal configuration-file syntax");
-            int cp = ln.codePointAt(0);
-            if (!Character.isJavaIdentifierStart(cp))
-                fail(service, u, lc, "Illegal provider-class name: " + ln);
-            for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
-                cp = ln.codePointAt(i);
-                if (!Character.isJavaIdentifierPart(cp) && (cp != '.'))
-                    fail(service, u, lc, "Illegal provider-class name: " + ln);
-            }
-            if (!returned.contains(ln)) {
-                names.add(ln);
-                returned.add(ln);
-            }
-        }
-        return lc + 1;
-    }
-
-    /**
-     * Parse the content of the given URL as a provider-configuration file.
-     *
-     * @param  service
-     *         The service class for which providers are being sought;
-     *         used to construct error detail strings
-     *
-     * @param  url
-     *         The URL naming the configuration file to be parsed
-     *
-     * @param  returned
-     *         A Set containing the names of provider classes that have already
-     *         been returned.  This set will be updated to contain the names
-     *         that will be yielded from the returned <tt>Iterator</tt>.
-     *
-     * @return A (possibly empty) <tt>Iterator</tt> that will yield the
-     *         provider-class names in the given configuration file that are
-     *         not yet members of the returned set
-     *
-     * @throws ServiceConfigurationError
-     *         If an I/O error occurs while reading from the given URL, or
-     *         if a configuration-file format error is detected
-     */
-    private static Iterator<String> parse(Class<?> service, URL u, Set<String> returned)
-        throws ServiceConfigurationError
-    {
-        InputStream in = null;
-        BufferedReader r = null;
-        ArrayList<String> names = new ArrayList<>();
-        try {
-            in = u.openStream();
-            r = new BufferedReader(new InputStreamReader(in, "utf-8"));
-            int lc = 1;
-            while ((lc = parseLine(service, u, r, lc, names, returned)) >= 0);
-        } catch (IOException x) {
-            fail(service, ": " + x);
-        } finally {
-            try {
-                if (r != null) r.close();
-                if (in != null) in.close();
-            } catch (IOException y) {
-                fail(service, ": " + y);
-            }
-        }
-        return names.iterator();
-    }
-
-
-    /**
-     * Private inner class implementing fully-lazy provider lookup
-     */
-    private static class LazyIterator<S> implements Iterator<S> {
-
-        Class<S> service;
-        ClassLoader loader;
-        Enumeration<URL> configs = null;
-        Iterator<String> pending = null;
-        Set<String> returned = new TreeSet<>();
-        String nextName = null;
-
-        private LazyIterator(Class<S> service, ClassLoader loader) {
-            this.service = service;
-            this.loader = loader;
-        }
-
-        public boolean hasNext() throws ServiceConfigurationError {
-            if (nextName != null) {
-                return true;
-            }
-            if (configs == null) {
-                try {
-                    String fullName = prefix + service.getName();
-                    if (loader == null)
-                        configs = ClassLoader.getSystemResources(fullName);
-                    else
-                        configs = loader.getResources(fullName);
-                } catch (IOException x) {
-                    fail(service, ": " + x);
-                }
-            }
-            while ((pending == null) || !pending.hasNext()) {
-                if (!configs.hasMoreElements()) {
-                    return false;
-                }
-                pending = parse(service, configs.nextElement(), returned);
-            }
-            nextName = pending.next();
-            return true;
-        }
-
-        public S next() throws ServiceConfigurationError {
-            if (!hasNext()) {
-                throw new NoSuchElementException();
-            }
-            String cn = nextName;
-            nextName = null;
-            Class<?> c = null;
-            try {
-                c = Class.forName(cn, false, loader);
-            } catch (ClassNotFoundException x) {
-                fail(service,
-                     "Provider " + cn + " not found");
-            }
-            if (!service.isAssignableFrom(c)) {
-                fail(service,
-                     "Provider " + cn  + " not a subtype");
-            }
-            try {
-                return service.cast(c.newInstance());
-            } catch (Throwable x) {
-                fail(service,
-                     "Provider " + cn + " could not be instantiated: " + x,
-                     x);
-            }
-            return null;        /* This cannot happen */
-        }
-
-        public void remove() {
-            throw new UnsupportedOperationException();
-        }
-
-    }
-
-
-    /**
-     * Locates and incrementally instantiates the available providers of a
-     * given service using the given class loader.
-     *
-     * <p> This method transforms the name of the given service class into a
-     * provider-configuration filename as described above and then uses the
-     * <tt>getResources</tt> method of the given class loader to find all
-     * available files with that name.  These files are then read and parsed to
-     * produce a list of provider-class names.  The iterator that is returned
-     * uses the given class loader to lookup and then instantiate each element
-     * of the list.
-     *
-     * <p> Because it is possible for extensions to be installed into a running
-     * Java virtual machine, this method may return different results each time
-     * it is invoked. <p>
-     *
-     * @param  service
-     *         The service's abstract service class
-     *
-     * @param  loader
-     *         The class loader to be used to load provider-configuration files
-     *         and instantiate provider classes, or <tt>null</tt> if the system
-     *         class loader (or, failing that the bootstrap class loader) is to
-     *         be used
-     *
-     * @return An <tt>Iterator</tt> that yields provider objects for the given
-     *         service, in some arbitrary order.  The iterator will throw a
-     *         <tt>ServiceConfigurationError</tt> if a provider-configuration
-     *         file violates the specified format or if a provider class cannot
-     *         be found and instantiated.
-     *
-     * @throws ServiceConfigurationError
-     *         If a provider-configuration file violates the specified format
-     *         or names a provider class that cannot be found and instantiated
-     *
-     * @see #providers(java.lang.Class)
-     * @see #installedProviders(java.lang.Class)
-     */
-    public static <S> Iterator<S> providers(Class<S> service, ClassLoader loader)
-        throws ServiceConfigurationError
-    {
-        return new LazyIterator<S>(service, loader);
-    }
-
-
-    /**
-     * Locates and incrementally instantiates the available providers of a
-     * given service using the context class loader.  This convenience method
-     * is equivalent to
-     *
-     * <pre>
-     *   ClassLoader cl = Thread.currentThread().getContextClassLoader();
-     *   return Service.providers(service, cl);
-     * </pre>
-     *
-     * @param  service
-     *         The service's abstract service class
-     *
-     * @return An <tt>Iterator</tt> that yields provider objects for the given
-     *         service, in some arbitrary order.  The iterator will throw a
-     *         <tt>ServiceConfigurationError</tt> if a provider-configuration
-     *         file violates the specified format or if a provider class cannot
-     *         be found and instantiated.
-     *
-     * @throws ServiceConfigurationError
-     *         If a provider-configuration file violates the specified format
-     *         or names a provider class that cannot be found and instantiated
-     *
-     * @see #providers(java.lang.Class, java.lang.ClassLoader)
-     */
-    public static <S> Iterator<S> providers(Class<S> service)
-        throws ServiceConfigurationError
-    {
-        ClassLoader cl = Thread.currentThread().getContextClassLoader();
-        return Service.providers(service, cl);
-    }
-
-
-    /**
-     * Locates and incrementally instantiates the available providers of a
-     * given service using the extension class loader.  This convenience method
-     * simply locates the extension class loader, call it
-     * <tt>extClassLoader</tt>, and then does
-     *
-     * <pre>
-     *   return Service.providers(service, extClassLoader);
-     * </pre>
-     *
-     * If the extension class loader cannot be found then the system class
-     * loader is used; if there is no system class loader then the bootstrap
-     * class loader is used.
-     *
-     * @param  service
-     *         The service's abstract service class
-     *
-     * @return An <tt>Iterator</tt> that yields provider objects for the given
-     *         service, in some arbitrary order.  The iterator will throw a
-     *         <tt>ServiceConfigurationError</tt> if a provider-configuration
-     *         file violates the specified format or if a provider class cannot
-     *         be found and instantiated.
-     *
-     * @throws ServiceConfigurationError
-     *         If a provider-configuration file violates the specified format
-     *         or names a provider class that cannot be found and instantiated
-     *
-     * @see #providers(java.lang.Class, java.lang.ClassLoader)
-     */
-    public static <S> Iterator<S> installedProviders(Class<S> service)
-        throws ServiceConfigurationError
-    {
-        ClassLoader cl = ClassLoader.getSystemClassLoader();
-        ClassLoader prev = null;
-        while (cl != null) {
-            prev = cl;
-            cl = cl.getParent();
-        }
-        return Service.providers(service, prev);
-    }
-
-}
--- a/jdk/src/share/classes/sun/misc/ServiceConfigurationError.java	Wed Jan 29 20:41:33 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.misc;
-
-
-/**
- * Error thrown when something goes wrong while looking up service providers.
- * In particular, this error will be thrown in the following situations:
- *
- *   <ul>
- *   <li> A concrete provider class cannot be found,
- *   <li> A concrete provider class cannot be instantiated,
- *   <li> The format of a provider-configuration file is illegal, or
- *   <li> An IOException occurs while reading a provider-configuration file.
- *   </ul>
- *
- * @author Mark Reinhold
- * @since 1.3
- */
-
-public class ServiceConfigurationError extends Error {
-
-    static final long serialVersionUID = 8769866263384244465L;
-
-    /**
-     * Constructs a new instance with the specified detail string.
-     */
-    public ServiceConfigurationError(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Constructs a new instance that wraps the specified throwable.
-     */
-    public ServiceConfigurationError(Throwable x) {
-        super(x);
-    }
-
-}
--- a/jdk/src/share/classes/sun/misc/VM.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/misc/VM.java	Tue Feb 18 15:48:14 2014 -0800
@@ -367,6 +367,11 @@
      */
     public static native ClassLoader latestUserDefinedLoader();
 
+    /**
+     * Returns {@code true} if we are in a set UID program.
+     */
+    public static native boolean isSetUID();
+
     static {
         initialize();
     }
--- a/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java	Tue Feb 18 15:48:14 2014 -0800
@@ -29,10 +29,20 @@
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.MappedByteBuffer;
-import java.nio.channels.*;
+import java.nio.channels.ClosedByInterruptException;
+import java.nio.channels.ClosedChannelException;
+import java.nio.channels.FileChannel;
+import java.nio.channels.FileLock;
+import java.nio.channels.FileLockInterruptionException;
+import java.nio.channels.NonReadableChannelException;
+import java.nio.channels.NonWritableChannelException;
+import java.nio.channels.OverlappingFileLockException;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.channels.WritableByteChannel;
+import java.security.AccessController;
 import java.util.ArrayList;
 import java.util.List;
-import java.security.AccessController;
+
 import sun.misc.Cleaner;
 import sun.security.action.GetPropertyAction;
 
@@ -56,13 +66,17 @@
     // Required to prevent finalization of creating stream (immutable)
     private final Object parent;
 
+    // The path of the referenced file
+    // (null if the parent stream is created with a file descriptor)
+    private final String path;
+
     // Thread-safe set of IDs of native threads, for signalling
     private final NativeThreadSet threads = new NativeThreadSet(2);
 
     // Lock for operations involving position and size
     private final Object positionLock = new Object();
 
-    private FileChannelImpl(FileDescriptor fd, boolean readable,
+    private FileChannelImpl(FileDescriptor fd, String path, boolean readable,
                             boolean writable, boolean append, Object parent)
     {
         this.fd = fd;
@@ -70,23 +84,24 @@
         this.writable = writable;
         this.append = append;
         this.parent = parent;
+        this.path = path;
         this.nd = new FileDispatcherImpl(append);
     }
 
     // Used by FileInputStream.getChannel() and RandomAccessFile.getChannel()
-    public static FileChannel open(FileDescriptor fd,
+    public static FileChannel open(FileDescriptor fd, String path,
                                    boolean readable, boolean writable,
                                    Object parent)
     {
-        return new FileChannelImpl(fd, readable, writable, false, parent);
+        return new FileChannelImpl(fd, path, readable, writable, false, parent);
     }
 
     // Used by FileOutputStream.getChannel
-    public static FileChannel open(FileDescriptor fd,
+    public static FileChannel open(FileDescriptor fd, String path,
                                    boolean readable, boolean writable,
                                    boolean append, Object parent)
     {
-        return new FileChannelImpl(fd, readable, writable, append, parent);
+        return new FileChannelImpl(fd, path, readable, writable, append, parent);
     }
 
     private void ensureOpen() throws IOException {
--- a/jdk/src/share/classes/sun/nio/ch/Reflect.java	Wed Jan 29 20:41:33 2014 +0100
+++ b/jdk/src/share/classes/sun/nio/ch/Reflect.java	Tue Feb 18 15:48:14 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@
 
     static Method lookupMethod(String className,
                                String methodName,
-                               Class... paramTypes)
+                               Class<?>... paramTypes)
     {
         try {
             Class<?> cl = Class.forName(className);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/nio/cs/StandardCharsets.java.template	Tue Feb 18 15:48:14 2014 -0800
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2000, 2014, 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.
+ *
+ */
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+package sun.nio.cs;
+
+import java.nio.charset.*;
+
+
+public class StandardCharsets
+    extends FastCharsetProvider
+{
+
+    _INCLUDE_ALIASES_TABLES_
+    _INCLUDE_ALIASES_MAP_
+    _INCLUDE_CLASSES_MAP_
+    _INCLUDE_CACHE_MAP_
+
+    public StandardCharsets() {
+        super("sun.nio.cs", new Aliases(), new Classes(), new Cache());
+    }
+
+}
--- a/jdk/src/share/classes/sun/nio/cs/standard-charsets	Wed Jan 29 20:41:33 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +0,0 @@
-#
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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.
-#
-
-# Standard charsets provided by StandardCharsets provider.
-#
-# Note that these "standard" charsets listed here are not
-# necessary to be the "Standard charsets" defined in the
-# specification of java.nio.charset.Charset. Instead these