changeset 32878:8b3f72ecd702

Merge
author lana
date Tue, 06 Oct 2015 08:42:20 -0700
parents eafee466ae14 b22f84a6b9d7
children 7b999f099d87
files jdk/src/java.base/share/classes/sun/misc/JavaAWTAccess.java jdk/src/java.base/share/classes/sun/misc/JavaAWTFontAccess.java jdk/src/java.base/share/classes/sun/misc/JavaBeansAccess.java jdk/src/java.base/share/classes/sun/misc/JavaIOAccess.java jdk/src/java.base/share/classes/sun/misc/JavaIOFileDescriptorAccess.java jdk/src/java.base/share/classes/sun/misc/JavaLangAccess.java jdk/src/java.base/share/classes/sun/misc/JavaLangRefAccess.java jdk/src/java.base/share/classes/sun/misc/JavaNetAccess.java jdk/src/java.base/share/classes/sun/misc/JavaNetHttpCookieAccess.java jdk/src/java.base/share/classes/sun/misc/JavaNetInetAddressAccess.java jdk/src/java.base/share/classes/sun/misc/JavaNioAccess.java jdk/src/java.base/share/classes/sun/misc/JavaSecurityAccess.java jdk/src/java.base/share/classes/sun/misc/JavaSecurityProtectionDomainAccess.java jdk/src/java.base/share/classes/sun/misc/JavaUtilJarAccess.java jdk/src/java.base/share/classes/sun/misc/JavaUtilZipFileAccess.java jdk/src/java.base/share/classes/sun/misc/SharedSecrets.java jdk/test/sun/misc/JavaLangAccess/FormatUnsigned.java jdk/test/sun/misc/JavaLangAccess/NewUnsafeString.java
diffstat 581 files changed, 6337 insertions(+), 3596 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/make/data/fontconfig/windows.fontconfig.properties	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/data/fontconfig/windows.fontconfig.properties	Tue Oct 06 08:42:20 2015 -0700
@@ -40,6 +40,7 @@
 allfonts.dingbats=Wingdings
 allfonts.lucida=Lucida Sans Regular
 allfonts.symbol=Symbol
+allfonts.symbols=Segoe UI Symbol
 allfonts.thai=Lucida Sans Regular
 allfonts.georgian=Sylfaen
 
@@ -236,7 +237,7 @@
 
 sequence.allfonts.x-windows-874=alphabetic,thai,dingbats,symbol
 
-sequence.fallback=lucida,\
+sequence.fallback=lucida,symbols,\
                   chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\
                   japanese,korean,chinese-ms950-extb,chinese-ms936-extb,georgian
 
@@ -298,3 +299,4 @@
 filename.Wingdings=WINGDING.TTF
 
 filename.Sylfaen=sylfaen.ttf
+filename.Segoe_UI_Symbol=SEGUISYM.TTF
--- a/jdk/make/data/tzdata/VERSION	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/data/tzdata/VERSION	Tue Oct 06 08:42:20 2015 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2015f
+tzdata2015g
--- a/jdk/make/data/tzdata/asia	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/data/tzdata/asia	Tue Oct 06 08:42:20 2015 -0700
@@ -154,7 +154,8 @@
 # Azerbaijan
 # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):
 # According to the resolution of Cabinet of Ministers, 1997
-# Resolution available at: http://aif.az/docs/daylight_res.pdf
+# From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17).
+# http://code.az/files/daylight_res.pdf
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Azer	1997	max	-	Mar	lastSun	 4:00	1:00	S
 Rule	Azer	1997	max	-	Oct	lastSun	 5:00	0	-
@@ -1740,11 +1741,12 @@
 # the 8:30 time zone on August 15, one example:
 # http://www.bbc.com/news/world-asia-33815049
 #
-# From Paul Eggert (2015-08-07):
-# No transition time is specified; assume 00:00.
+# From Paul Eggert (2015-08-15):
+# Bells rang out midnight (00:00) Friday as part of the celebrations.  See:
+# Talmadge E. North Korea celebrates new time zone, 'Pyongyang Time'
+# http://news.yahoo.com/north-korea-celebrates-time-zone-pyongyang-time-164038128.html
 # There is no common English-language abbreviation for this time zone.
-# Use %z rather than invent one.  We can't assume %z works everywhere yet,
-# so for now substitute its output manually.
+# Use KST, as that's what we already use for 1954-1961 in ROK.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Seoul	8:27:52	-	LMT	1908 Apr  1
@@ -1758,7 +1760,7 @@
 			8:30	-	KST	1912 Jan  1
 			9:00	-	JCST	1937 Oct  1
 			9:00	-	JST	1945 Aug 24
-			9:00	-	KST	2015 Aug 15
+			9:00	-	KST	2015 Aug 15 00:00
 			8:30	-	KST
 
 ###############################################################################
--- a/jdk/make/data/tzdata/australasia	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/data/tzdata/australasia	Tue Oct 06 08:42:20 2015 -0700
@@ -358,10 +358,17 @@
 # DST will start Nov. 2 this year.
 # http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx
 
-# From Paul Eggert (2014-10-20):
+# From a government order dated 2015-08-26 and published as Legal Notice No. 77
+# in the Government of Fiji Gazette Supplement No. 24 (2015-08-28),
+# via Ken Rylander (2015-09-02):
+# the daylight saving period is 1 hour in advance of the standard time
+# commencing at 2.00 am on Sunday 1st November, 2015 and ending at
+# 3.00 am on Sunday 17th January, 2016.
+
+# From Paul Eggert (2015-09-01):
 # For now, guess DST from 02:00 the first Sunday in November to
-# 03:00 the first Sunday on or after January 18.  Although ad hoc, it
-# matches this year's plan and seems more likely to match future
+# 03:00 the third Sunday in January.  Although ad hoc, it matches
+# transitions since late 2014 and seems more likely to match future
 # practice than guessing no DST.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -374,7 +381,7 @@
 Rule	Fiji	2012	2013	-	Jan	Sun>=18	3:00	0	-
 Rule	Fiji	2014	only	-	Jan	Sun>=18	2:00	0	-
 Rule	Fiji	2014	max	-	Nov	Sun>=1	2:00	1:00	S
-Rule	Fiji	2015	max	-	Jan	Sun>=18	3:00	0	-
+Rule	Fiji	2015	max	-	Jan	Sun>=15	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:55:44 -	LMT	1915 Oct 26 # Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -533,7 +540,10 @@
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Norfolk	11:11:52 -	LMT	1901 # Kingston
 			11:12	-	NMT	1951 # Norfolk Mean Time
-			11:30	-	NFT	# Norfolk Time
+			11:30	-	NFT	1974 Oct 27 02:00 # Norfolk T.
+			11:30	1:00	NFST	1975 Mar  2 02:00
+			11:30	-	NFT	2015 Oct  4 02:00
+			11:00	-	NFT
 
 # Palau (Belau)
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1573,6 +1583,20 @@
 # started DST on June 3.  Possibly DST was observed other years
 # in Midway, but we have no record of it.
 
+# Norfolk
+
+# From Alexander Krivenyshev (2015-09-23):
+# Norfolk Island will change ... from +1130 to +1100:
+# https://www.comlaw.gov.au/Details/F2015L01483/Explanatory%20Statement/Text
+# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015.
+# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf
+
+# From Paul Eggert (2015-09-23):
+# Transitions before 2015 are from timeanddate.com, which consulted
+# the Norfolk Island Museum and the Australian Bureau of Meteorology's
+# Norfolk Island station, and found no record of Norfolk observing DST
+# other than in 1974/5.  See:
+# http://www.timeanddate.com/time/australia/norfolk-island.html
 
 # Pitcairn
 
--- a/jdk/make/data/tzdata/europe	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/data/tzdata/europe	Tue Oct 06 08:42:20 2015 -0700
@@ -3173,6 +3173,11 @@
 # http://www.balkaneu.com/eventful-elections-turkey/ 2014-03-30.
 # I guess the best we can do is document the official time.
 
+# From Fatih (2015-09-29):
+# It's officially announced now by the Ministry of Energy.
+# Turkey delays winter time to 8th of November 04:00
+# http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Turkey	1916	only	-	May	 1	0:00	1:00	S
 Rule	Turkey	1916	only	-	Oct	 1	0:00	0	-
@@ -3242,6 +3247,8 @@
 			2:00	-	EET	2011 Mar 28  1:00u
 			2:00	EU	EE%sT	2014 Mar 30  1:00u
 			2:00	-	EET	2014 Mar 31  1:00u
+			2:00	EU	EE%sT	2015 Oct 25  1:00u
+			2:00	1:00	EEST	2015 Nov  8  1:00u
 			2:00	EU	EE%sT
 Link	Europe/Istanbul	Asia/Istanbul	# Istanbul is in both continents.
 
--- a/jdk/make/data/tzdata/northamerica	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/data/tzdata/northamerica	Tue Oct 06 08:42:20 2015 -0700
@@ -1849,6 +1849,22 @@
 
 # The transition dates (and times) are guesses.
 
+# From Matt Johnson (2015-09-21):
+# Fort Nelson, BC, Canada will cancel DST this year.  So while previously they
+# were aligned with America/Vancouver, they're now aligned with
+# America/Dawson_Creek.
+# http://www.northernrockies.ca/EN/meta/news/archives/2015/northern-rockies-time-change.html
+#
+# From Tim Parenti (2015-09-23):
+# This requires a new zone for the Northern Rockies Regional Municipality,
+# America/Fort_Nelson.  The resolution of 2014-12-08 was reached following a
+# 2014-11-15 poll with nearly 75% support.  Effectively, the municipality has
+# been on MST (-0700) like Dawson Creek since it advanced its clocks on
+# 2015-03-08.
+#
+# From Paul Eggert (2015-09-23):
+# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Vanc	1918	only	-	Apr	14	2:00	1:00	D
 Rule	Vanc	1918	only	-	Oct	27	2:00	0	S
@@ -1867,6 +1883,12 @@
 			-8:00	Canada	P%sT	1947
 			-8:00	Vanc	P%sT	1972 Aug 30  2:00
 			-7:00	-	MST
+Zone America/Fort_Nelson	-8:10:47 -	LMT	1884
+			-8:00	Vanc	P%sT	1946
+			-8:00	-	PST	1947
+			-8:00	Vanc	P%sT	1987
+			-8:00	Canada	P%sT	2015 Mar  8  2:00
+			-7:00	-	MST
 Zone America/Creston	-7:46:04 -	LMT	1884
 			-7:00	-	MST	1916 Oct 1
 			-8:00	-	PST	1918 Jun 2
--- a/jdk/make/data/tzdata/zone.tab	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/data/tzdata/zone.tab	Tue Oct 06 08:42:20 2015 -0700
@@ -152,6 +152,7 @@
 CA	+682059-1334300	America/Inuvik	Mountain Time - west Northwest Territories
 CA	+4906-11631	America/Creston	Mountain Standard Time - Creston, British Columbia
 CA	+5946-12014	America/Dawson_Creek	Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
+CA	+5848-12242	America/Fort_Nelson	Mountain Standard Time - Fort Nelson, British Columbia
 CA	+4916-12307	America/Vancouver	Pacific Time - west British Columbia
 CA	+6043-13503	America/Whitehorse	Pacific Time - south Yukon
 CA	+6404-13925	America/Dawson	Pacific Time - north Yukon
--- a/jdk/make/gensrc/GensrcProperties.gmk	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/gensrc/GensrcProperties.gmk	Tue Oct 06 08:42:20 2015 -0700
@@ -93,8 +93,7 @@
   $$($1_TARGET): $$($1_SRCS) $$($1_JAVAS) $(BUILD_TOOLS_JDK)
 	$(MKDIR) -p $$(@D) $$($1_DIRS)
 	$(ECHO) Compiling $$(words $$($1_SRCS)) properties into resource bundles for $(MODULE)
-	$(RM) $$($1_CMDLINE_FILE)
-	$$(call ListPathsSafely,$1_CMDLINE,\n, >> $$($1_CMDLINE_FILE))
+	$$(eval $$(call ListPathsSafely, $1_CMDLINE, $$($1_CMDLINE_FILE)))
 	$(TOOL_COMPILEPROPERTIES) -quiet @$$($1_CMDLINE_FILE)
 	$(TOUCH) $$@
 
--- a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.shell.gmk	Tue Oct 06 08:42:20 2015 -0700
@@ -26,5 +26,6 @@
 include LauncherCommon.gmk
 
 $(eval $(call SetupLauncher,jjs, \
+    -DENABLE_ARG_FILES \
     -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.jjs.Main"$(COMMA) }'))
 
--- a/jdk/make/lib/Awt2dLibraries.gmk	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Tue Oct 06 08:42:20 2015 -0700
@@ -959,10 +959,9 @@
           $(X_CFLAGS) \
           $(X_LIBS) \
           $(LIBAWT_LWAWT_CFLAGS), \
-      DISABLED_WARNINGS_clang := incomplete-implementation \
+      DISABLED_WARNINGS_clang := incomplete-implementation enum-conversion \
           deprecated-declarations objc-method-access bitwise-op-parentheses \
           incompatible-pointer-types parentheses-equality extra-tokens, \
-      WARNINGS_AS_ERRORS_clang := false, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN) \
           -L$(INSTALL_LIBRARIES_HERE), \
--- a/jdk/make/lib/CoreLibraries.gmk	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/lib/CoreLibraries.gmk	Tue Oct 06 08:42:20 2015 -0700
@@ -160,6 +160,7 @@
         -framework Security -framework SystemConfiguration, \
     LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \
         -export:getLastErrorString \
+        -export:getErrorString \
         jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
         shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
         advapi32.lib version.lib, \
--- a/jdk/make/mapfiles/libjava/mapfile-vers	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/mapfiles/libjava/mapfile-vers	Tue Oct 06 08:42:20 2015 -0700
@@ -282,8 +282,9 @@
 
                 # ZipFile.c needs this one
 		throwFileNotFoundException;
-                # zip_util.c needs this one
+                # zip_util.c needs these
 		getLastErrorString;
+		getErrorString;
 
 	# Outcalls from libjvm done using dlsym().
 
--- a/jdk/make/rmic/RmicCommon.gmk	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/make/rmic/RmicCommon.gmk	Tue Oct 06 08:42:20 2015 -0700
@@ -31,9 +31,9 @@
 
 ##########################################################################################
 
-BTRMIC_CP := $(call PathList, $(INTERIM_CORBA_JAR) \
+BTRMIC_CP := $(call PathList, \
     $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_classes $(INTERIM_LANGTOOLS_JAR))
-BTRMIC_ARGS := -Xbootclasspath/p:$(BTRMIC_CP) -cp $(BTRMIC_CP)
+BTRMIC_ARGS := -cp $(BTRMIC_CP)
 RMIC := $(JAVA) $(BTRMIC_ARGS) sun.rmi.rmic.Main
 
 CLASSES_DIR := $(JDK_OUTPUTDIR)/modules
--- a/jdk/src/demo/share/applets/MoleculeViewer/XYZApp.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/demo/share/applets/MoleculeViewer/XYZApp.java	Tue Oct 06 08:42:20 2015 -0700
@@ -504,11 +504,11 @@
 
     private static Applet applet;
     private static byte[] data;
-    private final static int R = 40;
-    private final static int hx = 15;
-    private final static int hy = 15;
-    private final static int bgGrey = 192;
-    private final static int nBalls = 16;
+    private static final int R = 40;
+    private static final int hx = 15;
+    private static final int hy = 15;
+    private static final int bgGrey = 192;
+    private static final int nBalls = 16;
     private static int maxr;
     private int Rl;
     private int Gl;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java	Tue Oct 06 08:42:20 2015 -0700
@@ -771,7 +771,7 @@
         }
     }
 
-    private static abstract class ImageOpTests extends ImageTests {
+    private abstract static class ImageOpTests extends ImageTests {
         ImageOpTests(Group parent, String nodeName, String desc) {
             super(parent, nodeName, desc,
                   new Modifier.Filter() {
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/PixelTests.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/PixelTests.java	Tue Oct 06 08:42:20 2015 -0700
@@ -245,7 +245,7 @@
         }
     }
 
-    public static abstract class BufImgTest extends PixelTests {
+    public abstract static class BufImgTest extends PixelTests {
         public BufImgTest(String nodeName, String description) {
             super(bufimgtestroot, nodeName, description);
         }
@@ -281,7 +281,7 @@
         }
     }
 
-    public static abstract class RasTest extends PixelTests {
+    public abstract static class RasTest extends PixelTests {
         public RasTest(String nodeName, String description) {
             super(rastertestroot, nodeName, description);
         }
@@ -355,7 +355,7 @@
         }
     }
 
-    public static abstract class DataBufTest extends PixelTests {
+    public abstract static class DataBufTest extends PixelTests {
         public DataBufTest(String nodeName, String description) {
             super(dbtestroot, nodeName, description);
         }
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/InputTests.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/InputTests.java	Tue Oct 06 08:42:20 2015 -0700
@@ -161,7 +161,7 @@
         }
     }
 
-    protected static abstract class Context {
+    protected abstract static class Context {
         int size;
         Object input;
         int inputType;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/OutputTests.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/OutputTests.java	Tue Oct 06 08:42:20 2015 -0700
@@ -156,7 +156,7 @@
         }
     }
 
-    protected static abstract class Context {
+    protected abstract static class Context {
         int size;
         Object output;
         int outputType;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/text/TextMeasureTests.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/text/TextMeasureTests.java	Tue Oct 06 08:42:20 2015 -0700
@@ -232,7 +232,7 @@
         }
     }
 
-    public static abstract class GVMeasureTest extends TextMeasureTests {
+    public abstract static class GVMeasureTest extends TextMeasureTests {
         protected GVMeasureTest(Group parent, String nodeName, String description) {
             super(parent, nodeName, description);
         }
@@ -431,7 +431,7 @@
         }
     }
 
-    public static abstract class TLMeasureTest extends TextMeasureTests {
+    public abstract static class TLMeasureTest extends TextMeasureTests {
         protected TLMeasureTest(Group parent, String nodeName, String description) {
             super(parent, nodeName, description);
         }
@@ -506,7 +506,7 @@
         }
     }
 
-    public static abstract class TLExtendedMeasureTest extends TLMeasureTest {
+    public abstract static class TLExtendedMeasureTest extends TLMeasureTest {
         protected TLExtendedMeasureTest(Group parent, String nodeName, String description) {
             super(parent, nodeName, description);
         }
--- a/jdk/src/demo/share/jfc/FileChooserDemo/FileChooserDemo.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/demo/share/jfc/FileChooserDemo/FileChooserDemo.java	Tue Oct 06 08:42:20 2015 -0700
@@ -143,11 +143,11 @@
     private JTextField customField;
     private final ExampleFileView fileView;
     private final ExampleFileSystemView fileSystemView;
-    private final static Dimension hpad10 = new Dimension(10, 1);
-    private final static Dimension vpad20 = new Dimension(1, 20);
-    private final static Dimension vpad7 = new Dimension(1, 7);
-    private final static Dimension vpad4 = new Dimension(1, 4);
-    private final static Insets insets = new Insets(5, 10, 0, 10);
+    private static final Dimension hpad10 = new Dimension(10, 1);
+    private static final Dimension vpad20 = new Dimension(1, 20);
+    private static final Dimension vpad7 = new Dimension(1, 7);
+    private static final Dimension vpad4 = new Dimension(1, 4);
+    private static final Insets insets = new Insets(5, 10, 0, 10);
     private final FilePreviewer previewer;
     private final JFileChooser chooser;
 
--- a/jdk/src/demo/share/jfc/Notepad/Notepad.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/demo/share/jfc/Notepad/Notepad.java	Tue Oct 06 08:42:20 2015 -0700
@@ -64,7 +64,7 @@
 
     protected static Properties properties;
     private static ResourceBundle resources;
-    private final static String EXIT_AFTER_PAINT = "-exit";
+    private static final String EXIT_AFTER_PAINT = "-exit";
     private static boolean exitAfterFirstPaint;
 
     private static final String[] MENUBAR_KEYS = {"file", "edit", "debug"};
--- a/jdk/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,9 +65,23 @@
         long pipeFds = IOUtil.makePipe(false);
         fd0 = (int) (pipeFds >>> 32);
         fd1 = (int) pipeFds;
-        pollWrapper = new EPollArrayWrapper();
-        pollWrapper.initInterrupt(fd0, fd1);
-        fdToKey = new HashMap<>();
+        try {
+            pollWrapper = new EPollArrayWrapper();
+            pollWrapper.initInterrupt(fd0, fd1);
+            fdToKey = new HashMap<>();
+        } catch (Throwable t) {
+            try {
+                FileDispatcherImpl.closeIntFD(fd0);
+            } catch (IOException ioe0) {
+                t.addSuppressed(ioe0);
+            }
+            try {
+                FileDispatcherImpl.closeIntFD(fd1);
+            } catch (IOException ioe1) {
+                t.addSuppressed(ioe1);
+            }
+            throw t;
+        }
     }
 
     protected int doSelect(long timeout) throws IOException {
--- a/jdk/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -84,10 +84,24 @@
         long fds = IOUtil.makePipe(false);
         fd0 = (int)(fds >>> 32);
         fd1 = (int)fds;
-        kqueueWrapper = new KQueueArrayWrapper();
-        kqueueWrapper.initInterrupt(fd0, fd1);
-        fdMap = new HashMap<>();
-        totalChannels = 1;
+        try {
+            kqueueWrapper = new KQueueArrayWrapper();
+            kqueueWrapper.initInterrupt(fd0, fd1);
+            fdMap = new HashMap<>();
+            totalChannels = 1;
+        } catch (Throwable t) {
+            try {
+                FileDispatcherImpl.closeIntFD(fd0);
+            } catch (IOException ioe0) {
+                t.addSuppressed(ioe0);
+            }
+            try {
+                FileDispatcherImpl.closeIntFD(fd1);
+            } catch (IOException ioe1) {
+                t.addSuppressed(ioe1);
+            }
+            throw t;
+        }
     }
 
 
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PackerImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PackerImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.time.ZoneOffset;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -41,7 +42,6 @@
 import java.util.ListIterator;
 import java.util.Map;
 import java.util.SortedMap;
-import java.util.TimeZone;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.jar.JarInputStream;
@@ -84,13 +84,8 @@
      */
     public synchronized void pack(JarFile in, OutputStream out) throws IOException {
         assert(Utils.currentInstance.get() == null);
-        TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
-                      ? null
-                      : TimeZone.getDefault();
         try {
             Utils.currentInstance.set(this);
-            if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
-
             if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
                 Utils.copyJarFile(in, out);
             } else {
@@ -98,7 +93,6 @@
             }
         } finally {
             Utils.currentInstance.set(null);
-            if (tz != null) TimeZone.setDefault(tz);
             in.close();
         }
     }
@@ -119,11 +113,8 @@
      */
     public synchronized void pack(JarInputStream in, OutputStream out) throws IOException {
         assert(Utils.currentInstance.get() == null);
-        TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE)) ? null :
-            TimeZone.getDefault();
         try {
             Utils.currentInstance.set(this);
-            if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
             if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
                 Utils.copyJarFile(in, out);
             } else {
@@ -131,7 +122,6 @@
             }
         } finally {
             Utils.currentInstance.set(null);
-            if (tz != null) TimeZone.setDefault(tz);
             in.close();
         }
     }
@@ -327,7 +317,9 @@
                 this.f = null;
                 this.jf = jf;
                 this.je = je;
-                int timeSecs = getModtime(je.getTime());
+                int timeSecs = (int) je.getTimeLocal()
+                        .atOffset(ZoneOffset.UTC)
+                        .toEpochSecond();
                 if (keepModtime && timeSecs != Constants.NO_MODTIME) {
                      this.modtime = timeSecs;
                 } else if (latestModtime && timeSecs > pkg.default_modtime) {
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,10 +69,6 @@
         props.put(Utils.DEBUG_VERBOSE,
                   String.valueOf(Integer.getInteger(Utils.DEBUG_VERBOSE,0)));
 
-        // Set the PACK_TIMEZONE_NO_UTC
-        props.put(Utils.PACK_DEFAULT_TIMEZONE,
-                  String.valueOf(Boolean.getBoolean(Utils.PACK_DEFAULT_TIMEZONE)));
-
         // The segment size is unlimited
         props.put(Pack200.Packer.SEGMENT_LIMIT, "-1");
 
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/UnpackerImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,10 +32,11 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.SortedMap;
-import java.util.TimeZone;
 import java.util.jar.JarEntry;
 import java.util.jar.JarInputStream;
 import java.util.jar.JarOutputStream;
@@ -95,13 +96,9 @@
             throw new NullPointerException("null output");
         }
         assert(Utils.currentInstance.get() == null);
-        TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
-                      ? null
-                      : TimeZone.getDefault();
 
         try {
             Utils.currentInstance.set(this);
-            if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
             final int verbose = props.getInteger(Utils.DEBUG_VERBOSE);
             BufferedInputStream in0 = new BufferedInputStream(in);
             if (Utils.isJarMagic(Utils.readMagic(in0))) {
@@ -125,7 +122,6 @@
         } finally {
             _nunp = null;
             Utils.currentInstance.set(null);
-            if (tz != null) TimeZone.setDefault(tz);
         }
     }
 
@@ -246,9 +242,9 @@
                     je.setCrc(crc.getValue());
                 }
                 if (keepModtime) {
-                    je.setTime(file.modtime);
-                    // Convert back to milliseconds
-                    je.setTime((long)file.modtime * 1000);
+                    LocalDateTime ldt = LocalDateTime
+                            .ofEpochSecond(file.modtime, 0, ZoneOffset.UTC);
+                    je.setTimeLocal(ldt);
                 } else {
                     je.setTime((long)modtime * 1000);
                 }
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/Utils.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/Utils.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -62,13 +62,6 @@
     static final String DEBUG_DISABLE_NATIVE = COM_PREFIX+"disable.native";
 
     /*
-     * Use the default working TimeZone instead of UTC.
-     * Note: This has installer unpacker implications.
-     * see: zip.cpp which uses gmtime vs. localtime.
-     */
-    static final String PACK_DEFAULT_TIMEZONE = COM_PREFIX+"default.timezone";
-
-    /*
      * Property indicating that the unpacker should
      * ignore the transmitted PACK_MODIFICATION_TIME,
      * replacing it by the given value. The value can
--- a/jdk/src/java.base/share/classes/com/sun/security/ntlm/NTLM.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/security/ntlm/NTLM.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,9 @@
     private final Mac hmac;
     private final MessageDigest md5;
     private static final boolean DEBUG =
-            System.getProperty("ntlm.debug") != null;
+            java.security.AccessController.doPrivileged(
+                    new sun.security.action.GetBooleanAction("ntlm.debug"))
+                        .booleanValue();
 
     final Version v;
 
--- a/jdk/src/java.base/share/classes/java/io/Console.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/Console.java	Tue Oct 06 08:42:20 2015 -0700
@@ -27,6 +27,8 @@
 
 import java.util.*;
 import java.nio.charset.Charset;
+import jdk.internal.misc.JavaIOAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.nio.cs.StreamDecoder;
 import sun.nio.cs.StreamEncoder;
 
@@ -519,7 +521,7 @@
         try {
             // Add a shutdown hook to restore console's echo state should
             // it be necessary.
-            sun.misc.SharedSecrets.getJavaLangAccess()
+            SharedSecrets.getJavaLangAccess()
                 .registerShutdownHook(0 /* shutdown hook invocation order */,
                     false /* only register if shutdown is not in progress */,
                     new Runnable() {
@@ -536,7 +538,7 @@
             // by a shutdown hook
         }
 
-        sun.misc.SharedSecrets.setJavaIOAccess(new sun.misc.JavaIOAccess() {
+        SharedSecrets.setJavaIOAccess(new JavaIOAccess() {
             public Console console() {
                 if (istty()) {
                     if (cons == null)
--- a/jdk/src/java.base/share/classes/java/io/DeleteOnExitHook.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/DeleteOnExitHook.java	Tue Oct 06 08:42:20 2015 -0700
@@ -26,6 +26,7 @@
 
 import java.util.*;
 import java.io.File;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * This class holds a set of filenames to be deleted on VM exit through a shutdown hook.
@@ -41,7 +42,7 @@
         // delete on exit list and cause the DeleteOnExitHook to be
         // registered during shutdown in progress. So set the
         // registerShutdownInProgress parameter to true.
-        sun.misc.SharedSecrets.getJavaLangAccess()
+        SharedSecrets.getJavaLangAccess()
             .registerShutdownHook(2 /* Shutdown hook invocation order */,
                 true /* register even if shutdown in progress */,
                 new Runnable() {
--- a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java	Tue Oct 06 08:42:20 2015 -0700
@@ -27,8 +27,8 @@
 
 import java.nio.channels.FileChannel;
 import java.util.concurrent.atomic.AtomicBoolean;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 import sun.nio.ch.FileChannelImpl;
 
 
--- a/jdk/src/java.base/share/classes/java/lang/FdLibm.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/FdLibm.java	Tue Oct 06 08:42:20 2015 -0700
@@ -352,15 +352,15 @@
 
             double p_h, p_l, t1, t2;
             // |y| is huge
-            if (y_abs > 0x1.0p31) { // if |y| > 2**31
+            if (y_abs > 0x1.00000_ffff_ffffp31) { // if |y| > ~2**31
                 final double INV_LN2   =  0x1.7154_7652_b82fep0;   //  1.44269504088896338700e+00 = 1/ln2
                 final double INV_LN2_H =  0x1.715476p0;            //  1.44269502162933349609e+00 = 24 bits of 1/ln2
                 final double INV_LN2_L =  0x1.4ae0_bf85_ddf44p-26; //  1.92596299112661746887e-08 = 1/ln2 tail
 
                 // Over/underflow if x is not close to one
-                if (x_abs < 0x1.fffffp-1) // |x| < 0.9999995231628418
+                if (x_abs < 0x1.fffff_0000_0000p-1) // |x| < ~0.9999995231628418
                     return (y < 0.0) ? s * INFINITY : s * 0.0;
-                if (x_abs > 1.0)         // |x| > 1.0
+                if (x_abs > 0x1.00000_ffff_ffffp0)         // |x| > ~1.0
                     return (y > 0.0) ? s * INFINITY : s * 0.0;
                 /*
                  * now |1-x| is tiny <= 2**-20, sufficient to compute
--- a/jdk/src/java.base/share/classes/java/lang/System.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/System.java	Tue Oct 06 08:42:20 2015 -0700
@@ -43,6 +43,8 @@
 import sun.security.util.SecurityConstants;
 import sun.reflect.annotation.AnnotationType;
 import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.misc.JavaLangAccess;;
+import jdk.internal.misc.SharedSecrets;;
 
 /**
  * The <code>System</code> class contains several useful class fields
@@ -212,7 +214,7 @@
      public static Console console() {
          if (cons == null) {
              synchronized (System.class) {
-                 cons = sun.misc.SharedSecrets.getJavaIOAccess().console();
+                 cons = SharedSecrets.getJavaIOAccess().console();
              }
          }
          return cons;
@@ -1216,7 +1218,7 @@
 
     private static void setJavaLangAccess() {
         // Allow privileged classes outside of java.lang
-        sun.misc.SharedSecrets.setJavaLangAccess(new sun.misc.JavaLangAccess(){
+        SharedSecrets.setJavaLangAccess(new JavaLangAccess(){
             public sun.reflect.ConstantPool getConstantPool(Class<?> klass) {
                 return klass.getConstantPool();
             }
--- a/jdk/src/java.base/share/classes/java/lang/Thread.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Thread.java	Tue Oct 06 08:42:20 2015 -0700
@@ -233,7 +233,8 @@
     private volatile Interruptible blocker;
     private final Object blockerLock = new Object();
 
-    /* Set the blocker field; invoked via sun.misc.SharedSecrets from java.nio code
+    /* Set the blocker field; invoked via jdk.internal.misc.SharedSecrets
+     * from java.nio code
      */
     void blockedOn(Interruptible b) {
         synchronized (blockerLock) {
--- a/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java	Tue Oct 06 08:42:20 2015 -0700
@@ -27,9 +27,9 @@
 
 import java.security.PrivilegedAction;
 import java.security.AccessController;
-import sun.misc.JavaLangAccess;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.ManagedLocalsThread;
-import sun.misc.SharedSecrets;
 import sun.misc.VM;
 
 final class Finalizer extends FinalReference<Object> { /* Package-private; must be in
--- a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java	Tue Oct 06 08:42:20 2015 -0700
@@ -26,10 +26,10 @@
 package java.lang.ref;
 
 import sun.misc.Cleaner;
-import sun.misc.JavaLangRefAccess;
+import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.misc.JavaLangRefAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.ManagedLocalsThread;
-import sun.misc.SharedSecrets;
-import jdk.internal.HotSpotIntrinsicCandidate;
 
 /**
  * Abstract base class for reference objects.  This class defines the
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Tue Oct 06 08:42:20 2015 -0700
@@ -25,6 +25,7 @@
 
 package java.lang.reflect;
 
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.CallerSensitive;
 import sun.reflect.ConstructorAccessor;
 import sun.reflect.Reflection;
@@ -582,7 +583,7 @@
 
         // A Constructor for an inner class
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                     getConstantPool(thisDeclClass),
                 this,
                 thisDeclClass,
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java	Tue Oct 06 08:42:20 2015 -0700
@@ -28,6 +28,8 @@
 import java.lang.annotation.*;
 import java.util.Map;
 import java.util.Objects;
+
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.annotation.AnnotationParser;
 import sun.reflect.annotation.AnnotationSupport;
 import sun.reflect.annotation.TypeAnnotationParser;
@@ -79,7 +81,7 @@
     Annotation[][] parseParameterAnnotations(byte[] parameterAnnotations) {
         return AnnotationParser.parseParameterAnnotations(
                parameterAnnotations,
-               sun.misc.SharedSecrets.getJavaLangAccess().
+               SharedSecrets.getJavaLangAccess().
                getConstantPool(getDeclaringClass()),
                getDeclaringClass());
     }
@@ -601,7 +603,7 @@
                     } else {
                         declAnnos = AnnotationParser.parseAnnotations(
                                 getAnnotationBytes(),
-                                sun.misc.SharedSecrets.getJavaLangAccess().
+                                SharedSecrets.getJavaLangAccess().
                                         getConstantPool(getDeclaringClass()),
                                 getDeclaringClass()
                         );
@@ -638,7 +640,7 @@
      */
     AnnotatedType getAnnotatedReturnType0(Type returnType) {
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
                 getDeclaringClass(),
@@ -672,7 +674,7 @@
         if (Modifier.isStatic(this.getModifiers()))
             return null;
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
                 getDeclaringClass(),
@@ -696,7 +698,7 @@
      */
     public AnnotatedType[] getAnnotatedParameterTypes() {
         return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
                 getDeclaringClass(),
@@ -720,7 +722,7 @@
      */
     public AnnotatedType[] getAnnotatedExceptionTypes() {
         return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
-                sun.misc.SharedSecrets.getJavaLangAccess().
+                SharedSecrets.getJavaLangAccess().
                         getConstantPool(getDeclaringClass()),
                 this,
                 getDeclaringClass(),
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Field.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Field.java	Tue Oct 06 08:42:20 2015 -0700
@@ -25,6 +25,7 @@
 
 package java.lang.reflect;
 
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.CallerSensitive;
 import sun.reflect.FieldAccessor;
 import sun.reflect.Reflection;
@@ -1152,7 +1153,7 @@
                     } else {
                         declAnnos = AnnotationParser.parseAnnotations(
                                 annotations,
-                                sun.misc.SharedSecrets.getJavaLangAccess()
+                                SharedSecrets.getJavaLangAccess()
                                         .getConstantPool(getDeclaringClass()),
                                 getDeclaringClass());
                     }
@@ -1175,7 +1176,7 @@
      */
     public AnnotatedType getAnnotatedType() {
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
-                                                       sun.misc.SharedSecrets.getJavaLangAccess().
+                                                       SharedSecrets.getJavaLangAccess().
                                                            getConstantPool(getDeclaringClass()),
                                                        this,
                                                        getDeclaringClass(),
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Tue Oct 06 08:42:20 2015 -0700
@@ -26,6 +26,7 @@
 package java.lang.reflect;
 
 import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.misc.SharedSecrets;
 import sun.reflect.CallerSensitive;
 import sun.reflect.MethodAccessor;
 import sun.reflect.Reflection;
@@ -626,7 +627,7 @@
             getReturnType());
         Object result = AnnotationParser.parseMemberValue(
             memberType, ByteBuffer.wrap(annotationDefault),
-            sun.misc.SharedSecrets.getJavaLangAccess().
+            SharedSecrets.getJavaLangAccess().
                 getConstantPool(getDeclaringClass()),
             getDeclaringClass());
         if (result instanceof sun.reflect.annotation.ExceptionProxy)
--- a/jdk/src/java.base/share/classes/java/net/HttpCookie.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/HttpCookie.java	Tue Oct 06 08:42:20 2015 -0700
@@ -35,6 +35,8 @@
 import java.util.Date;
 import java.util.Locale;
 import java.util.Objects;
+import jdk.internal.misc.JavaNetHttpCookieAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * An HttpCookie object represents an HTTP cookie, which carries state
@@ -971,8 +973,8 @@
     }
 
     static {
-        sun.misc.SharedSecrets.setJavaNetHttpCookieAccess(
-            new sun.misc.JavaNetHttpCookieAccess() {
+        SharedSecrets.setJavaNetHttpCookieAccess(
+            new JavaNetHttpCookieAccess() {
                 public List<HttpCookie> parse(String header) {
                     return HttpCookie.parse(header, true);
                 }
--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java	Tue Oct 06 08:42:20 2015 -0700
@@ -43,6 +43,8 @@
 import java.util.concurrent.ConcurrentSkipListSet;
 import java.util.concurrent.atomic.AtomicLong;
 
+import jdk.internal.misc.JavaNetInetAddressAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.security.action.*;
 import sun.net.InetAddressCachePolicy;
 import sun.net.util.IPAddressUtil;
@@ -215,7 +217,7 @@
          * DNS forging.
          *
          * Oracle JSSE provider is using this original hostname, via
-         * sun.misc.JavaNetAccess, for SSL/TLS endpoint identification.
+         * jdk.internal.misc.JavaNetAccess, for SSL/TLS endpoint identification.
          *
          * Note: May define a new public method in the future if necessary.
          */
@@ -297,8 +299,8 @@
                     return null;
                 }
             });
-        sun.misc.SharedSecrets.setJavaNetInetAddressAccess(
-                new sun.misc.JavaNetInetAddressAccess() {
+        SharedSecrets.setJavaNetInetAddressAccess(
+                new JavaNetInetAddressAccess() {
                     public String getOriginalHostName(InetAddress ia) {
                         return ia.holder.getOriginalHostName();
                     }
--- a/jdk/src/java.base/share/classes/java/net/URLClassLoader.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/URLClassLoader.java	Tue Oct 06 08:42:20 2015 -0700
@@ -49,6 +49,9 @@
 import java.util.jar.Attributes.Name;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
+
+import jdk.internal.misc.JavaNetAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.Resource;
 import sun.misc.URLClassPath;
 import sun.net.www.ParseUtil;
@@ -769,9 +772,9 @@
     }
 
     static {
-        sun.misc.SharedSecrets.setJavaNetAccess (
-            new sun.misc.JavaNetAccess() {
-                public URLClassPath getURLClassPath (URLClassLoader u) {
+        SharedSecrets.setJavaNetAccess(
+            new JavaNetAccess() {
+                public URLClassPath getURLClassPath(URLClassLoader u) {
                     return u.ucp;
                 }
             }
--- a/jdk/src/java.base/share/classes/java/nio/Bits.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/Bits.java	Tue Oct 06 08:42:20 2015 -0700
@@ -29,8 +29,9 @@
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.LongAdder;
 
-import sun.misc.JavaLangRefAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaNioAccess;
+import jdk.internal.misc.JavaLangRefAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.Unsafe;
 import sun.misc.VM;
 
@@ -702,11 +703,11 @@
 
     static {
         // setup access to this package in SharedSecrets
-        sun.misc.SharedSecrets.setJavaNioAccess(
-            new sun.misc.JavaNioAccess() {
+        SharedSecrets.setJavaNioAccess(
+            new JavaNioAccess() {
                 @Override
-                public sun.misc.JavaNioAccess.BufferPool getDirectBufferPool() {
-                    return new sun.misc.JavaNioAccess.BufferPool() {
+                public JavaNioAccess.BufferPool getDirectBufferPool() {
+                    return new JavaNioAccess.BufferPool() {
                         @Override
                         public String getName() {
                             return "direct";
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,6 +34,7 @@
 import java.nio.channels.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import jdk.internal.misc.SharedSecrets;
 import sun.nio.ch.Interruptible;
 
 
@@ -206,9 +207,8 @@
     }
 
 
-    // -- sun.misc.SharedSecrets --
+    // -- jdk.internal.misc.SharedSecrets --
     static void blockedOn(Interruptible intr) {         // package-private
-        sun.misc.SharedSecrets.getJavaLangAccess().blockedOn(Thread.currentThread(),
-                                                             intr);
+        SharedSecrets.getJavaLangAccess().blockedOn(Thread.currentThread(), intr);
     }
 }
--- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,10 +34,10 @@
 import java.util.Map;
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
-import sun.misc.JavaSecurityAccess;
-import sun.misc.JavaSecurityProtectionDomainAccess;
-import static sun.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaSecurityAccess;
+import jdk.internal.misc.JavaSecurityProtectionDomainAccess;
+import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
+import jdk.internal.misc.SharedSecrets;
 import sun.security.util.Debug;
 import sun.security.util.SecurityConstants;
 
--- a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1722,7 +1722,7 @@
             }
             return (start + zoneNames[nameIndex].length());
         }
-        return 0;
+        return -start;
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/EnumMap.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/EnumMap.java	Tue Oct 06 08:42:20 2015 -0700
@@ -26,7 +26,7 @@
 package java.util;
 
 import java.util.Map.Entry;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A specialized {@link Map} implementation for use with enum type keys.  All
--- a/jdk/src/java.base/share/classes/java/util/EnumSet.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/EnumSet.java	Tue Oct 06 08:42:20 2015 -0700
@@ -25,7 +25,7 @@
 
 package java.util;
 
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A specialized {@link Set} implementation for use with enum types.  All of
--- a/jdk/src/java.base/share/classes/java/util/StringJoiner.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/StringJoiner.java	Tue Oct 06 08:42:20 2015 -0700
@@ -24,8 +24,8 @@
  */
 package java.util;
 
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * {@code StringJoiner} is used to construct a sequence of characters separated
--- a/jdk/src/java.base/share/classes/java/util/UUID.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/UUID.java	Tue Oct 06 08:42:20 2015 -0700
@@ -27,8 +27,8 @@
 
 import java.security.*;
 
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A class that represents an immutable universally unique identifier (UUID).
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,7 +34,6 @@
  */
 
 package java.util.concurrent.atomic;
-import sun.misc.Unsafe;
 
 /**
  * A {@code boolean} value that may be updated atomically. See the
@@ -49,15 +48,17 @@
  */
 public class AtomicBoolean implements java.io.Serializable {
     private static final long serialVersionUID = 4654671469794556979L;
-    // setup to use Unsafe.compareAndSwapInt for updates
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long valueOffset;
+
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long VALUE;
 
     static {
         try {
-            valueOffset = unsafe.objectFieldOffset
+            VALUE = U.objectFieldOffset
                 (AtomicBoolean.class.getDeclaredField("value"));
-        } catch (Exception ex) { throw new Error(ex); }
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     private volatile int value;
@@ -96,9 +97,9 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(boolean expect, boolean update) {
-        int e = expect ? 1 : 0;
-        int u = update ? 1 : 0;
-        return unsafe.compareAndSwapInt(this, valueOffset, e, u);
+        return U.compareAndSwapInt(this, VALUE,
+                                   (expect ? 1 : 0),
+                                   (update ? 1 : 0));
     }
 
     /**
@@ -114,9 +115,9 @@
      * @return {@code true} if successful
      */
     public boolean weakCompareAndSet(boolean expect, boolean update) {
-        int e = expect ? 1 : 0;
-        int u = update ? 1 : 0;
-        return unsafe.compareAndSwapInt(this, valueOffset, e, u);
+        return U.compareAndSwapInt(this, VALUE,
+                                   (expect ? 1 : 0),
+                                   (update ? 1 : 0));
     }
 
     /**
@@ -135,8 +136,7 @@
      * @since 1.6
      */
     public final void lazySet(boolean newValue) {
-        int v = newValue ? 1 : 0;
-        unsafe.putOrderedInt(this, valueOffset, v);
+        U.putOrderedInt(this, VALUE, (newValue ? 1 : 0));
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
+
+import java.util.function.IntBinaryOperator;
 import java.util.function.IntUnaryOperator;
-import java.util.function.IntBinaryOperator;
-import sun.misc.Unsafe;
 
 /**
  * An {@code int} value that may be updated atomically.  See the
@@ -50,19 +50,20 @@
  *
  * @since 1.5
  * @author Doug Lea
-*/
+ */
 public class AtomicInteger extends Number implements java.io.Serializable {
     private static final long serialVersionUID = 6214790243416807050L;
 
-    // setup to use Unsafe.compareAndSwapInt for updates
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long valueOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long VALUE;
 
     static {
         try {
-            valueOffset = unsafe.objectFieldOffset
+            VALUE = U.objectFieldOffset
                 (AtomicInteger.class.getDeclaredField("value"));
-        } catch (Exception ex) { throw new Error(ex); }
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     private volatile int value;
@@ -107,7 +108,7 @@
      * @since 1.6
      */
     public final void lazySet(int newValue) {
-        unsafe.putOrderedInt(this, valueOffset, newValue);
+        U.putOrderedInt(this, VALUE, newValue);
     }
 
     /**
@@ -117,7 +118,7 @@
      * @return the previous value
      */
     public final int getAndSet(int newValue) {
-        return unsafe.getAndSetInt(this, valueOffset, newValue);
+        return U.getAndSetInt(this, VALUE, newValue);
     }
 
     /**
@@ -130,7 +131,7 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(int expect, int update) {
-        return unsafe.compareAndSwapInt(this, valueOffset, expect, update);
+        return U.compareAndSwapInt(this, VALUE, expect, update);
     }
 
     /**
@@ -146,7 +147,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int expect, int update) {
-        return unsafe.compareAndSwapInt(this, valueOffset, expect, update);
+        return U.compareAndSwapInt(this, VALUE, expect, update);
     }
 
     /**
@@ -155,7 +156,7 @@
      * @return the previous value
      */
     public final int getAndIncrement() {
-        return unsafe.getAndAddInt(this, valueOffset, 1);
+        return U.getAndAddInt(this, VALUE, 1);
     }
 
     /**
@@ -164,7 +165,7 @@
      * @return the previous value
      */
     public final int getAndDecrement() {
-        return unsafe.getAndAddInt(this, valueOffset, -1);
+        return U.getAndAddInt(this, VALUE, -1);
     }
 
     /**
@@ -174,7 +175,7 @@
      * @return the previous value
      */
     public final int getAndAdd(int delta) {
-        return unsafe.getAndAddInt(this, valueOffset, delta);
+        return U.getAndAddInt(this, VALUE, delta);
     }
 
     /**
@@ -183,7 +184,7 @@
      * @return the updated value
      */
     public final int incrementAndGet() {
-        return unsafe.getAndAddInt(this, valueOffset, 1) + 1;
+        return U.getAndAddInt(this, VALUE, 1) + 1;
     }
 
     /**
@@ -192,7 +193,7 @@
      * @return the updated value
      */
     public final int decrementAndGet() {
-        return unsafe.getAndAddInt(this, valueOffset, -1) - 1;
+        return U.getAndAddInt(this, VALUE, -1) - 1;
     }
 
     /**
@@ -202,7 +203,7 @@
      * @return the updated value
      */
     public final int addAndGet(int delta) {
-        return unsafe.getAndAddInt(this, valueOffset, delta) + delta;
+        return U.getAndAddInt(this, VALUE, delta) + delta;
     }
 
     /**
@@ -301,6 +302,7 @@
 
     /**
      * Returns the value of this {@code AtomicInteger} as an {@code int}.
+     * Equivalent to {@link #get()}.
      */
     public int intValue() {
         return get();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
+
+import java.util.function.IntBinaryOperator;
 import java.util.function.IntUnaryOperator;
-import java.util.function.IntBinaryOperator;
-import sun.misc.Unsafe;
 
 /**
  * An {@code int} array in which elements may be updated atomically.
@@ -49,16 +49,17 @@
 public class AtomicIntegerArray implements java.io.Serializable {
     private static final long serialVersionUID = 2862133569453604235L;
 
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final int base = unsafe.arrayBaseOffset(int[].class);
-    private static final int shift;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final int ABASE;
+    private static final int ASHIFT;
     private final int[] array;
 
     static {
-        int scale = unsafe.arrayIndexScale(int[].class);
+        ABASE = U.arrayBaseOffset(int[].class);
+        int scale = U.arrayIndexScale(int[].class);
         if ((scale & (scale - 1)) != 0)
-            throw new Error("data type scale not a power of two");
-        shift = 31 - Integer.numberOfLeadingZeros(scale);
+            throw new Error("array index scale not a power of two");
+        ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
     }
 
     private long checkedByteOffset(int i) {
@@ -69,7 +70,7 @@
     }
 
     private static long byteOffset(int i) {
-        return ((long) i << shift) + base;
+        return ((long) i << ASHIFT) + ABASE;
     }
 
     /**
@@ -114,7 +115,7 @@
     }
 
     private int getRaw(long offset) {
-        return unsafe.getIntVolatile(array, offset);
+        return U.getIntVolatile(array, offset);
     }
 
     /**
@@ -124,7 +125,7 @@
      * @param newValue the new value
      */
     public final void set(int i, int newValue) {
-        unsafe.putIntVolatile(array, checkedByteOffset(i), newValue);
+        U.putIntVolatile(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -135,7 +136,7 @@
      * @since 1.6
      */
     public final void lazySet(int i, int newValue) {
-        unsafe.putOrderedInt(array, checkedByteOffset(i), newValue);
+        U.putOrderedInt(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -147,7 +148,7 @@
      * @return the previous value
      */
     public final int getAndSet(int i, int newValue) {
-        return unsafe.getAndSetInt(array, checkedByteOffset(i), newValue);
+        return U.getAndSetInt(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -165,7 +166,7 @@
     }
 
     private boolean compareAndSetRaw(long offset, int expect, int update) {
-        return unsafe.compareAndSwapInt(array, offset, expect, update);
+        return U.compareAndSwapInt(array, offset, expect, update);
     }
 
     /**
@@ -213,7 +214,7 @@
      * @return the previous value
      */
     public final int getAndAdd(int i, int delta) {
-        return unsafe.getAndAddInt(array, checkedByteOffset(i), delta);
+        return U.getAndAddInt(array, checkedByteOffset(i), delta);
     }
 
     /**
@@ -247,7 +248,6 @@
         return getAndAdd(i, delta) + delta;
     }
 
-
     /**
      * Atomically updates the element at index {@code i} with the results
      * of applying the given function, returning the previous value. The
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,14 +34,14 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.IntUnaryOperator;
-import java.util.function.IntBinaryOperator;
-import sun.misc.Unsafe;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
+import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
+import java.util.function.IntBinaryOperator;
+import java.util.function.IntUnaryOperator;
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 
@@ -363,11 +363,11 @@
     }
 
     /**
-     * Standard hotspot implementation using intrinsics
+     * Standard hotspot implementation using intrinsics.
      */
     private static class AtomicIntegerFieldUpdaterImpl<T>
             extends AtomicIntegerFieldUpdater<T> {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private final long offset;
         private final Class<T> tclass;
         private final Class<?> cclass;
@@ -391,7 +391,7 @@
                 ClassLoader ccl = caller.getClassLoader();
                 if ((ccl != null) && (ccl != cl) &&
                     ((cl == null) || !isAncestor(cl, ccl))) {
-                  sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+                    sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
                 }
             } catch (PrivilegedActionException pae) {
                 throw new RuntimeException(pae.getException());
@@ -409,7 +409,7 @@
             this.cclass = (Modifier.isProtected(modifiers) &&
                            caller != tclass) ? caller : null;
             this.tclass = tclass;
-            offset = unsafe.objectFieldOffset(field);
+            offset = U.objectFieldOffset(field);
         }
 
         /**
@@ -437,32 +437,32 @@
 
         public boolean compareAndSet(T obj, int expect, int update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.compareAndSwapInt(obj, offset, expect, update);
+            return U.compareAndSwapInt(obj, offset, expect, update);
         }
 
         public boolean weakCompareAndSet(T obj, int expect, int update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.compareAndSwapInt(obj, offset, expect, update);
+            return U.compareAndSwapInt(obj, offset, expect, update);
         }
 
         public void set(T obj, int newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            unsafe.putIntVolatile(obj, offset, newValue);
+            U.putIntVolatile(obj, offset, newValue);
         }
 
         public void lazySet(T obj, int newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            unsafe.putOrderedInt(obj, offset, newValue);
+            U.putOrderedInt(obj, offset, newValue);
         }
 
         public final int get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getIntVolatile(obj, offset);
+            return U.getIntVolatile(obj, offset);
         }
 
         public int getAndSet(T obj, int newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getAndSetInt(obj, offset, newValue);
+            return U.getAndSetInt(obj, offset, newValue);
         }
 
         public int getAndIncrement(T obj) {
@@ -475,7 +475,7 @@
 
         public int getAndAdd(T obj, int delta) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getAndAddInt(obj, offset, delta);
+            return U.getAndAddInt(obj, offset, delta);
         }
 
         public int incrementAndGet(T obj) {
@@ -483,7 +483,7 @@
         }
 
         public int decrementAndGet(T obj) {
-             return getAndAdd(obj, -1) - 1;
+            return getAndAdd(obj, -1) - 1;
         }
 
         public int addAndGet(T obj, int delta) {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
+
+import java.util.function.LongBinaryOperator;
 import java.util.function.LongUnaryOperator;
-import java.util.function.LongBinaryOperator;
-import sun.misc.Unsafe;
 
 /**
  * A {@code long} value that may be updated atomically.  See the
@@ -54,9 +54,8 @@
 public class AtomicLong extends Number implements java.io.Serializable {
     private static final long serialVersionUID = 1927816293512124184L;
 
-    // setup to use Unsafe.compareAndSwapLong for updates
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long valueOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long VALUE;
 
     /**
      * Records whether the underlying JVM supports lockless
@@ -74,9 +73,11 @@
 
     static {
         try {
-            valueOffset = unsafe.objectFieldOffset
+            VALUE = U.objectFieldOffset
                 (AtomicLong.class.getDeclaredField("value"));
-        } catch (Exception ex) { throw new Error(ex); }
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     private volatile long value;
@@ -111,7 +112,9 @@
      * @param newValue the new value
      */
     public final void set(long newValue) {
-        value = newValue;
+        // Use putLongVolatile instead of ordinary volatile store when
+        // using compareAndSwapLong, for sake of some 32bit systems.
+        U.putLongVolatile(this, VALUE, newValue);
     }
 
     /**
@@ -121,7 +124,7 @@
      * @since 1.6
      */
     public final void lazySet(long newValue) {
-        unsafe.putOrderedLong(this, valueOffset, newValue);
+        U.putOrderedLong(this, VALUE, newValue);
     }
 
     /**
@@ -131,7 +134,7 @@
      * @return the previous value
      */
     public final long getAndSet(long newValue) {
-        return unsafe.getAndSetLong(this, valueOffset, newValue);
+        return U.getAndSetLong(this, VALUE, newValue);
     }
 
     /**
@@ -144,7 +147,7 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(long expect, long update) {
-        return unsafe.compareAndSwapLong(this, valueOffset, expect, update);
+        return U.compareAndSwapLong(this, VALUE, expect, update);
     }
 
     /**
@@ -160,7 +163,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(long expect, long update) {
-        return unsafe.compareAndSwapLong(this, valueOffset, expect, update);
+        return U.compareAndSwapLong(this, VALUE, expect, update);
     }
 
     /**
@@ -169,7 +172,7 @@
      * @return the previous value
      */
     public final long getAndIncrement() {
-        return unsafe.getAndAddLong(this, valueOffset, 1L);
+        return U.getAndAddLong(this, VALUE, 1L);
     }
 
     /**
@@ -178,7 +181,7 @@
      * @return the previous value
      */
     public final long getAndDecrement() {
-        return unsafe.getAndAddLong(this, valueOffset, -1L);
+        return U.getAndAddLong(this, VALUE, -1L);
     }
 
     /**
@@ -188,7 +191,7 @@
      * @return the previous value
      */
     public final long getAndAdd(long delta) {
-        return unsafe.getAndAddLong(this, valueOffset, delta);
+        return U.getAndAddLong(this, VALUE, delta);
     }
 
     /**
@@ -197,7 +200,7 @@
      * @return the updated value
      */
     public final long incrementAndGet() {
-        return unsafe.getAndAddLong(this, valueOffset, 1L) + 1L;
+        return U.getAndAddLong(this, VALUE, 1L) + 1L;
     }
 
     /**
@@ -206,7 +209,7 @@
      * @return the updated value
      */
     public final long decrementAndGet() {
-        return unsafe.getAndAddLong(this, valueOffset, -1L) - 1L;
+        return U.getAndAddLong(this, VALUE, -1L) - 1L;
     }
 
     /**
@@ -216,7 +219,7 @@
      * @return the updated value
      */
     public final long addAndGet(long delta) {
-        return unsafe.getAndAddLong(this, valueOffset, delta) + delta;
+        return U.getAndAddLong(this, VALUE, delta) + delta;
     }
 
     /**
@@ -324,6 +327,7 @@
 
     /**
      * Returns the value of this {@code AtomicLong} as a {@code long}.
+     * Equivalent to {@link #get()}.
      */
     public long longValue() {
         return get();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
+
+import java.util.function.LongBinaryOperator;
 import java.util.function.LongUnaryOperator;
-import java.util.function.LongBinaryOperator;
-import sun.misc.Unsafe;
 
 /**
  * A {@code long} array in which elements may be updated atomically.
@@ -48,16 +48,17 @@
 public class AtomicLongArray implements java.io.Serializable {
     private static final long serialVersionUID = -2308431214976778248L;
 
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final int base = unsafe.arrayBaseOffset(long[].class);
-    private static final int shift;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final int ABASE;
+    private static final int ASHIFT;
     private final long[] array;
 
     static {
-        int scale = unsafe.arrayIndexScale(long[].class);
+        ABASE = U.arrayBaseOffset(long[].class);
+        int scale = U.arrayIndexScale(long[].class);
         if ((scale & (scale - 1)) != 0)
-            throw new Error("data type scale not a power of two");
-        shift = 31 - Integer.numberOfLeadingZeros(scale);
+            throw new Error("array index scale not a power of two");
+        ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
     }
 
     private long checkedByteOffset(int i) {
@@ -68,7 +69,7 @@
     }
 
     private static long byteOffset(int i) {
-        return ((long) i << shift) + base;
+        return ((long) i << ASHIFT) + ABASE;
     }
 
     /**
@@ -113,7 +114,7 @@
     }
 
     private long getRaw(long offset) {
-        return unsafe.getLongVolatile(array, offset);
+        return U.getLongVolatile(array, offset);
     }
 
     /**
@@ -123,7 +124,7 @@
      * @param newValue the new value
      */
     public final void set(int i, long newValue) {
-        unsafe.putLongVolatile(array, checkedByteOffset(i), newValue);
+        U.putLongVolatile(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -134,7 +135,7 @@
      * @since 1.6
      */
     public final void lazySet(int i, long newValue) {
-        unsafe.putOrderedLong(array, checkedByteOffset(i), newValue);
+        U.putOrderedLong(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -146,7 +147,7 @@
      * @return the previous value
      */
     public final long getAndSet(int i, long newValue) {
-        return unsafe.getAndSetLong(array, checkedByteOffset(i), newValue);
+        return U.getAndSetLong(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -164,7 +165,7 @@
     }
 
     private boolean compareAndSetRaw(long offset, long expect, long update) {
-        return unsafe.compareAndSwapLong(array, offset, expect, update);
+        return U.compareAndSwapLong(array, offset, expect, update);
     }
 
     /**
@@ -212,7 +213,7 @@
      * @return the previous value
      */
     public final long getAndAdd(int i, long delta) {
-        return unsafe.getAndAddLong(array, checkedByteOffset(i), delta);
+        return U.getAndAddLong(array, checkedByteOffset(i), delta);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,14 +34,14 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.LongUnaryOperator;
-import java.util.function.LongBinaryOperator;
-import sun.misc.Unsafe;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
+import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
+import java.util.function.LongBinaryOperator;
+import java.util.function.LongUnaryOperator;
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 
@@ -366,7 +366,7 @@
     }
 
     private static class CASUpdater<T> extends AtomicLongFieldUpdater<T> {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private final long offset;
         private final Class<T> tclass;
         private final Class<?> cclass;
@@ -389,7 +389,7 @@
                 ClassLoader ccl = caller.getClassLoader();
                 if ((ccl != null) && (ccl != cl) &&
                     ((cl == null) || !isAncestor(cl, ccl))) {
-                  sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+                    sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
                 }
             } catch (PrivilegedActionException pae) {
                 throw new RuntimeException(pae.getException());
@@ -407,7 +407,7 @@
             this.cclass = (Modifier.isProtected(modifiers) &&
                            caller != tclass) ? caller : null;
             this.tclass = tclass;
-            offset = unsafe.objectFieldOffset(field);
+            offset = U.objectFieldOffset(field);
         }
 
         private void fullCheck(T obj) {
@@ -419,32 +419,32 @@
 
         public boolean compareAndSet(T obj, long expect, long update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.compareAndSwapLong(obj, offset, expect, update);
+            return U.compareAndSwapLong(obj, offset, expect, update);
         }
 
         public boolean weakCompareAndSet(T obj, long expect, long update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.compareAndSwapLong(obj, offset, expect, update);
+            return U.compareAndSwapLong(obj, offset, expect, update);
         }
 
         public void set(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            unsafe.putLongVolatile(obj, offset, newValue);
+            U.putLongVolatile(obj, offset, newValue);
         }
 
         public void lazySet(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            unsafe.putOrderedLong(obj, offset, newValue);
+            U.putOrderedLong(obj, offset, newValue);
         }
 
         public long get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getLongVolatile(obj, offset);
+            return U.getLongVolatile(obj, offset);
         }
 
         public long getAndSet(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getAndSetLong(obj, offset, newValue);
+            return U.getAndSetLong(obj, offset, newValue);
         }
 
         public long getAndIncrement(T obj) {
@@ -457,7 +457,7 @@
 
         public long getAndAdd(T obj, long delta) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
-            return unsafe.getAndAddLong(obj, offset, delta);
+            return U.getAndAddLong(obj, offset, delta);
         }
 
         public long incrementAndGet(T obj) {
@@ -465,7 +465,7 @@
         }
 
         public long decrementAndGet(T obj) {
-             return getAndAdd(obj, -1) - 1;
+            return getAndAdd(obj, -1) - 1;
         }
 
         public long addAndGet(T obj, long delta) {
@@ -490,7 +490,7 @@
 
 
     private static class LockedUpdater<T> extends AtomicLongFieldUpdater<T> {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private final long offset;
         private final Class<T> tclass;
         private final Class<?> cclass;
@@ -513,7 +513,7 @@
                 ClassLoader ccl = caller.getClassLoader();
                 if ((ccl != null) && (ccl != cl) &&
                     ((cl == null) || !isAncestor(cl, ccl))) {
-                  sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+                    sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
                 }
             } catch (PrivilegedActionException pae) {
                 throw new RuntimeException(pae.getException());
@@ -531,7 +531,7 @@
             this.cclass = (Modifier.isProtected(modifiers) &&
                            caller != tclass) ? caller : null;
             this.tclass = tclass;
-            offset = unsafe.objectFieldOffset(field);
+            offset = U.objectFieldOffset(field);
         }
 
         private void fullCheck(T obj) {
@@ -544,10 +544,10 @@
         public boolean compareAndSet(T obj, long expect, long update) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
             synchronized (this) {
-                long v = unsafe.getLong(obj, offset);
+                long v = U.getLong(obj, offset);
                 if (v != expect)
                     return false;
-                unsafe.putLong(obj, offset, update);
+                U.putLong(obj, offset, update);
                 return true;
             }
         }
@@ -559,7 +559,7 @@
         public void set(T obj, long newValue) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
             synchronized (this) {
-                unsafe.putLong(obj, offset, newValue);
+                U.putLong(obj, offset, newValue);
             }
         }
 
@@ -570,7 +570,7 @@
         public long get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null) fullCheck(obj);
             synchronized (this) {
-                return unsafe.getLong(obj, offset);
+                return U.getLong(obj, offset);
             }
         }
 
@@ -595,7 +595,7 @@
      * classloader's delegation chain.
      * Equivalent to the inaccessible: first.isAncestor(second).
      */
-    private static boolean isAncestor(ClassLoader first, ClassLoader second) {
+    static boolean isAncestor(ClassLoader first, ClassLoader second) {
         ClassLoader acl = first;
         do {
             acl = acl.getParent();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicMarkableReference.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicMarkableReference.java	Tue Oct 06 08:42:20 2015 -0700
@@ -97,7 +97,7 @@
      * Typical usage is {@code boolean[1] holder; ref = v.get(holder); }.
      *
      * @param markHolder an array of size of at least one. On return,
-     * {@code markholder[0]} will hold the value of the mark.
+     * {@code markHolder[0]} will hold the value of the mark.
      * @return the current value of the reference
      */
     public V get(boolean[] markHolder) {
@@ -190,23 +190,18 @@
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long pairOffset =
-        objectFieldOffset(UNSAFE, "pair", AtomicMarkableReference.class);
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long PAIR;
+    static {
+        try {
+            PAIR = U.objectFieldOffset
+                (AtomicMarkableReference.class.getDeclaredField("pair"));
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
+    }
 
     private boolean casPair(Pair<V> cmp, Pair<V> val) {
-        return UNSAFE.compareAndSwapObject(this, pairOffset, cmp, val);
-    }
-
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
-        try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
-        }
+        return U.compareAndSwapObject(this, PAIR, cmp, val);
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,9 +34,9 @@
  */
 
 package java.util.concurrent.atomic;
+
+import java.util.function.BinaryOperator;
 import java.util.function.UnaryOperator;
-import java.util.function.BinaryOperator;
-import sun.misc.Unsafe;
 
 /**
  * An object reference that may be updated atomically. See the {@link
@@ -49,14 +49,16 @@
 public class AtomicReference<V> implements java.io.Serializable {
     private static final long serialVersionUID = -1848883965231344442L;
 
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static final long valueOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long VALUE;
 
     static {
         try {
-            valueOffset = unsafe.objectFieldOffset
+            VALUE = U.objectFieldOffset
                 (AtomicReference.class.getDeclaredField("value"));
-        } catch (Exception ex) { throw new Error(ex); }
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
     }
 
     private volatile V value;
@@ -101,7 +103,7 @@
      * @since 1.6
      */
     public final void lazySet(V newValue) {
-        unsafe.putOrderedObject(this, valueOffset, newValue);
+        U.putOrderedObject(this, VALUE, newValue);
     }
 
     /**
@@ -113,7 +115,7 @@
      * the actual value was not equal to the expected value.
      */
     public final boolean compareAndSet(V expect, V update) {
-        return unsafe.compareAndSwapObject(this, valueOffset, expect, update);
+        return U.compareAndSwapObject(this, VALUE, expect, update);
     }
 
     /**
@@ -129,7 +131,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(V expect, V update) {
-        return unsafe.compareAndSwapObject(this, valueOffset, expect, update);
+        return U.compareAndSwapObject(this, VALUE, expect, update);
     }
 
     /**
@@ -140,7 +142,7 @@
      */
     @SuppressWarnings("unchecked")
     public final V getAndSet(V newValue) {
-        return (V)unsafe.getAndSetObject(this, valueOffset, newValue);
+        return (V)U.getAndSetObject(this, VALUE, newValue);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,11 +34,11 @@
  */
 
 package java.util.concurrent.atomic;
+
+import java.lang.reflect.Array;
+import java.util.Arrays;
+import java.util.function.BinaryOperator;
 import java.util.function.UnaryOperator;
-import java.util.function.BinaryOperator;
-import java.util.Arrays;
-import java.lang.reflect.Array;
-import sun.misc.Unsafe;
 
 /**
  * An array of object references in which elements may be updated
@@ -52,23 +52,22 @@
 public class AtomicReferenceArray<E> implements java.io.Serializable {
     private static final long serialVersionUID = -6209656149925076980L;
 
-    private static final Unsafe unsafe;
-    private static final int base;
-    private static final int shift;
-    private static final long arrayFieldOffset;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final int ABASE;
+    private static final int ASHIFT;
+    private static final long ARRAY;
     private final Object[] array; // must have exact type Object[]
 
     static {
         try {
-            unsafe = Unsafe.getUnsafe();
-            arrayFieldOffset = unsafe.objectFieldOffset
+            ARRAY = U.objectFieldOffset
                 (AtomicReferenceArray.class.getDeclaredField("array"));
-            base = unsafe.arrayBaseOffset(Object[].class);
-            int scale = unsafe.arrayIndexScale(Object[].class);
+            ABASE = U.arrayBaseOffset(Object[].class);
+            int scale = U.arrayIndexScale(Object[].class);
             if ((scale & (scale - 1)) != 0)
-                throw new Error("data type scale not a power of two");
-            shift = 31 - Integer.numberOfLeadingZeros(scale);
-        } catch (Exception e) {
+                throw new Error("array index scale not a power of two");
+            ASHIFT = 31 - Integer.numberOfLeadingZeros(scale);
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
@@ -81,7 +80,7 @@
     }
 
     private static long byteOffset(int i) {
-        return ((long) i << shift) + base;
+        return ((long) i << ASHIFT) + ABASE;
     }
 
     /**
@@ -127,7 +126,7 @@
 
     @SuppressWarnings("unchecked")
     private E getRaw(long offset) {
-        return (E) unsafe.getObjectVolatile(array, offset);
+        return (E) U.getObjectVolatile(array, offset);
     }
 
     /**
@@ -137,7 +136,7 @@
      * @param newValue the new value
      */
     public final void set(int i, E newValue) {
-        unsafe.putObjectVolatile(array, checkedByteOffset(i), newValue);
+        U.putObjectVolatile(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -148,7 +147,7 @@
      * @since 1.6
      */
     public final void lazySet(int i, E newValue) {
-        unsafe.putOrderedObject(array, checkedByteOffset(i), newValue);
+        U.putOrderedObject(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -161,7 +160,7 @@
      */
     @SuppressWarnings("unchecked")
     public final E getAndSet(int i, E newValue) {
-        return (E)unsafe.getAndSetObject(array, checkedByteOffset(i), newValue);
+        return (E)U.getAndSetObject(array, checkedByteOffset(i), newValue);
     }
 
     /**
@@ -179,7 +178,7 @@
     }
 
     private boolean compareAndSetRaw(long offset, E expect, E update) {
-        return unsafe.compareAndSwapObject(array, offset, expect, update);
+        return U.compareAndSwapObject(array, offset, expect, update);
     }
 
     /**
@@ -314,17 +313,20 @@
 
     /**
      * Reconstitutes the instance from a stream (that is, deserializes it).
+     * @param s the stream
+     * @throws ClassNotFoundException if the class of a serialized object
+     *         could not be found
+     * @throws java.io.IOException if an I/O error occurs
      */
     private void readObject(java.io.ObjectInputStream s)
-        throws java.io.IOException, ClassNotFoundException,
-        java.io.InvalidObjectException {
+        throws java.io.IOException, ClassNotFoundException {
         // Note: This must be changed if any additional fields are defined
         Object a = s.readFields().get("array", null);
         if (a == null || !a.getClass().isArray())
             throw new java.io.InvalidObjectException("Not array type");
         if (a.getClass() != Object[].class)
             a = Arrays.copyOf((Object[])a, Array.getLength(a), Object[].class);
-        unsafe.putObjectVolatile(this, arrayFieldOffset, a);
+        U.putObjectVolatile(this, ARRAY, a);
     }
 
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,14 +34,14 @@
  */
 
 package java.util.concurrent.atomic;
-import java.util.function.UnaryOperator;
-import java.util.function.BinaryOperator;
-import sun.misc.Unsafe;
+
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.security.AccessController;
+import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
+import java.util.function.BinaryOperator;
+import java.util.function.UnaryOperator;
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 
@@ -53,7 +53,7 @@
  * independently subject to atomic updates. For example, a tree node
  * might be declared as
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Node {
  *   private volatile Node left, right;
  *
@@ -62,7 +62,7 @@
  *   private static AtomicReferenceFieldUpdater<Node, Node> rightUpdater =
  *     AtomicReferenceFieldUpdater.newUpdater(Node.class, Node.class, "right");
  *
- *   Node getLeft() { return left;  }
+ *   Node getLeft() { return left; }
  *   boolean compareAndSetLeft(Node expect, Node update) {
  *     return leftUpdater.compareAndSet(this, expect, update);
  *   }
@@ -284,7 +284,7 @@
 
     private static final class AtomicReferenceFieldUpdaterImpl<T,V>
         extends AtomicReferenceFieldUpdater<T,V> {
-        private static final Unsafe unsafe = Unsafe.getUnsafe();
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
         private final long offset;
         private final Class<T> tclass;
         private final Class<V> vclass;
@@ -323,7 +323,7 @@
                 ClassLoader ccl = caller.getClassLoader();
                 if ((ccl != null) && (ccl != cl) &&
                     ((cl == null) || !isAncestor(cl, ccl))) {
-                  sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+                    sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
                 }
                 fieldClass = field.getType();
             } catch (PrivilegedActionException pae) {
@@ -347,7 +347,7 @@
                 this.vclass = null;
             else
                 this.vclass = vclass;
-            offset = unsafe.objectFieldOffset(field);
+            offset = U.objectFieldOffset(field);
         }
 
         /**
@@ -386,7 +386,7 @@
                 (update != null && vclass != null &&
                  vclass != update.getClass()))
                 updateCheck(obj, update);
-            return unsafe.compareAndSwapObject(obj, offset, expect, update);
+            return U.compareAndSwapObject(obj, offset, expect, update);
         }
 
         public boolean weakCompareAndSet(T obj, V expect, V update) {
@@ -395,7 +395,7 @@
                 (update != null && vclass != null &&
                  vclass != update.getClass()))
                 updateCheck(obj, update);
-            return unsafe.compareAndSwapObject(obj, offset, expect, update);
+            return U.compareAndSwapObject(obj, offset, expect, update);
         }
 
         public void set(T obj, V newValue) {
@@ -403,7 +403,7 @@
                 (newValue != null && vclass != null &&
                  vclass != newValue.getClass()))
                 updateCheck(obj, newValue);
-            unsafe.putObjectVolatile(obj, offset, newValue);
+            U.putObjectVolatile(obj, offset, newValue);
         }
 
         public void lazySet(T obj, V newValue) {
@@ -411,14 +411,14 @@
                 (newValue != null && vclass != null &&
                  vclass != newValue.getClass()))
                 updateCheck(obj, newValue);
-            unsafe.putOrderedObject(obj, offset, newValue);
+            U.putOrderedObject(obj, offset, newValue);
         }
 
         @SuppressWarnings("unchecked")
         public V get(T obj) {
             if (obj == null || obj.getClass() != tclass || cclass != null)
                 targetCheck(obj);
-            return (V)unsafe.getObjectVolatile(obj, offset);
+            return (V)U.getObjectVolatile(obj, offset);
         }
 
         @SuppressWarnings("unchecked")
@@ -427,7 +427,7 @@
                 (newValue != null && vclass != null &&
                  vclass != newValue.getClass()))
                 updateCheck(obj, newValue);
-            return (V)unsafe.getAndSetObject(obj, offset, newValue);
+            return (V)U.getAndSetObject(obj, offset, newValue);
         }
 
         private void ensureProtectedAccess(T obj) {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicStampedReference.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicStampedReference.java	Tue Oct 06 08:42:20 2015 -0700
@@ -97,7 +97,7 @@
      * Typical usage is {@code int[1] holder; ref = v.get(holder); }.
      *
      * @param stampHolder an array of size of at least one.  On return,
-     * {@code stampholder[0]} will hold the value of the stamp.
+     * {@code stampHolder[0]} will hold the value of the stamp.
      * @return the current value of the reference
      */
     public V get(int[] stampHolder) {
@@ -190,23 +190,18 @@
 
     // Unsafe mechanics
 
-    private static final sun.misc.Unsafe UNSAFE = sun.misc.Unsafe.getUnsafe();
-    private static final long pairOffset =
-        objectFieldOffset(UNSAFE, "pair", AtomicStampedReference.class);
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final long PAIR;
+    static {
+        try {
+            PAIR = U.objectFieldOffset
+                (AtomicStampedReference.class.getDeclaredField("pair"));
+        } catch (ReflectiveOperationException e) {
+            throw new Error(e);
+        }
+    }
 
     private boolean casPair(Pair<V> cmp, Pair<V> val) {
-        return UNSAFE.compareAndSwapObject(this, pairOffset, cmp, val);
-    }
-
-    static long objectFieldOffset(sun.misc.Unsafe UNSAFE,
-                                  String field, Class<?> klazz) {
-        try {
-            return UNSAFE.objectFieldOffset(klazz.getDeclaredField(field));
-        } catch (NoSuchFieldException e) {
-            // Convert Exception to corresponding Error
-            NoSuchFieldError error = new NoSuchFieldError(field);
-            error.initCause(e);
-            throw error;
-        }
+        return U.compareAndSwapObject(this, PAIR, cmp, val);
     }
 }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAccumulator.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.atomic;
+
 import java.io.Serializable;
 import java.util.function.DoubleBinaryOperator;
 
@@ -126,14 +127,13 @@
      * @return the current value
      */
     public double get() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         double result = Double.longBitsToDouble(base);
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
+            for (Cell a : as)
+                if (a != null)
                     result = function.applyAsDouble
                         (result, Double.longBitsToDouble(a.value));
-            }
         }
         return result;
     }
@@ -147,13 +147,12 @@
      * updating.
      */
     public void reset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         base = identity;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    a.value = identity;
-            }
+            for (Cell a : as)
+                if (a != null)
+                    a.reset(identity);
         }
     }
 
@@ -168,14 +167,14 @@
      * @return the value before reset
      */
     public double getThenReset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         double result = Double.longBitsToDouble(base);
         base = identity;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null) {
+            for (Cell a : as) {
+                if (a != null) {
                     double v = Double.longBitsToDouble(a.value);
-                    a.value = identity;
+                    a.reset(identity);
                     result = function.applyAsDouble(result, v);
                 }
             }
@@ -237,21 +236,27 @@
          * @serial
          */
         private final double value;
+
         /**
          * The function used for updates.
          * @serial
          */
         private final DoubleBinaryOperator function;
+
         /**
-         * The identity value
+         * The identity value, represented as a long, as converted by
+         * {@link Double#doubleToRawLongBits}.  The original identity
+         * can be recovered using {@link Double#longBitsToDouble}.
          * @serial
          */
         private final long identity;
 
-        SerializationProxy(DoubleAccumulator a) {
-            function = a.function;
-            identity = a.identity;
-            value = a.get();
+        SerializationProxy(double value,
+                           DoubleBinaryOperator function,
+                           long identity) {
+            this.value = value;
+            this.function = function;
+            this.identity = identity;
         }
 
         /**
@@ -259,7 +264,7 @@
          * held by this proxy.
          *
          * @return a {@code DoubleAccumulator} object with initial state
-         * held by this proxy.
+         * held by this proxy
          */
         private Object readResolve() {
             double d = Double.longBitsToDouble(identity);
@@ -279,7 +284,7 @@
      * representing the state of this instance
      */
     private Object writeReplace() {
-        return new SerializationProxy(this);
+        return new SerializationProxy(get(), function, identity);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAdder.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/DoubleAdder.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.atomic;
+
 import java.io.Serializable;
 
 /**
@@ -114,13 +115,12 @@
      * @return the sum
      */
     public double sum() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         double sum = Double.longBitsToDouble(base);
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
+            for (Cell a : as)
+                if (a != null)
                     sum += Double.longBitsToDouble(a.value);
-            }
         }
         return sum;
     }
@@ -133,13 +133,12 @@
      * known that no threads are concurrently updating.
      */
     public void reset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         base = 0L; // relies on fact that double 0 must have same rep as long
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    a.value = 0L;
-            }
+            for (Cell a : as)
+                if (a != null)
+                    a.reset();
         }
     }
 
@@ -154,14 +153,14 @@
      * @return the sum
      */
     public double sumThenReset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         double sum = Double.longBitsToDouble(base);
         base = 0L;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null) {
+            for (Cell a : as) {
+                if (a != null) {
                     long v = a.value;
-                    a.value = 0L;
+                    a.reset();
                     sum += Double.longBitsToDouble(v);
                 }
             }
@@ -233,7 +232,7 @@
          * held by this proxy.
          *
          * @return a {@code DoubleAdder} object with initial state
-         * held by this proxy.
+         * held by this proxy
          */
         private Object readResolve() {
             DoubleAdder a = new DoubleAdder();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/LongAccumulator.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/LongAccumulator.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.atomic;
+
 import java.io.Serializable;
 import java.util.function.LongBinaryOperator;
 
@@ -124,13 +125,12 @@
      * @return the current value
      */
     public long get() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         long result = base;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
+            for (Cell a : as)
+                if (a != null)
                     result = function.applyAsLong(result, a.value);
-            }
         }
         return result;
     }
@@ -144,13 +144,12 @@
      * updating.
      */
     public void reset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         base = identity;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    a.value = identity;
-            }
+            for (Cell a : as)
+                if (a != null)
+                    a.reset(identity);
         }
     }
 
@@ -165,14 +164,14 @@
      * @return the value before reset
      */
     public long getThenReset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         long result = base;
         base = identity;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null) {
+            for (Cell a : as) {
+                if (a != null) {
                     long v = a.value;
-                    a.value = identity;
+                    a.reset(identity);
                     result = function.applyAsLong(result, v);
                 }
             }
@@ -234,21 +233,25 @@
          * @serial
          */
         private final long value;
+
         /**
          * The function used for updates.
          * @serial
          */
         private final LongBinaryOperator function;
+
         /**
-         * The identity value
+         * The identity value.
          * @serial
          */
         private final long identity;
 
-        SerializationProxy(LongAccumulator a) {
-            function = a.function;
-            identity = a.identity;
-            value = a.get();
+        SerializationProxy(long value,
+                           LongBinaryOperator function,
+                           long identity) {
+            this.value = value;
+            this.function = function;
+            this.identity = identity;
         }
 
         /**
@@ -256,7 +259,7 @@
          * held by this proxy.
          *
          * @return a {@code LongAccumulator} object with initial state
-         * held by this proxy.
+         * held by this proxy
          */
         private Object readResolve() {
             LongAccumulator a = new LongAccumulator(function, identity);
@@ -275,7 +278,7 @@
      * representing the state of this instance
      */
     private Object writeReplace() {
-        return new SerializationProxy(this);
+        return new SerializationProxy(get(), function, identity);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/LongAdder.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/LongAdder.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,6 +34,7 @@
  */
 
 package java.util.concurrent.atomic;
+
 import java.io.Serializable;
 
 /**
@@ -116,13 +117,12 @@
      * @return the sum
      */
     public long sum() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         long sum = base;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
+            for (Cell a : as)
+                if (a != null)
                     sum += a.value;
-            }
         }
         return sum;
     }
@@ -135,13 +135,12 @@
      * known that no threads are concurrently updating.
      */
     public void reset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         base = 0L;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null)
-                    a.value = 0L;
-            }
+            for (Cell a : as)
+                if (a != null)
+                    a.reset();
         }
     }
 
@@ -156,14 +155,14 @@
      * @return the sum
      */
     public long sumThenReset() {
-        Cell[] as = cells; Cell a;
+        Cell[] as = cells;
         long sum = base;
         base = 0L;
         if (as != null) {
-            for (int i = 0; i < as.length; ++i) {
-                if ((a = as[i]) != null) {
+            for (Cell a : as) {
+                if (a != null) {
                     sum += a.value;
-                    a.value = 0L;
+                    a.reset();
                 }
             }
         }
@@ -230,11 +229,11 @@
         }
 
         /**
-         * Return a {@code LongAdder} object with initial state
+         * Returns a {@code LongAdder} object with initial state
          * held by this proxy.
          *
          * @return a {@code LongAdder} object with initial state
-         * held by this proxy.
+         * held by this proxy
          */
         private Object readResolve() {
             LongAdder a = new LongAdder();
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java	Tue Oct 06 08:42:20 2015 -0700
@@ -34,9 +34,11 @@
  */
 
 package java.util.concurrent.atomic;
+
+import java.util.Arrays;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.function.DoubleBinaryOperator;
 import java.util.function.LongBinaryOperator;
-import java.util.function.DoubleBinaryOperator;
-import java.util.concurrent.ThreadLocalRandom;
 
 /**
  * A package-local class holding common representation and mechanics
@@ -121,19 +123,23 @@
         volatile long value;
         Cell(long x) { value = x; }
         final boolean cas(long cmp, long val) {
-            return UNSAFE.compareAndSwapLong(this, valueOffset, cmp, val);
+            return U.compareAndSwapLong(this, VALUE, cmp, val);
+        }
+        final void reset() {
+            U.putLongVolatile(this, VALUE, 0L);
+        }
+        final void reset(long identity) {
+            U.putLongVolatile(this, VALUE, identity);
         }
 
         // Unsafe mechanics
-        private static final sun.misc.Unsafe UNSAFE;
-        private static final long valueOffset;
+        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final long VALUE;
         static {
             try {
-                UNSAFE = sun.misc.Unsafe.getUnsafe();
-                Class<?> ak = Cell.class;
-                valueOffset = UNSAFE.objectFieldOffset
-                    (ak.getDeclaredField("value"));
-            } catch (Exception e) {
+                VALUE = U.objectFieldOffset
+                    (Cell.class.getDeclaredField("value"));
+            } catch (ReflectiveOperationException e) {
                 throw new Error(e);
             }
         }
@@ -159,7 +165,7 @@
     transient volatile int cellsBusy;
 
     /**
-     * Package-private default constructor
+     * Package-private default constructor.
      */
     Striped64() {
     }
@@ -168,14 +174,14 @@
      * CASes the base field.
      */
     final boolean casBase(long cmp, long val) {
-        return UNSAFE.compareAndSwapLong(this, BASE, cmp, val);
+        return U.compareAndSwapLong(this, BASE, cmp, val);
     }
 
     /**
      * CASes the cellsBusy field from 0 to 1 to acquire lock.
      */
     final boolean casCellsBusy() {
-        return UNSAFE.compareAndSwapInt(this, CELLSBUSY, 0, 1);
+        return U.compareAndSwapInt(this, CELLSBUSY, 0, 1);
     }
 
     /**
@@ -183,7 +189,7 @@
      * Duplicated from ThreadLocalRandom because of packaging restrictions.
      */
     static final int getProbe() {
-        return UNSAFE.getInt(Thread.currentThread(), PROBE);
+        return U.getInt(Thread.currentThread(), PROBE);
     }
 
     /**
@@ -195,7 +201,7 @@
         probe ^= probe << 13;   // xorshift
         probe ^= probe >>> 17;
         probe ^= probe << 5;
-        UNSAFE.putInt(Thread.currentThread(), PROBE, probe);
+        U.putInt(Thread.currentThread(), PROBE, probe);
         return probe;
     }
 
@@ -220,27 +226,24 @@
             wasUncontended = true;
         }
         boolean collide = false;                // True if last slot nonempty
-        for (;;) {
+        done: for (;;) {
             Cell[] as; Cell a; int n; long v;
             if ((as = cells) != null && (n = as.length) > 0) {
                 if ((a = as[(n - 1) & h]) == null) {
                     if (cellsBusy == 0) {       // Try to attach new Cell
                         Cell r = new Cell(x);   // Optimistically create
                         if (cellsBusy == 0 && casCellsBusy()) {
-                            boolean created = false;
                             try {               // Recheck under lock
                                 Cell[] rs; int m, j;
                                 if ((rs = cells) != null &&
                                     (m = rs.length) > 0 &&
                                     rs[j = (m - 1) & h] == null) {
                                     rs[j] = r;
-                                    created = true;
+                                    break done;
                                 }
                             } finally {
                                 cellsBusy = 0;
                             }
-                            if (created)
-                                break;
                             continue;           // Slot is now non-empty
                         }
                     }
@@ -248,8 +251,8 @@
                 }
                 else if (!wasUncontended)       // CAS already known to fail
                     wasUncontended = true;      // Continue after rehash
-                else if (a.cas(v = a.value, ((fn == null) ? v + x :
-                                             fn.applyAsLong(v, x))))
+                else if (a.cas(v = a.value,
+                               (fn == null) ? v + x : fn.applyAsLong(v, x)))
                     break;
                 else if (n >= NCPU || cells != as)
                     collide = false;            // At max size or stale
@@ -257,12 +260,8 @@
                     collide = true;
                 else if (cellsBusy == 0 && casCellsBusy()) {
                     try {
-                        if (cells == as) {      // Expand table unless stale
-                            Cell[] rs = new Cell[n << 1];
-                            for (int i = 0; i < n; ++i)
-                                rs[i] = as[i];
-                            cells = rs;
-                        }
+                        if (cells == as)        // Expand table unless stale
+                            cells = Arrays.copyOf(as, n << 1);
                     } finally {
                         cellsBusy = 0;
                     }
@@ -272,26 +271,30 @@
                 h = advanceProbe(h);
             }
             else if (cellsBusy == 0 && cells == as && casCellsBusy()) {
-                boolean init = false;
                 try {                           // Initialize table
                     if (cells == as) {
                         Cell[] rs = new Cell[2];
                         rs[h & 1] = new Cell(x);
                         cells = rs;
-                        init = true;
+                        break done;
                     }
                 } finally {
                     cellsBusy = 0;
                 }
-                if (init)
-                    break;
             }
-            else if (casBase(v = base, ((fn == null) ? v + x :
-                                        fn.applyAsLong(v, x))))
-                break;                          // Fall back on using base
+            // Fall back on using base
+            else if (casBase(v = base,
+                             (fn == null) ? v + x : fn.applyAsLong(v, x)))
+                break done;
         }
     }
 
+    private static long apply(DoubleBinaryOperator fn, long v, double x) {
+        double d = Double.longBitsToDouble(v);
+        d = (fn == null) ? d + x : fn.applyAsDouble(d, x);
+        return Double.doubleToRawLongBits(d);
+    }
+
     /**
      * Same as longAccumulate, but injecting long/double conversions
      * in too many places to sensibly merge with long version, given
@@ -307,27 +310,24 @@
             wasUncontended = true;
         }
         boolean collide = false;                // True if last slot nonempty
-        for (;;) {
+        done: for (;;) {
             Cell[] as; Cell a; int n; long v;
             if ((as = cells) != null && (n = as.length) > 0) {
                 if ((a = as[(n - 1) & h]) == null) {
                     if (cellsBusy == 0) {       // Try to attach new Cell
                         Cell r = new Cell(Double.doubleToRawLongBits(x));
                         if (cellsBusy == 0 && casCellsBusy()) {
-                            boolean created = false;
                             try {               // Recheck under lock
                                 Cell[] rs; int m, j;
                                 if ((rs = cells) != null &&
                                     (m = rs.length) > 0 &&
                                     rs[j = (m - 1) & h] == null) {
                                     rs[j] = r;
-                                    created = true;
+                                    break done;
                                 }
                             } finally {
                                 cellsBusy = 0;
                             }
-                            if (created)
-                                break;
                             continue;           // Slot is now non-empty
                         }
                     }
@@ -335,13 +335,7 @@
                 }
                 else if (!wasUncontended)       // CAS already known to fail
                     wasUncontended = true;      // Continue after rehash
-                else if (a.cas(v = a.value,
-                               ((fn == null) ?
-                                Double.doubleToRawLongBits
-                                (Double.longBitsToDouble(v) + x) :
-                                Double.doubleToRawLongBits
-                                (fn.applyAsDouble
-                                 (Double.longBitsToDouble(v), x)))))
+                else if (a.cas(v = a.value, apply(fn, v, x)))
                     break;
                 else if (n >= NCPU || cells != as)
                     collide = false;            // At max size or stale
@@ -349,12 +343,8 @@
                     collide = true;
                 else if (cellsBusy == 0 && casCellsBusy()) {
                     try {
-                        if (cells == as) {      // Expand table unless stale
-                            Cell[] rs = new Cell[n << 1];
-                            for (int i = 0; i < n; ++i)
-                                rs[i] = as[i];
-                            cells = rs;
-                        }
+                        if (cells == as)        // Expand table unless stale
+                            cells = Arrays.copyOf(as, n << 1);
                     } finally {
                         cellsBusy = 0;
                     }
@@ -364,48 +354,38 @@
                 h = advanceProbe(h);
             }
             else if (cellsBusy == 0 && cells == as && casCellsBusy()) {
-                boolean init = false;
                 try {                           // Initialize table
                     if (cells == as) {
                         Cell[] rs = new Cell[2];
                         rs[h & 1] = new Cell(Double.doubleToRawLongBits(x));
                         cells = rs;
-                        init = true;
+                        break done;
                     }
                 } finally {
                     cellsBusy = 0;
                 }
-                if (init)
-                    break;
             }
-            else if (casBase(v = base,
-                             ((fn == null) ?
-                              Double.doubleToRawLongBits
-                              (Double.longBitsToDouble(v) + x) :
-                              Double.doubleToRawLongBits
-                              (fn.applyAsDouble
-                               (Double.longBitsToDouble(v), x)))))
-                break;                          // Fall back on using base
+            // Fall back on using base
+            else if (casBase(v = base, apply(fn, v, x)))
+                break done;
         }
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe UNSAFE;
+    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
     private static final long BASE;
     private static final long CELLSBUSY;
     private static final long PROBE;
     static {
         try {
-            UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class<?> sk = Striped64.class;
-            BASE = UNSAFE.objectFieldOffset
-                (sk.getDeclaredField("base"));
-            CELLSBUSY = UNSAFE.objectFieldOffset
-                (sk.getDeclaredField("cellsBusy"));
-            Class<?> tk = Thread.class;
-            PROBE = UNSAFE.objectFieldOffset
-                (tk.getDeclaredField("threadLocalRandomProbe"));
-        } catch (Exception e) {
+            BASE = U.objectFieldOffset
+                (Striped64.class.getDeclaredField("base"));
+            CELLSBUSY = U.objectFieldOffset
+                (Striped64.class.getDeclaredField("cellsBusy"));
+
+            PROBE = U.objectFieldOffset
+                (Thread.class.getDeclaredField("threadLocalRandomProbe"));
+        } catch (ReflectiveOperationException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/package-info.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/package-info.java	Tue Oct 06 08:42:20 2015 -0700
@@ -40,7 +40,7 @@
  * array elements to those that also provide an atomic conditional update
  * operation of the form:
  *
- *  <pre> {@code boolean compareAndSet(expectedValue, updateValue);}</pre>
+ * <pre> {@code boolean compareAndSet(expectedValue, updateValue);}</pre>
  *
  * <p>This method (which varies in argument types across different
  * classes) atomically sets a variable to the {@code updateValue} if it
@@ -67,7 +67,7 @@
  * {@code AtomicInteger} provide atomic increment methods.  One
  * application is to generate sequence numbers, as in:
  *
- *  <pre> {@code
+ * <pre> {@code
  * class Sequencer {
  *   private final AtomicLong sequenceNumber
  *     = new AtomicLong(0);
@@ -82,7 +82,7 @@
  * <pre> {@code long transform(long input)}</pre>
  *
  * write your utility method as follows:
- *  <pre> {@code
+ * <pre> {@code
  * long getAndTransform(AtomicLong var) {
  *   long prev, next;
  *   do {
@@ -94,18 +94,19 @@
  *
  * <p>The memory effects for accesses and updates of atomics generally
  * follow the rules for volatiles, as stated in
- * <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.4">
- * The Java Language Specification (17.4 Memory Model)</a>:
+ * <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-17.html#jls-17.4">
+ * Chapter 17 of
+ * <cite>The Java&trade; Language Specification</cite></a>:
  *
  * <ul>
  *
- *   <li> {@code get} has the memory effects of reading a
+ *   <li>{@code get} has the memory effects of reading a
  * {@code volatile} variable.
  *
- *   <li> {@code set} has the memory effects of writing (assigning) a
+ *   <li>{@code set} has the memory effects of writing (assigning) a
  * {@code volatile} variable.
  *
- *   <li> {@code lazySet} has the memory effects of writing (assigning)
+ *   <li>{@code lazySet} has the memory effects of writing (assigning)
  *   a {@code volatile} variable except that it permits reorderings with
  *   subsequent (but not previous) memory actions that do not themselves
  *   impose reordering constraints with ordinary non-{@code volatile}
@@ -119,7 +120,7 @@
  *   with respect to previous or subsequent reads and writes of any
  *   variables other than the target of the {@code weakCompareAndSet}.
  *
- *   <li> {@code compareAndSet}
+ *   <li>{@code compareAndSet}
  *   and all other read-and-update operations such as {@code getAndIncrement}
  *   have the memory effects of both reading and
  *   writing {@code volatile} variables.
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Tue Oct 06 08:42:20 2015 -0700
@@ -36,10 +36,10 @@
 import java.security.cert.Certificate;
 import java.security.AccessController;
 import java.security.CodeSource;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.IOUtils;
 import sun.security.action.GetPropertyAction;
 import sun.security.util.ManifestEntryVerifier;
-import sun.misc.SharedSecrets;
 import sun.security.util.SignatureFileVerifier;
 
 /**
--- a/jdk/src/java.base/share/classes/java/util/jar/JavaUtilJarAccessImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/jar/JavaUtilJarAccessImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -30,7 +30,7 @@
 import java.security.CodeSource;
 import java.util.Enumeration;
 import java.util.List;
-import sun.misc.JavaUtilJarAccess;
+import jdk.internal.misc.JavaUtilJarAccess;
 
 class JavaUtilJarAccessImpl implements JavaUtilJarAccess {
     public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException {
--- a/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java	Tue Oct 06 08:42:20 2015 -0700
@@ -140,8 +140,10 @@
  * desired locale sensitive service is not available, then the runtime looks for CLDR,
  * JRE in that order.
  * <p>
- * The default order for looking up the preferred locale providers is "CLDR,JRE,SPI",
- * so specifying "CLDR,JRE,SPI" is identical to the default behavior.
+ * The default order for looking up the preferred locale providers is "CLDR,JRE",
+ * so specifying "CLDR,JRE" is identical to the default behavior. Applications which
+ * require implementations of the locale sensitive services must explicitly specify
+ * "SPI" in order for the Java runtime to load them from the classpath.
  *
  * @since        1.6
  */
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Tue Oct 06 08:42:20 2015 -0700
@@ -44,6 +44,8 @@
 import java.util.WeakHashMap;
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
+import jdk.internal.misc.JavaUtilZipFileAccess;
+import jdk.internal.misc.SharedSecrets;
 
 import static java.util.zip.ZipConstants64.*;
 
@@ -781,12 +783,12 @@
     }
 
     static {
-        sun.misc.SharedSecrets.setJavaUtilZipFileAccess(
-            new sun.misc.JavaUtilZipFileAccess() {
+        SharedSecrets.setJavaUtilZipFileAccess(
+            new JavaUtilZipFileAccess() {
                 public boolean startsWithLocHeader(ZipFile zip) {
                     return zip.startsWithLocHeader();
                 }
-             }
+            }
         );
     }
 
--- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageFileCreator.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageFileCreator.java	Tue Oct 06 08:42:20 2015 -0700
@@ -261,6 +261,7 @@
             Map<String, List<Entry>> entriesForModule,
             ByteOrder byteOrder) throws IOException {
         ResourcePoolImpl resources = new ResourcePoolImpl(byteOrder);
+        // Doesn't contain META-INF
         Set<String> mods = modulePackagesMap.keySet();
         for (String mn : mods) {
             for (Entry entry : entriesForModule.get(mn)) {
@@ -286,6 +287,31 @@
             Archive archive = nameToArchive.get(mn);
             archive.close();
         }
+        // Fix for 8136365. Do we have an archive with module name "META-INF"?
+        // If yes, we are recreating a jimage.
+        // This is a workaround for META-INF being at the top level of resource path
+        String mn = "META-INF";
+        Archive archive = nameToArchive.get(mn);
+        if (archive != null) {
+            try {
+                for (Entry entry : entriesForModule.get(mn)) {
+                    String path = entry.name();
+                    try (InputStream stream = entry.stream()) {
+                        byte[] bytes = readAllBytes(stream);
+                        path = mn + "/" + path;
+                        try {
+                            resources.addResource(new ResourcePool.Resource(path,
+                                    ByteBuffer.wrap(bytes)));
+                        } catch (Exception ex) {
+                            throw new IOException(ex);
+                        }
+                    }
+                }
+            } finally {
+                // Done with this archive, close it.
+                archive.close();
+            }
+        }
         return resources;
     }
 
--- a/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageNativeSubstrate.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/ImageNativeSubstrate.java	Tue Oct 06 08:42:20 2015 -0700
@@ -27,8 +27,6 @@
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
-import sun.misc.JavaNioAccess;
-import sun.misc.SharedSecrets;
 
 public final class ImageNativeSubstrate implements ImageSubstrate {
     static {
@@ -42,8 +40,10 @@
             });
      }
 
-    private static final JavaNioAccess NIOACCESS =
-            SharedSecrets.getJavaNioAccess();
+    // TODO: Reinstate when the class below, NIOACCESS, is removed.
+    //private static final JavaNioAccess NIOACCESS =
+    //        SharedSecrets.getJavaNioAccess();
+
 
     private final long id;
     private final long indexAddress;
@@ -161,4 +161,59 @@
     public int[] attributeOffsets() {
         return attributeOffsets(id);
     }
+
+    // TODO: Remove when JRT-FS no longer indirectly depends on ImageNativeSubstrate
+    /**
+     * Reflective wrapper around ShareSecrets JavaNioAccess.
+     *
+     * SharedSecrets and friend interfaces moved from 'sun.misc' to 'jdk.internal.misc'
+     * in 1.9. This class provides the runtime with access to the appropriate
+     * JavaNioAccess methods whether running on 1.9, or lower.
+     */
+    static class NIOACCESS {
+
+        private static final String PKG_PREFIX = "jdk.internal.misc";
+        private static final String LEGACY_PKG_PREFIX = "sun.misc";
+
+        private static final Object javaNioAccess;
+        private static final java.lang.reflect.Method newDirectByteBufferMethod;
+
+        static {
+            try {
+                Class<?> c = getJDKClass("JavaNioAccess");
+
+                java.lang.reflect.Method m =
+                        getJDKClass("SharedSecrets").getDeclaredMethod("getJavaNioAccess");
+                javaNioAccess = m.invoke(null);
+
+                newDirectByteBufferMethod = c.getDeclaredMethod("newDirectByteBuffer",
+                                                                long.class,
+                                                                int.class,
+                                                                Object.class);
+            } catch (ReflectiveOperationException x) {
+                throw new InternalError(x);
+            }
+        }
+
+        private static Class<?> getJDKClass(String name) throws ClassNotFoundException {
+            try {
+                return Class.forName(PKG_PREFIX + "." + name);
+            } catch (ClassNotFoundException x) {
+                try {
+                    return Class.forName(LEGACY_PKG_PREFIX + "." + name);
+                } catch (ClassNotFoundException ex) {
+                    x.addSuppressed(ex);
+                    throw x;
+                }
+            }
+        }
+
+        static ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob) {
+            try {
+                return (ByteBuffer) newDirectByteBufferMethod.invoke(javaNioAccess, addr, cap, ob);
+            } catch (ReflectiveOperationException x) {
+                throw new InternalError(x);
+            }
+        }
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaAWTAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 jdk.internal.misc;
+
+public interface JavaAWTAccess {
+
+    // Returns the AppContext used for applet logging isolation, or null if
+    // no isolation is required.
+    // If there's no applet, or if the caller is a stand alone application,
+    // or running in the main app context, returns null.
+    // Otherwise, returns the AppContext of the calling applet.
+    public Object getAppletContext();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaAWTFontAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+/**
+ * SharedSecrets interface used for the access from java.text.Bidi
+ */
+
+package jdk.internal.misc;
+
+public interface JavaAWTFontAccess {
+
+    // java.awt.font.TextAttribute constants
+    public Object getTextAttributeConstant(String name);
+
+    // java.awt.font.NumericShaper
+    public void shape(Object shaper, char[] text, int start, int count);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaBeansAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package jdk.internal.misc;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+public interface JavaBeansAccess {
+    /**
+     * Returns the getter method for a property of the given name
+     * @param clazz The JavaBeans class
+     * @param property The property name
+     * @return The resolved property getter method
+     * @throws Exception
+     */
+    Method getReadMethod(Class<?> clazz, String property) throws Exception;
+
+    /**
+     * Return the <b>value</b> attribute of the associated
+     * <code>@ConstructorProperties</code> annotation if that is present.
+     * @param ctr The constructor to extract the annotation value from
+     * @return The {@code value} attribute of the <code>@ConstructorProperties</code>
+     *         annotation or {@code null} if the constructor is not annotated by
+     *         this annotation or the annotation is not accessible.
+     */
+    String[] getConstructorPropertiesValue(Constructor<?> ctr);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaIOAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2005, 2006, 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 jdk.internal.misc;
+
+import java.io.Console;
+import java.nio.charset.Charset;
+
+public interface JavaIOAccess {
+    public Console console();
+    public Charset charset();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaIOFileDescriptorAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.misc;
+
+import java.io.FileDescriptor;
+
+/*
+ * @author Chris Hegarty
+ */
+
+public interface JavaIOFileDescriptorAccess {
+    public void set(FileDescriptor obj, int fd);
+    public int get(FileDescriptor fd);
+    public void setAppend(FileDescriptor obj, boolean append);
+    public boolean getAppend(FileDescriptor obj);
+
+    // Only valid on Windows
+    public void setHandle(FileDescriptor obj, long handle);
+    public long getHandle(FileDescriptor obj);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 jdk.internal.misc;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Executable;
+import java.security.AccessControlContext;
+import java.util.Map;
+
+import sun.reflect.ConstantPool;
+import sun.reflect.annotation.AnnotationType;
+import sun.nio.ch.Interruptible;
+
+public interface JavaLangAccess {
+    /** Return the constant pool for a class. */
+    ConstantPool getConstantPool(Class<?> klass);
+
+    /**
+     * Compare-And-Swap the AnnotationType instance corresponding to this class.
+     * (This method only applies to annotation types.)
+     */
+    boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType);
+
+    /**
+     * Get the AnnotationType instance corresponding to this class.
+     * (This method only applies to annotation types.)
+     */
+    AnnotationType getAnnotationType(Class<?> klass);
+
+    /**
+     * Get the declared annotations for a given class, indexed by their types.
+     */
+    Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap(Class<?> klass);
+
+    /**
+     * Get the array of bytes that is the class-file representation
+     * of this Class' annotations.
+     */
+    byte[] getRawClassAnnotations(Class<?> klass);
+
+    /**
+     * Get the array of bytes that is the class-file representation
+     * of this Class' type annotations.
+     */
+    byte[] getRawClassTypeAnnotations(Class<?> klass);
+
+    /**
+     * Get the array of bytes that is the class-file representation
+     * of this Executable's type annotations.
+     */
+    byte[] getRawExecutableTypeAnnotations(Executable executable);
+
+    /**
+     * Returns the elements of an enum class or null if the
+     * Class object does not represent an enum type;
+     * the result is uncloned, cached, and shared by all callers.
+     */
+    <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass);
+
+    /** Set thread's blocker field. */
+    void blockedOn(Thread t, Interruptible b);
+
+    /**
+     * Registers a shutdown hook.
+     *
+     * It is expected that this method with registerShutdownInProgress=true
+     * is only used to register DeleteOnExitHook since the first file
+     * may be added to the delete on exit list by the application shutdown
+     * hooks.
+     *
+     * @param slot  the slot in the shutdown hook array, whose element
+     *              will be invoked in order during shutdown
+     * @param registerShutdownInProgress true to allow the hook
+     *        to be registered even if the shutdown is in progress.
+     * @param hook  the hook to be registered
+     *
+     * @throws IllegalStateException if shutdown is in progress and
+     *         the slot is not valid to register.
+     */
+    void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
+
+    /**
+     * Returns the number of stack frames represented by the given throwable.
+     */
+    int getStackTraceDepth(Throwable t);
+
+    /**
+     * Returns the ith StackTraceElement for the given throwable.
+     */
+    StackTraceElement getStackTraceElement(Throwable t, int i);
+
+    /**
+     * Returns a new string backed by the provided character array. The
+     * character array is not copied and must never be modified after the
+     * String is created, in order to fulfill String's contract.
+     *
+     * @param chars the character array to back the string
+     * @return a newly created string whose content is the character array
+     */
+    String newStringUnsafe(char[] chars);
+
+    /**
+     * Returns a new Thread with the given Runnable and an
+     * inherited AccessControlContext.
+     */
+    Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
+
+    /**
+     * Invokes the finalize method of the given object.
+     */
+    void invokeFinalize(Object o) throws Throwable;
+
+    /**
+     * Invokes Long.formatUnsignedLong(long val, int shift, char[] buf, int offset, int len)
+     */
+    void formatUnsignedLong(long val, int shift, char[] buf, int offset, int len);
+
+    /**
+     * Invokes Integer.formatUnsignedInt(long val, int shift, char[] buf, int offset, int len)
+     */
+    void formatUnsignedInt(int val, int shift, char[] buf, int offset, int len);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+package jdk.internal.misc;
+
+public interface JavaLangRefAccess {
+
+    /**
+     * Help ReferenceHandler thread process next pending
+     * {@link java.lang.ref.Reference}
+     *
+     * @return {@code true} if there was a pending reference and it
+     *         was enqueue-ed or {@code false} if there was no
+     *         pending reference
+     */
+    boolean tryHandlePendingReference();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2006, 2015, 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 jdk.internal.misc;
+
+import java.net.URLClassLoader;
+import sun.misc.URLClassPath;
+
+public interface JavaNetAccess {
+    /**
+     * return the URLClassPath belonging to the given loader
+     */
+    URLClassPath getURLClassPath (URLClassLoader u);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetHttpCookieAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.net.HttpCookie;
+import java.util.List;
+
+public interface JavaNetHttpCookieAccess {
+    /*
+     * Constructs cookies from Set-Cookie or Set-Cookie2 header string,
+     * retaining the original header String in the cookie itself.
+     */
+    public List<HttpCookie> parse(String header);
+
+    /*
+     * Returns the original header this cookie was constructed from, if it was
+     * constructed by parsing a header, otherwise null.
+     */
+    public String header(HttpCookie cookie);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetInetAddressAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2015, 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 jdk.internal.misc;
+
+import java.net.InetAddress;
+
+public interface JavaNetInetAddressAccess {
+    /**
+     * Return the original application specified hostname of
+     * the given InetAddress object.
+     */
+    String getOriginalHostName(InetAddress ia);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNioAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2007, 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 jdk.internal.misc;
+
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+
+public interface JavaNioAccess {
+    /**
+     * Provides access to information on buffer usage.
+     */
+    interface BufferPool {
+        String getName();
+        long getCount();
+        long getTotalCapacity();
+        long getMemoryUsed();
+    }
+    BufferPool getDirectBufferPool();
+
+    /**
+     * Constructs a direct ByteBuffer referring to the block of memory starting
+     * at the given memory address and extending {@code cap} bytes.
+     * The {@code ob} parameter is an arbitrary object that is attached
+     * to the resulting buffer.
+     */
+    ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob);
+
+    /**
+     * Truncates a buffer by changing its capacity to 0.
+     */
+    void truncate(Buffer buf);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaSecurityAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2010, 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 jdk.internal.misc;
+
+import java.security.AccessControlContext;
+import java.security.PrivilegedAction;
+
+public interface JavaSecurityAccess {
+
+    <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
+                                  AccessControlContext stack,
+                                  AccessControlContext context);
+
+    <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
+                                  AccessControlContext context);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaSecurityProtectionDomainAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.misc;
+
+import java.security.PermissionCollection;
+import java.security.ProtectionDomain;
+
+public interface JavaSecurityProtectionDomainAccess {
+    interface ProtectionDomainCache {
+        void put(ProtectionDomain pd, PermissionCollection pc);
+        PermissionCollection get(ProtectionDomain pd);
+    }
+    /**
+     * Returns the ProtectionDomainCache.
+     */
+    ProtectionDomainCache getProtectionDomainCache();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaUtilJarAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 jdk.internal.misc;
+
+import java.io.IOException;
+import java.net.URL;
+import java.security.CodeSource;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+public interface JavaUtilJarAccess {
+    public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException;
+    public CodeSource[] getCodeSources(JarFile jar, URL url);
+    public CodeSource getCodeSource(JarFile jar, URL url, String name);
+    public Enumeration<String> entryNames(JarFile jar, CodeSource[] cs);
+    public Enumeration<JarEntry> entries2(JarFile jar);
+    public void setEagerValidation(JarFile jar, boolean eager);
+    public List<Object> getManifestDigests(JarFile jar);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaUtilZipFileAccess.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 jdk.internal.misc;
+
+import java.util.zip.ZipFile;
+
+public interface JavaUtilZipFileAccess {
+    public boolean startsWithLocHeader(ZipFile zip);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Tue Oct 06 08:42:20 2015 -0700
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2002, 2015, 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 jdk.internal.misc;
+
+import java.util.jar.JarFile;
+import java.io.Console;
+import java.io.FileDescriptor;
+import java.security.ProtectionDomain;
+import java.security.AccessController;
+import sun.misc.Unsafe;
+
+/** A repository of "shared secrets", which are a mechanism for
+    calling implementation-private methods in another package without
+    using reflection. A package-private class implements a public
+    interface and provides the ability to call package-private methods
+    within that package; the object implementing that interface is
+    provided through a third package to which access is restricted.
+    This framework avoids the primary disadvantage of using reflection
+    for this purpose, namely the loss of compile-time checking. */
+
+public class SharedSecrets {
+    private static final Unsafe unsafe = Unsafe.getUnsafe();
+    private static JavaUtilJarAccess javaUtilJarAccess;
+    private static JavaLangAccess javaLangAccess;
+    private static JavaLangRefAccess javaLangRefAccess;
+    private static JavaIOAccess javaIOAccess;
+    private static JavaNetAccess javaNetAccess;
+    private static JavaNetInetAddressAccess javaNetInetAddressAccess;
+    private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
+    private static JavaNioAccess javaNioAccess;
+    private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
+    private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
+    private static JavaSecurityAccess javaSecurityAccess;
+    private static JavaUtilZipFileAccess javaUtilZipFileAccess;
+    private static JavaAWTAccess javaAWTAccess;
+    private static JavaAWTFontAccess javaAWTFontAccess;
+    private static JavaBeansAccess javaBeansAccess;
+
+    public static JavaUtilJarAccess javaUtilJarAccess() {
+        if (javaUtilJarAccess == null) {
+            // Ensure JarFile is initialized; we know that that class
+            // provides the shared secret
+            unsafe.ensureClassInitialized(JarFile.class);
+        }
+        return javaUtilJarAccess;
+    }
+
+    public static void setJavaUtilJarAccess(JavaUtilJarAccess access) {
+        javaUtilJarAccess = access;
+    }
+
+    public static void setJavaLangAccess(JavaLangAccess jla) {
+        javaLangAccess = jla;
+    }
+
+    public static JavaLangAccess getJavaLangAccess() {
+        return javaLangAccess;
+    }
+
+    public static void setJavaLangRefAccess(JavaLangRefAccess jlra) {
+        javaLangRefAccess = jlra;
+    }
+
+    public static JavaLangRefAccess getJavaLangRefAccess() {
+        return javaLangRefAccess;
+    }
+
+    public static void setJavaNetAccess(JavaNetAccess jna) {
+        javaNetAccess = jna;
+    }
+
+    public static JavaNetAccess getJavaNetAccess() {
+        if (javaNetAccess == null)
+            unsafe.ensureClassInitialized(java.net.URLClassLoader.class);
+        return javaNetAccess;
+    }
+
+    public static void setJavaNetInetAddressAccess(JavaNetInetAddressAccess jna) {
+        javaNetInetAddressAccess = jna;
+    }
+
+    public static JavaNetInetAddressAccess getJavaNetInetAddressAccess() {
+        return javaNetInetAddressAccess;
+    }
+
+    public static void setJavaNetHttpCookieAccess(JavaNetHttpCookieAccess a) {
+        javaNetHttpCookieAccess = a;
+    }
+
+    public static JavaNetHttpCookieAccess getJavaNetHttpCookieAccess() {
+        if (javaNetHttpCookieAccess == null)
+            unsafe.ensureClassInitialized(java.net.HttpCookie.class);
+        return javaNetHttpCookieAccess;
+    }
+
+    public static void setJavaNioAccess(JavaNioAccess jna) {
+        javaNioAccess = jna;
+    }
+
+    public static JavaNioAccess getJavaNioAccess() {
+        if (javaNioAccess == null) {
+            // Ensure java.nio.ByteOrder is initialized; we know that
+            // this class initializes java.nio.Bits that provides the
+            // shared secret.
+            unsafe.ensureClassInitialized(java.nio.ByteOrder.class);
+        }
+        return javaNioAccess;
+    }
+
+    public static void setJavaIOAccess(JavaIOAccess jia) {
+        javaIOAccess = jia;
+    }
+
+    public static JavaIOAccess getJavaIOAccess() {
+        if (javaIOAccess == null) {
+            unsafe.ensureClassInitialized(Console.class);
+        }
+        return javaIOAccess;
+    }
+
+    public static void setJavaIOFileDescriptorAccess(JavaIOFileDescriptorAccess jiofda) {
+        javaIOFileDescriptorAccess = jiofda;
+    }
+
+    public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() {
+        if (javaIOFileDescriptorAccess == null)
+            unsafe.ensureClassInitialized(FileDescriptor.class);
+
+        return javaIOFileDescriptorAccess;
+    }
+
+    public static void setJavaSecurityProtectionDomainAccess
+        (JavaSecurityProtectionDomainAccess jspda) {
+            javaSecurityProtectionDomainAccess = jspda;
+    }
+
+    public static JavaSecurityProtectionDomainAccess
+        getJavaSecurityProtectionDomainAccess() {
+            if (javaSecurityProtectionDomainAccess == null)
+                unsafe.ensureClassInitialized(ProtectionDomain.class);
+            return javaSecurityProtectionDomainAccess;
+    }
+
+    public static void setJavaSecurityAccess(JavaSecurityAccess jsa) {
+        javaSecurityAccess = jsa;
+    }
+
+    public static JavaSecurityAccess getJavaSecurityAccess() {
+        if (javaSecurityAccess == null) {
+            unsafe.ensureClassInitialized(AccessController.class);
+        }
+        return javaSecurityAccess;
+    }
+
+    public static JavaUtilZipFileAccess getJavaUtilZipFileAccess() {
+        if (javaUtilZipFileAccess == null)
+            unsafe.ensureClassInitialized(java.util.zip.ZipFile.class);
+        return javaUtilZipFileAccess;
+    }
+
+    public static void setJavaUtilZipFileAccess(JavaUtilZipFileAccess access) {
+        javaUtilZipFileAccess = access;
+    }
+
+    public static void setJavaAWTAccess(JavaAWTAccess jaa) {
+        javaAWTAccess = jaa;
+    }
+
+    public static JavaAWTAccess getJavaAWTAccess() {
+        // this may return null in which case calling code needs to
+        // provision for.
+        return javaAWTAccess;
+    }
+
+    public static void setJavaAWTFontAccess(JavaAWTFontAccess jafa) {
+        javaAWTFontAccess = jafa;
+    }
+
+    public static JavaAWTFontAccess getJavaAWTFontAccess() {
+        // this may return null in which case calling code needs to
+        // provision for.
+        return javaAWTFontAccess;
+    }
+
+    public static JavaBeansAccess getJavaBeansAccess() {
+        return javaBeansAccess;
+    }
+
+    public static void setJavaBeansAccess(JavaBeansAccess access) {
+        javaBeansAccess = access;
+    }
+}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaAWTAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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;
-
-public interface JavaAWTAccess {
-
-    // Returns the AppContext used for applet logging isolation, or null if
-    // no isolation is required.
-    // If there's no applet, or if the caller is a stand alone application,
-    // or running in the main app context, returns null.
-    // Otherwise, returns the AppContext of the calling applet.
-    public Object getAppletContext();
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaAWTFontAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * SharedSecrets interface used for the access from java.text.Bidi
- */
-
-package sun.misc;
-
-public interface JavaAWTFontAccess {
-
-    // java.awt.font.TextAttribute constants
-    public Object getTextAttributeConstant(String name);
-
-    // java.awt.font.NumericShaper
-    public void shape(Object shaper, char[] text, int start, int count);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaBeansAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-
-package sun.misc;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-
-public interface JavaBeansAccess {
-    /**
-     * Returns the getter method for a property of the given name
-     * @param clazz The JavaBeans class
-     * @param property The property name
-     * @return The resolved property getter method
-     * @throws Exception
-     */
-    Method getReadMethod(Class<?> clazz, String property) throws Exception;
-
-    /**
-     * Return the <b>value</b> attribute of the associated
-     * <code>@ConstructorProperties</code> annotation if that is present.
-     * @param ctr The constructor to extract the annotation value from
-     * @return The {@code value} attribute of the <code>@ConstructorProperties</code>
-     *         annotation or {@code null} if the constructor is not annotated by
-     *         this annotation or the annotation is not accessible.
-     */
-    String[] getConstructorPropertiesValue(Constructor<?> ctr);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaIOAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2005, 2006, 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.Console;
-import java.nio.charset.Charset;
-
-public interface JavaIOAccess {
-    public Console console();
-    public Charset charset();
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaIOFileDescriptorAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.misc;
-
-import java.io.FileDescriptor;
-
-/*
- * @author Chris Hegarty
- */
-
-public interface JavaIOFileDescriptorAccess {
-    public void set(FileDescriptor obj, int fd);
-    public int get(FileDescriptor fd);
-    public void setAppend(FileDescriptor obj, boolean append);
-    public boolean getAppend(FileDescriptor obj);
-
-    // Only valid on Windows
-    public void setHandle(FileDescriptor obj, long handle);
-    public long getHandle(FileDescriptor obj);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaLangAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.lang.annotation.Annotation;
-import java.lang.reflect.Executable;
-import java.security.AccessControlContext;
-import java.util.Map;
-
-import sun.reflect.ConstantPool;
-import sun.reflect.annotation.AnnotationType;
-import sun.nio.ch.Interruptible;
-
-public interface JavaLangAccess {
-    /** Return the constant pool for a class. */
-    ConstantPool getConstantPool(Class<?> klass);
-
-    /**
-     * Compare-And-Swap the AnnotationType instance corresponding to this class.
-     * (This method only applies to annotation types.)
-     */
-    boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType);
-
-    /**
-     * Get the AnnotationType instance corresponding to this class.
-     * (This method only applies to annotation types.)
-     */
-    AnnotationType getAnnotationType(Class<?> klass);
-
-    /**
-     * Get the declared annotations for a given class, indexed by their types.
-     */
-    Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap(Class<?> klass);
-
-    /**
-     * Get the array of bytes that is the class-file representation
-     * of this Class' annotations.
-     */
-    byte[] getRawClassAnnotations(Class<?> klass);
-
-    /**
-     * Get the array of bytes that is the class-file representation
-     * of this Class' type annotations.
-     */
-    byte[] getRawClassTypeAnnotations(Class<?> klass);
-
-    /**
-     * Get the array of bytes that is the class-file representation
-     * of this Executable's type annotations.
-     */
-    byte[] getRawExecutableTypeAnnotations(Executable executable);
-
-    /**
-     * Returns the elements of an enum class or null if the
-     * Class object does not represent an enum type;
-     * the result is uncloned, cached, and shared by all callers.
-     */
-    <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass);
-
-    /** Set thread's blocker field. */
-    void blockedOn(Thread t, Interruptible b);
-
-    /**
-     * Registers a shutdown hook.
-     *
-     * It is expected that this method with registerShutdownInProgress=true
-     * is only used to register DeleteOnExitHook since the first file
-     * may be added to the delete on exit list by the application shutdown
-     * hooks.
-     *
-     * @param slot  the slot in the shutdown hook array, whose element
-     *              will be invoked in order during shutdown
-     * @param registerShutdownInProgress true to allow the hook
-     *        to be registered even if the shutdown is in progress.
-     * @param hook  the hook to be registered
-     *
-     * @throws IllegalStateException if shutdown is in progress and
-     *         the slot is not valid to register.
-     */
-    void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
-
-    /**
-     * Returns the number of stack frames represented by the given throwable.
-     */
-    int getStackTraceDepth(Throwable t);
-
-    /**
-     * Returns the ith StackTraceElement for the given throwable.
-     */
-    StackTraceElement getStackTraceElement(Throwable t, int i);
-
-    /**
-     * Returns a new string backed by the provided character array. The
-     * character array is not copied and must never be modified after the
-     * String is created, in order to fulfill String's contract.
-     *
-     * @param chars the character array to back the string
-     * @return a newly created string whose content is the character array
-     */
-    String newStringUnsafe(char[] chars);
-
-    /**
-     * Returns a new Thread with the given Runnable and an
-     * inherited AccessControlContext.
-     */
-    Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
-
-    /**
-     * Invokes the finalize method of the given object.
-     */
-    void invokeFinalize(Object o) throws Throwable;
-
-    /**
-     * Invokes Long.formatUnsignedLong(long val, int shift, char[] buf, int offset, int len)
-     */
-    void formatUnsignedLong(long val, int shift, char[] buf, int offset, int len);
-
-    /**
-     * Invokes Integer.formatUnsignedInt(long val, int shift, char[] buf, int offset, int len)
-     */
-    void formatUnsignedInt(int val, int shift, char[] buf, int offset, int len);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaLangRefAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-
-package sun.misc;
-
-public interface JavaLangRefAccess {
-
-    /**
-     * Help ReferenceHandler thread process next pending
-     * {@link java.lang.ref.Reference}
-     *
-     * @return {@code true} if there was a pending reference and it
-     *         was enqueue-ed or {@code false} if there was no
-     *         pending reference
-     */
-    boolean tryHandlePendingReference();
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaNetAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2006, 2015, 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.net.URLClassLoader;
-
-public interface JavaNetAccess {
-    /**
-     * return the URLClassPath belonging to the given loader
-     */
-    URLClassPath getURLClassPath (URLClassLoader u);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaNetHttpCookieAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-import java.net.HttpCookie;
-import java.util.List;
-
-public interface JavaNetHttpCookieAccess {
-    /*
-     * Constructs cookies from Set-Cookie or Set-Cookie2 header string,
-     * retaining the original header String in the cookie itself.
-     */
-    public List<HttpCookie> parse(String header);
-
-    /*
-     * Returns the original header this cookie was constructed from, if it was
-     * constructed by parsing a header, otherwise null.
-     */
-    public String header(HttpCookie cookie);
-}
-
--- a/jdk/src/java.base/share/classes/sun/misc/JavaNetInetAddressAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2015, 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.net.InetAddress;
-
-public interface JavaNetInetAddressAccess {
-    /**
-     * Return the original application specified hostname of
-     * the given InetAddress object.
-     */
-    String getOriginalHostName(InetAddress ia);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaNioAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2007, 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 java.nio.Buffer;
-import java.nio.ByteBuffer;
-
-public interface JavaNioAccess {
-    /**
-     * Provides access to information on buffer usage.
-     */
-    interface BufferPool {
-        String getName();
-        long getCount();
-        long getTotalCapacity();
-        long getMemoryUsed();
-    }
-    BufferPool getDirectBufferPool();
-
-    /**
-     * Constructs a direct ByteBuffer referring to the block of memory starting
-     * at the given memory address and extending {@code cap} bytes.
-     * The {@code ob} parameter is an arbitrary object that is attached
-     * to the resulting buffer.
-     */
-    ByteBuffer newDirectByteBuffer(long addr, int cap, Object ob);
-
-    /**
-     * Truncates a buffer by changing its capacity to 0.
-     */
-    void truncate(Buffer buf);
-
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaSecurityAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2010, 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 java.security.AccessControlContext;
-import java.security.PrivilegedAction;
-
-public interface JavaSecurityAccess {
-
-    <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
-                                  AccessControlContext stack,
-                                  AccessControlContext context);
-
-    <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
-                                  AccessControlContext context);
-
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaSecurityProtectionDomainAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package sun.misc;
-
-import java.security.PermissionCollection;
-import java.security.ProtectionDomain;
-
-public interface JavaSecurityProtectionDomainAccess {
-    interface ProtectionDomainCache {
-        void put(ProtectionDomain pd, PermissionCollection pc);
-        PermissionCollection get(ProtectionDomain pd);
-    }
-    /**
-     * Returns the ProtectionDomainCache.
-     */
-    ProtectionDomainCache getProtectionDomainCache();
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaUtilJarAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.IOException;
-import java.net.URL;
-import java.security.CodeSource;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-public interface JavaUtilJarAccess {
-    public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException;
-    public CodeSource[] getCodeSources(JarFile jar, URL url);
-    public CodeSource getCodeSource(JarFile jar, URL url, String name);
-    public Enumeration<String> entryNames(JarFile jar, CodeSource[] cs);
-    public Enumeration<JarEntry> entries2(JarFile jar);
-    public void setEagerValidation(JarFile jar, boolean eager);
-    public List<Object> getManifestDigests(JarFile jar);
-}
--- a/jdk/src/java.base/share/classes/sun/misc/JavaUtilZipFileAccess.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.util.zip.ZipFile;
-
-public interface JavaUtilZipFileAccess {
-    public boolean startsWithLocHeader(ZipFile zip);
-}
-
--- a/jdk/src/java.base/share/classes/sun/misc/SharedSecrets.java	Mon Oct 05 20:25:04 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
- * Copyright (c) 2002, 2015, 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.util.jar.JarFile;
-import java.io.Console;
-import java.io.FileDescriptor;
-import java.security.ProtectionDomain;
-
-import java.security.AccessController;
-
-/** A repository of "shared secrets", which are a mechanism for
-    calling implementation-private methods in another package without
-    using reflection. A package-private class implements a public
-    interface and provides the ability to call package-private methods
-    within that package; the object implementing that interface is
-    provided through a third package to which access is restricted.
-    This framework avoids the primary disadvantage of using reflection
-    for this purpose, namely the loss of compile-time checking. */
-
-public class SharedSecrets {
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-    private static JavaUtilJarAccess javaUtilJarAccess;
-    private static JavaLangAccess javaLangAccess;
-    private static JavaLangRefAccess javaLangRefAccess;
-    private static JavaIOAccess javaIOAccess;
-    private static JavaNetAccess javaNetAccess;
-    private static JavaNetInetAddressAccess javaNetInetAddressAccess;
-    private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
-    private static JavaNioAccess javaNioAccess;
-    private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
-    private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
-    private static JavaSecurityAccess javaSecurityAccess;
-    private static JavaUtilZipFileAccess javaUtilZipFileAccess;
-    private static JavaAWTAccess javaAWTAccess;
-    private static JavaAWTFontAccess javaAWTFontAccess;
-    private static JavaBeansAccess javaBeansAccess;
-
-    public static JavaUtilJarAccess javaUtilJarAccess() {
-        if (javaUtilJarAccess == null) {
-            // Ensure JarFile is initialized; we know that that class
-            // provides the shared secret
-            unsafe.ensureClassInitialized(JarFile.class);
-        }
-        return javaUtilJarAccess;
-    }
-
-    public static void setJavaUtilJarAccess(JavaUtilJarAccess access) {
-        javaUtilJarAccess = access;
-    }
-
-    public static void setJavaLangAccess(JavaLangAccess jla) {
-        javaLangAccess = jla;
-    }
-
-    public static JavaLangAccess getJavaLangAccess() {
-        return javaLangAccess;
-    }
-
-    public static void setJavaLangRefAccess(JavaLangRefAccess jlra) {
-        javaLangRefAccess = jlra;
-    }
-
-    public static JavaLangRefAccess getJavaLangRefAccess() {
-        return javaLangRefAccess;
-    }
-
-    public static void setJavaNetAccess(JavaNetAccess jna) {
-        javaNetAccess = jna;
-    }
-
-    public static JavaNetAccess getJavaNetAccess() {
-        if (javaNetAccess == null)
-            unsafe.ensureClassInitialized(java.net.URLClassLoader.class);
-        return javaNetAccess;
-    }
-
-    public static void setJavaNetInetAddressAccess(JavaNetInetAddressAccess jna) {
-        javaNetInetAddressAccess = jna;
-    }
-
-    public static JavaNetInetAddressAccess getJavaNetInetAddressAccess() {
-        return javaNetInetAddressAccess;
-    }
-
-    public static void setJavaNetHttpCookieAccess(JavaNetHttpCookieAccess a) {
-        javaNetHttpCookieAccess = a;
-    }
-
-    public static JavaNetHttpCookieAccess getJavaNetHttpCookieAccess() {
-        if (javaNetHttpCookieAccess == null)
-            unsafe.ensureClassInitialized(java.net.HttpCookie.class);
-        return javaNetHttpCookieAccess;
-    }
-
-    public static void setJavaNioAccess(JavaNioAccess jna) {
-        javaNioAccess = jna;
-    }
-
-    public static JavaNioAccess getJavaNioAccess() {
-        if (javaNioAccess == null) {
-            // Ensure java.nio.ByteOrder is initialized; we know that
-            // this class initializes java.nio.Bits that provides the
-            // shared secret.
-            unsafe.ensureClassInitialized(java.nio.ByteOrder.class);
-        }
-        return javaNioAccess;
-    }
-
-    public static void setJavaIOAccess(JavaIOAccess jia) {
-        javaIOAccess = jia;
-    }
-
-    public static JavaIOAccess getJavaIOAccess() {
-        if (javaIOAccess == null) {
-            unsafe.ensureClassInitialized(Console.class);
-        }
-        return javaIOAccess;
-    }
-
-    public static void setJavaIOFileDescriptorAccess(JavaIOFileDescriptorAccess jiofda) {
-        javaIOFileDescriptorAccess = jiofda;
-    }
-
-    public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() {
-        if (javaIOFileDescriptorAccess == null)
-            unsafe.ensureClassInitialized(FileDescriptor.class);
-
-        return javaIOFileDescriptorAccess;
-    }
-
-    public static void setJavaSecurityProtectionDomainAccess
-        (JavaSecurityProtectionDomainAccess jspda) {
-            javaSecurityProtectionDomainAccess = jspda;
-    }
-
-    public static JavaSecurityProtectionDomainAccess
-        getJavaSecurityProtectionDomainAccess() {
-            if (javaSecurityProtectionDomainAccess == null)
-                unsafe.ensureClassInitialized(ProtectionDomain.class);
-            return javaSecurityProtectionDomainAccess;
-    }
-
-    public static void setJavaSecurityAccess(JavaSecurityAccess jsa) {
-        javaSecurityAccess = jsa;
-    }
-
-    public static JavaSecurityAccess getJavaSecurityAccess() {
-        if (javaSecurityAccess == null) {
-            unsafe.ensureClassInitialized(AccessController.class);
-        }
-        return javaSecurityAccess;
-    }
-
-    public static JavaUtilZipFileAccess getJavaUtilZipFileAccess() {
-        if (javaUtilZipFileAccess == null)
-            unsafe.ensureClassInitialized(java.util.zip.ZipFile.class);
-        return javaUtilZipFileAccess;
-    }
-
-    public static void setJavaUtilZipFileAccess(JavaUtilZipFileAccess access) {
-        javaUtilZipFileAccess = access;
-    }
-
-    public static void setJavaAWTAccess(JavaAWTAccess jaa) {
-        javaAWTAccess = jaa;
-    }
-
-    public static JavaAWTAccess getJavaAWTAccess() {
-        // this may return null in which case calling code needs to
-        // provision for.
-        return javaAWTAccess;
-    }
-
-    public static void setJavaAWTFontAccess(JavaAWTFontAccess jafa) {
-        javaAWTFontAccess = jafa;
-    }
-
-    public static JavaAWTFontAccess getJavaAWTFontAccess() {
-        // this may return null in which case calling code needs to
-        // provision for.
-        return javaAWTFontAccess;
-    }
-
-    public static JavaBeansAccess getJavaBeansAccess() {
-        return javaBeansAccess;
-    }
-
-    public static void setJavaBeansAccess(JavaBeansAccess access) {
-        javaBeansAccess = access;
-    }
-}
--- a/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java	Tue Oct 06 08:42:20 2015 -0700
@@ -66,6 +66,8 @@
 
 import jdk.internal.jimage.ImageLocation;
 import jdk.internal.jimage.ImageReader;
+import jdk.internal.misc.JavaUtilZipFileAccess;
+import jdk.internal.misc.SharedSecrets;
 
 import sun.net.util.URLUtil;
 import sun.net.www.ParseUtil;
@@ -622,8 +624,8 @@
         private URLStreamHandler handler;
         private HashMap<String, Loader> lmap;
         private boolean closed = false;
-        private static final sun.misc.JavaUtilZipFileAccess zipAccess =
-                sun.misc.SharedSecrets.getJavaUtilZipFileAccess();
+        private static final JavaUtilZipFileAccess zipAccess =
+                SharedSecrets.getJavaUtilZipFileAccess();
 
         /*
          * Creates a new JarLoader for the specified URL referring to
--- a/jdk/src/java.base/share/classes/sun/net/sdp/SdpSupport.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/sdp/SdpSupport.java	Tue Oct 06 08:42:20 2015 -0700
@@ -29,8 +29,8 @@
 import java.io.FileDescriptor;
 import java.security.AccessController;
 
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 
 /**
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Tue Oct 06 08:42:20 2015 -0700
@@ -65,6 +65,8 @@
 import java.util.HashMap;
 import java.util.Set;
 import java.util.StringJoiner;
+import jdk.internal.misc.JavaNetHttpCookieAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.net.*;
 import sun.net.www.*;
 import sun.net.www.http.HttpClient;
@@ -2878,8 +2880,8 @@
             if (cookieHandler == null || value.length() == 0)
                 return value;
 
-            sun.misc.JavaNetHttpCookieAccess access =
-                    sun.misc.SharedSecrets.getJavaNetHttpCookieAccess();
+            JavaNetHttpCookieAccess access =
+                    SharedSecrets.getJavaNetHttpCookieAccess();
             StringJoiner retValue = new StringJoiner(",");  // RFC 2965, comma separated
             List<HttpCookie> cookies = access.parse(value);
             for (HttpCookie cookie : cookies) {
--- a/jdk/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -44,9 +44,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.JavaNioAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.misc.Cleaner;
-import sun.misc.JavaIOFileDescriptorAccess;
-import sun.misc.SharedSecrets;
 import sun.security.action.GetPropertyAction;
 
 public class FileChannelImpl
@@ -976,8 +977,8 @@
      * Invoked by sun.management.ManagementFactoryHelper to create the management
      * interface for mapped buffers.
      */
-    public static sun.misc.JavaNioAccess.BufferPool getMappedBufferPool() {
-        return new sun.misc.JavaNioAccess.BufferPool() {
+    public static JavaNioAccess.BufferPool getMappedBufferPool() {
+        return new JavaNioAccess.BufferPool() {
             @Override
             public String getName() {
                 return "mapped";
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationSupport.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationSupport.java	Tue Oct 06 08:42:20 2015 -0700
@@ -35,12 +35,12 @@
 import java.util.Map;
 import java.util.Objects;
 
-import sun.misc.JavaLangAccess;
-import sun.reflect.LangReflectAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 import sun.reflect.ReflectionFactory;
 
 public final class AnnotationSupport {
-    private static final JavaLangAccess LANG_ACCESS = sun.misc.SharedSecrets.getJavaLangAccess();
+    private static final JavaLangAccess LANG_ACCESS = SharedSecrets.getJavaLangAccess();
 
     /**
      * Finds and returns all annotations in {@code annotations} matching
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Tue Oct 06 08:42:20 2015 -0700
@@ -25,13 +25,13 @@
 
 package sun.reflect.annotation;
 
-import sun.misc.JavaLangAccess;
-
 import java.lang.annotation.*;
 import java.lang.reflect.*;
 import java.util.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 
 /**
  * Represents an annotation type at run time.  Used to type-check annotations
@@ -79,7 +79,7 @@
     public static AnnotationType getInstance(
         Class<? extends Annotation> annotationClass)
     {
-        JavaLangAccess jla = sun.misc.SharedSecrets.getJavaLangAccess();
+        JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
         AnnotationType result = jla.getAnnotationType(annotationClass); // volatile read
         if (result == null) {
             result = new AnnotationType(annotationClass);
@@ -134,7 +134,7 @@
         // of the corresponding annotation types breaks infinite recursion.
         if (annotationClass != Retention.class &&
             annotationClass != Inherited.class) {
-            JavaLangAccess jla = sun.misc.SharedSecrets.getJavaLangAccess();
+            JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
             Map<Class<? extends Annotation>, Annotation> metaAnnotations =
                 AnnotationParser.parseSelectAnnotations(
                     jla.getRawClassAnnotations(annotationClass),
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Tue Oct 06 08:42:20 2015 -0700
@@ -35,7 +35,8 @@
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
-import sun.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
 import sun.reflect.ConstantPool;
 import static sun.reflect.annotation.TypeAnnotation.*;
 
@@ -309,7 +310,7 @@
     static TypeAnnotation[] parseAllTypeAnnotations(AnnotatedElement decl) {
         Class<?> container;
         byte[] rawBytes;
-        JavaLangAccess javaLangAccess = sun.misc.SharedSecrets.getJavaLangAccess();
+        JavaLangAccess javaLangAccess = SharedSecrets.getJavaLangAccess();
         if (decl instanceof Class) {
             container = (Class<?>)decl;
             rawBytes = javaLangAccess.getRawClassTypeAnnotations(container);
--- a/jdk/src/java.base/share/classes/sun/security/provider/PolicyFile.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/provider/PolicyFile.java	Tue Oct 06 08:42:20 2015 -0700
@@ -41,9 +41,9 @@
 import java.net.SocketPermission;
 import java.net.NetPermission;
 import java.util.concurrent.atomic.AtomicReference;
-import sun.misc.JavaSecurityProtectionDomainAccess;
-import static sun.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaSecurityProtectionDomainAccess;
+import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
+import jdk.internal.misc.SharedSecrets;
 import sun.security.util.PolicyUtil;
 import sun.security.util.PropertyExpander;
 import sun.security.util.Debug;
--- a/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java	Tue Oct 06 08:42:20 2015 -0700
@@ -49,7 +49,7 @@
  *      enum { ocsp(1), ocsp_multi(2), (255) } CertificateStatusType;
  */
 
-final class CertStatusReqItemV2 implements StatusRequest {
+final class CertStatusReqItemV2 {
 
     private final StatusRequestType statReqType;
     private final StatusRequest request;
@@ -144,8 +144,7 @@
      *
      * @return the encoded length of this {@code CertStatusReqItemV2}
      */
-    @Override
-    public int length() {
+    int length() {
         // The length is the the status type (1 byte) + the request length
         // field (2 bytes) + the StatusRequest data length.
         return request.length() + 3;
@@ -159,8 +158,7 @@
      *
      * @throws IOException if any errors occur during the encoding process
      */
-    @Override
-    public void send(HandshakeOutStream s) throws IOException {
+    void send(HandshakeOutStream s) throws IOException {
         s.putInt8(statReqType.id);
         s.putInt16(request.length());
         request.send(s);
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -42,8 +42,8 @@
 import javax.net.ssl.*;
 import sun.misc.ManagedLocalsThread;
 
-import sun.misc.JavaNetInetAddressAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaNetInetAddressAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Implementation of an SSL socket.  This is a normal connection type
@@ -2094,7 +2094,7 @@
      */
     private static String getOriginalHostname(InetAddress inetAddress) {
         /*
-         * Get the original hostname via sun.misc.SharedSecrets.
+         * Get the original hostname via jdk.internal.misc.SharedSecrets.
          */
         JavaNetInetAddressAccess jna = SharedSecrets.getJavaNetInetAddressAccess();
         String originalHostname = jna.getOriginalHostName(inetAddress);
--- a/jdk/src/java.base/share/classes/sun/security/util/Password.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/Password.java	Tue Oct 06 08:42:20 2015 -0700
@@ -29,6 +29,7 @@
 import java.nio.*;
 import java.nio.charset.*;
 import java.util.Arrays;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * A utility class for reading passwords
@@ -139,7 +140,7 @@
     private static byte[] convertToBytes(char[] pass) {
         if (enc == null) {
             synchronized (Password.class) {
-                enc = sun.misc.SharedSecrets.getJavaIOAccess()
+                enc = SharedSecrets.getJavaIOAccess()
                         .charset()
                         .newEncoder()
                         .onMalformedInput(CodingErrorAction.REPLACE)
--- a/jdk/src/java.base/share/classes/sun/text/bidi/BidiBase.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/text/bidi/BidiBase.java	Tue Oct 06 08:42:20 2015 -0700
@@ -52,8 +52,8 @@
 import java.text.AttributedCharacterIterator;
 import java.text.Bidi;
 import java.util.Arrays;
-import sun.misc.JavaAWTFontAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaAWTFontAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.text.normalizer.UBiDiProps;
 import sun.text.normalizer.UCharacter;
 import sun.text.normalizer.UTF16;
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Tue Oct 06 08:42:20 2015 -0700
@@ -185,7 +185,6 @@
                 LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
             }
             typeList.add(Type.JRE);
-            typeList.add(Type.SPI);
             defaultLocaleProviderAdapter = Type.JRE;
         }
 
--- a/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Tue Oct 06 08:42:20 2015 -0700
@@ -39,8 +39,8 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
-import sun.misc.JavaLangAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Platform logger provides an API for the JRE components to log
--- a/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java	Tue Oct 06 08:42:20 2015 -0700
@@ -430,6 +430,7 @@
             {"America/Eirunepe", ACT},
             {"America/El_Salvador", CST},
             {"America/Ensenada", PST},
+            {"America/Fort_Nelson", MST},
             {"America/Fort_Wayne", EST},
             {"America/Fortaleza", BRT},
             {"America/Glace_Bay", AST},
--- a/jdk/src/java.base/share/native/libjava/VMSupport.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/native/libjava/VMSupport.c	Tue Oct 06 08:42:20 2015 -0700
@@ -42,6 +42,7 @@
         if (!JDK_InitJvmHandle()) {
             JNU_ThrowInternalError(env,
                  "Handle for JVM not found for symbol lookup");
+            return NULL;
         }
         InitAgentProperties_fp = (INIT_AGENT_PROPERTIES_FN)
             JDK_FindJvmEntry("JVM_InitAgentProperties");
--- a/jdk/src/java.base/share/native/libjava/jni_util.h	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/native/libjava/jni_util.h	Tue Oct 06 08:42:20 2015 -0700
@@ -388,6 +388,7 @@
                           char *jniEntryName);
 
 extern size_t getLastErrorString(char *buf, size_t len);
+extern int getErrorString(int err, char *buf, size_t len);
 #ifdef __cplusplus
 } /* extern "C" */
 #endif /* __cplusplus */
--- a/jdk/src/java.base/share/native/libzip/zip_util.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/share/native/libzip/zip_util.c	Tue Oct 06 08:42:20 2015 -0700
@@ -1438,6 +1438,7 @@
 ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
 {
     char *msg;
+    char tmpbuf[1024];
 
     strcpy(entryname, entry->name);
     if (entry->csize == 0) {
@@ -1456,8 +1457,11 @@
             msg = zip->msg;
             ZIP_Unlock(zip);
             if (n == -1) {
-                jio_fprintf(stderr, "%s: %s\n", zip->name,
-                            msg != 0 ? msg : strerror(errno));
+                if (msg == 0) {
+                    getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+                    msg = tmpbuf;
+                }
+                jio_fprintf(stderr, "%s: %s\n", zip->name, msg);
                 return JNI_FALSE;
             }
             buf += n;
@@ -1470,8 +1474,11 @@
             if ((msg == NULL) || (*msg == 0)) {
                 msg = zip->msg;
             }
-            jio_fprintf(stderr, "%s: %s\n", zip->name,
-                        msg != 0 ? msg : strerror(errno));
+            if (msg == 0) {
+                getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+                msg = tmpbuf;
+            }
+            jio_fprintf(stderr, "%s: %s\n", zip->name, msg);
             return JNI_FALSE;
         }
     }
--- a/jdk/src/java.base/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -68,9 +68,23 @@
         long pipeFds = IOUtil.makePipe(false);
         fd0 = (int) (pipeFds >>> 32);
         fd1 = (int) pipeFds;
-        pollWrapper = new DevPollArrayWrapper();
-        pollWrapper.initInterrupt(fd0, fd1);
-        fdToKey = new HashMap<Integer,SelectionKeyImpl>();
+        try {
+            pollWrapper = new DevPollArrayWrapper();
+            pollWrapper.initInterrupt(fd0, fd1);
+            fdToKey = new HashMap<>();
+        } catch (Throwable t) {
+            try {
+                FileDispatcherImpl.closeIntFD(fd0);
+            } catch (IOException ioe0) {
+                t.addSuppressed(ioe0);
+            }
+            try {
+                FileDispatcherImpl.closeIntFD(fd1);
+            } catch (IOException ioe1) {
+                t.addSuppressed(ioe1);
+            }
+            throw t;
+        }
     }
 
     protected int doSelect(long timeout)
--- a/jdk/src/java.base/unix/classes/java/io/FileDescriptor.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/classes/java/io/FileDescriptor.java	Tue Oct 06 08:42:20 2015 -0700
@@ -27,6 +27,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Instances of the file descriptor class serve as an opaque handle
@@ -145,8 +147,8 @@
 
     // Set up JavaIOFileDescriptorAccess in SharedSecrets
     static {
-        sun.misc.SharedSecrets.setJavaIOFileDescriptorAccess(
-            new sun.misc.JavaIOFileDescriptorAccess() {
+        SharedSecrets.setJavaIOFileDescriptorAccess(
+            new JavaIOFileDescriptorAccess() {
                 public void set(FileDescriptor obj, int fd) {
                     obj.fd = fd;
                 }
--- a/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -46,6 +46,8 @@
 import java.security.PrivilegedAction;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * java.lang.Process subclass in the UNIX environment.
@@ -57,8 +59,8 @@
  * @since   1.5
  */
 final class ProcessImpl extends Process {
-    private static final sun.misc.JavaIOFileDescriptorAccess fdAccess
-        = sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess();
+    private static final JavaIOFileDescriptorAccess fdAccess
+        = SharedSecrets.getJavaIOFileDescriptorAccess();
 
     // Linux platforms support a normal (non-forcible) kill signal.
     static final boolean SUPPORTS_NORMAL_TERMINATION = true;
--- a/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -143,8 +143,9 @@
         password = pw.getPassword();
         init0();
         try {
-            client = new Client(System.getProperty("ntlm.version"), hostname,
-                    username, ntdomain, password);
+            String version = java.security.AccessController.doPrivileged(
+                    new sun.security.action.GetPropertyAction("ntlm.version"));
+            client = new Client(version, hostname, username, ntdomain, password);
         } catch (NTLMException ne) {
             try {
                 client = new Client(null, hostname, username, ntdomain, password);
--- a/jdk/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/ch/PollSelectorImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -57,9 +57,23 @@
         long pipeFds = IOUtil.makePipe(false);
         fd0 = (int) (pipeFds >>> 32);
         fd1 = (int) pipeFds;
-        pollWrapper = new PollArrayWrapper(INIT_CAP);
-        pollWrapper.initInterrupt(fd0, fd1);
-        channelArray = new SelectionKeyImpl[INIT_CAP];
+        try {
+            pollWrapper = new PollArrayWrapper(INIT_CAP);
+            pollWrapper.initInterrupt(fd0, fd1);
+            channelArray = new SelectionKeyImpl[INIT_CAP];
+        } catch (Throwable t) {
+            try {
+                FileDispatcherImpl.closeIntFD(fd0);
+            } catch (IOException ioe0) {
+                t.addSuppressed(ioe0);
+            }
+            try {
+                FileDispatcherImpl.closeIntFD(fd1);
+            } catch (IOException ioe1) {
+                t.addSuppressed(ioe1);
+            }
+            throw t;
+        }
     }
 
     protected int doSelect(long timeout)
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java	Tue Oct 06 08:42:20 2015 -0700
@@ -30,11 +30,11 @@
 import java.io.FileDescriptor;
 import java.util.Set;
 
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 import sun.nio.ch.FileChannelImpl;
 import sun.nio.ch.ThreadPool;
 import sun.nio.ch.SimpleAsynchronousFileChannelImpl;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
 
 import static sun.nio.fs.UnixNativeDispatcher.*;
 import static sun.nio.fs.UnixConstants.*;
--- a/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c	Tue Oct 06 08:42:20 2015 -0700
@@ -248,12 +248,13 @@
     const char *detail = defaultDetail;
     char *errmsg;
     size_t fmtsize;
+    char tmpbuf[1024];
     jstring s;
 
     if (errnum != 0) {
-        const char *s = strerror(errnum);
-        if (strcmp(s, "Unknown error") != 0)
-            detail = s;
+        int ret = getErrorString(errnum, tmpbuf, sizeof(tmpbuf));
+        if (ret != EINVAL)
+            detail = tmpbuf;
     }
     /* ASCII Decimal representation uses 2.4 times as many bits as binary. */
     fmtsize = sizeof(IOE_FORMAT) + strlen(detail) + 3 * sizeof(errnum);
--- a/jdk/src/java.base/unix/native/libjava/jni_util_md.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/native/libjava/jni_util_md.c	Tue Oct 06 08:42:20 2015 -0700
@@ -30,6 +30,13 @@
 #include "jni_util.h"
 #include "dlfcn.h"
 
+#if defined(LINUX) && (defined(_GNU_SOURCE) || \
+         (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE < 200112L \
+             && defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 600))
+extern int __xpg_strerror_r(int, char *, size_t);
+#define strerror_r(a, b, c) __xpg_strerror_r((a), (b), (c))
+#endif
+
 void* getProcessHandle() {
     static void *procHandle = NULL;
     if (procHandle != NULL) {
@@ -55,16 +62,14 @@
 size_t
 getLastErrorString(char *buf, size_t len)
 {
-    char *err;
-    size_t n;
     if (errno == 0 || len < 1) return 0;
+    getErrorString(errno, buf, len);
+    return strlen(buf);
+}
 
-    err = strerror(errno);
-    n = strlen(err);
-    if (n >= len)
-        n = len - 1;
-
-    strncpy(buf, err, n);
-    buf[n] = '\0';
-    return n;
+int
+getErrorString(int err, char *buf, size_t len)
+{
+    if (err == 0 || len < 1) return 0;
+    return strerror_r(err, buf, len);
 }
--- a/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Tue Oct 06 08:42:20 2015 -0700
@@ -918,6 +918,7 @@
                                                            jobject this) {
     jobject fdObj = (*env)->GetObjectField(env, this, pdsi_fdID);
     int arg, fd, t = 1;
+    char tmpbuf[1024];
 #ifdef AF_INET6
     int domain = ipv6_available() ? AF_INET6 : AF_INET;
 #else
@@ -953,22 +954,23 @@
     arg = 65507;
     if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
                    (char *)&arg, sizeof(arg)) < 0) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        strerror(errno));
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
         close(fd);
         return;
     }
     if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
                    (char *)&arg, sizeof(arg)) < 0) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                        strerror(errno));
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
         close(fd);
         return;
     }
 #endif /* __APPLE__ */
 
     if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST, (char*) &t, sizeof (int)) < 0) {
-        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", strerror(errno));
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
         close(fd);
         return;
     }
@@ -977,9 +979,10 @@
      arg = 0;
      int level = (domain == AF_INET6) ? IPPROTO_IPV6 : IPPROTO_IP;
      if ((setsockopt(fd, level, IP_MULTICAST_ALL, (char*)&arg, sizeof(arg)) < 0) &&
-         (errno != ENOPROTOOPT)) {
-         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
-                         strerror(errno));
+           (errno != ENOPROTOOPT))
+    {
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
          close(fd);
          return;
      }
@@ -994,7 +997,8 @@
         int ttl = 1;
         if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (char *) &ttl,
                 sizeof (ttl)) < 0) {
-            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", strerror(errno));
+            getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
             close(fd);
             return;
         }
--- a/jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c	Tue Oct 06 08:42:20 2015 -0700
@@ -315,21 +315,15 @@
 JNIEXPORT jbyteArray
 Java_sun_nio_fs_UnixNativeDispatcher_strerror(JNIEnv* env, jclass this, jint error)
 {
-    char* msg;
+    char tmpbuf[1024];
     jsize len;
     jbyteArray bytes;
 
-#ifdef _AIX
-    /* strerror() is not thread-safe on AIX so we have to use strerror_r() */
-    char buffer[256];
-    msg = (strerror_r((int)error, buffer, 256) == 0) ? buffer : "Error while calling strerror_r";
-#else
-    msg = strerror((int)error);
-#endif
-    len = strlen(msg);
+    getErrorString((int)errno, tmpbuf, sizeof(tmpbuf));
+    len = strlen(tmpbuf);
     bytes = (*env)->NewByteArray(env, len);
     if (bytes != NULL) {
-        (*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte*)msg);
+        (*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte*)tmpbuf);
     }
     return bytes;
 }
--- a/jdk/src/java.base/windows/classes/java/io/FileDescriptor.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/classes/java/io/FileDescriptor.java	Tue Oct 06 08:42:20 2015 -0700
@@ -27,6 +27,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Instances of the file descriptor class serve as an opaque handle
@@ -70,8 +72,8 @@
 
     // Set up JavaIOFileDescriptorAccess in SharedSecrets
     static {
-        sun.misc.SharedSecrets.setJavaIOFileDescriptorAccess(
-            new sun.misc.JavaIOFileDescriptorAccess() {
+        SharedSecrets.setJavaIOFileDescriptorAccess(
+            new JavaIOFileDescriptorAccess() {
                 public void set(FileDescriptor obj, int fd) {
                     obj.fd = fd;
                 }
--- a/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -42,6 +42,8 @@
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 
 /* This class is for the exclusive use of ProcessBuilder.start() to
  * create new processes.
@@ -51,8 +53,8 @@
  */
 
 final class ProcessImpl extends Process {
-    private static final sun.misc.JavaIOFileDescriptorAccess fdAccess
-        = sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess();
+    private static final JavaIOFileDescriptorAccess fdAccess
+        = SharedSecrets.getJavaIOFileDescriptorAccess();
 
     // Windows platforms support a forcible kill signal.
     static final boolean SUPPORTS_NORMAL_TERMINATION = false;
--- a/jdk/src/java.base/windows/classes/java/net/DualStackPlainDatagramSocketImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/classes/java/net/DualStackPlainDatagramSocketImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -25,8 +25,8 @@
 package java.net;
 
 import java.io.IOException;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 /**
  * This class defines the plain DatagramSocketImpl that is used on
--- a/jdk/src/java.base/windows/classes/java/net/DualStackPlainSocketImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/classes/java/net/DualStackPlainSocketImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -26,8 +26,8 @@
 
 import java.io.IOException;
 import java.io.FileDescriptor;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 /**
  * This class defines the plain SocketImpl that is used on Windows platforms
--- a/jdk/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -28,8 +28,8 @@
 import java.io.FileDescriptor;
 import java.io.IOException;
 import java.security.PrivilegedAction;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 class FileDispatcherImpl extends FileDispatcher {
 
--- a/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Tue Oct 06 08:42:20 2015 -0700
@@ -31,8 +31,8 @@
 import java.nio.BufferOverflowException;
 import java.io.IOException;
 import java.io.FileDescriptor;
-import sun.misc.SharedSecrets;
-import sun.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
 
 /**
  * Windows implementation of AsynchronousFileChannel using overlapped I/O.
--- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java	Tue Oct 06 08:42:20 2015 -0700
@@ -36,8 +36,8 @@
 
 import com.sun.nio.file.ExtendedOpenOption;
 
-import sun.misc.JavaIOFileDescriptorAccess;
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.nio.ch.FileChannelImpl;
 import sun.nio.ch.ThreadPool;
 import sun.nio.ch.WindowsAsynchronousFileChannelImpl;
--- a/jdk/src/java.base/windows/native/libjava/jni_util_md.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/native/libjava/jni_util_md.c	Tue Oct 06 08:42:20 2015 -0700
@@ -108,13 +108,9 @@
                 }
             } else if (errno != 0) {
                 // C runtime error that has no corresponding WIN32 error code
-                const WCHAR *rtError = _wcserror(errno);
-                if (rtError != NULL) {
-                    wcsncpy(utf16_osErrorMsg, rtError, cbErrorMsg);
-                    // truncate if too long
-                    utf16_osErrorMsg[cbErrorMsg - 1] = L'\0';
+                int ret = _wcserror_s(utf16_osErrorMsg, cbErrorMsg, errno);
+                if (ret == 0)
                     n = wcslen(utf16_osErrorMsg);
-                }
             } else
                 noError = TRUE; //OS has no error to report
 
@@ -147,3 +143,12 @@
     }
     return n;
 }
+
+int
+getErrorString(int err, char *buf, size_t len)
+{
+    int ret = 0;
+    if (err == 0 || len < 1) return 0;
+    ret = strerror_s(buf, len, err);
+    return ret;
+}
--- a/jdk/src/java.base/windows/native/libnet/Inet4AddressImpl.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/native/libnet/Inet4AddressImpl.c	Tue Oct 06 08:42:20 2015 -0700
@@ -283,8 +283,11 @@
  * Returns true is an ECHO_REPLY is received, otherwise, false.
  */
 static jboolean
-ping4(JNIEnv *env, unsigned long ipaddr, jint timeout) {
-
+ping4(JNIEnv *env,
+      unsigned long src_addr,
+      unsigned long dest_addr,
+      jint timeout)
+{
     // See https://msdn.microsoft.com/en-us/library/aa366050%28VS.85%29.aspx
 
     HANDLE hIcmpFile;
@@ -307,14 +310,29 @@
         return JNI_FALSE;
     }
 
-    dwRetVal = IcmpSendEcho(hIcmpFile,  // HANDLE IcmpHandle,
-                            ipaddr,     // IPAddr DestinationAddress,
-                            SendData,   // LPVOID RequestData,
-                            sizeof(SendData),   // WORD RequestSize,
-                            NULL,       // PIP_OPTION_INFORMATION RequestOptions,
-                            ReplyBuffer,// LPVOID ReplyBuffer,
-                            ReplySize,  // DWORD ReplySize,
-                            timeout);   // DWORD Timeout
+    if (src_addr == 0) {
+        dwRetVal = IcmpSendEcho(hIcmpFile,  // HANDLE IcmpHandle,
+                                dest_addr,  // IPAddr DestinationAddress,
+                                SendData,   // LPVOID RequestData,
+                                sizeof(SendData),   // WORD RequestSize,
+                                NULL,       // PIP_OPTION_INFORMATION RequestOptions,
+                                ReplyBuffer,// LPVOID ReplyBuffer,
+                                ReplySize,  // DWORD ReplySize,
+                                timeout);   // DWORD Timeout
+    } else {
+        dwRetVal = IcmpSendEcho2Ex(hIcmpFile,  // HANDLE IcmpHandle,
+                                   NULL,       // HANDLE Event
+                                   NULL,       // PIO_APC_ROUTINE ApcRoutine
+                                   NULL,       // ApcContext
+                                   src_addr,   // IPAddr SourceAddress,
+                                   dest_addr,  // IPAddr DestinationAddress,
+                                   SendData,   // LPVOID RequestData,
+                                   sizeof(SendData),   // WORD RequestSize,
+                                   NULL,       // PIP_OPTION_INFORMATION RequestOptions,
+                                   ReplyBuffer,// LPVOID ReplyBuffer,
+                                   ReplySize,  // DWORD ReplySize,
+                                   timeout);   // DWORD Timeout
+    }
 
     free(ReplyBuffer);
     IcmpCloseHandle(hIcmpFile);
@@ -337,9 +355,9 @@
                                            jint timeout,
                                            jbyteArray ifArray,
                                            jint ttl) {
-    jint addr;
+    jint src_addr = 0;
+    jint dest_addr = 0;
     jbyte caddr[4];
-    struct sockaddr_in him;
     int sz;
 
     /**
@@ -349,14 +367,28 @@
     if (sz != 4) {
       return JNI_FALSE;
     }
-    memset((char *) &him, 0, sizeof(him));
     memset((char *) caddr, 0, sizeof(caddr));
     (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr);
-    addr = ((caddr[0]<<24) & 0xff000000);
-    addr |= ((caddr[1] <<16) & 0xff0000);
-    addr |= ((caddr[2] <<8) & 0xff00);
-    addr |= (caddr[3] & 0xff);
-    addr = htonl(addr);
+    dest_addr = ((caddr[0]<<24) & 0xff000000);
+    dest_addr |= ((caddr[1] <<16) & 0xff0000);
+    dest_addr |= ((caddr[2] <<8) & 0xff00);
+    dest_addr |= (caddr[3] & 0xff);
+    dest_addr = htonl(dest_addr);
 
-    return ping4(env, addr, timeout);
+    /**
+     * If a network interface was specified, let's convert its address
+     * as well.
+     */
+    if (!(IS_NULL(ifArray))) {
+        memset((char *) caddr, 0, sizeof(caddr));
+        (*env)->GetByteArrayRegion(env, ifArray, 0, 4, caddr);
+        src_addr = ((caddr[0]<<24) & 0xff000000);
+        src_addr |= ((caddr[1] <<16) & 0xff0000);
+        src_addr |= ((caddr[2] <<8) & 0xff00);
+        src_addr |= (caddr[3] & 0xff);
+        src_addr = htonl(src_addr);
+    }
+
+    return ping4(env, src_addr, dest_addr, timeout);
 }
+
--- a/jdk/src/java.base/windows/native/libnet/TwoStacksPlainDatagramSocketImpl.c	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.base/windows/native/libnet/TwoStacksPlainDatagramSocketImpl.c	Tue Oct 06 08:42:20 2015 -0700
@@ -2211,8 +2211,11 @@
 
     optlen = sizeof(optval.i);
     if (NET_GetSockOpt(fd, level, optname, (void *)&optval, &optlen) < 0) {
-        char errmsg[255];
-        sprintf(errmsg, "error getting socket option: %s\n", strerror(errno));
+        char tmpbuf[255];
+        int size = 0;
+        char errmsg[255 + 31];
+        getErrorString(errno, tmpbuf, sizeof(tmpbuf));
+        sprintf(errmsg, "error getting socket option: %s", tmpbuf);
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", errmsg);
         return NULL;
     }
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java	Tue Oct 06 08:42:20 2015 -0700
@@ -127,7 +127,7 @@
      * @return the class loaded
      * @exception ClassNotFoundException if class is not found
      */
-    protected final static Class<?> tryToLoadClass(String className,
+    protected static final Class<?> tryToLoadClass(String className,
                                                    ClassLoader fallback)
         throws ClassNotFoundException
     {
@@ -163,7 +163,7 @@
     /*
      * private initializer
      */
-    static private DataFlavor createConstant(Class<?> rc, String prn) {
+    private static DataFlavor createConstant(Class<?> rc, String prn) {
         try {
             return new DataFlavor(rc, prn);
         } catch (Exception e) {
@@ -174,7 +174,7 @@
     /*
      * private initializer
      */
-    static private DataFlavor createConstant(String mt, String prn) {
+    private static DataFlavor createConstant(String mt, String prn) {
         try {
             return new DataFlavor(mt, prn);
         } catch (Exception e) {
@@ -185,7 +185,7 @@
     /*
      * private initializer
      */
-    static private DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
+    private static DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
         try {
             return new DataFlavor ("text/html; class=java.lang.String;document=" +
                                        htmlFlavorType + ";charset=Unicode");
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java	Tue Oct 06 08:42:20 2015 -0700
@@ -62,7 +62,7 @@
     private static native void nativeReplyToAppShouldTerminate(final boolean shouldTerminate);
     private static native void nativeRegisterForNotification(final int notification);
 
-    final static _AppEventHandler instance = new _AppEventHandler();
+    static final _AppEventHandler instance = new _AppEventHandler();
     static _AppEventHandler getInstance() {
         return instance;
     }
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eio/FileManager.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eio/FileManager.java	Tue Oct 06 08:42:20 2015 -0700
@@ -69,31 +69,31 @@
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kOnAppropriateDisk = -32767;
+    public static final short kOnAppropriateDisk = -32767;
     /**
      * Read-only system hierarchy.
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kSystemDomain = -32766;
+    public static final short kSystemDomain = -32766;
     /**
      * All users of a single machine have access to these resources.
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kLocalDomain = -32765;
+    public static final short kLocalDomain = -32765;
     /**
      * All users configured to use a common network server has access to these resources.
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kNetworkDomain = -32764;
+    public static final short kNetworkDomain = -32764;
     /**
      * Read/write. Resources that are private to the user.
      * @since Java for Mac OS X 10.5 - 1.5
          * @since Java for Mac OS X 10.5 Update 1 - 1.6
      */
-    public final static short kUserDomain = -32763;
+    public static final short kUserDomain = -32763;
 
 
         /**
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java	Tue Oct 06 08:42:20 2015 -0700
@@ -38,17 +38,17 @@
 
 public abstract class AquaButtonBorder extends AquaBorder implements Border, UIResource {
     public static final RecyclableSingleton<Dynamic> fDynamic = new RecyclableSingletonFromDefaultConstructor<Dynamic>(Dynamic.class);
-    static public AquaButtonBorder getDynamicButtonBorder() {
+    public static AquaButtonBorder getDynamicButtonBorder() {
         return fDynamic.get();
     }
 
     private static final RecyclableSingleton<Toggle> fToggle = new RecyclableSingletonFromDefaultConstructor<Toggle>(Toggle.class);
-    static public AquaButtonBorder getToggleButtonBorder() {
+    public static AquaButtonBorder getToggleButtonBorder() {
         return fToggle.get();
     }
 
     public static final RecyclableSingleton<Toolbar> fToolBar = new RecyclableSingletonFromDefaultConstructor<Toolbar>(Toolbar.class);
-    static public Border getToolBarButtonBorder() {
+    public static Border getToolBarButtonBorder() {
         return fToolBar.get();
     }
 
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java	Tue Oct 06 08:42:20 2015 -0700
@@ -63,7 +63,7 @@
         return logicalPosition;
     }
 
-    static abstract class TypeSpecifier {
+    abstract static class TypeSpecifier {
         final String name;
         final boolean setIconFont;
 
@@ -138,7 +138,7 @@
         return typeDefinitions.get().get(name);
     }
 
-    protected final static RecyclableSingleton<Map<String, TypeSpecifier>> typeDefinitions = new RecyclableSingleton<Map<String, TypeSpecifier>>() {
+    protected static final RecyclableSingleton<Map<String, TypeSpecifier>> typeDefinitions = new RecyclableSingleton<Map<String, TypeSpecifier>>() {
         protected Map<String, TypeSpecifier> getInstance() {
             return getAllTypes();
         }
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -221,7 +221,7 @@
         return new Dimension(width, height);
     }
 
-    public static abstract class LabeledButtonBorder extends AquaButtonBorder {
+    public abstract static class LabeledButtonBorder extends AquaButtonBorder {
         public LabeledButtonBorder(final SizeDescriptor sizeDescriptor) {
             super(sizeDescriptor);
         }
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -462,7 +462,7 @@
         return d;
     }
 
-    final static RecyclableSingleton<AquaHierarchyButtonListener> fHierListener = new RecyclableSingletonFromDefaultConstructor<AquaHierarchyButtonListener>(AquaHierarchyButtonListener.class);
+    static final RecyclableSingleton<AquaHierarchyButtonListener> fHierListener = new RecyclableSingletonFromDefaultConstructor<AquaHierarchyButtonListener>(AquaHierarchyButtonListener.class);
     static AquaHierarchyButtonListener getAquaHierarchyButtonListener() {
         return fHierListener.get();
     }
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java	Tue Oct 06 08:42:20 2015 -0700
@@ -35,10 +35,10 @@
 
 @SuppressWarnings("serial") // Superclass is not serializable across versions
 class AquaComboBoxButton extends JButton {
-    final protected JComboBox<Object> comboBox;
-    final protected JList<?> list;
-    final protected CellRendererPane rendererPane;
-    final protected AquaComboBoxUI ui;
+    protected final JComboBox<Object> comboBox;
+    protected final JList<?> list;
+    protected final CellRendererPane rendererPane;
+    protected final AquaComboBoxUI ui;
 
     protected final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance());
     boolean isPopDown;
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java	Tue Oct 06 08:42:20 2015 -0700
@@ -26,6 +26,8 @@
 package com.apple.laf;
 
 import java.awt.*;
+import java.awt.Insets;
+import java.awt.Rectangle;
 import java.awt.event.*;
 
 import javax.swing.*;
@@ -195,24 +197,14 @@
         final GraphicsDevice[] gs = ge.getScreenDevices();
         //System.err.println("  gs.length = " + gs.length);
         final Rectangle comboBoxBounds = comboBox.getBounds();
-        if (gs.length == 1) {
-            final Dimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();
-
-            //System.err.println("  scrSize: "+ scrSize);
-
-            // If the combo box is totally off screen, don't show a popup
-            if ((p.x + comboBoxBounds.width < 0) || (p.y + comboBoxBounds.height < 0) || (p.x > scrSize.width) || (p.y > scrSize.height)) {
-                return null;
-            }
-            Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(comboBox.getGraphicsConfiguration());
-            return new Rectangle(0, insets.top, scrSize.width, scrSize.height - insets.top - insets.bottom);
-        }
 
         for (final GraphicsDevice gd : gs) {
             final GraphicsConfiguration[] gc = gd.getConfigurations();
             for (final GraphicsConfiguration element0 : gc) {
                 final Rectangle gcBounds = element0.getBounds();
-                if (gcBounds.contains(p)) return gcBounds;
+                if (gcBounds.contains(p)) {
+                    return getAvailableScreenArea(gcBounds, element0);
+                }
             }
         }
 
@@ -222,13 +214,24 @@
             final GraphicsConfiguration[] gc = gd.getConfigurations();
             for (final GraphicsConfiguration element0 : gc) {
                 final Rectangle gcBounds = element0.getBounds();
-                if (gcBounds.intersects(comboBoxBounds)) return gcBounds;
+                if (gcBounds.intersects(comboBoxBounds)) {
+                    if (gcBounds.contains(p)) {
+                        return getAvailableScreenArea(gcBounds, element0);
+                    }
+                }
             }
         }
 
         return null;
     }
 
+    private Rectangle getAvailableScreenArea(Rectangle bounds,
+                                             GraphicsConfiguration gc) {
+        Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
+        return new Rectangle(0, insets.top, bounds.width,
+                bounds.height - insets.top);
+    }
+
     @Override
     protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
         final int itemCount = comboBox.getModel().getSize();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileSystemModel.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileSystemModel.java	Tue Oct 06 08:42:20 2015 -0700
@@ -57,8 +57,8 @@
     // private boolean fSortAscending = true;
     private boolean fSortNames = true;
     private final String[] fColumnNames;
-    public final static String SORT_BY_CHANGED = "sortByChanged";
-    public final static String SORT_ASCENDING_CHANGED = "sortAscendingChanged";
+    public static final String SORT_BY_CHANGED = "sortByChanged";
+    public static final String SORT_ASCENDING_CHANGED = "sortAscendingChanged";
 
     public AquaFileSystemModel(final JFileChooser filechooser, final JTable filelist, final String[] colNames) {
         fileCacheLock = new Object();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java	Tue Oct 06 08:42:20 2015 -0700
@@ -73,7 +73,7 @@
         public void initIconPainter(final AquaPainter<? extends JRSUIState> painter);
     }
 
-    static abstract class JRSUIIcon implements Icon, UIResource {
+    abstract static class JRSUIIcon implements Icon, UIResource {
         protected final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance());
 
         public void paintIcon(final Component c, final Graphics g, final int x, final int y) {
@@ -81,7 +81,7 @@
         }
     }
 
-    static abstract class DynamicallySizingJRSUIIcon extends JRSUIIcon {
+    abstract static class DynamicallySizingJRSUIIcon extends JRSUIIcon {
         protected final SizeDescriptor sizeDescriptor;
         protected SizeVariant sizeVariant;
 
@@ -109,7 +109,7 @@
         }
     }
 
-    static abstract class CachingScalingIcon implements Icon, UIResource {
+    abstract static class CachingScalingIcon implements Icon, UIResource {
         int width;
         int height;
         Image image;
@@ -167,7 +167,7 @@
 
     }
 
-    static abstract class ScalingJRSUIIcon implements Icon, UIResource {
+    abstract static class ScalingJRSUIIcon implements Icon, UIResource {
         final int width;
         final int height;
 
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -229,9 +229,9 @@
 
     @SuppressWarnings("serial") // Superclass is not serializable across versions
     class DockLabel extends JLabel {
-        final static int NUB_HEIGHT = 7;
-        final static int ROUND_ADDITIONAL_HEIGHT = 8;
-        final static int ROUND_ADDITIONAL_WIDTH = 12;
+        static final int NUB_HEIGHT = 7;
+        static final int ROUND_ADDITIONAL_HEIGHT = 8;
+        static final int ROUND_ADDITIONAL_WIDTH = 12;
 
         DockLabel(final String text) {
             super(text);
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java	Tue Oct 06 08:42:20 2015 -0700
@@ -529,7 +529,7 @@
 
     // extracted and adapted from DefaultEditorKit in 1.6
     @SuppressWarnings("serial") // Superclass is not serializable across versions
-    static abstract class DeleteWordAction extends TextAction {
+    abstract static class DeleteWordAction extends TextAction {
         public DeleteWordAction(final String name) { super(name); }
 
         public void actionPerformed(final ActionEvent e) {
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaRootPaneUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaRootPaneUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -48,7 +48,7 @@
 public class AquaRootPaneUI extends BasicRootPaneUI implements AncestorListener, WindowListener, ContainerListener {
     private static final RecyclableSingleton<AquaRootPaneUI> sRootPaneUI = new RecyclableSingletonFromDefaultConstructor<AquaRootPaneUI>(AquaRootPaneUI.class);
 
-    final static int kDefaultButtonPaintDelayBetweenFrames = 50;
+    static final int kDefaultButtonPaintDelayBetweenFrames = 50;
     JButton fCurrentDefaultButton = null;
     Timer fTimer = null;
     static final boolean sUseScreenMenuBar = AquaMenuBarUI.getScreenMenuBarProperty();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -2011,20 +2011,20 @@
     }
 
     private static class Actions extends UIAction {
-        final static String NEXT = "navigateNext";
-        final static String PREVIOUS = "navigatePrevious";
-        final static String RIGHT = "navigateRight";
-        final static String LEFT = "navigateLeft";
-        final static String UP = "navigateUp";
-        final static String DOWN = "navigateDown";
-        final static String PAGE_UP = "navigatePageUp";
-        final static String PAGE_DOWN = "navigatePageDown";
-        final static String REQUEST_FOCUS = "requestFocus";
-        final static String REQUEST_FOCUS_FOR_VISIBLE = "requestFocusForVisibleComponent";
-        final static String SET_SELECTED = "setSelectedIndex";
-        final static String SELECT_FOCUSED = "selectTabWithFocus";
-        final static String SCROLL_FORWARD = "scrollTabsForwardAction";
-        final static String SCROLL_BACKWARD = "scrollTabsBackwardAction";
+        static final String NEXT = "navigateNext";
+        static final String PREVIOUS = "navigatePrevious";
+        static final String RIGHT = "navigateRight";
+        static final String LEFT = "navigateLeft";
+        static final String UP = "navigateUp";
+        static final String DOWN = "navigateDown";
+        static final String PAGE_UP = "navigatePageUp";
+        static final String PAGE_DOWN = "navigatePageDown";
+        static final String REQUEST_FOCUS = "requestFocus";
+        static final String REQUEST_FOCUS_FOR_VISIBLE = "requestFocusForVisibleComponent";
+        static final String SET_SELECTED = "setSelectedIndex";
+        static final String SELECT_FOCUSED = "selectTabWithFocus";
+        static final String SCROLL_FORWARD = "scrollTabsForwardAction";
+        static final String SCROLL_BACKWARD = "scrollTabsBackwardAction";
 
         Actions(final String key) {
             super(key);
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -67,7 +67,7 @@
         super.uninstallDefaults();
     }
 
-    final static RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
+    static final RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
         @Override
         @SuppressWarnings("unchecked")
         protected ClientPropertyApplicator<JTableHeader, JTableHeader> getInstance() {
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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.awt.*;
 import java.beans.*;
-import java.lang.reflect.Method;
 
 import javax.swing.*;
 import javax.swing.border.Border;
@@ -38,16 +37,20 @@
 
 import com.apple.laf.AquaUtils.RecyclableSingleton;
 import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor;
+import sun.security.action.GetPropertyAction;
+
+import static java.security.AccessController.*;
 
 public class AquaUtilControlSize {
-    protected final static String CLIENT_PROPERTY_KEY = "JComponent.sizeVariant";
-    protected final static String SYSTEM_PROPERTY_KEY = "swing.component.sizevariant";
+    protected static final String CLIENT_PROPERTY_KEY = "JComponent.sizeVariant";
+    protected static final String SYSTEM_PROPERTY_KEY = "swing.component.sizevariant";
 
     interface Sizeable {
         void applySizeFor(final JComponent c, final Size size);
     }
 
-    protected static final RecyclableSingleton<PropertySizeListener> sizeListener = new RecyclableSingletonFromDefaultConstructor<PropertySizeListener>(PropertySizeListener.class);
+    protected static final RecyclableSingleton<PropertySizeListener> sizeListener
+            = new RecyclableSingletonFromDefaultConstructor<>(PropertySizeListener.class);
     protected static PropertySizeListener getSizeListener() {
         return sizeListener.get();
     }
@@ -70,13 +73,13 @@
     }
 
     private static Size getDefaultSize() {
-        final String sizeProperty = java.security.AccessController.doPrivileged(new sun.security.action.GetPropertyAction(SYSTEM_PROPERTY_KEY));
+        final String sizeProperty = doPrivileged(new GetPropertyAction(SYSTEM_PROPERTY_KEY));
         final JRSUIConstants.Size size = getSizeFromString(sizeProperty);
         if (size != null) return size;
         return JRSUIConstants.Size.REGULAR;
     }
 
-    protected final static JRSUIConstants.Size defaultSize = getDefaultSize();
+    protected static final JRSUIConstants.Size defaultSize = getDefaultSize();
     protected static JRSUIConstants.Size getUserSizeFrom(final JComponent c) {
         final Object sizeProp = c.getClientProperty(CLIENT_PROPERTY_KEY);
         if (sizeProp == null) return defaultSize;
@@ -85,20 +88,32 @@
         return size;
     }
 
-    protected static JRSUIConstants.Size applySizeForControl(final JComponent c, final AquaPainter<? extends JRSUIState> painter) {
+    protected static JRSUIConstants.Size applySizeForControl(final JComponent c,
+                                                             final AquaPainter<? extends JRSUIState> painter) {
         final JRSUIConstants.Size sizeFromUser = getUserSizeFrom(c);
-        final JRSUIConstants.Size size = sizeFromUser == null ? JRSUIConstants.Size.REGULAR : sizeFromUser;
+        final JRSUIConstants.Size size = sizeFromUser == null
+                                         ? JRSUIConstants.Size.REGULAR
+                                         : sizeFromUser;
         painter.state.set(size);
         return size;
     }
 
-    protected static Font getFontForSize(final Component c, final JRSUIConstants.Size size) {
+    protected static Font getFontForSize(final Component c,
+                                         final JRSUIConstants.Size size) {
         final Font initialFont = c.getFont();
 
-        if (size == null || !(initialFont instanceof UIResource)) return initialFont;
+        if (size == null || !(initialFont instanceof UIResource)) {
+            return initialFont;
+        }
 
-        if (size == JRSUIConstants.Size.MINI) return initialFont.deriveFont(AquaFonts.getMiniControlTextFont().getSize2D());
-        if (size == JRSUIConstants.Size.SMALL) return initialFont.deriveFont(AquaFonts.getSmallControlTextFont().getSize2D());
+        if (size == JRSUIConstants.Size.MINI) {
+            return initialFont.deriveFont(
+                    AquaFonts.getMiniControlTextFont().getSize2D());
+        }
+        if (size == JRSUIConstants.Size.SMALL) {
+            return initialFont.deriveFont(
+                    AquaFonts.getSmallControlTextFont().getSize2D());
+        }
 
         return initialFont.deriveFont(AquaFonts.getControlTextFont().getSize2D());
     }
@@ -115,25 +130,8 @@
         c.setBorder(derivedBorder);
     }
 
-    // call JComponent.getUI() if it exists, then call Sizeable.applySizeFor() if the UI is "Sizeable"
-    // next best thing to -respondsToSelector: :-P
-    private static void applyUISizing(final JComponent c, final Size size) {
-        try {
-            // see if this component has a "getUI" method
-            final Class<? extends JComponent> clazz = c.getClass();
-            final Method getUIMethod = clazz.getMethod("getUI", new Class<?>[0]);
-
-            // see if that UI is one of ours that understands sizing
-            final Object ui = getUIMethod.invoke(c, new Object[0]);
-            if (!(ui instanceof Sizeable)) return;
-
-            // size it!
-            final Sizeable sizeable = (Sizeable)ui;
-            sizeable.applySizeFor(c, size);
-        } catch (final Throwable e) { return; }
-    }
-
     protected static class PropertySizeListener implements PropertyChangeListener {
+        @Override
         public void propertyChange(final PropertyChangeEvent evt) {
             final String key = evt.getPropertyName();
             if (!CLIENT_PROPERTY_KEY.equalsIgnoreCase(key)) return;
@@ -154,7 +152,10 @@
 
             applyBorderForSize(c, size);
 
-            applyUISizing(c, size);
+            final Object ui = c.getUI();
+            if (ui instanceof Sizeable) {
+                ((Sizeable) ui).applySizeFor(c, size);
+            }
 
             final Font priorFont = c.getFont();
             if (!(priorFont instanceof FontUIResource)) return;
@@ -200,6 +201,7 @@
             return regular;
         }
 
+        @Override
         public String toString() {
             return "regular[" + regular + "] small[" + small + "] mini[" + mini + "]";
         }
@@ -223,8 +225,14 @@
 
         public SizeVariant(final SizeVariant desc){
             this.size = desc.size;
-            this.insets = new InsetsUIResource(desc.insets.top, desc.insets.left, desc.insets.bottom, desc.insets.right);
-            this.margins = new InsetsUIResource(desc.margins.top, desc.margins.left, desc.margins.bottom, desc.margins.right);
+            this.insets = new InsetsUIResource(desc.insets.top,
+                                               desc.insets.left,
+                                               desc.insets.bottom,
+                                               desc.insets.right);
+            this.margins = new InsetsUIResource(desc.margins.top,
+                                                desc.margins.left,
+                                                desc.margins.bottom,
+                                                desc.margins.right);
             this.fontSize = desc.fontSize;
             this.w = desc.w;
             this.h = desc.h;
@@ -241,7 +249,8 @@
             return this;
         }
 
-        public SizeVariant alterInsets(final int top, final int left, final int bottom, final int right) {
+        public SizeVariant alterInsets(final int top, final int left,
+                                       final int bottom, final int right) {
             insets = generateInsets(insets, top, left, bottom, right);
             return this;
         }
@@ -251,7 +260,8 @@
             return this;
         }
 
-        public SizeVariant alterMargins(final int top, final int left, final int bottom, final int right) {
+        public SizeVariant alterMargins(final int top, final int left,
+                                        final int bottom, final int right) {
             margins = generateInsets(margins, top, left, bottom, right);
             return this;
         }
@@ -273,8 +283,12 @@
 //            return this;
 //        }
 
-        static Insets generateInsets(final Insets i, final int top, final int left, final int bottom, final int right) {
-            if (i == null) return new InsetsUIResource(top, left, bottom, right);
+        static Insets generateInsets(final Insets i, final int top,
+                                     final int left, final int bottom,
+                                     final int right) {
+            if (i == null) {
+                return new InsetsUIResource(top, left, bottom, right);
+            }
             i.top += top;
             i.left += left;
             i.bottom += bottom;
@@ -282,8 +296,10 @@
             return i;
         }
 
+        @Override
         public String toString() {
-            return "insets:" + insets + ", margins:" + margins + ", fontSize:" + fontSize;// + ", textBaseline:" + textBaseline;
+            return "insets:" + insets + ", margins:" + margins + ", fontSize:"
+                    + fontSize;// + ", textBaseline:" + textBaseline;
         }
     }
 }
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/CRenderer.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/CRenderer.java	Tue Oct 06 08:42:20 2015 -0700
@@ -36,7 +36,7 @@
 import sun.lwawt.macosx.*;
 
 public class CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, DrawImagePipe {
-    native static void init();
+    static native void init();
 
     // cache of the runtime options
     static {
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/CompositeCRenderer.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/CompositeCRenderer.java	Tue Oct 06 08:42:20 2015 -0700
@@ -35,8 +35,8 @@
 import sun.java2d.pipe.*;
 
 public class CompositeCRenderer extends CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, DrawImagePipe, TextPipe {
-    final static int fPadding = 4;
-    final static int fPaddingHalf = fPadding / 2;
+    static final int fPadding = 4;
+    static final int fPaddingHalf = fPadding / 2;
 
     private static AffineTransform sIdentityMatrix = new AffineTransform();
 
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Tue Oct 06 08:42:20 2015 -0700
@@ -43,8 +43,8 @@
  * This is the SurfaceData for a CGContextRef.
  */
 public abstract class OSXSurfaceData extends BufImgSurfaceData {
-    final static float UPPER_BND = Float.MAX_VALUE / 2.0f;
-    final static float LOWER_BND = -UPPER_BND;
+    static final float UPPER_BND = Float.MAX_VALUE / 2.0f;
+    static final float LOWER_BND = -UPPER_BND;
 
     protected static CRenderer sQuartzPipe = null;
     protected static CTextPipe sCocoaTextPipe = null;
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java	Tue Oct 06 08:42:20 2015 -0700
@@ -365,7 +365,7 @@
     // Mac OS X specific APIs for JOGL/Java2D bridge...
 
     // given a surface create and attach GL context, then return it
-    private native static long createCGLContextOnSurface(CGLSurfaceData sd,
+    private static native long createCGLContextOnSurface(CGLSurfaceData sd,
             long sharedContext);
 
     public static long createOGLContextOnSurface(Graphics g, long sharedContext) {
@@ -379,7 +379,7 @@
     }
 
     // returns whether or not the makeCurrent operation succeeded
-    native static boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd,
+    static native boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd,
             long ctx);
 
     public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) {
@@ -393,7 +393,7 @@
     }
 
     // additional cleanup
-    private native static void destroyCGLContext(long ctx);
+    private static native void destroyCGLContext(long ctx);
 
     public static void destroyOGLContext(long ctx) {
         if (ctx != 0L) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java	Tue Oct 06 08:42:20 2015 -0700
@@ -43,12 +43,12 @@
 
 public abstract class LWToolkit extends SunToolkit implements Runnable {
 
-    private final static int STATE_NONE = 0;
-    private final static int STATE_INIT = 1;
-    private final static int STATE_MESSAGELOOP = 2;
-    private final static int STATE_SHUTDOWN = 3;
-    private final static int STATE_CLEANUP = 4;
-    private final static int STATE_DONE = 5;
+    private static final int STATE_NONE = 0;
+    private static final int STATE_INIT = 1;
+    private static final int STATE_MESSAGELOOP = 2;
+    private static final int STATE_SHUTDOWN = 3;
+    private static final int STATE_CLEANUP = 4;
+    private static final int STATE_DONE = 5;
 
     private int runState = STATE_NONE;
 
@@ -454,14 +454,14 @@
     /*
      * Expose non-public targetToPeer() method.
      */
-    public final static Object targetToPeer(Object target) {
+    public static final Object targetToPeer(Object target) {
         return SunToolkit.targetToPeer(target);
     }
 
     /*
      * Expose non-public targetDisposedPeer() method.
      */
-    public final static void targetDisposedPeer(Object target, Object peer) {
+    public static final void targetDisposedPeer(Object target, Object peer) {
         SunToolkit.targetDisposedPeer(target, peer);
     }
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java	Tue Oct 06 08:42:20 2015 -0700
@@ -558,9 +558,9 @@
 
     // Duplicated from JavaComponentAccessibility
     // Note that values >=0 are indexes into the child array
-    final static int JAVA_AX_ALL_CHILDREN = -1;
-    final static int JAVA_AX_SELECTED_CHILDREN = -2;
-    final static int JAVA_AX_VISIBLE_CHILDREN = -3;
+    static final int JAVA_AX_ALL_CHILDREN = -1;
+    static final int JAVA_AX_SELECTED_CHILDREN = -2;
+    static final int JAVA_AX_VISIBLE_CHILDREN = -3;
 
     // Each child takes up two entries in the array: one for itself and one for its role
     public static Object[] getChildrenAndRoles(final Accessible a, final Component c, final int whichChildren, final boolean allowIgnored) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Tue Oct 06 08:42:20 2015 -0700
@@ -171,7 +171,7 @@
     }
 
     @Override
-    synchronized protected Long getFormatForNativeAsLong(String str) {
+    protected synchronized Long getFormatForNativeAsLong(String str) {
         Long format = predefinedClipboardNameMap.get(str);
 
         if (format == null) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java	Tue Oct 06 08:42:20 2015 -0700
@@ -422,7 +422,7 @@
      * Tell the component to commit all of the characters in the string to the current
      * text view. This effectively wipes out any text in progress.
      */
-    synchronized private void insertText(String aString) {
+    private synchronized void insertText(String aString) {
         AttributedString attribString = new AttributedString(aString);
 
         // Set locale information on the new string.
@@ -447,11 +447,11 @@
         fCurrentTextLength = rawText.length();
     }
 
-    static private final int kCaretPosition = 0;
-    static private final int kRawText = 1;
-    static private final int kSelectedRawText = 2;
-    static private final int kConvertedText = 3;
-    static private final int kSelectedConvertedText = 4;
+    private static final int kCaretPosition = 0;
+    private static final int kRawText = 1;
+    private static final int kSelectedRawText = 2;
+    private static final int kConvertedText = 3;
+    private static final int kSelectedConvertedText = 4;
 
     /**
      * Convert Cocoa text highlight attributes into Java input method highlighting.
@@ -556,7 +556,7 @@
     /**
      * Frequent callbacks from NSTextInput.  I think we're supposed to commit it here?
      */
-    synchronized private void unmarkText() {
+    private synchronized void unmarkText() {
         if (fCurrentText == null)
             return;
 
@@ -574,7 +574,7 @@
         fCurrentTextLength = 0;
     }
 
-    synchronized private boolean hasMarkedText() {
+    private synchronized boolean hasMarkedText() {
         return fCurrentText != null;
     }
 
@@ -583,7 +583,7 @@
      * Java does not.  So, we have to see where the request is and based on that return the right
      * substring.
      */
-    synchronized private String attributedSubstringFromRange(final int locationIn, final int lengthIn) {
+    private synchronized String attributedSubstringFromRange(final int locationIn, final int lengthIn) {
         final String[] retString = new String[1];
 
         try {
@@ -635,7 +635,7 @@
      * for the fact that the insert point in Swing can come AFTER the selected text, making this
      * potentially incorrect.
      */
-    synchronized private int[] selectedRange() {
+    private synchronized int[] selectedRange() {
         final int[] returnValue = new int[2];
 
         try {
@@ -683,7 +683,7 @@
      * inserted, so we can return that position, and the length of the text in progress.  If there is no marked text
      * return null.
      */
-    synchronized private int[] markedRange() {
+    private synchronized int[] markedRange() {
         if (fCurrentText == null)
             return null;
 
@@ -710,7 +710,7 @@
      * which is always in front of the in-progress text, we get the offset into the composed text, and we get
      * that location from the input method context.
      */
-    synchronized private int[] firstRectForCharacterRange(final int absoluteTextOffset) {
+    private synchronized int[] firstRectForCharacterRange(final int absoluteTextOffset) {
         final int[] rect = new int[4];
 
         try {
@@ -753,7 +753,7 @@
      * The coordinates are in Java screen coordinates.  If no character in the composed text was hit, we return -1, indicating
      * not found.
      */
-    synchronized private int characterIndexForPoint(final int screenX, final int screenY) {
+    private synchronized int characterIndexForPoint(final int screenX, final int screenY) {
         final TextHitInfo[] offsetInfo = new TextHitInfo[1];
         final int[] insertPositionOffset = new int[1];
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Tue Oct 06 08:42:20 2015 -0700
@@ -45,8 +45,8 @@
     private static class Lock {}
     private final Lock lock = new Lock();
 
-    private final static int SHOWING_DELAY = 300;
-    private final static int HIDING_DELAY = 2000;
+    private static final int SHOWING_DELAY = 300;
+    private static final int HIDING_DELAY = 2000;
 
     private Rectangle bounds = new Rectangle();
     private final WeakReference<LWWindowPeer> ownerPeer;
@@ -406,7 +406,7 @@
     private final Lock taskLock = new Lock();
     private CancelableRunnable showHideTask;
 
-    private static abstract class CancelableRunnable implements Runnable {
+    private abstract static class CancelableRunnable implements Runnable {
         private volatile boolean perform = true;
 
         public final void cancel() {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CocoaConstants.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CocoaConstants.java	Tue Oct 06 08:42:20 2015 -0700
@@ -30,35 +30,35 @@
     private CocoaConstants(){}
 
     //from the NSEvent class reference:
-    public final static int NSLeftMouseDown      = 1;
-    public final static int NSLeftMouseUp        = 2;
-    public final static int NSRightMouseDown     = 3;
-    public final static int NSRightMouseUp       = 4;
-    public final static int NSMouseMoved         = 5;
-    public final static int NSLeftMouseDragged   = 6;
-    public final static int NSRightMouseDragged  = 7;
-    public final static int NSMouseEntered       = 8;
-    public final static int NSMouseExited        = 9;
-    public final static int NSKeyDown            = 10;
-    public final static int NSKeyUp              = 11;
-    public final static int NSFlagsChanged       = 12;
+    public static final int NSLeftMouseDown      = 1;
+    public static final int NSLeftMouseUp        = 2;
+    public static final int NSRightMouseDown     = 3;
+    public static final int NSRightMouseUp       = 4;
+    public static final int NSMouseMoved         = 5;
+    public static final int NSLeftMouseDragged   = 6;
+    public static final int NSRightMouseDragged  = 7;
+    public static final int NSMouseEntered       = 8;
+    public static final int NSMouseExited        = 9;
+    public static final int NSKeyDown            = 10;
+    public static final int NSKeyUp              = 11;
+    public static final int NSFlagsChanged       = 12;
 
-    public final static int NSScrollWheel        = 22;
-    public final static int NSOtherMouseDown     = 25;
-    public final static int NSOtherMouseUp       = 26;
-    public final static int NSOtherMouseDragged  = 27;
+    public static final int NSScrollWheel        = 22;
+    public static final int NSOtherMouseDown     = 25;
+    public static final int NSOtherMouseUp       = 26;
+    public static final int NSOtherMouseDragged  = 27;
 
-    public final static int AllLeftMouseEventsMask =
+    public static final int AllLeftMouseEventsMask =
         1 << NSLeftMouseDown |
         1 << NSLeftMouseUp |
         1 << NSLeftMouseDragged;
 
-    public final static int AllRightMouseEventsMask =
+    public static final int AllRightMouseEventsMask =
         1 << NSRightMouseDown |
         1 << NSRightMouseUp |
         1 << NSRightMouseDragged;
 
-    public final static int AllOtherMouseEventsMask =
+    public static final int AllOtherMouseEventsMask =
         1 << NSOtherMouseDown |
         1 << NSOtherMouseUp |
         1 << NSOtherMouseDragged;
@@ -82,24 +82,24 @@
 
     // See http://developer.apple.com/library/mac/#documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
 
-    public final static int kCGMouseButtonLeft   = 0;
-    public final static int kCGMouseButtonRight  = 1;
-    public final static int kCGMouseButtonCenter = 2;
+    public static final int kCGMouseButtonLeft   = 0;
+    public static final int kCGMouseButtonRight  = 1;
+    public static final int kCGMouseButtonCenter = 2;
 
     // See https://wiki.mozilla.org/NPAPI:CocoaEventModel
 
-    public final static int NPCocoaEventDrawRect           = 1;
-    public final static int NPCocoaEventMouseDown          = 2;
-    public final static int NPCocoaEventMouseUp            = 3;
-    public final static int NPCocoaEventMouseMoved         = 4;
-    public final static int NPCocoaEventMouseEntered       = 5;
-    public final static int NPCocoaEventMouseExited        = 6;
-    public final static int NPCocoaEventMouseDragged       = 7;
-    public final static int NPCocoaEventKeyDown            = 8;
-    public final static int NPCocoaEventKeyUp              = 9;
-    public final static int NPCocoaEventFlagsChanged       = 10;
-    public final static int NPCocoaEventFocusChanged       = 11;
-    public final static int NPCocoaEventWindowFocusChanged = 12;
-    public final static int NPCocoaEventScrollWheel        = 13;
-    public final static int NPCocoaEventTextInput          = 14;
+    public static final int NPCocoaEventDrawRect           = 1;
+    public static final int NPCocoaEventMouseDown          = 2;
+    public static final int NPCocoaEventMouseUp            = 3;
+    public static final int NPCocoaEventMouseMoved         = 4;
+    public static final int NPCocoaEventMouseEntered       = 5;
+    public static final int NPCocoaEventMouseExited        = 6;
+    public static final int NPCocoaEventMouseDragged       = 7;
+    public static final int NPCocoaEventKeyDown            = 8;
+    public static final int NPCocoaEventKeyUp              = 9;
+    public static final int NPCocoaEventFlagsChanged       = 10;
+    public static final int NPCocoaEventFocusChanged       = 11;
+    public static final int NPCocoaEventWindowFocusChanged = 12;
+    public static final int NPCocoaEventScrollWheel        = 13;
+    public static final int NPCocoaEventTextInput          = 14;
 }
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Tue Oct 06 08:42:20 2015 -0700
@@ -127,10 +127,10 @@
     /*
      * System colors with default initial values, overwritten by toolkit if system values differ and are available.
      */
-    private final static int NUM_APPLE_COLORS = 3;
-    public final static int KEYBOARD_FOCUS_COLOR = 0;
-    public final static int INACTIVE_SELECTION_BACKGROUND_COLOR = 1;
-    public final static int INACTIVE_SELECTION_FOREGROUND_COLOR = 2;
+    private static final int NUM_APPLE_COLORS = 3;
+    public static final int KEYBOARD_FOCUS_COLOR = 0;
+    public static final int INACTIVE_SELECTION_BACKGROUND_COLOR = 1;
+    public static final int INACTIVE_SELECTION_FOREGROUND_COLOR = 2;
     private static int[] appleColors = {
         0xFF808080, // keyboardFocusColor = Color.gray;
         0xFFC0C0C0, // secondarySelectedControlColor
@@ -681,7 +681,7 @@
      * @param r a {@code Runnable} to execute
      * @param delay a delay in milliseconds
      */
-    native static void performOnMainThreadAfterDelay(Runnable r, long delay);
+    static native void performOnMainThreadAfterDelay(Runnable r, long delay);
 
 // DnD support
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.h	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.h	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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,8 +26,6 @@
 #ifndef __AWTEVENT_H
 #define __AWTEVENT_H
 
-#import "LWCToolkit.h"
-
 jlong UTC(NSEvent *event);
 void DeliverJavaKeyEvent(JNIEnv *env, NSEvent *event, jobject peer);
 void DeliverJavaMouseEvent(JNIEnv *env, NSEvent *event, jobject peer);
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m	Tue Oct 06 08:42:20 2015 -0700
@@ -23,18 +23,15 @@
  * questions.
  */
 
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
-#import <sys/time.h>
-#include <Carbon/Carbon.h>
-
-#import "jni_util.h" 
-#import "LWCToolkit.h"
-#import "ThreadUtilities.h"
-
 #import "java_awt_event_InputEvent.h"
 #import "java_awt_event_KeyEvent.h"
-#import "java_awt_event_MouseEvent.h"
+#import "LWCToolkit.h"
+
+#import "jni_util.h"
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import <sys/time.h>
+#import <Carbon/Carbon.h>
 
 /*
  * Table to map typed characters to their Java virtual key equivalent and back.
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.h	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.h	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -24,7 +24,6 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #import "CDragSource.h"
 #import "CDropTarget.h"
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,22 +23,17 @@
  * questions.
  */
 
+#import "jni_util.h"
 #import "CGLGraphicsConfig.h"
-
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
-#import "jni_util.h"
-
-#import "ThreadUtilities.h"
 #import "AWTView.h"
-#import "AWTEvent.h"
 #import "AWTWindow.h"
-#import "LWCToolkit.h"
 #import "JavaComponentAccessibility.h"
 #import "JavaTextAccessibility.h"
 #import "GeomUtilities.h"
 #import "OSVersion.h"
-#import "CGLLayer.h"
+#import "ThreadUtilities.h"
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 @interface AWTView()
 @property (retain) CDropTarget *_dropTarget;
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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,13 +27,12 @@
 #define _AWTWINDOW_H
 
 #import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #import "CMenuBar.h"
 #import "LWCToolkit.h"
 
-
 @class AWTView;
+@class JNFWeakJObjectWrapper;
 
 @interface AWTWindow : NSObject <NSWindowDelegate> {
 @private
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Tue Oct 06 08:42:20 2015 -0700
@@ -25,7 +25,6 @@
 
 #import <Cocoa/Cocoa.h>
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
 
 #import "sun_lwawt_macosx_CPlatformWindow.h"
 #import "com_apple_eawt_event_GestureHandler.h"
@@ -34,12 +33,8 @@
 
 #import "AWTWindow.h"
 #import "AWTView.h"
-#import "CMenu.h"
-#import "CMenuBar.h"
-#import "LWCToolkit.h"
 #import "GeomUtilities.h"
 #import "ThreadUtilities.h"
-#import "OSVersion.h"
 
 #define MASK(KEY) \
     (sun_lwawt_macosx_CPlatformWindow_ ## KEY)
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CDataTransferer.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CDataTransferer.m	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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,11 +26,9 @@
 #import "CDataTransferer.h"
 #include "sun_lwawt_macosx_CDataTransferer.h"
 
-#import <AppKit/AppKit.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 #import "jni_util.h"
 
-#include "ThreadUtilities.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 
 // ***** NOTE ***** This dictionary corresponds to the static array predefinedClipboardNames
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsConfig.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsConfig.m	Tue Oct 06 08:42:20 2015 -0700
@@ -27,7 +27,7 @@
 #include "GeomUtilities.h"
 
 #include "sun_awt_CGraphicsConfig.h"
-
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 /*
  * Class:     sun_awt_CGraphicsConfig
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m	Tue Oct 06 08:42:20 2015 -0700
@@ -26,6 +26,8 @@
 #import "LWCToolkit.h"
 #import "ThreadUtilities.h"
 
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+
 /*
  * Convert the mode string to the more convinient bits per pixel value
  */
@@ -200,7 +202,7 @@
         for (NSScreen *screen in screens) {
             NSDictionary *screenInfo = [screen deviceDescription];
             NSNumber *screenID = [screenInfo objectForKey:@"NSScreenNumber"];
-            if ([screenID pointerValue] == displayID){
+            if ([screenID unsignedIntValue] == displayID){
                 frame = [screen frame];
                 visibleFrame = [screen visibleFrame];
                 break;
@@ -333,7 +335,7 @@
         for (NSScreen *screen in screens) {
             NSDictionary *screenInfo = [screen deviceDescription];
             NSNumber *screenID = [screenInfo objectForKey:@"NSScreenNumber"];
-            if ([screenID pointerValue] == displayID){
+            if ([screenID unsignedIntValue] == displayID){
                 if ([screen respondsToSelector:@selector(backingScaleFactor)]) {
                     ret = [screen backingScaleFactor];
                 }
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsEnv.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsEnv.m	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,12 +23,11 @@
  * questions.
  */
 
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import "AWT_debug.h"
 
 #import "jni_util.h"
-#import "LWCToolkit.h"
-#import "AWT_debug.h"
 
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #define MAX_DISPLAYS 64
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -58,6 +58,14 @@
 static void javaPrinterJobToNSPrintInfo(JNIEnv* env, jobject srcPrinterJob, jobject srcPageable, NSPrintInfo* dst);
 
 
+#ifdef __MAC_10_9 // code for SDK 10.9 or newer
+#define NS_PORTRAIT NSPaperOrientationPortrait
+#define NS_LANDSCAPE NSPaperOrientationLandscape
+#else // code for SDK 10.8 or older
+#define NS_PORTRAIT NSPortraitOrientation
+#define NS_LANDSCAPE NSLandscapeOrientation
+#endif
+
 static NSPrintInfo* createDefaultNSPrintInfo(JNIEnv* env, jstring printer)
 {
     NSPrintInfo* defaultPrintInfo = [[NSPrintInfo sharedPrintInfo] copy];
@@ -143,12 +151,12 @@
 
     NSSize paperSize = [src paperSize];
     switch ([src orientation]) {
-        case NSPortraitOrientation:
+        case NS_PORTRAIT:
             jPaperW = paperSize.width;
             jPaperH = paperSize.height;
             break;
 
-        case NSLandscapeOrientation:
+        case NS_LANDSCAPE:
             jPaperW = paperSize.height;
             jPaperH = paperSize.width;
             break;
@@ -217,13 +225,12 @@
     static JNF_CTOR_CACHE(jm_Paper_ctor, sjc_Paper, "()V");
 
     jint jOrientation;
-    NSPrintingOrientation nsOrientation = [src orientation];
-    switch (nsOrientation) {
-        case NSPortraitOrientation:
+    switch ([src orientation]) {
+        case NS_PORTRAIT:
             jOrientation = java_awt_print_PageFormat_PORTRAIT;
             break;
 
-        case NSLandscapeOrientation:
+        case NS_LANDSCAPE:
             jOrientation = java_awt_print_PageFormat_LANDSCAPE; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
@@ -273,20 +280,20 @@
 
     switch (JNFCallIntMethod(env, srcPageFormat, jm_getOrientation)) { // AWT_THREADING Safe (!appKit)
         case java_awt_print_PageFormat_PORTRAIT:
-            [dstPrintInfo setOrientation:NSPortraitOrientation];
+            [dstPrintInfo setOrientation:NS_PORTRAIT];
             break;
 
         case java_awt_print_PageFormat_LANDSCAPE:
-            [dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
+            [dstPrintInfo setOrientation:NS_LANDSCAPE]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
         // AppKit printing doesn't support REVERSE_LANDSCAPE. Radar 2960295.
         case java_awt_print_PageFormat_REVERSE_LANDSCAPE:
-            [dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
+            [dstPrintInfo setOrientation:NS_LANDSCAPE]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
             break;
 
         default:
-            [dstPrintInfo setOrientation:NSPortraitOrientation];
+            [dstPrintInfo setOrientation:NS_PORTRAIT];
             break;
     }
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,9 +23,10 @@
  * questions.
  */
 
+#import "jni_util.h"
+
 #import <AppKit/AppKit.h>
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import "jni_util.h"
 
 #import "CTrayIcon.h"
 #import "ThreadUtilities.h"
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.h	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.h	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -24,8 +24,7 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-
+#include "jni.h"
 
 jobject CGToJavaRect(JNIEnv *env, CGRect rect);
 CGRect JavaToCGRect(JNIEnv *env, jobject rect);
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.m	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -24,6 +24,7 @@
  */
 
 #import "GeomUtilities.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 static JNF_CLASS_CACHE(sjc_Point2D, "java/awt/geom/Point2D");
 static JNF_MEMBER_CACHE(jm_pt_getX, sjc_Point2D, "getX", "()D");
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.h	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.h	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,9 +23,9 @@
  * questions.
  */
 
+#include "jni.h"
+
 #import <AppKit/AppKit.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-
 
 //#define JAVA_AX_DEBUG 1
 //#define JAVA_AX_NO_IGNORES 1
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h	Tue Oct 06 08:42:20 2015 -0700
@@ -23,11 +23,12 @@
  * questions.
  */
 
+#include "jni.h"
+
 #import <pthread.h>
 #import <assert.h>
 
 #import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #define DEBUG 1
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m	Tue Oct 06 08:42:20 2015 -0700
@@ -28,15 +28,10 @@
 #import <objc/runtime.h>
 #import <Cocoa/Cocoa.h>
 #import <Security/AuthSession.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
 
 #include "jni_util.h"
-#import "CMenuBar.h"
-#import "InitIDs.h"
 #import "LWCToolkit.h"
 #import "ThreadUtilities.h"
-#import "AWT_debug.h"
 #import "CSystemColors.h"
 #import  "NSApplicationAWT.h"
 #import "PropertiesUtilities.h"
@@ -46,6 +41,8 @@
 
 #import "sizecalc.h"
 
+#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
+
 int gNumberOfButtons;
 jint* gButtonDownMasks;
 
@@ -529,7 +526,7 @@
             // Processing all events excluding NSApplicationDefined which need to be processed
             // on the main loop only (those events are intended for disposing resources)
             NSEvent *event;
-            if ((event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSApplicationDefined)
+            if ((event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSApplicationDefinedMask)
                                            untilDate:nil
                                               inMode:NSDefaultRunLoopMode
                                              dequeue:YES]) != nil) {
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLGraphicsConfig.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLGraphicsConfig.m	Tue Oct 06 08:42:20 2015 -0700
@@ -23,20 +23,17 @@
  * questions.
  */
 
+#import "sun_java2d_opengl_CGLGraphicsConfig.h"
+
+#import "CGLGraphicsConfig.h"
+#import "CGLSurfaceData.h"
+#import "ThreadUtilities.h"
+
 #import <stdlib.h>
 #import <string.h>
 #import <ApplicationServices/ApplicationServices.h>
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
 
-#import "sun_java2d_opengl_CGLGraphicsConfig.h"
-
-#import "jni.h"
-#import "jni_util.h"
-#import "CGLGraphicsConfig.h"
-#import "CGLSurfaceData.h"
-#import "LWCToolkit.h"
-#import "ThreadUtilities.h"
-
 #pragma mark -
 #pragma mark "--- Mac OS X specific methods for GL pipeline ---"
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLLayer.h	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLLayer.h	Tue Oct 06 08:42:20 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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,7 @@
 #ifndef CGLLayer_h_Included
 #define CGLLayer_h_Included
 
-#import "AWTView.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 @interface CGLLayer : CAOpenGLLayer
 {
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLSurfaceData.m	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLSurfaceData.m	Tue Oct 06 08:42:20 2015 -0700
@@ -24,16 +24,13 @@
  */
 
 #import <stdlib.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
 
 #import "sun_java2d_opengl_CGLSurfaceData.h"
 
-#import "jni.h"
 #import "jni_util.h"
 #import "OGLRenderQueue.h"
 #import "CGLGraphicsConfig.h"
 #import "CGLSurfaceData.h"
-#import "CGLLayer.h"
 #import "ThreadUtilities.h"
 
 /* JDK's glext.h is already included and will prevent the Apple glext.h
--- a/jdk/src/java.desktop/share/classes/com/sun/beans/decoder/DocumentHandler.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/beans/decoder/DocumentHandler.java	Tue Oct 06 08:42:20 2015 -0700
@@ -50,7 +50,7 @@
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
-import sun.misc.SharedSecrets;
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * The main class to parse JavaBeans XML archive.
--- a/jdk/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java	Tue Oct 06 08:42:20 2015 -0700
@@ -32,7 +32,7 @@
 
 import java.beans.*;
 
-abstract public class NumberEditor extends PropertyEditorSupport {
+public abstract class NumberEditor extends PropertyEditorSupport {
 
     public String getJavaInitializationString() {
         Object value = getValue();
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/I18N.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/I18N.java	Tue Oct 06 08:42:20 2015 -0700
@@ -26,7 +26,7 @@
 package com.sun.imageio.plugins.common;
 
 public final class I18N extends I18NImpl {
-    private final static String resource_name = "iio-plugin.properties";
+    private static final String resource_name = "iio-plugin.properties";
     public static String getString(String key) {
         return getString("com.sun.imageio.plugins.common.I18N", resource_name, key);
     }
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java	Tue Oct 06 08:42:20 2015 -0700
@@ -37,16 +37,16 @@
  **/
 public class LZWStringTable {
     /** codesize + Reserved Codes */
-    private final static int RES_CODES = 2;
+    private static final int RES_CODES = 2;
 
-    private final static short HASH_FREE = (short)0xFFFF;
-    private final static short NEXT_FIRST = (short)0xFFFF;
+    private static final short HASH_FREE = (short)0xFFFF;
+    private static final short NEXT_FIRST = (short)0xFFFF;
 
-    private final static int MAXBITS = 12;
-    private final static int MAXSTR = (1 << MAXBITS);
+    private static final int MAXBITS = 12;
+    private static final int MAXSTR = (1 << MAXBITS);
 
-    private final static short HASHSIZE = 9973;
-    private final static short HASHSTEP = 2039;
+    private static final short HASHSIZE = 9973;
+    private static final short HASHSTEP = 2039;
 
     byte[]  strChr;  // after predecessor character
     short[] strNxt;  // predecessor string
@@ -142,7 +142,7 @@
         }
     }
 
-    static public int hash(short index, byte lastbyte) {
+    public static int hash(short index, byte lastbyte) {
         return (((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE;
     }
 
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1773,7 +1773,7 @@
     private static final ImageTypeProducer [] defaultTypes =
             new ImageTypeProducer [JPEG.NUM_JCS_CODES];
 
-    public synchronized static ImageTypeProducer getTypeProducer(int csCode) {
+    public static synchronized ImageTypeProducer getTypeProducer(int csCode) {
         if (csCode < 0 || csCode >= JPEG.NUM_JCS_CODES) {
             return null;
         }
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java	Tue Oct 06 08:42:20 2015 -0700
@@ -56,7 +56,7 @@
  */
 class GTKEngine {
 
-    final static GTKEngine INSTANCE = new GTKEngine();
+    static final GTKEngine INSTANCE = new GTKEngine();
 
     /** Size of the image cache */
     private static final int CACHE_SIZE = 50;
@@ -523,7 +523,7 @@
         native_paint_background(widget, state, x - x0, y - y0, w, h);
     }
 
-    private final static ColorModel[] COLOR_MODELS = {
+    private static final ColorModel[] COLOR_MODELS = {
         // Transparency.OPAQUE
         new DirectColorModel(24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000),
         // Transparency.BITMASK
@@ -532,7 +532,7 @@
         ColorModel.getRGBdefault(),
     };
 
-    private final static int[][] BAND_OFFSETS = {
+    private static final int[][] BAND_OFFSETS = {
         { 0x00ff0000, 0x0000ff00, 0x000000ff },             // OPAQUE
         { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x01000000 }, // BITMASK
         { 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }  // TRANSLUCENT
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java	Tue Oct 06 08:42:20 2015 -0700
@@ -63,8 +63,8 @@
         ShadowType.ETCHED_IN, ShadowType.OUT
     };
 
-    private final static GTKEngine ENGINE = GTKEngine.INSTANCE;
-    final static GTKPainter INSTANCE = new GTKPainter();
+    private static final GTKEngine ENGINE = GTKEngine.INSTANCE;
+    static final GTKPainter INSTANCE = new GTKPainter();
 
     private GTKPainter() {
     }
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java	Tue Oct 06 08:42:20 2015 -0700
@@ -263,7 +263,7 @@
         Color frameShadow;
 
         // The width of the border
-        public final static int BORDER_SIZE = 5;
+        public static final int BORDER_SIZE = 5;
 
         /** Constructs an FrameBorder for the JComponent <b>comp</b>.
         */
@@ -446,7 +446,7 @@
         JInternalFrame frame;
 
         // The size of the bounding box for Motif frame corners.
-        public final static int CORNER_SIZE = 24;
+        public static final int CORNER_SIZE = 24;
 
         /** Constructs an InternalFrameBorder for the InternalFrame
           * <b>aFrame</b>.
@@ -634,10 +634,10 @@
         protected Color  highlightColor;
 
         // Space between the border and text
-        static protected final int TEXT_SPACING = 2;
+        protected static final int TEXT_SPACING = 2;
 
         // Space for the separator under the title
-        static protected final int GROOVE_HEIGHT = 2;
+        protected static final int GROOVE_HEIGHT = 2;
 
         /**
          * Creates a MotifPopupMenuBorder instance
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -49,7 +49,7 @@
 
     private static final Object MOTIF_CHECK_BOX_UI_KEY = new Object();
 
-    private final static String propertyPrefix = "CheckBox" + ".";
+    private static final String propertyPrefix = "CheckBox" + ".";
 
     private boolean defaults_initialized = false;
 
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -59,10 +59,10 @@
     JPopupMenu systemMenu;
     EventListener mml;
 
-    final static int LABEL_HEIGHT = 18;
-    final static int LABEL_DIVIDER = 4;    // padding between icon and label
+    static final int LABEL_HEIGHT = 18;
+    static final int LABEL_DIVIDER = 4;    // padding between icon and label
 
-    final static Font defaultTitleFont =
+    static final Font defaultTitleFont =
         new Font(Font.SANS_SERIF, Font.PLAIN, 12);
 
     public static ComponentUI createUI(JComponent c)    {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -306,7 +306,7 @@
         }
 
         @SuppressWarnings("serial") // anonymous class
-        JTextField tmp1 = new JTextField(curDirName) {
+        JTextField tmp1 = new JTextField(curDirName, 35) {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
@@ -420,7 +420,7 @@
         interior.add(fileNameLabel);
 
         @SuppressWarnings("serial") // anonymous class
-        JTextField tmp3 = new JTextField() {
+        JTextField tmp3 = new JTextField(35) {
             public Dimension getMaximumSize() {
                 Dimension d = super.getMaximumSize();
                 d.height = getPreferredSize().height;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java	Tue Oct 06 08:42:20 2015 -0700
@@ -93,7 +93,7 @@
 
     @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxIcon implements Icon, UIResource, Serializable  {
-        final static int csize = 13;
+        static final int csize = 13;
 
         private Color control = UIManager.getColor("control");
         private Color foreground = UIManager.getColor("CheckBox.foreground");
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java	Tue Oct 06 08:42:20 2015 -0700
@@ -56,7 +56,7 @@
     Color shadow;
 
     // The width and height of a title pane button
-    public final static int BUTTON_SIZE = 19;  // 17 + 1 pixel border
+    public static final int BUTTON_SIZE = 19;  // 17 + 1 pixel border
 
 
     public MotifInternalFrameTitlePane(JInternalFrame frame) {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -47,9 +47,9 @@
  */
 public class MotifScrollPaneUI extends BasicScrollPaneUI
 {
-    private final static Border vsbMarginBorderR = new EmptyBorder(0, 4, 0, 0);
-    private final static Border vsbMarginBorderL = new EmptyBorder(0, 0, 0, 4);
-    private final static Border hsbMarginBorder = new EmptyBorder(4, 0, 0, 0);
+    private static final Border vsbMarginBorderR = new EmptyBorder(0, 4, 0, 0);
+    private static final Border vsbMarginBorderL = new EmptyBorder(0, 0, 0, 4);
+    private static final Border hsbMarginBorder = new EmptyBorder(4, 0, 0, 0);
 
     private CompoundBorder vsbBorder;
     private CompoundBorder hsbBorder;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java	Tue Oct 06 08:42:20 2015 -0700
@@ -69,11 +69,11 @@
  */
 class AnimationController implements ActionListener, PropertyChangeListener {
 
-    private final static boolean VISTA_ANIMATION_DISABLED =
+    private static final boolean VISTA_ANIMATION_DISABLED =
         AccessController.doPrivileged(new GetBooleanAction("swing.disablevistaanimation"));
 
 
-    private final static Object ANIMATION_CONTROLLER_KEY =
+    private static final Object ANIMATION_CONTROLLER_KEY =
         new StringBuilder("ANIMATION_CONTROLLER_KEY");
 
     private final Map<JComponent, Map<Part, AnimationState>> animationStateMap =
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -53,7 +53,7 @@
 
     private static final Object WINDOWS_CHECK_BOX_UI_KEY = new Object();
 
-    private final static String propertyPrefix = "CheckBox" + ".";
+    private static final String propertyPrefix = "CheckBox" + ".";
 
     private boolean defaults_initialized = false;
 
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -1017,7 +1017,7 @@
         }
     }
 
-    final static int space = 10;
+    static final int space = 10;
     class IndentIcon implements Icon {
 
         Icon icon = null;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java	Tue Oct 06 08:42:20 2015 -0700
@@ -321,7 +321,7 @@
     @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxIcon implements Icon, Serializable
     {
-        final static int csize = 13;
+        static final int csize = 13;
         public void paintIcon(Component c, Graphics g, int x, int y) {
             JCheckBox cb = (JCheckBox) c;
             ButtonModel model = cb.getModel();
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Tue Oct 06 08:42:20 2015 -0700
@@ -2271,7 +2271,7 @@
         protected Object classicValue, xpValue;
 
         // A constant that lets you specify null when using XP styles.
-        private final static Object NULL_VALUE = new Object();
+        private static final Object NULL_VALUE = new Object();
 
         XPValue(Object xpValue, Object classicValue) {
             this.xpValue = xpValue;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -70,7 +70,7 @@
  */
 public class WindowsRootPaneUI extends BasicRootPaneUI {
 
-    private final static WindowsRootPaneUI windowsRootPaneUI = new WindowsRootPaneUI();
+    private static final WindowsRootPaneUI windowsRootPaneUI = new WindowsRootPaneUI();
     static final AltProcessor altProcessor = new AltProcessor();
 
     public static ComponentUI createUI(JComponent c) {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java	Mon Oct 05 20:25:04 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java	Tue Oct 06 08:42:20 2015 -0700
@@ -106,8 +106,8 @@
         }
     }
 
-    static protected final int HALF_SIZE = 4;
-    static protected final int SIZE = 9;
+    protected static final int HALF_SIZE = 4;
+    protected static final int SIZE = 9;
 
     /**
      * Returns the default cell renderer that is used to do the
@@ -130,7 +130,7 @@
     @SuppressWarnings("serial") // Same-version serialization only
     public static class ExpandedIcon implements Icon, Serializable {
 
-        static public Icon createExpandedIcon() {
+        public static Icon createExpandedIcon() {
             return new ExpandedIcon();
         }