changeset 9999:f142c0938978

Merge
author prr
date Fri, 23 May 2014 09:05:24 -0700
parents 56024e323104 474739f38cb3
children e48e3e902f4c 4aff7bf822f6
files make/profile-rtjar-includes.txt src/share/classes/javax/swing/border/LineBorder.java src/share/classes/javax/swing/text/html/parser/Parser.java src/share/classes/jdk/internal/util/xml/BasicXmlPropertiesProvider.java src/share/classes/sun/util/spi/XmlPropertiesProvider.java src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java test/java/util/Properties/CustomProvider.java test/java/util/Properties/MyXmlPropertiesProvider.java
diffstat 141 files changed, 4137 insertions(+), 1258 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue May 13 10:29:12 2014 -0700
+++ b/.hgtags	Fri May 23 09:05:24 2014 -0700
@@ -255,3 +255,5 @@
 ab06ba2894313a47e4969ca37792ff119c49e711 jdk9-b10
 47feccd164b7187a0147693a922ee47c6629643c jdk9-b11
 83d9bc20973de232cae45b139fdff8a4549c130f jdk9-b12
+c7c8002d02721e02131d104549ebeb8b379fb8d2 jdk9-b13
+5c7a17a81afd0906b53ee31d95a3211c96ff6b25 jdk9-b14
--- a/make/data/tzdata/VERSION	Tue May 13 10:29:12 2014 -0700
+++ b/make/data/tzdata/VERSION	Fri May 23 09:05:24 2014 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2014b
+tzdata2014c
--- a/make/data/tzdata/africa	Tue May 13 10:29:12 2014 -0700
+++ b/make/data/tzdata/africa	Fri May 23 09:05:24 2014 -0700
@@ -358,11 +358,54 @@
 # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
 # </a>
 
+# From Ahmad El-Dardiry (2014-05-07):
+# Egypt is to change back to Daylight system on May 15
+# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx
+
+# From Gunther Vermier (2015-05-13):
+# our Egypt office confirms that the change will be at 15 May "midnight" (24:00)
+
+# From Paul Eggert (2014-05-13):
+# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says
+# the change is because of blackouts in Cairo, even though Ahram Online (cited
+# above) says DST had no affect on electricity consumption.  The AP story says
+# DST will not be observed during Ramadan.  There is no information about when
+# DST will end.  See:
+# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833
+#
+# For now, guess that later transitions will use 2010's rules, and that
+# Egypt will agree with Morocco (see below) about the date Ramadan starts and
+# ends, though (unlike Morocco) it will switch at 00:00 standard time.  In
+# Egypt the spring-forward transitions are removed for 2020-2022, when the
+# guessed spring-forward date falls during the estimated Ramadan, and all
+# transitions removed for 2023-2038, where the estimated Ramadan falls entirely
+# outside the guessed daylight-saving time.  Ramadan intrudes on the guessed
+# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff.
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
 Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2014	only	-	May	15	24:00	1:00	S
+Rule	Egypt	2014	only	-	Jun	29	 0:00s	0	-
+Rule	Egypt	2014	only	-	Jul	29	 0:00s	1:00	S
+Rule	Egypt	2014	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2015	2019	-	Apr	lastFri	 0:00s	1:00	S
+Rule	Egypt	2015	only	-	Jun	18	 0:00s	0	-
+Rule	Egypt	2015	only	-	Jul	18	 0:00s	1:00	S
+Rule	Egypt	2016	only	-	Jun	 7	 0:00s	0	-
+Rule	Egypt	2016	only	-	Jul	 7	 0:00s	1:00	S
+Rule	Egypt	2017	only	-	May	27	 0:00s	0	-
+Rule	Egypt	2017	only	-	Jun	26	 0:00s	1:00	S
+Rule	Egypt	2018	only	-	May	16	 0:00s	0	-
+Rule	Egypt	2018	only	-	Jun	15	 0:00s	1:00	S
+Rule	Egypt	2019	only	-	May	 6	 0:00s	0	-
+Rule	Egypt	2019	only	-	Jun	 5	 0:00s	1:00	S
+Rule	Egypt	2020	only	-	May	24	 0:00s	1:00	S
+Rule	Egypt	2021	only	-	May	13	 0:00s	1:00	S
+Rule	Egypt	2022	only	-	May	 3	 0:00s	1:00	S
+Rule	Egypt	2023	max	-	Apr	lastFri	 0:00s	1:00	S
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:09 -	LMT	1900 Oct
--- a/make/data/tzdata/asia	Tue May 13 10:29:12 2014 -0700
+++ b/make/data/tzdata/asia	Fri May 23 09:05:24 2014 -0700
@@ -1370,22 +1370,6 @@
 # "Jordan will switch to winter time on Friday, October 27".
 #
 
-# From Phil Pizzey (2009-04-02):
-# ...I think I may have spotted an error in the timezone data for
-# Jordan.
-# The current (2009d) asia file shows Jordan going to daylight
-# saving
-# time on the last Thursday in March.
-#
-# Rule  Jordan      2000  max	-  Mar   lastThu     0:00s 1:00  S
-#
-# However timeanddate.com, which I usually find reliable, shows Jordan
-# going to daylight saving time on the last Friday in March since 2002.
-# Please see
-# <a href="http://www.timeanddate.com/worldclock/timezone.html?n=11">
-# http://www.timeanddate.com/worldclock/timezone.html?n=11
-# </a>
-
 # From Steffen Thorsen (2009-04-02):
 # This single one might be good enough, (2009-03-24, Arabic):
 # <a href="http://petra.gov.jo/Artical.aspx?Lng=2&Section=8&Artical=95279">
--- a/make/data/tzdata/europe	Tue May 13 10:29:12 2014 -0700
+++ b/make/data/tzdata/europe	Fri May 23 09:05:24 2014 -0700
@@ -2989,6 +2989,10 @@
 # From Alexander Krivenyshev (2014-03-17):
 # time change at 2:00 (2am) on March 30, 2014
 # http://vz.ru/news/2014/3/17/677464.html
+# From Paul Eggert (2014-03-30):
+# Simferopol and Sevastopol reportedly changed their central town clocks
+# late the previous day, but this appears to have been ceremonial
+# and the discrepancies are small enough to not worry about.
 			2:00	EU	EE%sT	2014 Mar 30 2:00
 			4:00	-	MSK
 
--- a/make/mapfiles/libjava/mapfile-vers	Tue May 13 10:29:12 2014 -0700
+++ b/make/mapfiles/libjava/mapfile-vers	Fri May 23 09:05:24 2014 -0700
@@ -270,7 +270,10 @@
                 Java_sun_misc_Version_getJvmVersionInfo;
                 Java_sun_misc_Version_getJvmSpecialVersion;
 		Java_sun_misc_VM_latestUserDefinedLoader;
-                Java_sun_misc_VM_isSetUID;
+                Java_sun_misc_VM_getuid;
+                Java_sun_misc_VM_geteuid;
+                Java_sun_misc_VM_getgid;
+                Java_sun_misc_VM_getegid;
                 Java_sun_misc_VM_initialize;
 		Java_sun_misc_VMSupport_initAgentProperties;
 		Java_sun_misc_VMSupport_getVMTemporaryDirectory;
--- a/make/profile-rtjar-includes.txt	Tue May 13 10:29:12 2014 -0700
+++ b/make/profile-rtjar-includes.txt	Fri May 23 09:05:24 2014 -0700
@@ -100,9 +100,7 @@
 
 PROFILE_2_RTJAR_EXCLUDE_TYPES :=
 
-PROFILE_2_INCLUDE_METAINF_SERVICES := \
-    META-INF/services/sun.util.spi.XmlPropertiesProvider
-
+PROFILE_2_INCLUDE_METAINF_SERVICES :=
 
 PROFILE_3_RTJAR_INCLUDE_PACKAGES := \
     com/sun/jmx \
--- a/src/share/bin/java.c	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/bin/java.c	Fri May 23 09:05:24 2014 -0700
@@ -739,6 +739,9 @@
     if (s == NULL)
         return;
     s = JLI_WildcardExpandClasspath(s);
+    if (sizeof(format) - 2 + JLI_StrLen(s) < JLI_StrLen(s))
+        // s is became corrupted after expanding wildcards
+        return;
     def = JLI_MemAlloc(sizeof(format)
                        - 2 /* strlen("%s") */
                        + JLI_StrLen(s));
@@ -1358,9 +1361,11 @@
         if (s) {
             s = (char *) JLI_WildcardExpandClasspath(s);
             /* 40 for -Denv.class.path= */
-            envcp = (char *)JLI_MemAlloc(JLI_StrLen(s) + 40);
-            sprintf(envcp, "-Denv.class.path=%s", s);
-            AddOption(envcp, NULL);
+            if (JLI_StrLen(s) + 40 > JLI_StrLen(s)) { // Safeguard from overflow
+                envcp = (char *)JLI_MemAlloc(JLI_StrLen(s) + 40);
+                sprintf(envcp, "-Denv.class.path=%s", s);
+                AddOption(envcp, NULL);
+            }
         }
     }
 
--- a/src/share/classes/com/sun/jndi/ldap/Connection.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/Connection.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -459,10 +459,10 @@
                             // will be woken up before readTimeout only if reply is
                             // available
                             ldr.wait(readTimeout);
-                            waited = true;
                         } else {
                             ldr.wait(15 * 1000); // 15 second timeout
                         }
+                        waited = true;
                     } else {
                         break;
                     }
--- a/src/share/classes/com/sun/tools/jdi/SocketAttachingConnector.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/SocketAttachingConnector.java	Fri May 23 09:05:24 2014 -0700
@@ -44,12 +44,7 @@
     public SocketAttachingConnector() {
         super(new SocketTransportService());
 
-        String defaultHostName;
-        try {
-            defaultHostName = InetAddress.getLocalHost().getHostName();
-        } catch (UnknownHostException e) {
-            defaultHostName = "";
-        }
+        String defaultHostName = "localhost";
 
         addStringArgument(
             ARG_HOST,
--- a/src/share/classes/com/sun/tools/jdi/SocketTransportService.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/SocketTransportService.java	Fri May 23 09:05:24 2014 -0700
@@ -198,13 +198,17 @@
         String host;
         String portStr;
         if (splitIndex < 0) {
-            host = InetAddress.getLocalHost().getHostName();
+            host = "localhost";
             portStr = address;
         } else {
             host = address.substring(0, splitIndex);
             portStr = address.substring(splitIndex+1);
         }
 
+        if (host.equals("*")) {
+            host = InetAddress.getLocalHost().getHostName();
+        }
+
         int port;
         try {
             port = Integer.decode(portStr).intValue();
@@ -215,7 +219,6 @@
 
 
         // open TCP connection to VM
-
         InetSocketAddress sa = new InetSocketAddress(host, port);
         Socket s = new Socket();
         try {
--- a/src/share/classes/java/lang/ClassValue.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/lang/ClassValue.java	Fri May 23 09:05:24 2014 -0700
@@ -25,7 +25,6 @@
 
 package java.lang;
 
-import java.lang.ClassValue.ClassValueMap;
 import java.util.WeakHashMap;
 import java.lang.ref.WeakReference;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -375,10 +374,10 @@
         synchronized (CRITICAL_SECTION) {  // private object to avoid deadlocks
             // happens about once per type
             if ((map = type.classValueMap) == null)
-                type.classValueMap = map = new ClassValueMap(type);
+                type.classValueMap = map = new ClassValueMap();
         }
-            return map;
-        }
+        return map;
+    }
 
     static <T> Entry<T> makeEntry(Version<T> explicitVersion, T value) {
         // Note that explicitVersion might be different from this.version.
@@ -398,12 +397,11 @@
 
     // The following class could also be top level and non-public:
 
-    /** A backing map for all ClassValues, relative a single given type.
+    /** A backing map for all ClassValues.
      *  Gives a fully serialized "true state" for each pair (ClassValue cv, Class type).
      *  Also manages an unserialized fast-path cache.
      */
     static class ClassValueMap extends WeakHashMap<ClassValue.Identity, Entry<?>> {
-        private final Class<?> type;
         private Entry<?>[] cacheArray;
         private int cacheLoad, cacheLoadLimit;
 
@@ -413,11 +411,10 @@
          */
         private static final int INITIAL_ENTRIES = 32;
 
-        /** Build a backing map for ClassValues, relative the given type.
+        /** Build a backing map for ClassValues.
          *  Also, create an empty cache array and install it on the class.
          */
-        ClassValueMap(Class<?> type) {
-            this.type = type;
+        ClassValueMap() {
             sizeCache(INITIAL_ENTRIES);
         }
 
--- a/src/share/classes/java/lang/ConditionalSpecialCasing.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/lang/ConditionalSpecialCasing.java	Fri May 23 09:05:24 2014 -0700
@@ -62,6 +62,7 @@
         //# Conditional mappings
         //# ================================================================================
         new Entry(0x03A3, new char[]{0x03C2}, new char[]{0x03A3}, null, FINAL_CASED), // # GREEK CAPITAL LETTER SIGMA
+        new Entry(0x0130, new char[]{0x0069, 0x0307}, new char[]{0x0130}, null, 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
 
         //# ================================================================================
         //# Locale-sensitive mappings
@@ -77,8 +78,8 @@
 
         //# ================================================================================
         //# Turkish and Azeri
-//      new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "tr", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
-//      new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "az", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
+        new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "tr", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
+        new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "az", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
         new Entry(0x0307, new char[]{}, new char[]{0x0307}, "tr", AFTER_I), // # COMBINING DOT ABOVE
         new Entry(0x0307, new char[]{}, new char[]{0x0307}, "az", AFTER_I), // # COMBINING DOT ABOVE
         new Entry(0x0049, new char[]{0x0131}, new char[]{0x0049}, "tr", NOT_BEFORE_DOT), // # LATIN CAPITAL LETTER I
@@ -147,21 +148,25 @@
 
     private static char[] lookUpTable(String src, int index, Locale locale, boolean bLowerCasing) {
         HashSet<Entry> set = entryTable.get(new Integer(src.codePointAt(index)));
+        char[] ret = null;
 
         if (set != null) {
             Iterator<Entry> iter = set.iterator();
             String currentLang = locale.getLanguage();
             while (iter.hasNext()) {
                 Entry entry = iter.next();
-                String conditionLang= entry.getLanguage();
+                String conditionLang = entry.getLanguage();
                 if (((conditionLang == null) || (conditionLang.equals(currentLang))) &&
                         isConditionMet(src, index, locale, entry.getCondition())) {
-                    return (bLowerCasing ? entry.getLowerCase() : entry.getUpperCase());
+                    ret = bLowerCasing ? entry.getLowerCase() : entry.getUpperCase();
+                    if (conditionLang != null) {
+                        break;
+                    }
                 }
             }
         }
 
-        return null;
+        return ret;
     }
 
     private static boolean isConditionMet(String src, int index, Locale locale, int condition) {
--- a/src/share/classes/java/lang/String.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/lang/String.java	Fri May 23 09:05:24 2014 -0700
@@ -2583,6 +2583,9 @@
             if (cp == '\u03A3') {                       // GREEK CAPITAL LETTER SIGMA
                 return toLowerCaseEx(result, i, locale, false);
             }
+            if (cp == '\u0130') {                       // LATIN CAPITAL LETTER I WITH DOT ABOVE
+                return toLowerCaseEx(result, i, locale, true);
+            }
             cp = Character.toLowerCase(cp);
             if (!Character.isBmpCodePoint(cp)) {
                 return toLowerCaseEx(result, i, locale, false);
--- a/src/share/classes/java/util/DoubleSummaryStatistics.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/util/DoubleSummaryStatistics.java	Fri May 23 09:05:24 2014 -0700
@@ -54,7 +54,7 @@
  *
  * @implNote This implementation is not thread safe. However, it is safe to use
  * {@link java.util.stream.Collectors#summarizingDouble(java.util.function.ToDoubleFunction)
- * Collectors.toDoubleStatistics()} on a parallel stream, because the parallel
+ * Collectors.summarizingDouble()} on a parallel stream, because the parallel
  * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
  * provides the necessary partitioning, isolation, and merging of results for
  * safe and efficient parallel execution.
--- a/src/share/classes/java/util/IntSummaryStatistics.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/util/IntSummaryStatistics.java	Fri May 23 09:05:24 2014 -0700
@@ -54,7 +54,7 @@
  *
  * @implNote This implementation is not thread safe. However, it is safe to use
  * {@link java.util.stream.Collectors#summarizingInt(java.util.function.ToIntFunction)
- * Collectors.toIntStatistics()} on a parallel stream, because the parallel
+ * Collectors.summarizingInt()} on a parallel stream, because the parallel
  * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
  * provides the necessary partitioning, isolation, and merging of results for
  * safe and efficient parallel execution.
--- a/src/share/classes/java/util/LongSummaryStatistics.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/util/LongSummaryStatistics.java	Fri May 23 09:05:24 2014 -0700
@@ -42,7 +42,7 @@
  * }</pre>
  *
  * <p>{@code LongSummaryStatistics} can be used as a
- * {@linkplain java.util.stream.Stream#collect(Collector)} reduction}
+ * {@linkplain java.util.stream.Stream#collect(Collector) reduction}
  * target for a {@linkplain java.util.stream.Stream stream}. For example:
  *
  * <pre> {@code
@@ -55,7 +55,7 @@
  *
  * @implNote This implementation is not thread safe. However, it is safe to use
  * {@link java.util.stream.Collectors#summarizingLong(java.util.function.ToLongFunction)
- * Collectors.toLongStatistics()} on a parallel stream, because the parallel
+ * Collectors.summarizingLong()} on a parallel stream, because the parallel
  * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
  * provides the necessary partitioning, isolation, and merging of results for
  * safe and efficient parallel execution.
--- a/src/share/classes/java/util/Properties.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/util/Properties.java	Fri May 23 09:05:24 2014 -0700
@@ -37,7 +37,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
-import sun.util.spi.XmlPropertiesProvider;
+import jdk.internal.util.xml.PropertiesDefaultHandler;
 
 /**
  * The {@code Properties} class represents a persistent set of
@@ -877,7 +877,9 @@
     public synchronized void loadFromXML(InputStream in)
         throws IOException, InvalidPropertiesFormatException
     {
-        XmlSupport.load(this, Objects.requireNonNull(in));
+        Objects.requireNonNull(in);
+        PropertiesDefaultHandler handler = new PropertiesDefaultHandler();
+        handler.load(this, in);
         in.close();
     }
 
@@ -949,8 +951,10 @@
     public void storeToXML(OutputStream os, String comment, String encoding)
         throws IOException
     {
-        XmlSupport.save(this, Objects.requireNonNull(os), comment,
-                        Objects.requireNonNull(encoding));
+        Objects.requireNonNull(os);
+        Objects.requireNonNull(encoding);
+        PropertiesDefaultHandler handler = new PropertiesDefaultHandler();
+        handler.store(this, os, comment, encoding);
     }
 
     /**
@@ -1128,83 +1132,4 @@
     private static final char[] hexDigit = {
         '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
     };
-
-    /**
-     * Supporting class for loading/storing properties in XML format.
-     *
-     * <p> The {@code load} and {@code store} methods defined here delegate to a
-     * system-wide {@code XmlPropertiesProvider}. On first invocation of either
-     * method then the system-wide provider is located as follows: </p>
-     *
-     * <ol>
-     *   <li> If the system property {@code sun.util.spi.XmlPropertiesProvider}
-     *   is defined then it is taken to be the full-qualified name of a concrete
-     *   provider class. The class is loaded with the system class loader as the
-     *   initiating loader. If it cannot be loaded or instantiated using a zero
-     *   argument constructor then an unspecified error is thrown. </li>
-     *
-     *   <li> If the system property is not defined then the service-provider
-     *   loading facility defined by the {@link ServiceLoader} class is used to
-     *   locate a provider with the system class loader as the initiating
-     *   loader and {@code sun.util.spi.XmlPropertiesProvider} as the service
-     *   type. If this process fails then an unspecified error is thrown. If
-     *   there is more than one service provider installed then it is
-     *   not specified as to which provider will be used. </li>
-     *
-     *   <li> If the provider is not found by the above means then a system
-     *   default provider will be instantiated and used. </li>
-     * </ol>
-     */
-    private static class XmlSupport {
-
-        private static XmlPropertiesProvider loadProviderFromProperty(ClassLoader cl) {
-            String cn = System.getProperty("sun.util.spi.XmlPropertiesProvider");
-            if (cn == null)
-                return null;
-            try {
-                Class<?> c = Class.forName(cn, true, cl);
-                return (XmlPropertiesProvider)c.newInstance();
-            } catch (ClassNotFoundException |
-                     IllegalAccessException |
-                     InstantiationException x) {
-                throw new ServiceConfigurationError(null, x);
-            }
-        }
-
-        private static XmlPropertiesProvider loadProviderAsService(ClassLoader cl) {
-            Iterator<XmlPropertiesProvider> iterator =
-                 ServiceLoader.load(XmlPropertiesProvider.class, cl).iterator();
-            return iterator.hasNext() ? iterator.next() : null;
-        }
-
-        private static XmlPropertiesProvider loadProvider() {
-            return AccessController.doPrivileged(
-                new PrivilegedAction<XmlPropertiesProvider>() {
-                    public XmlPropertiesProvider run() {
-                        ClassLoader cl = ClassLoader.getSystemClassLoader();
-                        XmlPropertiesProvider provider = loadProviderFromProperty(cl);
-                        if (provider != null)
-                            return provider;
-                        provider = loadProviderAsService(cl);
-                        if (provider != null)
-                            return provider;
-                        return new jdk.internal.util.xml.BasicXmlPropertiesProvider();
-                }});
-        }
-
-        private static final XmlPropertiesProvider PROVIDER = loadProvider();
-
-        static void load(Properties props, InputStream in)
-            throws IOException, InvalidPropertiesFormatException
-        {
-            PROVIDER.load(props, in);
-        }
-
-        static void save(Properties props, OutputStream os, String comment,
-                         String encoding)
-            throws IOException
-        {
-            PROVIDER.store(props, os, comment, encoding);
-        }
-    }
 }
--- a/src/share/classes/java/util/TimeZone.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/util/TimeZone.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -591,8 +591,7 @@
     /**
      * Gets the platform defined TimeZone ID.
      **/
-    private static native String getSystemTimeZoneID(String javaHome,
-                                                     String country);
+    private static native String getSystemTimeZoneID(String javaHome);
 
     /**
      * Gets the custom time zone ID based on the GMT offset of the
@@ -650,12 +649,10 @@
         // if the time zone ID is not set (yet), perform the
         // platform to Java time zone ID mapping.
         if (zoneID == null || zoneID.isEmpty()) {
-            String country = AccessController.doPrivileged(
-                    new GetPropertyAction("user.country"));
             String javaHome = AccessController.doPrivileged(
                     new GetPropertyAction("java.home"));
             try {
-                zoneID = getSystemTimeZoneID(javaHome, country);
+                zoneID = getSystemTimeZoneID(javaHome);
                 if (zoneID == null) {
                     zoneID = GMT_ID;
                 }
--- a/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Fri May 23 09:05:24 2014 -0700
@@ -1532,10 +1532,12 @@
      *
      * @param corePoolSize the new core size
      * @throws IllegalArgumentException if {@code corePoolSize < 0}
+     *         or {@code corePoolSize} is greater than the {@linkplain
+     *         #getMaximumPoolSize() maximum pool size}
      * @see #getCorePoolSize
      */
     public void setCorePoolSize(int corePoolSize) {
-        if (corePoolSize < 0)
+        if (corePoolSize < 0 || maximumPoolSize < corePoolSize)
             throw new IllegalArgumentException();
         int delta = corePoolSize - this.corePoolSize;
         this.corePoolSize = corePoolSize;
--- a/src/share/classes/javax/crypto/JceSecurity.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/crypto/JceSecurity.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -216,26 +216,28 @@
             new WeakHashMap<>();
 
     /*
-     * Retuns the CodeBase for the given class.
+     * Returns the CodeBase for the given class.
      */
     static URL getCodeBase(final Class<?> clazz) {
-        URL url = codeBaseCacheRef.get(clazz);
-        if (url == null) {
-            url = AccessController.doPrivileged(new PrivilegedAction<URL>() {
-                public URL run() {
-                    ProtectionDomain pd = clazz.getProtectionDomain();
-                    if (pd != null) {
-                        CodeSource cs = pd.getCodeSource();
-                        if (cs != null) {
-                            return cs.getLocation();
+        synchronized (codeBaseCacheRef) {
+            URL url = codeBaseCacheRef.get(clazz);
+            if (url == null) {
+                url = AccessController.doPrivileged(new PrivilegedAction<URL>() {
+                    public URL run() {
+                        ProtectionDomain pd = clazz.getProtectionDomain();
+                        if (pd != null) {
+                            CodeSource cs = pd.getCodeSource();
+                            if (cs != null) {
+                                return cs.getLocation();
+                            }
                         }
+                        return NULL_URL;
                     }
-                    return NULL_URL;
-                }
-            });
-            codeBaseCacheRef.put(clazz, url);
+                });
+                codeBaseCacheRef.put(clazz, url);
+            }
+            return (url == NULL_URL) ? null : url;
         }
-        return (url == NULL_URL) ? null : url;
     }
 
     private static void setupJurisdictionPolicies() throws Exception {
--- a/src/share/classes/javax/swing/border/BevelBorder.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/border/BevelBorder.java	Fri May 23 09:05:24 2014 -0700
@@ -134,7 +134,9 @@
      * when rendered on the specified component.  If no highlight
      * color was specified at instantiation, the highlight color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the highlight may be derived
+     * @return the outer highlight {@code Color}
      * @since 1.3
      */
     public Color getHighlightOuterColor(Component c)   {
@@ -148,7 +150,9 @@
      * when rendered on the specified component.  If no highlight
      * color was specified at instantiation, the highlight color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the highlight may be derived
+     * @return the inner highlight {@code Color}
      * @since 1.3
      */
     public Color getHighlightInnerColor(Component c)   {
@@ -162,7 +166,9 @@
      * when rendered on the specified component.  If no shadow
      * color was specified at instantiation, the shadow color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the shadow may be derived
+     * @return the inner shadow {@code Color}
      * @since 1.3
      */
     public Color getShadowInnerColor(Component c)      {
@@ -176,7 +182,9 @@
      * when rendered on the specified component.  If no shadow
      * color was specified at instantiation, the shadow color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the shadow may be derived
+     * @return the outer shadow {@code Color}
      * @since 1.3
      */
     public Color getShadowOuterColor(Component c)      {
@@ -189,6 +197,9 @@
      * Returns the outer highlight color of the bevel border.
      * Will return null if no highlight color was specified
      * at instantiation.
+     *
+     * @return the outer highlight {@code Color} or {@code null} if no highlight
+     *         color was specified
      * @since 1.3
      */
     public Color getHighlightOuterColor()   {
@@ -199,6 +210,9 @@
      * Returns the inner highlight color of the bevel border.
      * Will return null if no highlight color was specified
      * at instantiation.
+     *
+     * @return the inner highlight {@code Color} or {@code null} if no highlight
+     *         color was specified
      * @since 1.3
      */
     public Color getHighlightInnerColor()   {
@@ -209,6 +223,9 @@
      * Returns the inner shadow color of the bevel border.
      * Will return null if no shadow color was specified
      * at instantiation.
+     *
+     * @return the inner shadow {@code Color} or {@code null} if no shadow color
+     *         was specified
      * @since 1.3
      */
     public Color getShadowInnerColor()      {
@@ -219,6 +236,9 @@
      * Returns the outer shadow color of the bevel border.
      * Will return null if no shadow color was specified
      * at instantiation.
+     *
+     * @return the outer shadow {@code Color} or {@code null} if no shadow color
+     *         was specified
      * @since 1.3
      */
     public Color getShadowOuterColor()      {
@@ -227,13 +247,18 @@
 
     /**
      * Returns the type of the bevel border.
+     *
+     * @return the bevel border type, either {@code RAISED} or {@code LOWERED}
      */
     public int getBevelType()       {
         return bevelType;
     }
 
     /**
-     * Returns whether or not the border is opaque.
+     * Returns whether or not the border is opaque. This implementation
+     * returns {@code true}.
+     *
+     * @return true
      */
     public boolean isBorderOpaque() { return true; }
 
--- a/src/share/classes/javax/swing/border/Border.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/border/Border.java	Fri May 23 09:05:24 2014 -0700
@@ -66,6 +66,7 @@
     /**
      * Paints the border for the specified component with the specified
      * position and size.
+     *
      * @param c the component for which this border is being painted
      * @param g the paint graphics
      * @param x the x position of the painted border
@@ -77,7 +78,10 @@
 
     /**
      * Returns the insets of the border.
+     *
      * @param c the component for which this border insets value applies
+     * @return an {@code Insets} object containing the insets from top, left,
+     *         bottom and right of this {@code Border}
      */
     Insets getBorderInsets(Component c);
 
@@ -85,6 +89,8 @@
      * Returns whether or not the border is opaque.  If the border
      * is opaque, it is responsible for filling in it's own
      * background when painting.
+     *
+     * @return true if this {@code Border} is opaque
      */
     boolean isBorderOpaque();
 }
--- a/src/share/classes/javax/swing/border/CompoundBorder.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/border/CompoundBorder.java	Fri May 23 09:05:24 2014 -0700
@@ -155,6 +155,8 @@
 
     /**
      * Returns the outside border object.
+     *
+     * @return the outside {@code Border} object
      */
     public Border getOutsideBorder() {
         return outsideBorder;
@@ -162,6 +164,8 @@
 
     /**
      * Returns the inside border object.
+     *
+     * @return the inside {@code Border} object
      */
     public Border getInsideBorder() {
         return insideBorder;
--- a/src/share/classes/javax/swing/border/EmptyBorder.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/border/EmptyBorder.java	Fri May 23 09:05:24 2014 -0700
@@ -98,6 +98,9 @@
 
     /**
      * Returns the insets of the border.
+     *
+     * @return an {@code Insets} object containing the insets from top, left,
+     *         bottom and right
      * @since 1.3
      */
     public Insets getBorderInsets() {
--- a/src/share/classes/javax/swing/border/EtchedBorder.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/border/EtchedBorder.java	Fri May 23 09:05:24 2014 -0700
@@ -77,6 +77,7 @@
      * whose colors will be derived
      * from the background color of the component passed into
      * the paintBorder method.
+     *
      * @param etchType the type of etch to be drawn by the border
      */
     public EtchedBorder(int etchType)    {
@@ -86,6 +87,7 @@
     /**
      * Creates a lowered etched border with the specified highlight and
      * shadow colors.
+     *
      * @param highlight the color to use for the etched highlight
      * @param shadow the color to use for the etched shadow
      */
@@ -96,6 +98,7 @@
     /**
      * Creates an etched border with the specified etch-type,
      * highlight and shadow colors.
+     *
      * @param etchType the type of etch to be drawn by the border
      * @param highlight the color to use for the etched highlight
      * @param shadow the color to use for the etched shadow
@@ -110,6 +113,7 @@
     /**
      * Paints the border for the specified component with the
      * specified position and size.
+     *
      * @param c the component for which this border is being painted
      * @param g the paint graphics
      * @param x the x position of the painted border
@@ -138,6 +142,7 @@
 
     /**
      * Reinitialize the insets parameter with this Border's current Insets.
+     *
      * @param c the component for which this border insets value applies
      * @param insets the object to be reinitialized
      */
@@ -148,11 +153,16 @@
 
     /**
      * Returns whether or not the border is opaque.
+     * This implementation returns true.
+     *
+     * @return true
      */
     public boolean isBorderOpaque() { return true; }
 
     /**
      * Returns which etch-type is set on the etched border.
+     *
+     * @return the etched border type, either {@code RAISED} or {@code LOWERED}
      */
     public int getEtchType() {
         return etchType;
@@ -163,7 +173,9 @@
      * when rendered on the specified component.  If no highlight
      * color was specified at instantiation, the highlight color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the highlight may be derived
+     * @return the highlight {@code Color} of this {@code EtchedBorder}
      * @since 1.3
      */
     public Color getHighlightColor(Component c)   {
@@ -175,6 +187,9 @@
      * Returns the highlight color of the etched border.
      * Will return null if no highlight color was specified
      * at instantiation.
+     *
+     * @return the highlight {@code Color} of this {@code EtchedBorder} or null
+     *         if none was specified
      * @since 1.3
      */
     public Color getHighlightColor()   {
@@ -186,7 +201,9 @@
      * when rendered on the specified component.  If no shadow
      * color was specified at instantiation, the shadow color
      * is derived from the specified component's background color.
+     *
      * @param c the component for which the shadow may be derived
+     * @return the shadow {@code Color} of this {@code EtchedBorder}
      * @since 1.3
      */
     public Color getShadowColor(Component c)   {
@@ -197,6 +214,9 @@
      * Returns the shadow color of the etched border.
      * Will return null if no shadow color was specified
      * at instantiation.
+     *
+     * @return the shadow {@code Color} of this {@code EtchedBorder} or null
+     *         if none was specified
      * @since 1.3
      */
     public Color getShadowColor()   {
--- a/src/share/classes/javax/swing/border/LineBorder.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/border/LineBorder.java	Fri May 23 09:05:24 2014 -0700
@@ -60,8 +60,11 @@
     protected Color lineColor;
     protected boolean roundedCorners;
 
-    /** Convenience method for getting the Color.black LineBorder of thickness 1.
-      */
+    /**
+     * Convenience method for getting the Color.black LineBorder of thickness 1.
+     *
+     * @return a {@code LineBorder} with {@code Color.black} and thickness of 1
+     */
     public static Border createBlackLineBorder() {
         if (blackLine == null) {
             blackLine = new LineBorder(Color.black, 1);
@@ -69,8 +72,11 @@
         return blackLine;
     }
 
-    /** Convenience method for getting the Color.gray LineBorder of thickness 1.
-      */
+    /**
+     * Convenience method for getting the Color.gray LineBorder of thickness 1.
+     *
+     * @return a {@code LineBorder} with {@code Color.gray} and thickness of 1
+     */
     public static Border createGrayLineBorder() {
         if (grayLine == null) {
             grayLine = new LineBorder(Color.gray, 1);
@@ -81,6 +87,7 @@
     /**
      * Creates a line border with the specified color and a
      * thickness = 1.
+     *
      * @param color the color for the border
      */
     public LineBorder(Color color) {
@@ -89,6 +96,7 @@
 
     /**
      * Creates a line border with the specified color and thickness.
+     *
      * @param color the color of the border
      * @param thickness the thickness of the border
      */
@@ -99,6 +107,7 @@
     /**
      * Creates a line border with the specified color, thickness,
      * and corner shape.
+     *
      * @param color the color of the border
      * @param thickness the thickness of the border
      * @param roundedCorners whether or not border corners should be round
@@ -114,6 +123,7 @@
     /**
      * Paints the border for the specified component with the
      * specified position and size.
+     *
      * @param c the component for which this border is being painted
      * @param g the paint graphics
      * @param x the x position of the painted border
@@ -152,6 +162,7 @@
 
     /**
      * Reinitialize the insets parameter with this Border's current Insets.
+     *
      * @param c the component for which this border insets value applies
      * @param insets the object to be reinitialized
      */
@@ -162,6 +173,8 @@
 
     /**
      * Returns the color of the border.
+     *
+     * @return a {@code Color} object representing the color of this object
      */
     public Color getLineColor()     {
         return lineColor;
@@ -169,6 +182,8 @@
 
     /**
      * Returns the thickness of the border.
+     *
+     * @return the thickness of this border
      */
     public int getThickness()       {
         return thickness;
@@ -176,6 +191,8 @@
 
     /**
      * Returns whether this border will be drawn with rounded corners.
+     *
+     * @return {@code true} if this border should have rounded corners
      * @since 1.3
      */
     public boolean getRoundedCorners() {
@@ -184,6 +201,8 @@
 
     /**
      * Returns whether or not the border is opaque.
+     *
+     * @return {@code true} if the border is opaque, {@code false} otherwise
      */
     public boolean isBorderOpaque() {
         return !roundedCorners;
--- a/src/share/classes/javax/swing/border/MatteBorder.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/border/MatteBorder.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -196,6 +196,9 @@
     /**
      * Returns the color used for tiling the border or null
      * if a tile icon is being used.
+     *
+     * @return the {@code Color} object used to render the border or {@code null}
+     *         if a tile icon is used
      * @since 1.3
      */
     public Color getMatteColor() {
@@ -205,6 +208,9 @@
    /**
      * Returns the icon used for tiling the border or null
      * if a solid color is being used.
+     *
+     * @return the {@code Icon} used to tile the border or {@code null} if a
+     *         solid color is used to fill the border
      * @since 1.3
      */
     public Icon getTileIcon() {
@@ -213,6 +219,8 @@
 
     /**
      * Returns whether or not the border is opaque.
+     *
+     * @return {@code true} if the border is opaque, {@code false} otherwise
      */
     public boolean isBorderOpaque() {
         // If a tileIcon is set, then it may contain transparent bits
--- a/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/colorchooser/AbstractColorChooserPanel.java	Fri May 23 09:05:24 2014 -0700
@@ -145,7 +145,8 @@
     /**
      * Invoked when the panel is added to the chooser.
      * If you override this, be sure to call <code>super</code>.
-     * @param enclosingChooser  the panel to be added
+     *
+     * @param enclosingChooser the chooser to which the panel is to be added
      * @exception RuntimeException  if the chooser panel has already been
      *                          installed
      */
@@ -163,6 +164,8 @@
     /**
      * Invoked when the panel is removed from the chooser.
      * If override this, be sure to call <code>super</code>.
+     *
+     * @param enclosingChooser the chooser from which the panel is to be removed
      */
   public void uninstallChooserPanel(JColorChooser enclosingChooser) {
         chooser.removePropertyChangeListener("enabled", enabledListener);
--- a/src/share/classes/javax/swing/filechooser/FileFilter.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/filechooser/FileFilter.java	Fri May 23 09:05:24 2014 -0700
@@ -51,11 +51,16 @@
 public abstract class FileFilter {
     /**
      * Whether the given file is accepted by this filter.
+     *
+     * @param f the File to test
+     * @return true if the file is to be accepted
      */
     public abstract boolean accept(File f);
 
     /**
      * The description of this filter. For example: "JPG and GIF Images"
+     *
+     * @return the description of this filter
      * @see FileView#getName
      */
     public abstract String getDescription();
--- a/src/share/classes/javax/swing/filechooser/FileSystemView.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/filechooser/FileSystemView.java	Fri May 23 09:05:24 2014 -0700
@@ -324,11 +324,18 @@
 
     /**
      * Creates a new folder with a default folder name.
+     *
+     * @param containingDir a {@code File} object denoting directory to contain the new folder
+     * @return a {@code File} object denoting the newly created folder
+     * @throws IOException if new folder could not be created
      */
     public abstract File createNewFolder(File containingDir) throws IOException;
 
     /**
      * Returns whether a file is hidden or not.
+     *
+     * @param f a {@code File} object
+     * @return true if the given {@code File} denotes a hidden file
      */
     public boolean isHiddenFile(File f) {
         return f.isHidden();
@@ -395,6 +402,9 @@
      * Returns all root partitions on this system. For example, on
      * Windows, this would be the "Desktop" folder, while on DOS this
      * would be the A: through Z: drives.
+     *
+     * @return an array of {@code File} objects representing all root partitions
+     *         on this system
      */
     public File[] getRoots() {
         // Don't cache this array, because filesystem might change
@@ -435,6 +445,10 @@
 
     /**
      * Returns a File object constructed in dir from the given filename.
+     *
+     * @param dir an abstract pathname denoting a directory
+     * @param filename a {@code String} representation of a pathname
+     * @return a {@code File} object created from {@code dir} and {@code filename}
      */
     public File createFileObject(File dir, String filename) {
         if(dir == null) {
@@ -446,6 +460,9 @@
 
     /**
      * Returns a File object constructed from the given path string.
+     *
+     * @param path {@code String} representation of path
+     * @return a {@code File} object created from the given {@code path}
      */
     public File createFileObject(String path) {
         File f = new File(path);
@@ -458,6 +475,12 @@
 
     /**
      * Gets the list of shown (i.e. not hidden) files.
+     *
+     * @param dir the root directory of files to be returned
+     * @param useFileHiding determine if hidden files are returned
+     * @return an array of {@code File} objects representing files and
+     *         directories in the given {@code dir}. It includes hidden
+     *         files if {@code useFileHiding} is false.
      */
     public File[] getFiles(File dir, boolean useFileHiding) {
         List<File> files = new ArrayList<File>();
--- a/src/share/classes/javax/swing/filechooser/FileView.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/filechooser/FileView.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,6 +69,9 @@
     /**
      * The name of the file. Normally this would be simply
      * <code>f.getName()</code>.
+     *
+     * @param f a {@code File} object
+     * @return a {@code String} representing the name of the file
      */
     public String getName(File f) {
         return null;
@@ -78,6 +81,11 @@
      * A human readable description of the file. For example,
      * a file named <i>jag.jpg</i> might have a description that read:
      * "A JPEG image file of James Gosling's face".
+     *
+     * @param f a {@code File} object
+     * @return a {@code String} containing a description of the file or
+     *         {@code null} if it is not available.
+     *
      */
     public String getDescription(File f) {
         return null;
@@ -87,6 +95,10 @@
      * A human readable description of the type of the file. For
      * example, a <code>jpg</code> file might have a type description of:
      * "A JPEG Compressed Image File"
+     *
+     * @param f a {@code File} object
+     * @return a {@code String} containing a description of the type of the file
+     *         or {@code null} if it is not available   .
      */
     public String getTypeDescription(File f) {
         return null;
@@ -94,6 +106,10 @@
 
     /**
      * The icon that represents this file in the <code>JFileChooser</code>.
+     *
+     * @param f a {@code File} object
+     * @return an {@code Icon} which represents the specified {@code File} or
+     *         {@code null} if it is not available.
      */
     public Icon getIcon(File f) {
         return null;
@@ -103,6 +119,12 @@
      * Whether the directory is traversable or not. This might be
      * useful, for example, if you want a directory to represent
      * a compound document and don't want the user to descend into it.
+     *
+     * @param f a {@code File} object representing a directory
+     * @return {@code true} if the directory is traversable,
+     *         {@code false} if it is not, and {@code null} if the
+     *         file system should be checked.
+     * @see FileSystemView#isTraversable
      */
     public Boolean isTraversable(File f) {
         return null;
--- a/src/share/classes/javax/swing/text/html/parser/AttributeList.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/text/html/parser/AttributeList.java	Fri May 23 09:05:24 2014 -0700
@@ -59,6 +59,8 @@
 
     /**
      * Create an attribute list element.
+     *
+     * @param name  the attribute name
      */
     public AttributeList(String name) {
         this.name = name;
@@ -66,6 +68,13 @@
 
     /**
      * Create an attribute list element.
+     *
+     * @param name      the attribute name
+     * @param type      the attribute type
+     * @param modifier  the attribute modifier
+     * @param value     the default attribute value
+     * @param values    the possible attribute values
+     * @param next      the next attribute in the list
      */
     public AttributeList(String name, int type, int modifier, String value, Vector<?> values, AttributeList next) {
         this.name = name;
--- a/src/share/classes/javax/swing/text/html/parser/ContentModel.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/text/html/parser/ContentModel.java	Fri May 23 09:05:24 2014 -0700
@@ -62,6 +62,8 @@
 
     /**
      * Create a content model for an element.
+     *
+     * @param content  the element
      */
     public ContentModel(Element content) {
         this(0, content, null);
@@ -69,6 +71,9 @@
 
     /**
      * Create a content model of a particular type.
+     *
+     * @param type     the type
+     * @param content  the content
      */
     public ContentModel(int type, ContentModel content) {
         this(type, content, null);
@@ -76,6 +81,10 @@
 
     /**
      * Create a content model of a particular type.
+     *
+     * @param type     the type
+     * @param content  the content
+     * @param next     the next content model
      */
     public ContentModel(int type, Object content, ContentModel next) {
         this.type = type;
@@ -86,6 +95,9 @@
     /**
      * Return true if the content model could
      * match an empty input stream.
+     *
+     * @return {@code true} if the content model could
+     *         match an empty input stream
      */
     public boolean empty() {
         switch (type) {
@@ -119,6 +131,8 @@
     /**
      * Update elemVec with the list of elements that are
      * part of the this contentModel.
+     *
+     * @param elemVec  the list of elements
      */
      public void getElements(Vector<Element> elemVec) {
          switch (type) {
@@ -148,6 +162,11 @@
     /**
      * Return true if the token could potentially be the
      * first token in the input stream.
+     *
+     * @param token  the token
+     *
+     * @return {@code true} if the token could potentially be the first token
+     *         in the input stream
      */
     public boolean first(Object token) {
         switch (type) {
@@ -206,6 +225,8 @@
 
     /**
      * Return the element that must be next.
+     *
+     * @return the element that must be next
      */
     public Element first() {
         switch (type) {
@@ -226,6 +247,8 @@
 
     /**
      * Convert to a string.
+     *
+     * @return the string representation of this {@code ContentModel}
      */
     public String toString() {
         switch (type) {
--- a/src/share/classes/javax/swing/text/html/parser/DTD.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/text/html/parser/DTD.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -102,6 +102,7 @@
 
     /**
      * Gets an entity by name.
+     * @param name  the entity name
      * @return the <code>Entity</code> corresponding to the
      *   <code>name</code> <code>String</code>
      */
@@ -111,6 +112,7 @@
 
     /**
      * Gets a character entity.
+     * @param ch  the character
      * @return the <code>Entity</code> corresponding to the
      *    <code>ch</code> character
      */
@@ -193,13 +195,15 @@
      * specified parameters.  If one doesn't exist, a new
      * one is created and returned.
      *
-     * @param name the name of the <code>Element</code>
-     * @param type the type of the <code>Element</code>
-     * @param omitStart <code>true</code> if start should be omitted
-     * @param omitEnd  <code>true</code> if end should be omitted
-     * @param content  the <code>ContentModel</code>
-     * @param atts the <code>AttributeList</code> specifying the
-     *    <code>Element</code>
+     * @param name        the name of the <code>Element</code>
+     * @param type        the type of the <code>Element</code>
+     * @param omitStart   <code>true</code> if start should be omitted
+     * @param omitEnd     <code>true</code> if end should be omitted
+     * @param content     the <code>ContentModel</code>
+     * @param exclusions  the set of elements that must not occur inside the element
+     * @param inclusions  the set of elements that can occur inside the element
+     * @param atts        the <code>AttributeList</code> specifying the
+     *                    <code>Element</code>
      * @return the <code>Element</code> specified
      */
     public Element defineElement(String name, int type,
@@ -231,6 +235,8 @@
     /**
      * Creates and returns a character <code>Entity</code>.
      * @param name the entity's name
+     * @param type the entity's type
+     * @param ch   the entity's value (character)
      * @return the new character <code>Entity</code>
      */
     public Entity defEntity(String name, int type, int ch) {
@@ -241,6 +247,8 @@
     /**
      * Creates and returns an <code>Entity</code>.
      * @param name the entity's name
+     * @param type the entity's type
+     * @param str  the entity's data section
      * @return the new <code>Entity</code>
      */
     protected Entity defEntity(String name, int type, String str) {
@@ -252,7 +260,14 @@
 
     /**
      * Creates and returns an <code>Element</code>.
-     * @param name the element's name
+     * @param name        the element's name
+     * @param type        the element's type
+     * @param omitStart   {@code true} if the element needs no starting tag
+     * @param omitEnd     {@code true} if the element needs no closing tag
+     * @param content     the element's content
+     * @param exclusions  the elements that must be excluded from the content of the element
+     * @param inclusions  the elements that can be included as the content of the element
+     * @param atts        the attributes of the element
      * @return the new <code>Element</code>
      */
     protected Element defElement(String name, int type,
@@ -280,11 +295,18 @@
     }
 
     /**
-     * Creates and returns an <code>AttributeList</code>.
-     * @param name the attribute list's name
+     * Creates and returns an <code>AttributeList</code> responding to a new attribute.
+     * @param name      the attribute's name
+     * @param type      the attribute's type
+     * @param modifier  the attribute's modifier
+     * @param value     the default value of the attribute
+     * @param values    the allowed values for the attribute (multiple values could be separated by '|')
+     * @param atts      the previous attribute of the element; to be placed to {@code AttributeList.next},
+     *                  creating a linked list
      * @return the new <code>AttributeList</code>
      */
-    protected AttributeList defAttributeList(String name, int type, int modifier, String value, String values, AttributeList atts) {
+    protected AttributeList defAttributeList(String name, int type, int modifier,
+                                             String value, String values, AttributeList atts) {
         Vector<String> vals = null;
         if (values != null) {
             vals = new Vector<String>();
@@ -301,6 +323,8 @@
     /**
      * Creates and returns a new content model.
      * @param type the type of the new content model
+     * @param obj  the content of the content model
+     * @param next pointer to the next content model
      * @return the new <code>ContentModel</code>
      */
     protected ContentModel defContentModel(int type, Object obj, ContentModel next) {
@@ -332,6 +356,7 @@
      *
      * @param name the name of the DTD
      * @return the DTD which corresponds to <code>name</code>
+     * @throws IOException if an I/O error occurs
      */
     public static DTD getDTD(String name) throws IOException {
         name = name.toLowerCase();
@@ -359,6 +384,7 @@
     /**
      * Recreates a DTD from an archived format.
      * @param in  the <code>DataInputStream</code> to read from
+     * @throws IOException if an I/O error occurs
      */
     public void read(DataInputStream in) throws IOException {
         if (in.readInt() != FILE_VERSION) {
--- a/src/share/classes/javax/swing/text/html/parser/Element.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/text/html/parser/Element.java	Fri May 23 09:05:24 2014 -0700
@@ -64,6 +64,9 @@
 
     /**
      * Create a new element.
+     *
+     * @param name   the name of the element
+     * @param index  the index
      */
     Element(String name, int index) {
         this.name = name;
@@ -84,6 +87,8 @@
 
     /**
      * Get the name of the element.
+     *
+     * @return  the name of the element
      */
     public String getName() {
         return name;
@@ -91,6 +96,8 @@
 
     /**
      * Return true if the start tag can be omitted.
+     *
+     * @return  {@code true} if the start tag can be omitted
      */
     public boolean omitStart() {
         return oStart;
@@ -98,6 +105,8 @@
 
     /**
      * Return true if the end tag can be omitted.
+     *
+     * @return  {@code true} if the end tag can be omitted
      */
     public boolean omitEnd() {
         return oEnd;
@@ -105,6 +114,8 @@
 
     /**
      * Get type.
+     *
+     * @return  the type of the element
      */
     public int getType() {
         return type;
@@ -112,6 +123,8 @@
 
     /**
      * Get content model
+     *
+     * @return  the content model
      */
     public ContentModel getContent() {
         return content;
@@ -119,6 +132,8 @@
 
     /**
      * Get the attributes.
+     *
+     * @return  the {@code AttributeList} specifying the element
      */
     public AttributeList getAttributes() {
         return atts;
@@ -126,6 +141,8 @@
 
     /**
      * Get index.
+     *
+     * @return the element index
      */
     public int getIndex() {
         return index;
@@ -133,6 +150,8 @@
 
     /**
      * Check if empty
+     *
+     * @return  true if the current element is empty
      */
     public boolean isEmpty() {
         return type == EMPTY;
@@ -140,6 +159,8 @@
 
     /**
      * Convert to a string.
+     *
+     * @return  a string representation for the given {@code Element} instance
      */
     public String toString() {
         return name;
@@ -147,6 +168,10 @@
 
     /**
      * Get an attribute by name.
+     *
+     * @param name  the attribute name
+     *
+     * @return the {@code AttributeList} for the given {@code name}
      */
     public AttributeList getAttribute(String name) {
         for (AttributeList a = atts ; a != null ; a = a.next) {
@@ -159,10 +184,14 @@
 
     /**
      * Get an attribute by value.
+     *
+     * @param value  the string representation of value
+     *
+     * @return  the {@code AttributeList} for the given {@code value}
      */
-    public AttributeList getAttributeByValue(String name) {
+    public AttributeList getAttributeByValue(String value) {
         for (AttributeList a = atts ; a != null ; a = a.next) {
-            if ((a.values != null) && a.values.contains(name)) {
+            if ((a.values != null) && a.values.contains(value)) {
                 return a;
             }
         }
--- a/src/share/classes/javax/swing/text/html/parser/Parser.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/text/html/parser/Parser.java	Fri May 23 09:05:24 2014 -0700
@@ -216,6 +216,8 @@
      * the current comment tag, text, block.... This is provided for
      * subclassers that wish to know the start of the current block when
      * called with one of the handleXXX methods.
+     *
+     * @return the start position of the current block
      */
     int getBlockStartPosition() {
         return Math.max(0, lastBlockStartPos - 1);
@@ -223,31 +225,55 @@
 
     /**
      * Makes a TagElement.
+     *
+     * @param elem       the element storing the tag definition
+     * @param fictional  the value of the flag "{@code fictional}" to be set for the tag
+     *
+     * @return the created {@code TagElement}
      */
     protected TagElement makeTag(Element elem, boolean fictional) {
         return new TagElement(elem, fictional);
     }
 
+    /**
+     * Makes a TagElement.
+     *
+     * @param elem  the element storing the tag definition
+     *
+     * @return the created {@code TagElement}
+     */
     protected TagElement makeTag(Element elem) {
         return makeTag(elem, false);
     }
 
+    /**
+     * Returns attributes for the current tag.
+     *
+     * @return {@code SimpleAttributeSet} containing the attributes
+     */
     protected SimpleAttributeSet getAttributes() {
         return attributes;
     }
 
+    /**
+     * Removes the current attributes.
+     */
     protected void flushAttributes() {
         attributes.removeAttributes(attributes);
     }
 
     /**
      * Called when PCDATA is encountered.
+     *
+     * @param text  the section text
      */
     protected void handleText(char text[]) {
     }
 
     /**
      * Called when an HTML title tag is encountered.
+     *
+     * @param text  the title text
      */
     protected void handleTitle(char text[]) {
         // default behavior is to call handleText. Subclasses
@@ -257,10 +283,15 @@
 
     /**
      * Called when an HTML comment is encountered.
+     *
+     * @param text  the comment being handled
      */
     protected void handleComment(char text[]) {
     }
 
+    /**
+     * Called when the content terminates without closing the HTML comment.
+     */
     protected void handleEOFInComment() {
         // We've reached EOF.  Our recovery strategy is to
         // see if we have more than one line in the comment;
@@ -288,24 +319,34 @@
 
     /**
      * Called when an empty tag is encountered.
+     *
+     * @param tag  the tag being handled
+     * @throws ChangedCharSetException if the document charset was changed
      */
     protected void handleEmptyTag(TagElement tag) throws ChangedCharSetException {
     }
 
     /**
      * Called when a start tag is encountered.
+     *
+     * @param tag  the tag being handled
      */
     protected void handleStartTag(TagElement tag) {
     }
 
     /**
      * Called when an end tag is encountered.
+     *
+     * @param tag  the tag being handled
      */
     protected void handleEndTag(TagElement tag) {
     }
 
     /**
      * An error has occurred.
+     *
+     * @param ln   the number of line containing the error
+     * @param msg  the error message
      */
     protected void handleError(int ln, String msg) {
         /*
@@ -368,7 +409,12 @@
     }
 
     /**
-     * Invoke the error handler.
+     * Invokes the error handler.
+     *
+     * @param err   the error type
+     * @param arg1  the 1st error message argument
+     * @param arg2  the 2nd error message argument
+     * @param arg3  the 3rd error message argument
      */
     protected void error(String err, String arg1, String arg2,
         String arg3) {
@@ -390,6 +436,9 @@
      * Handle a start tag. The new tag is pushed
      * onto the tag stack. The attribute list is
      * checked for required attributes.
+     *
+     * @param tag  the tag
+     * @throws ChangedCharSetException if the document charset was changed
      */
     protected void startTag(TagElement tag) throws ChangedCharSetException {
         Element elem = tag.getElement();
@@ -441,6 +490,9 @@
     /**
      * Handle an end tag. The end tag is popped
      * from the tag stack.
+     *
+     * @param omitted  {@code true} if the tag is no actually present in the
+     *                 document, but is supposed by the parser
      */
     protected void endTag(boolean omitted) {
         handleText(stack.tag);
@@ -498,6 +550,8 @@
 
     /**
      * Marks the first time a tag has been seen in a document
+     *
+     * @param elem  the element represented by the tag
      */
 
     protected void markFirstTime(Element elem) {
@@ -1482,8 +1536,11 @@
     }
 
     /**
-     * Parses th Document Declaration Type markup declaration.
+     * Parses the Document Type Declaration markup declaration.
      * Currently ignores it.
+     *
+     * @return the string representation of the markup declaration
+     * @throws IOException if an I/O error occurs
      */
     public String parseDTDMarkup() throws IOException {
 
@@ -1527,6 +1584,11 @@
      * Parse markup declarations.
      * Currently only handles the Document Type Declaration markup.
      * Returns true if it is a markup declaration false otherwise.
+     *
+     * @param strBuff  the markup declaration
+     * @return {@code true} if this is a valid markup declaration;
+     *         otherwise {@code false}
+     * @throws IOException if an I/O error occurs
      */
     protected boolean parseMarkupDeclarations(StringBuffer strBuff) throws IOException {
 
@@ -2246,6 +2308,9 @@
 
     /**
      * Parse an HTML stream, given a DTD.
+     *
+     * @param in  the reader to read the source from
+     * @throws IOException if an I/O error occurs
      */
     public synchronized void parse(Reader in) throws IOException {
         this.in = in;
--- a/src/share/classes/javax/swing/tree/AbstractLayoutCache.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/AbstractLayoutCache.java	Fri May 23 09:05:24 2014 -0700
@@ -149,6 +149,8 @@
      * Returns the height of each row.  If the returned value is less than
      * or equal to 0 the height for each row is determined by the
      * renderer.
+     *
+     * @return the height of each row
      */
     public int getRowHeight() {
         return rowHeight;
@@ -263,6 +265,9 @@
 
     /**
       * Returns true if the value identified by row is currently expanded.
+      *
+      * @param path TreePath to check
+      * @return whether TreePath is expanded
       */
     public abstract boolean isExpanded(TreePath path);
 
@@ -496,6 +501,8 @@
 
     /**
       * Returns true if the height of each row is a fixed size.
+      *
+      * @return whether the height of each row is a fixed size
       */
     protected boolean isFixedRowHeight() {
         return (rowHeight > 0);
--- a/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java	Fri May 23 09:05:24 2014 -0700
@@ -534,6 +534,7 @@
      * Returns true if and only if <code>aNode</code> is in the same tree
      * as this node.  Returns false if <code>aNode</code> is null.
      *
+     * @param   aNode node to find common ancestor with
      * @see     #getSharedAncestor
      * @see     #getRoot
      * @return  true if <code>aNode</code> is in the same tree as this node;
@@ -638,6 +639,8 @@
       * Returns the user object path, from the root, to get to this node.
       * If some of the TreeNodes in the path have null user objects, the
       * returned path will contain nulls.
+      *
+      * @return the user object path, from the root, to get to this node
       */
     public Object[] getUserObjectPath() {
         TreeNode[]          realPath = getPath();
@@ -828,6 +831,7 @@
      * Modifying the tree by inserting, removing, or moving a node invalidates
      * any enumerations created before the modification.
      *
+     * @param           ancestor the node to start enumeration from
      * @see             #isNodeAncestor
      * @see             #isNodeDescendant
      * @exception       IllegalArgumentException if <code>ancestor</code> is
@@ -848,6 +852,7 @@
      * Returns true if <code>aNode</code> is a child of this node.  If
      * <code>aNode</code> is null, this method returns false.
      *
+     * @param   aNode the node to determinate whether it is a child
      * @return  true if <code>aNode</code> is a child of this node; false if
      *                  <code>aNode</code> is null
      */
@@ -906,6 +911,7 @@
      * <code>aChild</code> and is O(n) where n is the number of children; to
      * traverse the entire array of children, use an enumeration instead.
      *
+     * @param           aChild the child node to look for next child after it
      * @see             #children
      * @exception       IllegalArgumentException if <code>aChild</code> is
      *                                  null or is not a child of this node
@@ -938,6 +944,7 @@
      * performs a linear search of this node's children for <code>aChild</code>
      * and is O(n) where n is the number of children.
      *
+     * @param           aChild the child node to look for previous child before it
      * @exception       IllegalArgumentException if <code>aChild</code> is null
      *                                          or is not a child of this node
      * @return  the child of this node that immediately precedes
--- a/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Fri May 23 09:05:24 2014 -0700
@@ -405,7 +405,9 @@
     /**
      * Returns true if <code>event</code> is a <code>MouseEvent</code>
      * and the click count is 1.
-     * @param event  the event being studied
+     *
+     * @param event the event being studied
+     * @return whether {@code event} should starts the editing timer
      */
     protected boolean shouldStartEditingTimer(EventObject event) {
         if((event instanceof MouseEvent) &&
@@ -433,7 +435,9 @@
      * Returns true if <code>event</code> is <code>null</code>,
      * or it is a <code>MouseEvent</code> with a click count &gt; 2
      * and <code>inHitRegion</code> returns true.
+     *
      * @param event the event being studied
+     * @return whether editing can be started for the given {@code event}
      */
     protected boolean canEditImmediately(EventObject event) {
         if((event instanceof MouseEvent) &&
@@ -513,6 +517,8 @@
     /**
      * Creates the container to manage placement of
      * <code>editingComponent</code>.
+     *
+     * @return new Container object
      */
     protected Container createContainer() {
         return new EditorContainer();
--- a/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Fri May 23 09:05:24 2014 -0700
@@ -234,6 +234,9 @@
     /**
       * Returns the default icon, for the current laf, that is used to
       * represent non-leaf nodes that are expanded.
+      *
+      * @return the default icon, for the current laf, that is used to
+      *         represent non-leaf nodes that are expanded.
       */
     public Icon getDefaultOpenIcon() {
         return DefaultLookup.getIcon(this, ui, "Tree.openIcon");
@@ -242,6 +245,9 @@
     /**
       * Returns the default icon, for the current laf, that is used to
       * represent non-leaf nodes that are not expanded.
+      *
+      * @return the default icon, for the current laf, that is used to
+      *         represent non-leaf nodes that are not expanded.
       */
     public Icon getDefaultClosedIcon() {
         return DefaultLookup.getIcon(this, ui, "Tree.closedIcon");
@@ -250,6 +256,9 @@
     /**
       * Returns the default icon, for the current laf, that is used to
       * represent leaf nodes.
+      *
+      * @return the default icon, for the current laf, that is used to
+      *         represent leaf nodes.
       */
     public Icon getDefaultLeafIcon() {
         return DefaultLookup.getIcon(this, ui, "Tree.leafIcon");
@@ -257,6 +266,8 @@
 
     /**
       * Sets the icon used to represent non-leaf nodes that are expanded.
+      *
+      * @param newIcon the icon to be used for expanded non-leaf nodes
       */
     public void setOpenIcon(Icon newIcon) {
         openIcon = newIcon;
@@ -264,6 +275,8 @@
 
     /**
       * Returns the icon used to represent non-leaf nodes that are expanded.
+      *
+      * @return the icon used to represent non-leaf nodes that are expanded
       */
     public Icon getOpenIcon() {
         return openIcon;
@@ -271,6 +284,8 @@
 
     /**
       * Sets the icon used to represent non-leaf nodes that are not expanded.
+      *
+      * @param newIcon the icon to be used for not expanded non-leaf nodes
       */
     public void setClosedIcon(Icon newIcon) {
         closedIcon = newIcon;
@@ -279,6 +294,9 @@
     /**
       * Returns the icon used to represent non-leaf nodes that are not
       * expanded.
+      *
+      * @return the icon used to represent non-leaf nodes that are not
+      *         expanded
       */
     public Icon getClosedIcon() {
         return closedIcon;
@@ -286,6 +304,8 @@
 
     /**
       * Sets the icon used to represent leaf nodes.
+      *
+      * @param newIcon icon to be used for leaf nodes
       */
     public void setLeafIcon(Icon newIcon) {
         leafIcon = newIcon;
@@ -293,6 +313,8 @@
 
     /**
       * Returns the icon used to represent leaf nodes.
+      *
+      * @return the icon used to represent leaf nodes
       */
     public Icon getLeafIcon() {
         return leafIcon;
@@ -300,6 +322,8 @@
 
     /**
       * Sets the color the text is drawn with when the node is selected.
+      *
+      * @param newColor color to be used for text when the node is selected
       */
     public void setTextSelectionColor(Color newColor) {
         textSelectionColor = newColor;
@@ -307,6 +331,8 @@
 
     /**
       * Returns the color the text is drawn with when the node is selected.
+      *
+      * @return the color the text is drawn with when the node is selected
       */
     public Color getTextSelectionColor() {
         return textSelectionColor;
@@ -314,6 +340,8 @@
 
     /**
       * Sets the color the text is drawn with when the node isn't selected.
+      *
+      * @param newColor color to be used for text when the node isn't selected
       */
     public void setTextNonSelectionColor(Color newColor) {
         textNonSelectionColor = newColor;
@@ -321,6 +349,8 @@
 
     /**
       * Returns the color the text is drawn with when the node isn't selected.
+      *
+      * @return the color the text is drawn with when the node isn't selected.
       */
     public Color getTextNonSelectionColor() {
         return textNonSelectionColor;
@@ -328,6 +358,8 @@
 
     /**
       * Sets the color to use for the background if node is selected.
+      *
+      * @param newColor to be used for the background if the node is selected
       */
     public void setBackgroundSelectionColor(Color newColor) {
         backgroundSelectionColor = newColor;
@@ -336,6 +368,8 @@
 
     /**
       * Returns the color to use for the background if node is selected.
+      *
+      * @return the color to use for the background if node is selected
       */
     public Color getBackgroundSelectionColor() {
         return backgroundSelectionColor;
@@ -343,6 +377,8 @@
 
     /**
       * Sets the background color to be used for non selected nodes.
+      *
+      * @param newColor color to be used for the background for non selected nodes
       */
     public void setBackgroundNonSelectionColor(Color newColor) {
         backgroundNonSelectionColor = newColor;
@@ -350,6 +386,8 @@
 
     /**
       * Returns the background color to be used for non selected nodes.
+      *
+      * @return the background color to be used for non selected nodes.
       */
     public Color getBackgroundNonSelectionColor() {
         return backgroundNonSelectionColor;
@@ -357,6 +395,8 @@
 
     /**
       * Sets the color to use for the border.
+      *
+      * @param newColor color to be used for the border
       */
     public void setBorderSelectionColor(Color newColor) {
         borderSelectionColor = newColor;
@@ -364,6 +404,8 @@
 
     /**
       * Returns the color the border is drawn.
+      *
+      * @return the color the border is drawn
       */
     public Color getBorderSelectionColor() {
         return borderSelectionColor;
--- a/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Fri May 23 09:05:24 2014 -0700
@@ -105,6 +105,9 @@
       * Sets whether or not to test leafness by asking getAllowsChildren()
       * or isLeaf() to the TreeNodes.  If newvalue is true, getAllowsChildren()
       * is messaged, otherwise isLeaf() is messaged.
+      *
+      * @param newValue if true, getAllowsChildren() is messaged, otherwise
+      *                 isLeaf() is messaged
       */
     public void setAsksAllowsChildren(boolean newValue) {
         asksAllowsChildren = newValue;
@@ -125,6 +128,8 @@
     /**
      * Sets the root to <code>root</code>. A null <code>root</code> implies
      * the tree is to display nothing, and is legal.
+     *
+     * @param root new value of tree root
      */
     public void setRoot(TreeNode root) {
         Object oldRoot = this.root;
@@ -231,6 +236,10 @@
      * This will then message nodesWereInserted to create the appropriate
      * event. This is the preferred way to add children as it will create
      * the appropriate event.
+     *
+     * @param newChild  child node to be inserted
+     * @param parent    node to which children new node will be added
+     * @param index     index of parent's children
      */
     public void insertNodeInto(MutableTreeNode newChild,
                                MutableTreeNode parent, int index){
@@ -247,6 +256,8 @@
      * nodesWereRemoved to create the appropriate event. This is the
      * preferred way to remove a node as it handles the event creation
      * for you.
+     *
+     * @param node the node to be removed from it's parrent
      */
     public void removeNodeFromParent(MutableTreeNode node) {
         MutableTreeNode         parent = (MutableTreeNode)node.getParent();
@@ -266,6 +277,8 @@
     /**
       * Invoke this method after you've changed how node is to be
       * represented in the tree.
+      *
+      * @param node the changed node
       */
     public void nodeChanged(TreeNode node) {
         if(listenerList != null && node != null) {
@@ -303,6 +316,9 @@
       * Invoke this method after you've inserted some TreeNodes into
       * node.  childIndices should be the index of the new elements and
       * must be sorted in ascending order.
+      *
+      * @param node         parent node which children count been incremented
+      * @param childIndices indexes of inserted children
       */
     public void nodesWereInserted(TreeNode node, int[] childIndices) {
         if(listenerList != null && node != null && childIndices != null
@@ -322,6 +338,10 @@
       * node.  childIndices should be the index of the removed elements and
       * must be sorted in ascending order. And removedChildren should be
       * the array of the children objects that were removed.
+      *
+      * @param node             parent node which childred were removed
+      * @param childIndices     indexes of removed childs
+      * @param removedChildren  array of the children objects that were removed
       */
     public void nodesWereRemoved(TreeNode node, int[] childIndices,
                                  Object[] removedChildren) {
@@ -334,6 +354,9 @@
     /**
       * Invoke this method after you've changed how the children identified by
       * childIndicies are to be represented in the tree.
+      *
+      * @param node         changed node
+      * @param childIndices indexes of changed children
       */
     public void nodesChanged(TreeNode node, int[] childIndices) {
         if(node != null) {
@@ -360,6 +383,8 @@
       * Invoke this method if you've totally changed the children of
       * node and its children's children...  This will post a
       * treeStructureChanged event.
+      *
+      * @param node changed node
       */
     public void nodeStructureChanged(TreeNode node) {
         if(node != null) {
@@ -374,6 +399,7 @@
      * tree.
      *
      * @param aNode the TreeNode to get the path for
+     * @return an array of TreeNodes giving the path from the root
      */
     public TreeNode[] getPathToRoot(TreeNode aNode) {
         return getPathToRoot(aNode, 0);
--- a/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Fri May 23 09:05:24 2014 -0700
@@ -618,6 +618,9 @@
     /**
      * Notifies all listeners that are registered for
      * tree selection events on this object.
+     *
+     * @param e the event that characterizes the change
+     *
      * @see #addTreeSelectionListener
      * @see EventListenerList
      */
@@ -920,6 +923,9 @@
     /**
      * Returns true if the paths are contiguous,
      * or this object has no RowMapper.
+     *
+     * @param paths array of paths to check
+     * @return      whether the paths are contiguous, or this object has no RowMapper
      */
     protected boolean arePathsContiguous(TreePath[] paths) {
         if(rowMapper == null || paths.length < 2)
@@ -968,6 +974,9 @@
      * or the selection mode is <code>DISCONTIGUOUS_TREE_SELECTION</code>, or
      * adding the paths to the current selection still results in a
      * contiguous set of <code>TreePath</code>s.
+     *
+     * @param paths array of {@code TreePaths} to check
+     * @return      whether the particular set of {@code TreePaths} can be added
      */
     protected boolean canPathsBeAdded(TreePath[] paths) {
         if(paths == null || paths.length == 0 || rowMapper == null ||
@@ -1019,6 +1028,10 @@
      * Returns true if the paths can be removed without breaking the
      * continuity of the model.
      * This is rather expensive.
+     *
+     * @param paths array of {@code TreePath} to check
+     * @return      whether the paths can be removed without breaking the
+     *              continuity of the model
      */
     protected boolean canPathsBeRemoved(TreePath[] paths) {
         if(rowMapper == null || selection == null ||
@@ -1072,6 +1085,9 @@
      * instances of PathPlaceHolder.
      *
      * @deprecated As of JDK version 1.7
+     *
+     * @param changedPaths      the vector of the changed paths
+     * @param oldLeadSelection  the old selection path
      */
     @Deprecated
     protected void notifyPathChange(Vector<?> changedPaths,
--- a/src/share/classes/javax/swing/tree/MutableTreeNode.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/MutableTreeNode.java	Fri May 23 09:05:24 2014 -0700
@@ -42,22 +42,31 @@
     /**
      * Adds <code>child</code> to the receiver at <code>index</code>.
      * <code>child</code> will be messaged with <code>setParent</code>.
+     *
+     * @param child node to be added
+     * @param index index of the receiver
      */
     void insert(MutableTreeNode child, int index);
 
     /**
      * Removes the child at <code>index</code> from the receiver.
+     *
+     * @param index index of child to be removed
      */
     void remove(int index);
 
     /**
      * Removes <code>node</code> from the receiver. <code>setParent</code>
      * will be messaged on <code>node</code>.
+     *
+     * @param node node to be removed from the receiver
      */
     void remove(MutableTreeNode node);
 
     /**
      * Resets the user object of the receiver to <code>object</code>.
+     *
+     * @param object object to be set as a receiver
      */
     void setUserObject(Object object);
 
@@ -68,6 +77,8 @@
 
     /**
      * Sets the parent of the receiver to <code>newParent</code>.
+     *
+     * @param newParent node to be set as parent of the receiver
      */
     void setParent(MutableTreeNode newParent);
 }
--- a/src/share/classes/javax/swing/tree/RowMapper.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/RowMapper.java	Fri May 23 09:05:24 2014 -0700
@@ -41,6 +41,10 @@
      * the same length as that passed in, and if one of the TreePaths
      * in <code>path</code> is not valid its entry in the array should
      * be set to -1.
+     *
+     * @param path  array of TreePath to parse
+     * @return      the rows that the TreePath instances in {@code path} are
+     *              being displayed at
      */
     int[] getRowsForPaths(TreePath[] path);
 }
--- a/src/share/classes/javax/swing/tree/TreeCellRenderer.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/TreeCellRenderer.java	Fri May 23 09:05:24 2014 -0700
@@ -67,7 +67,14 @@
      *     }
      * </pre>
      *
-     * @return  the <code>Component</code> that the renderer uses to draw the value
+     * @param tree      the receiver is being configured for
+     * @param value     the value to render
+     * @param selected  whether node is selected
+     * @param expanded  whether node is expanded
+     * @param leaf      whether node is a lead node
+     * @param row       row index
+     * @param hasFocus  whether node has focus
+     * @return          the {@code Component} that the renderer uses to draw the value
      */
     Component getTreeCellRendererComponent(JTree tree, Object value,
                                    boolean selected, boolean expanded,
--- a/src/share/classes/javax/swing/tree/TreeModel.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/TreeModel.java	Fri May 23 09:05:24 2014 -0700
@@ -79,8 +79,9 @@
      * is a valid index for <code>parent</code> (that is <code>index &gt;= 0 &amp;&amp;
      * index &lt; getChildCount(parent</code>)).
      *
-     * @param   parent  a node in the tree, obtained from this data source
-     * @return  the child of <code>parent</code> at index <code>index</code>
+     * @param parent    a node in the tree, obtained from this data source
+     * @param index     index of child to be returned
+     * @return          the child of {@code parent} at index {@code index}
      */
     public Object getChild(Object parent, int index);
 
--- a/src/share/classes/javax/swing/tree/TreeNode.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/TreeNode.java	Fri May 23 09:05:24 2014 -0700
@@ -49,17 +49,24 @@
     /**
      * Returns the child <code>TreeNode</code> at index
      * <code>childIndex</code>.
+     *
+     * @param   childIndex  index of child
+     * @return              the child node at given index
      */
     TreeNode getChildAt(int childIndex);
 
     /**
      * Returns the number of children <code>TreeNode</code>s the receiver
      * contains.
+     *
+     * @return              the number of children the receiver contains
      */
     int getChildCount();
 
     /**
      * Returns the parent <code>TreeNode</code> of the receiver.
+     *
+     * @return              the parent of the receiver
      */
     TreeNode getParent();
 
@@ -67,21 +74,30 @@
      * Returns the index of <code>node</code> in the receivers children.
      * If the receiver does not contain <code>node</code>, -1 will be
      * returned.
+     *
+     * @param   node        node to be loked for
+     * @return              index of specified node
      */
     int getIndex(TreeNode node);
 
     /**
      * Returns true if the receiver allows children.
+     *
+     * @return              whether the receiver allows children
      */
     boolean getAllowsChildren();
 
     /**
      * Returns true if the receiver is a leaf.
+     *
+     * @return              whether the receiver is a leaf
      */
     boolean isLeaf();
 
     /**
      * Returns the children of the receiver as an <code>Enumeration</code>.
+     *
+     * @return              the children of the receiver as an {@code Enumeration}
      */
     Enumeration children();
 }
--- a/src/share/classes/javax/swing/tree/TreePath.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/TreePath.java	Fri May 23 09:05:24 2014 -0700
@@ -320,8 +320,10 @@
      * plus <code>child</code>. <code>child</code> is the last element
      * of the newly created {@code TreePath}.
      *
-     * @param child the path element to add
-     * @throws NullPointerException if {@code child} is {@code null}
+     * @param   child   the path element to add
+     * @throws          NullPointerException if {@code child} is {@code null}
+     * @return          a new path containing all the elements of this path
+     *                  plus {@code child}
      */
     public TreePath pathByAddingChild(Object child) {
         if(child == null)
--- a/src/share/classes/javax/swing/tree/TreeSelectionModel.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/tree/TreeSelectionModel.java	Fri May 23 09:05:24 2014 -0700
@@ -109,6 +109,8 @@
      * selected when the mode is changed to <code>SINGLE_TREE_SELECTION</code>,
      * only one TreePath will remain selected. It is up to the particular
      * implementation to decide what TreePath remains selected.
+     *
+     * @param   mode    selection mode to be set
      */
     void setSelectionMode(int mode);
 
@@ -117,6 +119,8 @@
      * <code>SINGLE_TREE_SELECTION</code>,
      * <code>CONTIGUOUS_TREE_SELECTION</code> or
      * <code>DISCONTIGUOUS_TREE_SELECTION</code>.
+     *
+     * @return          the current selection mode
      */
     int getSelectionMode();
 
@@ -125,7 +129,7 @@
       * the TreeSelectionListeners are notified. If <code>path</code> is
       * null, this has the same effect as invoking <code>clearSelection</code>.
       *
-      * @param path new path to select
+      * @param  path    new path to select
       */
     void setSelectionPath(TreePath path);
 
@@ -134,7 +138,7 @@
       * the TreeSelectionListeners are notified. If <code>paths</code> is
       * null, this has the same effect as invoking <code>clearSelection</code>.
       *
-      * @param paths new selection
+      * @param  paths   new selection
       */
     void setSelectionPaths(TreePath[] paths);
 
@@ -143,7 +147,7 @@
       * in the selection the TreeSelectionListeners are notified. This has
       * no effect if <code>path</code> is null.
       *
-      * @param path the new path to add to the current selection
+      * @param  path    the new path to add to the current selection
       */
     void addSelectionPath(TreePath path);
 
@@ -153,7 +157,7 @@
       * are notified. This has
       * no effect if <code>paths</code> is null.
       *
-      * @param paths the new paths to add to the current selection
+      * @param  paths   the new paths to add to the current selection
       */
     void addSelectionPaths(TreePath[] paths);
 
@@ -162,7 +166,7 @@
       * The TreeSelectionListeners are notified. This has no effect if
       * <code>path</code> is null.
       *
-      * @param path the path to remove from the selection
+      * @param  path    the path to remove from the selection
       */
     void removeSelectionPath(TreePath path);
 
@@ -172,7 +176,7 @@
       * are in the selection, the TreeSelectionListeners are notified.
       * This method has no effect if <code>paths</code> is null.
       *
-      * @param paths the path to remove from the selection
+      * @param  paths   the path to remove from the selection
       */
     void removeSelectionPaths(TreePath[] paths);
 
@@ -181,28 +185,39 @@
       * up to implementors, and may not necessarily be the TreePath with
       * the smallest integer value as determined from the
       * <code>RowMapper</code>.
+      *
+      * @return         the first path in the selection
       */
     TreePath getSelectionPath();
 
     /**
       * Returns the paths in the selection. This will return null (or an
       * empty array) if nothing is currently selected.
+      *
+      * @return         the paths in the selection
       */
     TreePath[] getSelectionPaths();
 
     /**
      * Returns the number of paths that are selected.
+     *
+     * @return          the number of paths that are selected
      */
     int getSelectionCount();
 
     /**
       * Returns true if the path, <code>path</code>, is in the current
       * selection.
+      *
+      * @param  path    the path to be loked for
+      * @return         whether the {@code path} is in the current selection
       */
     boolean isPathSelected(TreePath path);
 
     /**
       * Returns true if the selection is currently empty.
+      *
+      * @return         whether the selection is currently empty
       */
     boolean isSelectionEmpty();
 
@@ -215,12 +230,17 @@
     /**
      * Sets the RowMapper instance. This instance is used to determine
      * the row for a particular TreePath.
+     *
+     * @param   newMapper   RowMapper to be set
      */
     void setRowMapper(RowMapper newMapper);
 
     /**
      * Returns the RowMapper instance that is able to map a TreePath to a
      * row.
+     *
+     * @return          the RowMapper instance that is able to map a TreePath
+     *                  to a row
      */
     RowMapper getRowMapper();
 
@@ -228,6 +248,8 @@
       * Returns all of the currently selected rows. This will return
       * null (or an empty array) if there are no selected TreePaths or
       * a RowMapper has not been set.
+      *
+      * @return         all of the currently selected rows
       */
     int[] getSelectionRows();
 
@@ -235,6 +257,9 @@
      * Returns the smallest value obtained from the RowMapper for the
      * current set of selected TreePaths. If nothing is selected,
      * or there is no RowMapper, this will return -1.
+     *
+     * @return          the smallest value obtained from the RowMapper
+     *                  for the current set of selected TreePaths
       */
     int getMinSelectionRow();
 
@@ -242,11 +267,17 @@
      * Returns the largest value obtained from the RowMapper for the
      * current set of selected TreePaths. If nothing is selected,
      * or there is no RowMapper, this will return -1.
+     *
+     * @return          the largest value obtained from the RowMapper
+     *                  for the current set of selected TreePaths
       */
     int getMaxSelectionRow();
 
     /**
       * Returns true if the row identified by <code>row</code> is selected.
+      *
+      * @param  row     row to check
+      * @return         whether the row is selected
       */
     boolean isRowSelected(int row);
 
@@ -264,12 +295,16 @@
     /**
      * Returns the lead selection index. That is the last index that was
      * added.
+     *
+     * @return          the lead selection index
      */
     int getLeadSelectionRow();
 
     /**
      * Returns the last path that was added. This may differ from the
      * leadSelectionPath property maintained by the JTree.
+     *
+     * @return          the last path that was added
      */
     TreePath getLeadSelectionPath();
 
@@ -280,7 +315,7 @@
      * A PropertyChangeEvent will get fired when the selection mode
      * changes.
      *
-     * @param listener  the PropertyChangeListener to be added
+     * @param   listener    the PropertyChangeListener to be added
      */
     void addPropertyChangeListener(PropertyChangeListener listener);
 
@@ -289,7 +324,7 @@
      * This removes a PropertyChangeListener that was registered
      * for all properties.
      *
-     * @param listener  the PropertyChangeListener to be removed
+     * @param   listener    the PropertyChangeListener to be removed
      */
     void removePropertyChangeListener(PropertyChangeListener listener);
 
@@ -297,7 +332,7 @@
       * Adds x to the list of listeners that are notified each time the
       * set of selected TreePaths changes.
       *
-      * @param x the new listener to be added
+      * @param  x       the new listener to be added
       */
     void addTreeSelectionListener(TreeSelectionListener x);
 
@@ -305,7 +340,7 @@
       * Removes x from the list of listeners that are notified each time
       * the set of selected TreePaths changes.
       *
-      * @param x the listener to remove
+      * @param  x       the listener to remove
       */
     void removeTreeSelectionListener(TreeSelectionListener x);
 }
--- a/src/share/classes/javax/swing/undo/CompoundEdit.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/undo/CompoundEdit.java	Fri May 23 09:05:24 2014 -0700
@@ -82,6 +82,9 @@
      * Returns the last <code>UndoableEdit</code> in
      * <code>edits</code>, or <code>null</code>
      * if <code>edits</code> is empty.
+     *
+     * @return the last {@code UndoableEdit} in {@code edits},
+     *         or {@code null} if {@code edits} is empty.
      */
     protected UndoableEdit lastEdit() {
         int count = edits.size();
@@ -182,6 +185,7 @@
      * received end. This generally means that edits are still being
      * added to it.
      *
+     * @return  whether this edit is in progress
      * @see     #end
      */
     public boolean isInProgress() {
--- a/src/share/classes/javax/swing/undo/StateEditable.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/undo/StateEditable.java	Fri May 23 09:05:24 2014 -0700
@@ -43,12 +43,16 @@
     /**
      * Upon receiving this message the receiver should place any relevant
      * state into <EM>state</EM>.
+     *
+     * @param state Hashtable object to store the state
      */
     public void storeState(Hashtable<Object,Object> state);
 
     /**
      * Upon receiving this message the receiver should extract any relevant
      * state out of <EM>state</EM>.
+     *
+     * @param state Hashtable object to restore the state from it
      */
     public void restoreState(Hashtable<?,?> state);
 } // End of interface StateEditable
--- a/src/share/classes/javax/swing/undo/UndoManager.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/undo/UndoManager.java	Fri May 23 09:05:24 2014 -0700
@@ -326,6 +326,7 @@
      * Undoes all changes from the index of the next edit to
      * <code>edit</code>, updating the index of the next edit appropriately.
      *
+     * @param edit the edit to be undo to
      * @throws CannotUndoException if one of the edits throws
      *         <code>CannotUndoException</code>
      */
@@ -342,6 +343,7 @@
      * Redoes all changes from the index of the next edit to
      * <code>edit</code>, updating the index of the next edit appropriately.
      *
+     * @param edit the edit to be redo to
      * @throws CannotRedoException if one of the edits throws
      *         <code>CannotRedoException</code>
      */
--- a/src/share/classes/javax/swing/undo/UndoableEditSupport.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/javax/swing/undo/UndoableEditSupport.java	Fri May 23 09:05:24 2014 -0700
@@ -96,6 +96,8 @@
      * Called only from <code>postEdit</code> and <code>endUpdate</code>. Calls
      * <code>undoableEditHappened</code> in all listeners. No synchronization
      * is performed here, since the two calling methods are synchronized.
+     *
+     * @param e edit to be verified
      */
     protected void _postEdit(UndoableEdit e) {
         UndoableEditEvent ev = new UndoableEditEvent(realSource, e);
@@ -110,6 +112,8 @@
      * DEADLOCK WARNING: Calling this method may call
      * <code>undoableEditHappened</code> in all listeners.
      * It is unwise to call this method from one of its listeners.
+     *
+     * @param e edit to be posted
      */
     public synchronized void postEdit(UndoableEdit e) {
         if (updateLevel == 0) {
@@ -142,6 +146,8 @@
     /**
      * Called only from <code>beginUpdate</code>.
      * Exposed here for subclasses' use.
+     *
+     * @return new created {@code CompoundEdit} object
      */
     protected CompoundEdit createCompoundEdit() {
         return new CompoundEdit();
--- a/src/share/classes/jdk/internal/util/xml/BasicXmlPropertiesProvider.java	Tue May 13 10:29:12 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.internal.util.xml;
-
-import java.util.Properties;
-import java.util.InvalidPropertiesFormatException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-import sun.util.spi.XmlPropertiesProvider;
-
-/**
- * A {@code XmlPropertiesProvider} implementation that uses the UKit XML parser.
- */
-
-public class BasicXmlPropertiesProvider extends XmlPropertiesProvider {
-
-    public BasicXmlPropertiesProvider() { }
-
-    @Override
-    public void load(Properties props, InputStream in)
-        throws IOException, InvalidPropertiesFormatException
-    {
-        PropertiesDefaultHandler handler = new PropertiesDefaultHandler();
-        handler.load(props, in);
-    }
-
-    @Override
-    public void store(Properties props, OutputStream os, String comment,
-                      String encoding)
-        throws IOException
-    {
-        PropertiesDefaultHandler handler = new PropertiesDefaultHandler();
-        handler.store(props, os, comment, encoding);
-    }
-}
--- a/src/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java	Fri May 23 09:05:24 2014 -0700
@@ -123,7 +123,7 @@
 
             writer.writeEndElement();
             writer.writeEndDocument();
-            writer.close();
+            writer.flush();
         } catch (XMLStreamException e) {
             if (e.getCause() instanceof UnsupportedEncodingException) {
                 throw (UnsupportedEncodingException) e.getCause();
--- a/src/share/classes/sun/misc/VM.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/sun/misc/VM.java	Fri May 23 09:05:24 2014 -0700
@@ -370,7 +370,37 @@
     /**
      * Returns {@code true} if we are in a set UID program.
      */
-    public static native boolean isSetUID();
+    public static boolean isSetUID() {
+        long uid = getuid();
+        long euid = geteuid();
+        long gid = getgid();
+        long egid = getegid();
+        return uid != euid  || gid != egid;
+    }
+
+    /**
+     * Returns the real user ID of the calling process,
+     * or -1 if the value is not available.
+     */
+    public static native long getuid();
+
+    /**
+     * Returns the effective user ID of the calling process,
+     * or -1 if the value is not available.
+     */
+    public static native long geteuid();
+
+    /**
+     * Returns the real group ID of the calling process,
+     * or -1 if the value is not available.
+     */
+    public static native long getgid();
+
+    /**
+     * Returns the effective group ID of the calling process,
+     * or -1 if the value is not available.
+     */
+    public static native long getegid();
 
     static {
         initialize();
--- a/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Fri May 23 09:05:24 2014 -0700
@@ -34,8 +34,11 @@
 import java.util.Random;
 
 import sun.net.www.HeaderParser;
+import sun.net.NetProperties;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedAction;
+import java.security.AccessController;
 import static sun.net.www.protocol.http.HttpURLConnection.HTTP_CONNECT;
 
 /**
@@ -51,6 +54,23 @@
 
     private String authMethod;
 
+    private final static String compatPropName = "http.auth.digest." +
+        "quoteParameters";
+
+    // true if http.auth.digest.quoteParameters Net property is true
+    private static final boolean delimCompatFlag;
+
+    static {
+        Boolean b = AccessController.doPrivileged(
+            new PrivilegedAction<Boolean>() {
+                public Boolean run() {
+                    return NetProperties.getBoolean(compatPropName);
+                }
+            }
+        );
+        delimCompatFlag = (b == null) ? false : b.booleanValue();
+    }
+
     // Authentication parameters defined in RFC2617.
     // One instance of these may be shared among several DigestAuthentication
     // instances as a result of a single authorization (for multiple domains)
@@ -206,7 +226,7 @@
     }
 
     /**
-     * Reclaculates the request-digest and returns it.
+     * Recalculates the request-digest and returns it.
      *
      * <P> Used in the common case where the requestURI is simply the
      * abs_path.
@@ -225,7 +245,7 @@
     }
 
     /**
-     * Reclaculates the request-digest and returns it.
+     * Recalculates the request-digest and returns it.
      *
      * <P> Used when the requestURI is not the abs_path. The exact
      * requestURI can be passed as a String.
@@ -357,24 +377,34 @@
             ncfield = "\", nc=" + ncstring;
         }
 
+        String algoS, qopS;
+
+        if (delimCompatFlag) {
+            // Put quotes around these String value parameters
+            algoS = ", algorithm=\"" + algorithm + "\"";
+            qopS = ", qop=\"auth\"";
+        } else {
+            // Don't put quotes around them, per the RFC
+            algoS = ", algorithm=" + algorithm;
+            qopS = ", qop=auth";
+        }
+
         String value = authMethod
                         + " username=\"" + pw.getUserName()
                         + "\", realm=\"" + realm
                         + "\", nonce=\"" + nonce
                         + ncfield
                         + ", uri=\"" + uri
-                        + "\", response=\"" + response
-                        + "\", algorithm=" + algorithm;
+                        + "\", response=\"" + response + "\""
+                        + algoS;
         if (opaque != null) {
-            value = value + ", opaque=\"" + opaque;
-            value = value + "\"";
+            value += ", opaque=\"" + opaque + "\"";
         }
         if (cnonce != null) {
-            value = value + ", cnonce=\"" + cnonce;
-            value = value + "\"";
+            value += ", cnonce=\"" + cnonce + "\"";
         }
         if (qop) {
-            value = value + ", qop=auth";
+            value += qopS;
         }
         return value;
     }
--- a/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Fri May 23 09:05:24 2014 -0700
@@ -75,7 +75,7 @@
             if (ti.getTarget() == filter)
                 l.add(t);
         }
-        TypeAnnotation[] typeAnnotations = l.toArray(new TypeAnnotation[0]);
+        TypeAnnotation[] typeAnnotations = l.toArray(EMPTY_TYPE_ANNOTATION_ARRAY);
         return AnnotatedTypeFactory.buildAnnotatedType(type,
                                                        LocationInfo.BASE_LOCATION,
                                                        typeAnnotations,
@@ -245,7 +245,6 @@
         if (bounds != null) {
             int startIndex = 0;
             AnnotatedType[] res = new AnnotatedType[bounds.length];
-            Arrays.fill(res, AnnotatedTypeFactory.EMPTY_ANNOTATED_TYPE);
 
             // Adjust bounds index
             //
@@ -276,12 +275,12 @@
                             tInfo.getCount() == typeVarIndex) {
                         l.add(t);
                     }
-                    res[i] = AnnotatedTypeFactory.buildAnnotatedType(bounds[i],
-                                                                     loc,
-                                                                     l.toArray(new TypeAnnotation[0]),
-                                                                     candidates.toArray(new TypeAnnotation[0]),
-                                                                     (AnnotatedElement)decl);
                 }
+                res[i] = AnnotatedTypeFactory.buildAnnotatedType(bounds[i],
+                        loc,
+                        l.toArray(EMPTY_TYPE_ANNOTATION_ARRAY),
+                        candidates.toArray(EMPTY_TYPE_ANNOTATION_ARRAY),
+                        (AnnotatedElement)decl);
             }
             return res;
         }
--- a/src/share/classes/sun/security/krb5/internal/rcache/DflCache.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/rcache/DflCache.java	Fri May 23 09:05:24 2014 -0700
@@ -39,7 +39,6 @@
 import java.security.AccessController;
 import java.util.*;
 
-import com.sun.security.auth.module.UnixSystem;
 import sun.security.action.GetPropertyAction;
 import sun.security.krb5.internal.KerberosTime;
 import sun.security.krb5.internal.Krb5;
@@ -61,8 +60,7 @@
  *
  *    service_euid
  *
- * Java does not have a method to get euid, so uid is used instead. This
- * should normally to be since a Java program is seldom used as a setuid app.
+ * in which euid is available as sun.misc.VM.geteuid().
  *
  * The file has a header:
  *
@@ -108,14 +106,8 @@
 
     private static long uid;
     static {
-        try {
-            // Available on Solaris, Linux and Mac. Otherwise, no _euid suffix
-            UnixSystem us = new com.sun.security.auth.module.UnixSystem();
-            uid = us.getUid();
-        } catch (Throwable e) {
-            // Cannot be only Exception, might be UnsatisfiedLinkError
-            uid = -1;
-        }
+        // Available on Solaris, Linux and Mac. Otherwise, -1 and no _euid suffix
+        uid = sun.misc.VM.geteuid();
     }
 
     public DflCache (String source) {
--- a/src/share/classes/sun/text/resources/es/FormatData_es_DO.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/sun/text/resources/es/FormatData_es_DO.java	Fri May 23 09:05:24 2014 -0700
@@ -75,8 +75,8 @@
                 new String[] {
                     "EEEE d' de 'MMMM' de 'yyyy", // full date pattern
                     "d' de 'MMMM' de 'yyyy", // long date pattern
-                    "MM/dd/yyyy", // medium date pattern
-                    "MM/dd/yy", // short date pattern
+                    "dd/MM/yyyy", // medium date pattern
+                    "dd/MM/yy", // short date pattern
                 }
             },
             { "DateTimePatterns",
--- a/src/share/classes/sun/tools/serialver/SerialVer.java	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/sun/tools/serialver/SerialVer.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,8 +26,6 @@
 package sun.tools.serialver;
 
 import java.io.*;
-import java.awt.*;
-import java.applet.*;
 import java.io.ObjectStreamClass;
 import java.util.Properties;
 import java.text.MessageFormat;
@@ -39,106 +37,7 @@
 import java.util.StringTokenizer;
 import sun.net.www.ParseUtil;
 
-public class SerialVer extends Applet {
-    GridBagLayout gb;
-    TextField classname_t;
-    Button show_b;
-    TextField serialversion_t;
-    Label footer_l;
-
-    private static final long serialVersionUID = 7666909783837760853L;
-
-    public synchronized void init() {
-        gb = new GridBagLayout();
-        setLayout(gb);
-
-        GridBagConstraints c = new GridBagConstraints();
-        c.fill = GridBagConstraints.BOTH;
-
-        Label l1 = new Label(Res.getText("FullClassName"));
-        l1.setAlignment(Label.RIGHT);
-        gb.setConstraints(l1, c);
-        add(l1);
-
-        classname_t = new TextField(20);
-        c.gridwidth = GridBagConstraints.RELATIVE;
-        c.weightx = 1.0;
-        gb.setConstraints(classname_t, c);
-        add(classname_t);
-
-        show_b = new Button(Res.getText("Show"));
-        c.gridwidth = GridBagConstraints.REMAINDER;
-        c.weightx = 0.0;        /* Don't grow the button */
-        gb.setConstraints(show_b, c);
-        add(show_b);
-
-        Label l2 = new Label(Res.getText("SerialVersion"));
-        l2.setAlignment(Label.RIGHT);
-        c.gridwidth = 1;
-        gb.setConstraints(l2, c);
-        add(l2);
-
-        serialversion_t = new TextField(50);
-        serialversion_t.setEditable(false);
-        c.gridwidth = GridBagConstraints.REMAINDER;
-        gb.setConstraints(serialversion_t, c);
-        add(serialversion_t);
-
-        footer_l = new Label();
-        c.gridwidth = GridBagConstraints.REMAINDER;
-        gb.setConstraints(footer_l, c);
-        add(footer_l);
-
-        /* Give the focus to the type-in area */
-        classname_t.requestFocus();
-    }
-
-    public void start() {
-        /* Give the focus to the type-in area */
-        classname_t.requestFocus();
-    }
-
-    @SuppressWarnings("deprecation")
-    public boolean action(Event ev, Object obj) {
-        if (ev.target == classname_t) {
-            show((String)ev.arg);
-            return true;
-        } else if (ev.target == show_b) {
-            show(classname_t.getText());
-            return true;
-        }
-        return false;
-    }
-
-
-    @SuppressWarnings("deprecation")
-    public boolean handleEvent(Event ev) {
-        boolean rc = super.handleEvent(ev);
-        return rc;
-    }
-
-    /**
-     * Lookup the specified classname and display it.
-     */
-    void show(String classname) {
-        try {
-            footer_l.setText(""); // Clear the message
-            serialversion_t.setText(""); // clear the last value
-
-            if (classname.equals("")) {
-                return;
-            }
-
-            String s = serialSyntax(classname);
-            if (s != null) {
-                serialversion_t.setText(s);
-            } else {
-                footer_l.setText(Res.getText("NotSerializable", classname));
-            }
-        } catch (ClassNotFoundException cnf) {
-            footer_l.setText(Res.getText("ClassNotFound", classname));
-        }
-    }
+public class SerialVer {
 
     /*
      * A class loader that will load from the CLASSPATH environment
@@ -218,13 +117,7 @@
         }
     }
 
-    @SuppressWarnings("deprecation")
-    private static void showWindow(Window w) {
-        w.show();
-    }
-
     public static void main(String[] args) {
-        boolean show = false;
         String envcp = null;
         int i = 0;
 
@@ -234,9 +127,7 @@
         }
 
         for (i = 0; i < args.length; i++) {
-            if (args[i].equals("-show")) {
-                show = true;
-            } else if (args[i].equals("-classpath")) {
+            if (args[i].equals("-classpath")) {
                 if ((i+1 == args.length) || args[i+1].startsWith("-")) {
                     System.err.println(Res.getText("error.missing.classpath"));
                     usage();
@@ -278,51 +169,35 @@
             System.exit(3);
         }
 
-        if (!show) {
-            /*
-             * Check if there are any class names specified, if it is not a
-             * invocation with the -show option.
-             */
-            if (i == args.length) {
-                usage();
-                System.exit(1);
-            }
+        /*
+         * Check if there are any class names specified
+         */
+        if (i == args.length) {
+            usage();
+            System.exit(1);
+        }
 
-            /*
-             * The rest of the parameters are classnames.
-             */
-            boolean exitFlag = false;
-            for (i = i; i < args.length; i++ ) {
-                try {
-                    String syntax = serialSyntax(args[i]);
-                    if (syntax != null)
-                        System.out.println(args[i] + ":" + syntax);
-                    else {
-                        System.err.println(Res.getText("NotSerializable",
-                            args[i]));
-                        exitFlag = true;
-                    }
-                } catch (ClassNotFoundException cnf) {
-                    System.err.println(Res.getText("ClassNotFound", args[i]));
+        /*
+         * The rest of the parameters are classnames.
+         */
+        boolean exitFlag = false;
+        for (i = i; i < args.length; i++ ) {
+            try {
+                String syntax = serialSyntax(args[i]);
+                if (syntax != null)
+                    System.out.println(args[i] + ":" + syntax);
+                else {
+                    System.err.println(Res.getText("NotSerializable",
+                        args[i]));
                     exitFlag = true;
                 }
+            } catch (ClassNotFoundException cnf) {
+                System.err.println(Res.getText("ClassNotFound", args[i]));
+                exitFlag = true;
             }
-            if (exitFlag) {
-                System.exit(1);
-            }
-        } else {
-            if (i < args.length) {
-                System.err.println(Res.getText("ignoring.classes"));
-                System.exit(1);
-            }
-            Frame f =  new SerialVerFrame();
-            //  f.setLayout(new FlowLayout());
-            SerialVer sv = new SerialVer();
-            sv.init();
-
-            f.add("Center", sv);
-            f.pack();
-            showWindow(f);
+        }
+        if (exitFlag) {
+            System.exit(1);
         }
     }
 
@@ -337,65 +212,6 @@
 }
 
 /**
- * Top level frame so serialVer can be run as an main program
- * and have an exit menu item.
- */
-class SerialVerFrame extends Frame {
-    MenuBar menu_mb;
-    Menu file_m;
-    MenuItem exit_i;
-
-    private static final long serialVersionUID = -7248105987187532533L;
-
-    /*
-     * Construct a new Frame with title and menu.
-     */
-    SerialVerFrame() {
-        super(Res.getText("SerialVersionInspector"));
-
-        /* Create the file menu */
-        file_m = new Menu(Res.getText("File"));
-        file_m.add(exit_i = new MenuItem(Res.getText("Exit")));
-
-        /* Now add the file menu to the menu bar  */
-        menu_mb = new MenuBar();
-        menu_mb.add(file_m);
-
-        /* Add the menubar to the frame */
-        // Bug in JDK1.1        setMenuBar(menu_mb);
-    }
-
-    /*
-     * Handle a window destroy event by exiting.
-     */
-    @SuppressWarnings("deprecation")
-    public boolean handleEvent(Event e) {
-        if (e.id == Event.WINDOW_DESTROY) {
-            exit(0);
-        }
-        return super.handleEvent(e);
-    }
-    /*
-     * Handle an Exit event by exiting.
-     */
-    @SuppressWarnings("deprecation")
-    public boolean action(Event ev, Object obj) {
-        if (ev.target == exit_i) {
-            exit(0);
-        }
-        return false;
-    }
-
-    /*
-     * Cleanup and exit.
-     */
-    void exit(int ret) {
-        System.exit(ret);
-    }
-
-}
-
-/**
  * Utility for integrating with serialver and for localization.
  * Handle Resources. Access to error and warning counts.
  * Message formatting.
--- a/src/share/classes/sun/tools/serialver/resources/serialver.properties	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/classes/sun/tools/serialver/resources/serialver.properties	Fri May 23 09:05:24 2014 -0700
@@ -1,9 +1,3 @@
-SerialVersionInspector=Serial Version Inspector
-File=File
-Exit=Exit
-Show=Show
-FullClassName=Full Class Name:
-SerialVersion=Serial Version:
 NotSerializable=\
 	Class {0} is not Serializable.
 ClassNotFound=\
@@ -14,7 +8,5 @@
 	Missing argument for -classpath option
 invalid.flag=\
 	Invalid flag {0}.
-ignoring.classes=\
-	Cannot specify class arguments with the -show option
 usage=\
-	use: serialver [-classpath classpath] [-show] [classname...]
+	use: serialver [-classpath classpath] [classname...]
--- a/src/share/classes/sun/util/spi/XmlPropertiesProvider.java	Tue May 13 10:29:12 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.util.spi;
-
-import java.util.Properties;
-import java.util.InvalidPropertiesFormatException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * Service-provider class for loading and storing {@link Properites} in XML
- * format.
- *
- * @see Properties#loadFromXML
- * @see Properties#storeToXML
- */
-
-public abstract class XmlPropertiesProvider {
-
-    /**
-     * Initializes a new instance of this class.
-     */
-    protected XmlPropertiesProvider() {
-        // do nothing for now
-    }
-
-    /**
-     * Loads all of the properties represented by the XML document on the
-     * specified input stream into a properties table.
-     *
-     * @param props the properties table to populate
-     * @param in the input stream from which to read the XML document
-     * @throws IOException if reading from the specified input stream fails
-     * @throws java.io.UnsupportedEncodingException if the document's encoding
-     *         declaration can be read and it specifies an encoding that is not
-     *         supported
-     * @throws InvalidPropertiesFormatException Data on input stream does not
-     *         constitute a valid XML document with the mandated document type.
-     *
-     * @see Properties#loadFromXML
-     */
-    public abstract void load(Properties props, InputStream in)
-        throws IOException, InvalidPropertiesFormatException;
-
-    /**
-     * Emits an XML document representing all of the properties in a given
-     * table.
-     *
-     * @param props the properies to store
-     * @param out the output stream on which to emit the XML document.
-     * @param comment  a description of the property list, can be @{code null}
-     * @param encoding the name of a supported character encoding
-     *
-     * @throws IOException if writing to the specified output stream fails
-     * @throws java.io.UnsupportedEncodingException if the encoding is not
-     *         supported by the implementation
-     * @throws NullPointerException if {@code out} is null.
-     * @throws ClassCastException  if this {@code Properties} object
-     *         contains any keys or values that are not
-     *         {@code Strings}.
-     *
-     * @see Properties#storeToXML
-     */
-    public abstract void store(Properties props, OutputStream out,
-                               String comment, String encoding)
-        throws IOException;
-}
--- a/src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider	Tue May 13 10:29:12 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-sun.util.xml.PlatformXmlPropertiesProvider
--- a/src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java	Tue May 13 10:29:12 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +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.util.xml;
-
-import java.io.*;
-import java.util.*;
-import java.nio.charset.*;
-import java.util.Map.Entry;
-import org.xml.sax.*;
-import org.w3c.dom.*;
-import javax.xml.parsers.*;
-import javax.xml.transform.*;
-import javax.xml.transform.dom.*;
-import javax.xml.transform.stream.*;
-
-import sun.util.spi.XmlPropertiesProvider;
-
-/**
- * A {@code XmlPropertiesProvider} implementation that uses the JAXP API
- * for parsing.
- *
- * @author  Michael McCloskey
- * @since   1.3
- */
-public class PlatformXmlPropertiesProvider extends XmlPropertiesProvider {
-
-    // XML loading and saving methods for Properties
-
-    // The required DTD URI for exported properties
-    private static final String PROPS_DTD_URI =
-    "http://java.sun.com/dtd/properties.dtd";
-
-    private static final String PROPS_DTD =
-    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
-    "<!-- DTD for properties -->"                +
-    "<!ELEMENT properties ( comment?, entry* ) >"+
-    "<!ATTLIST properties"                       +
-        " version CDATA #FIXED \"1.0\">"         +
-    "<!ELEMENT comment (#PCDATA) >"              +
-    "<!ELEMENT entry (#PCDATA) >"                +
-    "<!ATTLIST entry "                           +
-        " key CDATA #REQUIRED>";
-
-    /**
-     * Version number for the format of exported properties files.
-     */
-    private static final String EXTERNAL_XML_VERSION = "1.0";
-
-    @Override
-    public void load(Properties props, InputStream in)
-        throws IOException, InvalidPropertiesFormatException
-    {
-        Document doc = null;
-        try {
-            doc = getLoadingDoc(in);
-        } catch (SAXException saxe) {
-            throw new InvalidPropertiesFormatException(saxe);
-        }
-        Element propertiesElement = doc.getDocumentElement();
-        String xmlVersion = propertiesElement.getAttribute("version");
-        if (xmlVersion.compareTo(EXTERNAL_XML_VERSION) > 0)
-            throw new InvalidPropertiesFormatException(
-                "Exported Properties file format version " + xmlVersion +
-                " is not supported. This java installation can read" +
-                " versions " + EXTERNAL_XML_VERSION + " or older. You" +
-                " may need to install a newer version of JDK.");
-        importProperties(props, propertiesElement);
-    }
-
-    static Document getLoadingDoc(InputStream in)
-        throws SAXException, IOException
-    {
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        dbf.setIgnoringElementContentWhitespace(true);
-        dbf.setValidating(true);
-        dbf.setCoalescing(true);
-        dbf.setIgnoringComments(true);
-        try {
-            DocumentBuilder db = dbf.newDocumentBuilder();
-            db.setEntityResolver(new Resolver());
-            db.setErrorHandler(new EH());
-            InputSource is = new InputSource(in);
-            return db.parse(is);
-        } catch (ParserConfigurationException x) {
-            throw new Error(x);
-        }
-    }
-
-    static void importProperties(Properties props, Element propertiesElement) {
-        NodeList entries = propertiesElement.getChildNodes();
-        int numEntries = entries.getLength();
-        int start = numEntries > 0 &&
-            entries.item(0).getNodeName().equals("comment") ? 1 : 0;
-        for (int i=start; i<numEntries; i++) {
-            Element entry = (Element)entries.item(i);
-            if (entry.hasAttribute("key")) {
-                Node n = entry.getFirstChild();
-                String val = (n == null) ? "" : n.getNodeValue();
-                props.setProperty(entry.getAttribute("key"), val);
-            }
-        }
-    }
-
-    @Override
-    public void store(Properties props, OutputStream os, String comment,
-                      String encoding)
-        throws IOException
-    {
-        // fast-fail for unsupported charsets as UnsupportedEncodingException may
-        // not be thrown later (see JDK-8000621)
-        try {
-            Charset.forName(encoding);
-        } catch (IllegalCharsetNameException | UnsupportedCharsetException x) {
-            throw new UnsupportedEncodingException(encoding);
-        }
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        DocumentBuilder db = null;
-        try {
-            db = dbf.newDocumentBuilder();
-        } catch (ParserConfigurationException pce) {
-            assert(false);
-        }
-        Document doc = db.newDocument();
-        Element properties =  (Element)
-            doc.appendChild(doc.createElement("properties"));
-
-        if (comment != null) {
-            Element comments = (Element)properties.appendChild(
-                doc.createElement("comment"));
-            comments.appendChild(doc.createTextNode(comment));
-        }
-
-        synchronized (props) {
-            for (Entry<Object, Object> e : props.entrySet()) {
-                final Object k = e.getKey();
-                final Object v = e.getValue();
-                if (k instanceof String && v instanceof String) {
-                    Element entry = (Element)properties.appendChild(
-                        doc.createElement("entry"));
-                    entry.setAttribute("key", (String)k);
-                    entry.appendChild(doc.createTextNode((String)v));
-                }
-            }
-        }
-        emitDocument(doc, os, encoding);
-    }
-
-    static void emitDocument(Document doc, OutputStream os, String encoding)
-        throws IOException
-    {
-        TransformerFactory tf = TransformerFactory.newInstance();
-        Transformer t = null;
-        try {
-            t = tf.newTransformer();
-            t.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, PROPS_DTD_URI);
-            t.setOutputProperty(OutputKeys.INDENT, "yes");
-            t.setOutputProperty(OutputKeys.METHOD, "xml");
-            t.setOutputProperty(OutputKeys.ENCODING, encoding);
-        } catch (TransformerConfigurationException tce) {
-            assert(false);
-        }
-        DOMSource doms = new DOMSource(doc);
-        StreamResult sr = new StreamResult(os);
-        try {
-            t.transform(doms, sr);
-        } catch (TransformerException te) {
-            throw new IOException(te);
-        }
-    }
-
-    private static class Resolver implements EntityResolver {
-        public InputSource resolveEntity(String pid, String sid)
-            throws SAXException
-        {
-            if (sid.equals(PROPS_DTD_URI)) {
-                InputSource is;
-                is = new InputSource(new StringReader(PROPS_DTD));
-                is.setSystemId(PROPS_DTD_URI);
-                return is;
-            }
-            throw new SAXException("Invalid system identifier: " + sid);
-        }
-    }
-
-    private static class EH implements ErrorHandler {
-        public void error(SAXParseException x) throws SAXException {
-            throw x;
-        }
-        public void fatalError(SAXParseException x) throws SAXException {
-            throw x;
-        }
-        public void warning(SAXParseException x) throws SAXException {
-            throw x;
-        }
-    }
-
-}
--- a/src/share/lib/security/sunpkcs11-solaris.cfg	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/lib/security/sunpkcs11-solaris.cfg	Fri May 23 09:05:24 2014 -0700
@@ -18,16 +18,6 @@
 
 disabledMechanisms = {
   CKM_DSA_KEY_PAIR_GEN
-# the following mechanisms are disabled due to CKR_SAVED_STATE_INVALID bug
-# (Solaris bug 7058108)
-  CKM_MD2
-  CKM_MD5
-  CKM_SHA_1
-# the following mechanisms are disabled due to no cloning support
-# (Solaris bug 7050617)
-  CKM_SHA256
-  CKM_SHA384
-  CKM_SHA512
 # the following mechanisms are disabled due to performance issues
 # (Solaris bug 6337157)
   CKM_DSA_SHA1
--- a/src/share/native/java/util/TimeZone.c	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/native/java/util/TimeZone.c	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,42 +38,28 @@
  */
 JNIEXPORT jstring JNICALL
 Java_java_util_TimeZone_getSystemTimeZoneID(JNIEnv *env, jclass ign,
-                                            jstring java_home, jstring country)
+                                            jstring java_home)
 {
-    const char *cname;
     const char *java_home_dir;
     char *javaTZ;
+    jstring jstrJavaTZ = NULL;
 
-    if (java_home == NULL)
-        return NULL;
+    CHECK_NULL_RETURN(java_home, NULL);
 
     java_home_dir = JNU_GetStringPlatformChars(env, java_home, 0);
-    if (java_home_dir == NULL)
-        return NULL;
-
-    if (country != NULL) {
-        cname = JNU_GetStringPlatformChars(env, country, 0);
-        /* ignore error cases for cname */
-    } else {
-        cname = NULL;
-    }
+    CHECK_NULL_RETURN(java_home_dir, NULL);
 
     /*
      * Invoke platform dependent mapping function
      */
-    javaTZ = findJavaTZ_md(java_home_dir, cname);
-
-    free((void *)java_home_dir);
-    if (cname != NULL) {
-        free((void *)cname);
+    javaTZ = findJavaTZ_md(java_home_dir);
+    if (javaTZ != NULL) {
+        jstrJavaTZ = JNU_NewStringPlatform(env, javaTZ);
+        free((void *)javaTZ);
     }
 
-    if (javaTZ != NULL) {
-        jstring jstrJavaTZ = JNU_NewStringPlatform(env, javaTZ);
-        free((void *)javaTZ);
-        return jstrJavaTZ;
-    }
-    return NULL;
+    JNU_ReleaseStringPlatformChars(env, java_home, java_home_dir);
+    return jstrJavaTZ;
 }
 
 /*
--- a/src/share/native/sun/security/smartcardio/pcsc.c	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/native/sun/security/smartcardio/pcsc.c	Fri May 23 09:05:24 2014 -0700
@@ -108,7 +108,7 @@
 JNIEXPORT jlong JNICALL Java_sun_security_smartcardio_PCSC_SCardEstablishContext
     (JNIEnv *env, jclass thisClass, jint dwScope)
 {
-    SCARDCONTEXT context;
+    SCARDCONTEXT context = 0;
     LONG rv;
     dprintf("-establishContext\n");
     rv = CALL_SCardEstablishContext(dwScope, NULL, NULL, &context);
@@ -180,7 +180,7 @@
     SCARDCONTEXT context = (SCARDCONTEXT)jContext;
     LONG rv;
     LPTSTR mszReaders;
-    DWORD size;
+    DWORD size = 0;
     jobjectArray result;
 
     dprintf1("-context: %x\n", context);
@@ -215,8 +215,8 @@
     SCARDCONTEXT context = (SCARDCONTEXT)jContext;
     LONG rv;
     LPCTSTR readerName;
-    SCARDHANDLE card;
-    DWORD proto;
+    SCARDHANDLE card = 0;
+    DWORD proto = 0;
 
     readerName = (*env)->GetStringUTFChars(env, jReaderName, NULL);
     if (readerName == NULL) {
@@ -280,8 +280,8 @@
     DWORD readerLen = READERNAME_BUFFER_SIZE;
     unsigned char atr[ATR_BUFFER_SIZE];
     DWORD atrLen = ATR_BUFFER_SIZE;
-    DWORD state;
-    DWORD protocol;
+    DWORD state = 0;
+    DWORD protocol = 0;
     jbyteArray jArray;
     jbyte status[2];
 
--- a/src/share/transport/socket/socketTransport.c	Tue May 13 10:29:12 2014 -0700
+++ b/src/share/transport/socket/socketTransport.c	Fri May 23 09:05:24 2014 -0700
@@ -31,6 +31,11 @@
 #include "jdwpTransport.h"
 #include "sysSocket.h"
 
+#ifdef _WIN32
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+#endif
+
 /*
  * The Socket Transport Library.
  *
@@ -189,23 +194,83 @@
     return JDWPTRANSPORT_ERROR_NONE;
 }
 
+static uint32_t
+getLocalHostAddress() {
+    // Simple routine to guess localhost address.
+    // it looks up "localhost" and returns 127.0.0.1 if lookup
+    // fails.
+    struct addrinfo hints, *res = NULL;
+    int err;
+
+    // Use portable way to initialize the structure
+    memset((void *)&hints, 0, sizeof(hints));
+    hints.ai_family = AF_INET;
+
+    err = getaddrinfo("localhost", NULL, &hints, &res);
+    if (err < 0 || res == NULL) {
+        return dbgsysHostToNetworkLong(INADDR_LOOPBACK);
+    }
+
+    // getaddrinfo might return more than one address
+    // but we are using first one only
+    return ((struct sockaddr_in *)(res->ai_addr))->sin_addr.s_addr;
+}
+
+static int
+getPortNumber(const char *s_port) {
+    u_long n;
+    char *eptr;
+
+    if (*s_port == 0) {
+        // bad address - colon with no port number in parameters
+        return -1;
+    }
+
+    n = strtoul(s_port, &eptr, 10);
+    if (eptr != s_port + strlen(s_port)) {
+        // incomplete conversion - port number contains non-digit
+        return -1;
+    }
+
+    if (n > (u_short) -1) {
+        // check that value supplied by user is less than
+        // maximum possible u_short value (65535) and
+        // will not be truncated later.
+        return -1;
+    }
+
+    return n;
+}
+
 static jdwpTransportError
-parseAddress(const char *address, struct sockaddr_in *sa, uint32_t defaultHost) {
+parseAddress(const char *address, struct sockaddr_in *sa) {
     char *colon;
+    int port;
 
     memset((void *)sa,0,sizeof(struct sockaddr_in));
     sa->sin_family = AF_INET;
 
     /* check for host:port or port */
     colon = strchr(address, ':');
+    port = getPortNumber((colon == NULL) ? address : colon +1);
+    if (port < 0) {
+        RETURN_ERROR(JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT, "invalid port number specified");
+    }
+    sa->sin_port = dbgsysHostToNetworkShort((u_short)port);
+
     if (colon == NULL) {
-        u_short port = (u_short)atoi(address);
-        sa->sin_port = dbgsysHostToNetworkShort(port);
-        sa->sin_addr.s_addr = dbgsysHostToNetworkLong(defaultHost);
-    } else {
+        // bind to localhost only if no address specified
+        sa->sin_addr.s_addr = getLocalHostAddress();
+    } else if (strncmp(address,"localhost:",10) == 0) {
+        // optimize for common case
+        sa->sin_addr.s_addr = getLocalHostAddress();
+    } else if (*address == '*' && *(address+1) == ':') {
+        // we are explicitly asked to bind server to all available IP addresses
+        // has no meaning for client.
+        sa->sin_addr.s_addr = dbgsysHostToNetworkLong(INADDR_ANY);
+     } else {
         char *buf;
         char *hostname;
-        u_short port;
         uint32_t addr;
 
         buf = (*callback->alloc)((int)strlen(address)+1);
@@ -215,8 +280,6 @@
         strcpy(buf, address);
         buf[colon - address] = '\0';
         hostname = buf;
-        port = atoi(colon + 1);
-        sa->sin_port = dbgsysHostToNetworkShort(port);
 
         /*
          * First see if the host is a literal IP address.
@@ -277,7 +340,7 @@
         address = "0";
     }
 
-    err = parseAddress(address, &sa, INADDR_ANY);
+    err = parseAddress(address, &sa);
     if (err != JDWPTRANSPORT_ERROR_NONE) {
         return err;
     }
@@ -437,7 +500,7 @@
         RETURN_ERROR(JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT, "address is missing");
     }
 
-    err = parseAddress(addressString, &sa, 0x7f000001);
+    err = parseAddress(addressString, &sa);
     if (err != JDWPTRANSPORT_ERROR_NONE) {
         return err;
     }
--- a/src/solaris/native/java/util/TimeZone_md.c	Tue May 13 10:29:12 2014 -0700
+++ b/src/solaris/native/java/util/TimeZone_md.c	Fri May 23 09:05:24 2014 -0700
@@ -652,11 +652,11 @@
  * using <java_home>/lib/tzmappings. If the TZ value is not found, it
  * trys some libc implementation dependent mappings. If it still
  * can't map to a Java time zone ID, it falls back to the GMT+/-hh:mm
- * form. `country', which can be null, is not used for UNIX platforms.
+ * form.
  */
 /*ARGSUSED1*/
 char *
-findJavaTZ_md(const char *java_home_dir, const char *country)
+findJavaTZ_md(const char *java_home_dir)
 {
     char *tz;
     char *javatz = NULL;
--- a/src/solaris/native/java/util/TimeZone_md.h	Tue May 13 10:29:12 2014 -0700
+++ b/src/solaris/native/java/util/TimeZone_md.h	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #ifndef _TIMEZONE_MD_H
 #define _TIMEZONE_MD_H
 
-char *findJavaTZ_md(const char *java_home_dir, const char *region);
+char *findJavaTZ_md(const char *java_home_dir);
 char *getGMTOffsetID();
 
 #endif
--- a/src/solaris/native/sun/misc/VM_md.c	Tue May 13 10:29:12 2014 -0700
+++ b/src/solaris/native/sun/misc/VM_md.c	Fri May 23 09:05:24 2014 -0700
@@ -27,12 +27,26 @@
 #include "jni_util.h"
 
 
-JNIEXPORT jboolean JNICALL
-Java_sun_misc_VM_isSetUID(JNIEnv *env, jclass thisclass) {
+JNIEXPORT jlong JNICALL
+Java_sun_misc_VM_getuid(JNIEnv *env, jclass thisclass) {
 
-    /* Return true if we are in a set UID or set GID process. */
-    if (getuid() != geteuid() || getgid() != getegid()) {
-        return JNI_TRUE;
-    }
-    return JNI_FALSE;
+    return getuid();
 }
+
+JNIEXPORT jlong JNICALL
+Java_sun_misc_VM_geteuid(JNIEnv *env, jclass thisclass) {
+
+    return geteuid();
+}
+
+JNIEXPORT jlong JNICALL
+Java_sun_misc_VM_getgid(JNIEnv *env, jclass thisclass) {
+
+    return getgid();
+}
+
+JNIEXPORT jlong JNICALL
+Java_sun_misc_VM_getegid(JNIEnv *env, jclass thisclass) {
+
+    return getegid();
+}
--- a/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Tue May 13 10:29:12 2014 -0700
+++ b/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Fri May 23 09:05:24 2014 -0700
@@ -62,6 +62,8 @@
 
 #define MAX_ATR_SIZE                    33      /* Maximum ATR size */
 
+#ifndef __APPLE__
+
 typedef struct
 {
         const char *szReader;
@@ -73,6 +75,23 @@
 }
 SCARD_READERSTATE_A;
 
+#else // __APPLE__
+
+#pragma pack(1)
+typedef struct
+{
+        const char *szReader;
+        void *pvUserData;
+        uint32_t dwCurrentState;
+        uint32_t dwEventState;
+        uint32_t cbAtr;
+        unsigned char rgbAtr[MAX_ATR_SIZE];
+}
+SCARD_READERSTATE_A;
+#pragma pack()
+
+#endif // __APPLE__
+
 typedef SCARD_READERSTATE_A SCARD_READERSTATE, *PSCARD_READERSTATE_A,
         *LPSCARD_READERSTATE_A;
 
--- a/src/windows/native/java/util/TimeZone_md.c	Tue May 13 10:29:12 2014 -0700
+++ b/src/windows/native/java/util/TimeZone_md.c	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -394,31 +394,34 @@
  *
  * value_type is one of the following values:
  *      VALUE_KEY for exact key matching
- *      VALUE_MAPID for MapID and country-based mapping (this is
+ *      VALUE_MAPID for MapID (this is
  *      required for the old Windows, such as NT 4.0 SP3).
  */
 static char *matchJavaTZ(const char *java_home_dir, int value_type, char *tzName,
-                         char *mapID, const char *country)
+                         char *mapID)
 {
     int line;
     int IDmatched = 0;
     FILE *fp;
     char *javaTZName = NULL;
     char *items[TZ_NITEMS];
-    char mapFileName[_MAX_PATH + 1];
+    char *mapFileName;
     char lineBuffer[MAX_ZONE_CHAR * 4];
-    char bestMatch[MAX_ZONE_CHAR];
-    int noMapID = *mapID == '\0';       /* no mapID on Vista */
+    int noMapID = *mapID == '\0';       /* no mapID on Vista and later */
 
-    bestMatch[0] = '\0';
-
+    mapFileName = malloc(strlen(java_home_dir) + strlen(MAPPINGS_FILE) + 1);
+    if (mapFileName == NULL) {
+        return NULL;
+    }
     strcpy(mapFileName, java_home_dir);
     strcat(mapFileName, MAPPINGS_FILE);
 
     if ((fp = fopen(mapFileName, "r")) == NULL) {
         jio_fprintf(stderr, "can't open %s.\n", mapFileName);
+        free((void *) mapFileName);
         return NULL;
     }
+    free((void *) mapFileName);
 
     line = 0;
     while (fgets(lineBuffer, sizeof(lineBuffer), fp) != NULL) {
@@ -469,18 +472,6 @@
                 javaTZName = _strdup(items[TZ_JAVA_NAME]);
                 break;
             }
-            /*
-             * Try to find the most likely time zone.
-             */
-            if (*items[TZ_REGION] == '\0') {
-                strncpy(bestMatch, items[TZ_JAVA_NAME], MAX_ZONE_CHAR);
-            } else if (country != NULL && strcmp(items[TZ_REGION], country) == 0) {
-                if (value_type == VALUE_MAPID) {
-                    javaTZName = _strdup(items[TZ_JAVA_NAME]);
-                    break;
-                }
-                strncpy(bestMatch, items[TZ_JAVA_NAME], MAX_ZONE_CHAR);
-            }
         } else {
             if (IDmatched == 1) {
                 /*
@@ -492,9 +483,6 @@
     }
     fclose(fp);
 
-    if (javaTZName == NULL && bestMatch[0] != '\0') {
-        javaTZName = _strdup(bestMatch);
-    }
     return javaTZName;
 
  illegal_format:
@@ -506,7 +494,7 @@
 /*
  * Detects the platform time zone which maps to a Java time zone ID.
  */
-char *findJavaTZ_md(const char *java_home_dir, const char *country)
+char *findJavaTZ_md(const char *java_home_dir)
 {
     char winZoneName[MAX_ZONE_CHAR];
     char winMapID[MAX_MAPID_LENGTH];
@@ -521,7 +509,7 @@
             std_timezone = _strdup(winZoneName);
         } else {
             std_timezone = matchJavaTZ(java_home_dir, result,
-                                       winZoneName, winMapID, country);
+                                       winZoneName, winMapID);
         }
     }
 
--- a/src/windows/native/java/util/TimeZone_md.h	Tue May 13 10:29:12 2014 -0700
+++ b/src/windows/native/java/util/TimeZone_md.h	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #ifndef _TIMEZONE_MD_H
 #define _TIMEZONE_MD_H
 
-char *findJavaTZ_md(const char *java_home_dir, const char *region);
+char *findJavaTZ_md(const char *java_home_dir);
 char *getGMTOffsetID();
 
 #endif
--- a/src/windows/native/sun/misc/VM_md.c	Tue May 13 10:29:12 2014 -0700
+++ b/src/windows/native/sun/misc/VM_md.c	Fri May 23 09:05:24 2014 -0700
@@ -26,9 +26,30 @@
 #include "jni_util.h"
 
 
-JNIEXPORT jboolean JNICALL
-Java_sun_misc_VM_isSetUID(JNIEnv *env, jclass thisclass) {
+JNIEXPORT jlong JNICALL
+Java_sun_misc_VM_getuid(JNIEnv *env, jclass thisclass) {
 
-    /* There is no set UID on Windows. */
-    return JNI_FALSE;
+    /* -1 means function not available. */
+    return -1;
 }
+
+JNIEXPORT jlong JNICALL
+Java_sun_misc_VM_geteuid(JNIEnv *env, jclass thisclass) {
+
+    /* -1 means function not available. */
+    return -1;
+}
+
+JNIEXPORT jlong JNICALL
+Java_sun_misc_VM_getgid(JNIEnv *env, jclass thisclass) {
+
+    /* -1 means function not available. */
+    return -1;
+}
+
+JNIEXPORT jlong JNICALL
+Java_sun_misc_VM_getegid(JNIEnv *env, jclass thisclass) {
+
+    /* -1 means function not available. */
+    return -1;
+}
--- a/test/com/sun/jdi/BadHandshakeTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/com/sun/jdi/BadHandshakeTest.java	Fri May 23 09:05:24 2014 -0700
@@ -26,7 +26,7 @@
  * @summary Check that a bad handshake doesn't cause a debuggee to abort
  * @library /lib/testlibrary
  *
- * @build VMConnection BadHandshakeTest Exit0
+ * @build jdk.testlibrary.* VMConnection BadHandshakeTest Exit0
  * @run main BadHandshakeTest
  *
  */
@@ -110,12 +110,12 @@
         }
 
         // Connect to the debuggee and handshake with garbage
-        Socket s = new Socket(InetAddress.getLocalHost(), port);
+        Socket s = new Socket("localhost", port);
         s.getOutputStream().write("Here's a poke in the eye".getBytes("UTF-8"));
         s.close();
 
         // Re-connect and to a partial handshake - don't disconnect
-        s = new Socket(InetAddress.getLocalHost(), port);
+        s = new Socket("localhost", port);
         s.getOutputStream().write("JDWP-".getBytes("UTF-8"));
 
 
--- a/test/com/sun/jdi/ExclusiveBind.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/com/sun/jdi/ExclusiveBind.java	Fri May 23 09:05:24 2014 -0700
@@ -27,8 +27,7 @@
  *          at the same time.
  * @library /lib/testlibrary
  *
- * @build jdk.testlibrary.ProcessTools jdk.testlibrary.JDKToolLauncher jdk.testlibrary.Utils
- * @build VMConnection ExclusiveBind HelloWorld
+ * @build jdk.testlibrary.* VMConnection ExclusiveBind HelloWorld
  * @run main ExclusiveBind
  */
 import java.net.ServerSocket;
--- a/test/com/sun/jdi/OptionTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/com/sun/jdi/OptionTest.java	Fri May 23 09:05:24 2014 -0700
@@ -157,6 +157,37 @@
                 throw new Exception("Test failed: jdwp doesn't like " + cmds[1]);
             }
         }
+
+        System.out.println("Testing invalid address string");
+
+        // Test invalid addresses
+        String badAddresses[] = {
+            ":",
+            "localhost:",
+            "localhost:abc",
+            "localhost:65536",
+            "localhost:65F"
+        };
+
+        for (String badAddress : badAddresses) {
+
+            String badOptions = "transport=dt_socket" +
+                              ",address=" + badAddress +
+                              ",server=y" +
+                              ",suspend=n";
+            String cmds[] = {javaExe, "-agentlib:jdwp=" + badOptions, targetClass};
+            OptionTest myTest = new OptionTest();
+            String results[] = myTest.run(VMConnection.insertDebuggeeVMOptions(cmds));
+
+            if (!results[RETSTAT].equals("0") && results[STDERR].startsWith("ERROR:")) {
+                // We got expected error, test passed
+            }
+            else {
+                throw new Exception("Test failed: jdwp accept invalid address '" + badAddress + "'");
+            }
+        }
+
         System.out.println("Test passed: status = 0");
     }
 }
+
--- a/test/com/sun/jdi/RunToExit.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/com/sun/jdi/RunToExit.java	Fri May 23 09:05:24 2014 -0700
@@ -161,6 +161,9 @@
         Connector.IntegerArgument port_arg =
             (Connector.IntegerArgument)conn_args.get("port");
         port_arg.setValue(port);
+
+        System.out.println("Connection arguments: " + conn_args);
+
         VirtualMachine vm = conn.attach(conn_args);
 
         // The first event is always a VMStartEvent, and it is always in
--- a/test/com/sun/jndi/ldap/LdapTimeoutTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/com/sun/jndi/ldap/LdapTimeoutTest.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,11 +64,12 @@
         env.put(Context.SECURITY_PRINCIPAL, "user");
         env.put(Context.SECURITY_CREDENTIALS, "password");
 
-        env.put("com.sun.jndi.ldap.connect.timeout", "10");
-        env.put("com.sun.jndi.ldap.read.timeout", "3000");
-
         InitialContext ctx = null;
         try {
+            new LdapTimeoutTest().deadServerNoTimeout(env);
+
+            env.put("com.sun.jndi.ldap.connect.timeout", "10");
+            env.put("com.sun.jndi.ldap.read.timeout", "3000");
             new LdapTimeoutTest().ldapReadTimeoutTest(env, false);
             new LdapTimeoutTest().ldapReadTimeoutTest(env, true);
             new LdapTimeoutTest().simpleAuthConnectTest(env);
@@ -84,7 +85,7 @@
     void ldapReadTimeoutTest(Hashtable env, boolean ssl) {
         InitialContext ctx = null;
         if (ssl) env.put(Context.SECURITY_PROTOCOL, "ssl");
-        ScheduledFuture killer = killSwitch();
+        ScheduledFuture killer = killSwitch(5000);
         long start = System.nanoTime();
         try {
             ctx = new InitialDirContext(env);
@@ -112,7 +113,7 @@
 
     void simpleAuthConnectTest(Hashtable env) {
         InitialContext ctx = null;
-        ScheduledFuture killer = killSwitch();
+        ScheduledFuture killer = killSwitch(5000);
         long start = System.nanoTime();
         try {
             ctx = new InitialDirContext(env);
@@ -139,6 +140,32 @@
         }
     }
 
+    void deadServerNoTimeout(Hashtable env) {
+        InitialContext ctx = null;
+        ScheduledFuture killer = killSwitch(30000);
+        long start = System.nanoTime();
+        try {
+            ctx = new InitialDirContext(env);
+            SearchControls scl = new SearchControls();
+            scl.setSearchScope(SearchControls.SUBTREE_SCOPE);
+            NamingEnumeration<SearchResult> answer = ((InitialDirContext)ctx)
+                .search("ou=People,o=JNDITutorial", "(objectClass=*)", scl);
+            // shouldn't reach here
+            fail();
+        } catch (NamingException e) {
+            long end = System.nanoTime();
+            if (TimeUnit.NANOSECONDS.toMillis(end - start) < 14000) {
+                System.err.println("fail: timeout should be at least 15 seconds, actual time: "
+                                   + TimeUnit.NANOSECONDS.toMillis(end - start));
+                fail();
+            } else {
+                pass();
+            }
+        } finally {
+            if (!shutItDown(killer, ctx)) fail();
+        }
+    }
+
     boolean shutItDown(ScheduledFuture killer, InitialContext ctx) {
         killer.cancel(true);
         try {
@@ -149,15 +176,15 @@
         }
     }
 
-    ScheduledFuture killSwitch() {
+    ScheduledFuture killSwitch(int ms) {
         final Thread current = Thread.currentThread();
         return LdapTimeoutTest.pool.schedule(new Callable<Void>() {
             public Void call() throws Exception {
                 System.err.println("Fail: killSwitch()");
-                current.interrupt();
+                System.exit(0);
                 return null;
             }
-        }, 5000, TimeUnit.MILLISECONDS);
+        }, ms, TimeUnit.MILLISECONDS);
     }
 
     static class Server extends Thread {
--- a/test/com/sun/tools/attach/TempDirTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/com/sun/tools/attach/TempDirTest.java	Fri May 23 09:05:24 2014 -0700
@@ -38,8 +38,8 @@
  * @bug 8033104
  * @summary Test to make sure attach and jvmstat works correctly when java.io.tmpdir is set
  * @library /lib/testlibrary
- * @run build Application Shutdown RunnerUtil
- * @run main/timeout=10 TempDirTest
+ * @run build jdk.testlibrary.* Application Shutdown RunnerUtil
+ * @run main TempDirTest
  */
 
 public class TempDirTest {
--- a/test/demo/jvmti/mtrace/JFrameCreateTime.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/demo/jvmti/mtrace/JFrameCreateTime.java	Fri May 23 09:05:24 2014 -0700
@@ -32,24 +32,28 @@
  *   was very slow (VisualMust debugger people reported this).
  */
 
+import java.awt.GraphicsEnvironment;
 import javax.swing.*;
 
 public class JFrameCreateTime {
     public static void main(String[] args) {
         JFrame f;
         long start, end;
+        if (GraphicsEnvironment.isHeadless()) {
+            System.out.println("JFrameCreateTime test was skipped due to headless mode");
+        } else {
+            start = System.currentTimeMillis();
+            f = new JFrame("JFrame");
+            end = System.currentTimeMillis();
 
-        start = System.currentTimeMillis();
-        f = new JFrame("JFrame");
-        end = System.currentTimeMillis();
+            System.out.println("JFrame first creation took " + (end - start) + " ms");
 
-        System.out.println("JFrame first creation took " + (end - start) + " ms");
+            start = System.currentTimeMillis();
+            f = new JFrame("JFrame");
+            end = System.currentTimeMillis();
 
-        start = System.currentTimeMillis();
-        f = new JFrame("JFrame");
-        end = System.currentTimeMillis();
-
-        System.out.println("JFrame second creation took " + (end - start) + " ms");
-        System.exit(0);
+            System.out.println("JFrame second creation took " + (end - start) + " ms");
+            System.exit(0);
+        }
     }
 }
--- a/test/demo/jvmti/mtrace/TraceJFrame.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/demo/jvmti/mtrace/TraceJFrame.java	Fri May 23 09:05:24 2014 -0700
@@ -37,7 +37,7 @@
 public class TraceJFrame {
     public static void main(String args[]) throws Exception {
         if (GraphicsEnvironment.isHeadless()) {
-            System.out.println("JFrame test was skipped due to headless mode");
+            System.out.println("TraceJFrame test was skipped due to headless mode");
         } else {
             DemoRun demo;
 
--- a/test/java/lang/String/ToLowerCase.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/java/lang/String/ToLowerCase.java	Fri May 23 09:05:24 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
     @test
-    @bug 4217441 4533872 4900935 8020037 8032012
+    @bug 4217441 4533872 4900935 8020037 8032012 8041791
     @summary toLowerCase should lower-case Greek Sigma correctly depending
              on the context (final/non-final).  Also it should handle
              Locale specific (lt, tr, and az) lowercasings and supplementary
@@ -72,8 +72,10 @@
         // I-dot tests
         test("\u0130", turkish, "i");
         test("\u0130", az, "i");
-        test("\u0130", lt, "i");
-        test("\u0130", Locale.US, "i");
+        test("\u0130", lt, "\u0069\u0307");
+        test("\u0130", Locale.US, "\u0069\u0307");
+        test("\u0130", Locale.JAPAN, "\u0069\u0307");
+        test("\u0130", Locale.ROOT, "\u0069\u0307");
 
         // Remove dot_above in the sequence I + dot_above (Turkish and Azeri)
         test("I\u0307", turkish, "i");
@@ -111,6 +113,12 @@
             if (cp >= Character.MIN_HIGH_SURROGATE && cp <= Character.MAX_HIGH_SURROGATE) {
                 continue;
             }
+            if (cp == 0x0130) {
+                // Although UnicodeData.txt has the lower case char as \u0069, it should be
+                // handled with the rules in SpecialCasing.txt, i.e., \u0069\u0307 in
+                // non Turkic locales.
+                continue;
+            }
             int lowerCase = Character.toLowerCase(cp);
             if (lowerCase == -1) {    //Character.ERROR
                 continue;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/annotation/TypeVariableBounds.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,129 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8038994
+ * @summary Test that getAnnotatedBounds().getType() match getBounds()
+ * @run testng TypeVariableBounds
+ */
+
+import java.io.Serializable;
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.concurrent.Callable;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.*;
+
+public class TypeVariableBounds {
+    @Test(dataProvider = "classData")
+    public void testClass(Class<?> c) throws Exception {
+        assertNotEquals(c.getTypeParameters().length, 0);
+
+        TypeVariable[] tv = c.getTypeParameters();
+
+        for(TypeVariable t : tv)
+            testTv(t);
+
+    }
+
+    @Test(dataProvider = "methodData")
+    public void testMethod(Class<?>c) throws Exception {
+        Method m = c.getMethod("aMethod");
+        TypeVariable[] tv = m.getTypeParameters();
+
+        for(TypeVariable t : tv)
+            testTv(t);
+
+    }
+
+    public void testTv(TypeVariable<?> tv) {
+        Type[] t = tv.getBounds();
+        AnnotatedType[] at = tv.getAnnotatedBounds();
+
+        assertEquals(t.length, at.length, Arrays.asList(t) + " and " + Arrays.asList(at) + " should be the same length");
+
+        for (int i = 0; i < t.length; i++)
+            assertSame(at[i].getType(), t[i], "T: " + t[i] + ", AT: " + at[i] + ", AT.getType(): " + at[i].getType() + "\n");
+    }
+
+    @DataProvider
+    public Object[][] classData() { return CLASS_TESTS; }
+
+    @DataProvider
+    public Object[][] methodData() { return METHOD_TESTS; }
+
+    public static final Object[][] CLASS_TESTS = {
+        { Case1.class, },
+        { Case2.class, },
+        { Case5.class, },
+        { Case6.class, },
+    };
+
+    public static final Object[][] METHOD_TESTS = {
+        { Case3.class, },
+        { Case4.class, },
+        { Case5.class, },
+        { Case6.class, },
+    };
+
+    // Class type var
+    public static class Case1<C1T1, C1T2 extends AnnotatedElement, C1T3 extends AnnotatedElement & Type & Serializable> {}
+    public static class Case2<C2T0, @TA C2T1 extends Type, C2T2 extends @TB AnnotatedElement, C2T3 extends AnnotatedElement & @TB Type & Serializable> {}
+
+    // Method type var
+    public static class Case3 { public <C3T1, C3T2 extends AnnotatedElement, C3T3 extends AnnotatedElement & Type & Serializable> void aMethod() {}}
+    public static class Case4 { public <C4T0, @TA C4T1 extends List, C4T2 extends @TB Set, C4T3 extends Set & @TB Callable & Serializable> void aMethod() {}}
+
+    // Both
+    public static class Case5 <C5CT1, C5CT2 extends Runnable> {
+        public <C5MT1,
+               C5MT2 extends AnnotatedElement,
+               C5MT3 extends AnnotatedElement & Type & Serializable,
+               C5MT4 extends C5CT2>
+                   void aMethod() {}}
+
+    public static class Case6 <@TA C6CT1, C6CT2 extends @TB Runnable> {
+        public <@TA C6MT1,
+               C6MT2 extends @TB AnnotatedElement,
+               C6MT3 extends @TB AnnotatedElement & @TB2 Type & Serializable,
+               C6MT4 extends @TB2 C6CT2>
+                   void aMethod() {}}
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target(ElementType.TYPE_PARAMETER)
+    public @interface TA {}
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target(ElementType.TYPE_USE)
+    public @interface TB {}
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target(ElementType.TYPE_USE)
+    public @interface TB2 {}
+}
--- a/test/java/lang/instrument/DaemonThread/TestDaemonThread.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/java/lang/instrument/DaemonThread/TestDaemonThread.java	Fri May 23 09:05:24 2014 -0700
@@ -26,7 +26,7 @@
  * @summary Assert in java.lang.instrument agents during shutdown when classloading occurs after shutdown
  * @library /lib/testlibrary
  *
- * @build DummyAgent DummyClass TestDaemonThreadLauncher TestDaemonThread
+ * @build jdk.testlibrary.* DummyAgent DummyClass TestDaemonThreadLauncher TestDaemonThread
  * @run shell ../MakeJAR3.sh DummyAgent
  * @run main TestDaemonThreadLauncher /timeout=240
  *
--- a/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java	Fri May 23 09:05:24 2014 -0700
@@ -33,7 +33,7 @@
  * @author  Mandy Chung
  *
  * @library /lib/testlibrary/
- * @build ResetPeakMemoryUsage MemoryUtil RunUtil
+ * @build jdk.testlibrary.* ResetPeakMemoryUsage MemoryUtil RunUtil
  * @run main ResetPeakMemoryUsage
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/Authenticator/B8034170.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,192 @@
+/*
+ * 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+/**
+ * @test
+ * @bug 8034170
+ * @summary Digest authentication interop issue
+ * @run main/othervm B8034170 unquoted
+ * @run main/othervm -Dhttp.auth.digest.quoteParameters=true B8034170 quoted
+ */
+
+public class B8034170 {
+
+    static boolean expectQuotes;
+
+    static class BasicServer extends Thread {
+
+        ServerSocket server;
+
+        Socket s;
+        InputStream is;
+        OutputStream os;
+
+        static final String realm = "wallyworld";
+
+        String reply1 = "HTTP/1.1 401 Unauthorized\r\n"+
+            "WWW-Authenticate: Digest realm=\""+realm+"\", qop=\"auth\"" +
+            ", nonce=\"8989de95ea2402b64d73cecdb15da255\"" +
+            ", opaque=\"bbfb4c9ee92ddccc73521c3e6e841ba2\"\r\n\r\n";
+
+        String OKreply = "HTTP/1.1 200 OK\r\n"+
+            "Date: Mon, 15 Jan 2001 12:18:21 GMT\r\n" +
+            "Server: Apache/1.3.14 (Unix)\r\n" +
+            "Connection: close\r\n" +
+            "Content-Type: text/plain; charset=iso-8859-1\r\n" +
+            "Content-Length: 10\r\n\r\n";
+
+        String ERRreply = "HTTP/1.1 500 Internal server error\r\n"+
+            "Date: Mon, 15 Jan 2001 12:18:21 GMT\r\n" +
+            "Server: Apache/1.3.14 (Unix)\r\n" +
+            "Connection: close\r\n" +
+            "Content-Length: 0\r\n\r\n";
+
+        BasicServer (ServerSocket s) {
+            server = s;
+        }
+
+        int readAll (Socket s, byte[] buf) throws IOException {
+            int pos = 0;
+            InputStream is = s.getInputStream ();
+            // wait two seconds for request, as client doesn't close
+            // the connection
+            s.setSoTimeout(2000);
+            try {
+                int n;
+                while ((n=is.read(buf, pos, buf.length-pos)) > 0)
+                    pos +=n;
+            } catch (SocketTimeoutException x) { }
+            return pos;
+        }
+
+        public void run () {
+            byte[] buf = new byte[5000];
+            try {
+                System.out.println ("Server 1: accept");
+                s = server.accept ();
+                System.out.println ("accepted");
+                os = s.getOutputStream();
+                os.write (reply1.getBytes());
+                readAll (s, buf);
+                s.close ();
+
+                System.out.println ("Server 2: accept");
+                s = server.accept ();
+                System.out.println ("accepted");
+                os = s.getOutputStream();
+                int count = readAll (s, buf);
+                String reply = new String(buf, 0, count);
+
+                boolean error;
+
+                if (expectQuotes) {
+                    error = false;
+                    if (!reply.contains("qop=\"auth\"")) {
+                        System.out.println ("Expecting quoted qop. Not found");
+                        error = true;
+                    }
+                    if (!reply.contains("algorithm=\"MD5\"")) {
+                        System.out.println ("Expecting quoted algorithm. Not found");
+                        error = true;
+                    }
+                } else {
+                    error = false;
+                    if (!reply.contains("qop=auth")) {
+                        System.out.println ("Expecting unquoted qop. Not found");
+                        error = true;
+                    }
+                    if (!reply.contains("algorithm=MD5")) {
+                        System.out.println ("Expecting unquoted algorithm. Not found");
+                        error = true;
+                    }
+                }
+                if (error) {
+                    os.write(ERRreply.getBytes());
+                    os.flush();
+                    s.close();
+                } else {
+                    os.write((OKreply+"HelloWorld").getBytes());
+                    os.flush();
+                    s.close();
+                }
+            }
+            catch (Exception e) {
+                System.out.println (e);
+            }
+            finished ();
+        }
+
+        public synchronized void finished () {
+            notifyAll();
+        }
+
+    }
+
+    static class MyAuthenticator3 extends Authenticator {
+        PasswordAuthentication pw;
+        MyAuthenticator3 () {
+            super ();
+            pw = new PasswordAuthentication ("user", "passwordNotCheckedAnyway".toCharArray());
+        }
+
+        public PasswordAuthentication getPasswordAuthentication ()
+            {
+            System.out.println ("Auth called");
+            return pw;
+        }
+    }
+
+
+    static void read (InputStream is) throws IOException {
+        int c;
+        System.out.println ("reading");
+        while ((c=is.read()) != -1) {
+            System.out.write (c);
+        }
+        System.out.println ("");
+        System.out.println ("finished reading");
+    }
+
+    public static void main (String args[]) throws Exception {
+        expectQuotes = args[0].equals("quoted");
+
+        MyAuthenticator3 auth = new MyAuthenticator3 ();
+        Authenticator.setDefault (auth);
+        ServerSocket ss = new ServerSocket (0);
+        int port = ss.getLocalPort ();
+        BasicServer server = new BasicServer (ss);
+        synchronized (server) {
+            server.start();
+            System.out.println ("client 1");
+            URL url = new URL ("http://localhost:"+port+"/d1/d2/d3/foo.html");
+            URLConnection urlc = url.openConnection ();
+            InputStream is = urlc.getInputStream ();
+            read (is);
+            is.close ();
+        }
+    }
+}
--- a/test/java/sql/util/BaseTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/java/sql/util/BaseTest.java	Fri May 23 09:05:24 2014 -0700
@@ -61,29 +61,31 @@
     public void tearDownMethod() throws Exception {
     }
 
-    /**
+    /*
      * Take some form of SQLException, serialize and deserialize it
-     *
-     * @param <T> SQLException
-     * @param ex SQLException
-     * @return deserialized SQLException
-     * @throws IOException
-     * @throws ClassNotFoundException
      */
     @SuppressWarnings("unchecked")
     protected <T extends SQLException> T
             createSerializedException(T ex)
             throws IOException, ClassNotFoundException {
-        T ex1;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        try (ObjectOutputStream oos = new ObjectOutputStream(baos) ) {
-            oos.writeObject(ex);
-        }
-        try (ObjectInputStream ois =
-                new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
-            ex1 = (T) ois.readObject();
-        }
-        return ex1;
+        return (T) serializeDeserializeObject(ex);
     }
 
+    /*
+     * Utility method to serialize and deserialize an object
+     */
+    @SuppressWarnings("unchecked")
+    protected <T> T serializeDeserializeObject(T o)
+            throws IOException, ClassNotFoundException {
+        T o1;
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {
+            oos.writeObject(o);
+        }
+        try (ObjectInputStream ois
+                = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
+            o1 = (T) ois.readObject();
+        }
+        return o1;
+    }
 }
--- a/test/java/util/Properties/CompatibilityTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/java/util/Properties/CompatibilityTest.java	Fri May 23 09:05:24 2014 -0700
@@ -25,8 +25,6 @@
  * @test
  * @bug 8005280 8004371
  * @summary Compatibility test
- * @run main CompatibilityTest
- * @run main/othervm -Dsun.util.spi.XmlPropertiesProvider=jdk.internal.util.xml.BasicXmlPropertiesProvider CompatibilityTest
  */
 
 import java.io.FileInputStream;
--- a/test/java/util/Properties/ConcurrentLoadAndStoreXML.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/java/util/Properties/ConcurrentLoadAndStoreXML.java	Fri May 23 09:05:24 2014 -0700
@@ -25,9 +25,6 @@
  * @bug 8005281
  * @summary Test that the Properties storeToXML and loadFromXML methods are
  *   thread safe
- * @run main ConcurrentLoadAndStoreXML
- * @run main/othervm -Dsun.util.spi.XmlPropertiesProvider=jdk.internal.util.xml.BasicXmlPropertiesProvider ConcurrentLoadAndStoreXML
-
  */
 
 import java.io.*;
--- a/test/java/util/Properties/CustomProvider.java	Tue May 13 10:29:12 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.
- */
-/*
- * @test
- * @bug 8000354
- * @summary Test
- * @compile -XDignore.symbol.file CustomProvider.java MyXmlPropertiesProvider.java
- * @run main/othervm -Dsun.util.spi.XmlPropertiesProvider=MyXmlPropertiesProvider CustomProvider
- */
-
-import java.util.*;
-import java.io.*;
-
-/**
- * Sanity test to verify that the property sun.util.spi.XmlPropertiesProvider
- * can be used to specify a custom provider for loading/storing properties
- * in XML format.
- */
-public class CustomProvider {
-
-    public static void main(String[] args) throws IOException {
-        String provider = System.getProperty("sun.util.spi.XmlPropertiesProvider");
-        assertTrue(provider != null, "sun.util.spi.XmlPropertiesProvider not set");
-
-        OutputStream out = new ByteArrayOutputStream();
-        InputStream in = new ByteArrayInputStream(new byte[100]);
-
-        Properties props;
-
-        props = new Properties();
-        props.loadFromXML(in);
-
-        props = System.getProperties();
-        props.storeToXML(out, "comment");
-        props.storeToXML(out, "comment", "UTF-8");
-
-        // check that the provider's load and store methods have been invoked
-
-        assertTrue(MyXmlPropertiesProvider.createCount() == 1,
-            "Provider should only be created once");
-        assertTrue(MyXmlPropertiesProvider.loadCount() == 1,
-            "load method expected to be called once");
-        assertTrue(MyXmlPropertiesProvider.storeCount() == 2,
-             "store method expected to be called twice");
-    }
-
-    static void assertTrue(boolean b, String msg) {
-        if (!b) throw new RuntimeException(msg);
-    }
-}
--- a/test/java/util/Properties/LoadAndStoreXML.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/java/util/Properties/LoadAndStoreXML.java	Fri May 23 09:05:24 2014 -0700
@@ -23,16 +23,28 @@
 
 /*
  * @test
- * @bug 8000354 8000685 8004371
+ * @bug 8000354 8000685 8004371 8043119
  * @summary Basic test of storeToXML and loadToXML
- * @run main LoadAndStoreXML
- * @run main/othervm -Dsun.util.spi.XmlPropertiesProvider=jdk.internal.util.xml.BasicXmlPropertiesProvider LoadAndStoreXML
  */
 
-import java.io.*;
-import java.util.*;
-import java.security.*;
-import java.nio.file.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.InvalidPropertiesFormatException;
+import java.util.Properties;
+import java.util.PropertyPermission;
 
 public class LoadAndStoreXML {
 
@@ -66,6 +78,50 @@
     }
 
     /**
+     * A {@code ByteArrayInputStream} that allows testing if the
+     * {@code close} method has been invoked.
+     */
+    static class TestInputStream extends ByteArrayInputStream {
+        private boolean closed;
+
+        TestInputStream(byte[] buf) {
+            super(buf);
+        }
+
+        boolean isOpen() {
+            return !closed;
+        }
+
+        public void close() throws IOException {
+            try {
+                super.close();
+            } finally {
+                closed = true;
+            }
+        }
+    }
+
+    /**
+     * A {@code ByteArrayOutputStream} that allows testing if the
+     * {@code close} method has been invoked.
+     */
+    static class TestOutputStream extends ByteArrayOutputStream {
+        private boolean closed;
+
+        boolean isOpen() {
+            return !closed;
+        }
+
+        public void close() throws IOException {
+            try {
+                super.close();
+            } finally {
+                closed = true;
+            }
+        }
+    }
+
+    /**
      * Sanity test that properties saved with Properties#storeToXML can be
      * read with Properties#loadFromXML.
      */
@@ -79,12 +135,16 @@
         props.put("k4", "\u7532\u9aa8\u6587");
         props.put("k5", "<java.home>/lib/jaxp.properties");
 
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        TestOutputStream out = new TestOutputStream();
         props.storeToXML(out, null, encoding);
+        if (!out.isOpen())
+            throw new RuntimeException("OutputStream closed by storeToXML");
 
         Properties p = new Properties();
-        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+        TestInputStream in = new TestInputStream(out.toByteArray());
         p.loadFromXML(in);
+        if (in.isOpen())
+            throw new RuntimeException("InputStream not closed by loadFromXML");
 
         if (!p.equals(props)) {
             System.err.println("stored: " + props);
--- a/test/java/util/Properties/LoadAndStoreXMLWithDefaults.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/java/util/Properties/LoadAndStoreXMLWithDefaults.java	Fri May 23 09:05:24 2014 -0700
@@ -35,58 +35,17 @@
  */
 public class LoadAndStoreXMLWithDefaults {
 
-    public static enum StoreMethod {
-        // Note: this case will test the default provider when available,
-        //       and the basic provider when it's not.
-        PROPERTIES {
-            @Override
-            public String writeToXML(Properties p) throws IOException {
-                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                p.storeToXML(baos, "Test 8016344");
-                return baos.toString();
-            }
-            @Override
-            public Properties loadFromXML(String xml, Properties defaults)
-                    throws IOException {
-                final ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes("UTF-8"));
-                Properties p = new Properties(defaults);
-                p.loadFromXML(bais);
-                return p;
-            }
-        },
-        // Note: this case always test the basic provider, which is always available.
-        //       so sometimes it's just a dup with the previous case...
-        BASICPROVIDER {
-            @Override
-            public String writeToXML(Properties p) throws IOException {
-                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                jdk.internal.util.xml.BasicXmlPropertiesProvider provider =
-                        new  jdk.internal.util.xml.BasicXmlPropertiesProvider();
-                provider.store(p, baos, "Test 8016344", "UTF-8");
-                return baos.toString();
-            }
-            @Override
-            public Properties loadFromXML(String xml, Properties defaults)
-                    throws IOException {
-                final ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes("UTF-8"));
-                Properties p = new Properties(defaults);
-                jdk.internal.util.xml.BasicXmlPropertiesProvider provider =
-                        new  jdk.internal.util.xml.BasicXmlPropertiesProvider();
-                provider.load(p, bais);
-                return p;
-            }
-        };
-        public abstract String writeToXML(Properties p) throws IOException;
-        public abstract Properties loadFromXML(String xml, Properties defaults)
-                    throws IOException;
-        public String displayName() {
-            switch(this) {
-                case PROPERTIES: return "Properties.storeToXML";
-                case BASICPROVIDER: return "BasicXmlPropertiesProvider.store";
-                default:
-                    throw new UnsupportedOperationException(this.name());
-            }
-        }
+    static String writeToXML(Properties props) throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        props.storeToXML(baos, "Test 8016344");
+        return baos.toString();
+    }
+
+    static Properties loadFromXML(String xml, Properties defaults) throws IOException {
+        ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes("UTF-8"));
+        Properties props = new Properties(defaults);
+        props.loadFromXML(bais);
+        return props;
     }
 
     static enum Objects { OBJ1, OBJ2, OBJ3 };
@@ -106,63 +65,59 @@
         p3.setProperty("p1.and.p2.and.p3.prop", "prop9-p3");
         p3.setProperty("p2.and.p3.prop", "prop10-p3");
 
-        for (StoreMethod m : StoreMethod.values()) {
-            System.out.println("Testing with " + m.displayName());
-            Properties P1 = m.loadFromXML(m.writeToXML(p1), null);
-            Properties P2 = m.loadFromXML(m.writeToXML(p2), P1);
-            Properties P3 = m.loadFromXML(m.writeToXML(p3), P2);
+        Properties P1 = loadFromXML(writeToXML(p1), null);
+        Properties P2 = loadFromXML(writeToXML(p2), P1);
+        Properties P3 = loadFromXML(writeToXML(p3), P2);
 
-            testResults(m, p1, P1, p2, P2, p3, P3);
+        testResults(p1, P1, p2, P2, p3, P3);
 
-            // Now check that properties whose keys or values are objects
-            // are skipped.
+        // Now check that properties whose keys or values are objects
+        // are skipped.
 
-            System.out.println("Testing with " + m.displayName() + " and Objects");
-            P1.put("p1.object.prop", Objects.OBJ1);
-            P1.put(Objects.OBJ1, "p1.object.prop");
-            P1.put("p2.object.prop", "p2.object.prop");
-            P2.put("p2.object.prop", Objects.OBJ2);
-            P2.put(Objects.OBJ2, "p2.object.prop");
-            P3.put("p3.object.prop", Objects.OBJ3);
-            P3.put(Objects.OBJ3, "p3.object.prop");
+        P1.put("p1.object.prop", Objects.OBJ1);
+        P1.put(Objects.OBJ1, "p1.object.prop");
+        P1.put("p2.object.prop", "p2.object.prop");
+        P2.put("p2.object.prop", Objects.OBJ2);
+        P2.put(Objects.OBJ2, "p2.object.prop");
+        P3.put("p3.object.prop", Objects.OBJ3);
+        P3.put(Objects.OBJ3, "p3.object.prop");
 
-            Properties PP1 = m.loadFromXML(m.writeToXML(P1), null);
-            Properties PP2 = m.loadFromXML(m.writeToXML(P2), PP1);
-            Properties PP3 = m.loadFromXML(m.writeToXML(P3), PP2);
+        Properties PP1 = loadFromXML(writeToXML(P1), null);
+        Properties PP2 = loadFromXML(writeToXML(P2), PP1);
+        Properties PP3 = loadFromXML(writeToXML(P3), PP2);
 
-            p1.setProperty("p2.object.prop", "p2.object.prop");
-            try {
-                testResults(m, p1, PP1, p2, PP2, p3, PP3);
-            } finally {
-                p1.remove("p2.object.prop");
-            }
+        p1.setProperty("p2.object.prop", "p2.object.prop");
+        try {
+            testResults(p1, PP1, p2, PP2, p3, PP3);
+        } finally {
+            p1.remove("p2.object.prop");
         }
     }
 
-    public static void testResults(StoreMethod m, Properties... pps) {
+    public static void testResults(Properties... pps) {
         for (int i=0 ; i < pps.length ; i += 2) {
             if (!pps[i].equals(pps[i+1])) {
-                System.err.println(m.displayName() +": P" + (i/2+1)
+                System.err.println("P" + (i/2+1)
                         + " Reloaded properties differ from original");
                 System.err.println("\toriginal: " + pps[i]);
                 System.err.println("\treloaded: " + pps[i+1]);
-                throw new RuntimeException(m.displayName() +": P" + (i/2+1)
+                throw new RuntimeException("P" + (i/2+1)
                         + " Reloaded properties differ from original");
             }
             if (!pps[i].keySet().equals(pps[i+1].keySet())) {
-                System.err.println(m.displayName() +": P" + (i/2+1)
+                System.err.println("P" + (i/2+1)
                         + " Reloaded property names differ from original");
                 System.err.println("\toriginal: " + pps[i].keySet());
                 System.err.println("\treloaded: " + pps[i+1].keySet());
-                throw new RuntimeException(m.displayName() +": P" + (i/2+1)
+                throw new RuntimeException("P" + (i/2+1)
                         + " Reloaded property names differ from original");
             }
             if (!pps[i].stringPropertyNames().equals(pps[i+1].stringPropertyNames())) {
-                System.err.println(m.displayName() +": P" + (i/2+1)
+                System.err.println("P" + (i/2+1)
                         + " Reloaded string property names differ from original");
                 System.err.println("\toriginal: " + pps[i].stringPropertyNames());
                 System.err.println("\treloaded: " + pps[i+1].stringPropertyNames());
-                throw new RuntimeException(m.displayName() +": P" + (i/2+1)
+                throw new RuntimeException("P" + (i/2+1)
                         + " Reloaded string property names differ from original");
             }
         }
--- a/test/java/util/Properties/MyXmlPropertiesProvider.java	Tue May 13 10:29:12 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.util.*;
-import java.io.*;
-
-public class MyXmlPropertiesProvider
-    extends sun.util.spi.XmlPropertiesProvider
-{
-    private static int createCount;
-    private static int loadCount;
-    private static int storeCount;
-
-    static int createCount() { return createCount; }
-    static int loadCount() { return loadCount; }
-    static int storeCount() { return storeCount; }
-
-    public MyXmlPropertiesProvider() {
-        createCount++;
-    }
-
-    @Override
-    public void load(Properties props, InputStream in)
-        throws IOException, InvalidPropertiesFormatException
-    {
-        loadCount++;
-    }
-
-    @Override
-    public void store(Properties props, OutputStream out,
-                      String comment, String encoding)
-        throws IOException
-    {
-        storeCount++;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/TEST.properties	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,2 @@
+# JDBC unit tests uses TestNG
+TestNG.dirs= .
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/test/rowset/serial/SerialArrayTests.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,236 @@
+/*
+ * 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.
+ *
+ * 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 test.rowset.serial;
+
+import java.sql.Array;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import javax.sql.rowset.serial.SerialArray;
+import javax.sql.rowset.serial.SerialException;
+import static org.testng.Assert.*;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import util.BaseTest;
+import util.StubArray;
+
+public class SerialArrayTests extends BaseTest {
+
+    private Object[] coffees;
+    private final String sqlType = "VARCHAR";
+    private Array a;
+    private Map<String, Class<?>> map;
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+        coffees = new Object[]{"Espresso", "Colombian", "French Roast",
+            "Cappuccino"};
+        a = new StubArray(sqlType, coffees);
+        map = new HashMap<>();
+    }
+
+    /*
+     * Validate a SerialArray can be created from an Array
+     */
+    @Test
+    public void test01() throws Exception {
+        SerialArray sa = new SerialArray(a);
+    }
+
+    /*
+     * Validate a SQLException is thrown if the map is null
+     */
+    @Test(expectedExceptions = SQLException.class)
+    public void test02() throws Exception {
+        SerialArray sa = new SerialArray(a, null);
+    }
+
+    /*
+     * Validate a SerialException is thrown when getResultSet() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test03() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.getResultSet();
+    }
+
+    /*
+     * Validate a SerialException is thrown when getResultSet() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test04() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.getResultSet(null);
+    }
+
+    /*
+     * Validate a SerialException is thrown when getResultSet() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test05() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.getResultSet(1, 1);
+    }
+
+    /*
+     * Validate a SerialException is thrown when getResultSet() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test06() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.getResultSet(1, 1, null);
+    }
+
+    /*
+     * Validate a SerialException is thrown when  getArray() is invoked after
+     * free() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test07() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.free();
+        sa.getArray();
+    }
+
+    /*
+     * Validate a SerialException is thrown when  getArray() is invoked after
+     * free() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test08() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.free();
+        sa.getArray(map);
+    }
+
+    /*
+     * Validate a SerialException is thrown when  getArray() is invoked after
+     * free() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test09() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.free();
+        sa.getArray(1, 1, map);
+    }
+
+    /*
+     * Validate a SerialException is thrown when  getArray() is invoked after
+     * free() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test10() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.free();
+        sa.getArray(1, 1);
+    }
+
+    /*
+     * Validate a SerialException is thrown when  getBaseType() is invoked after
+     * free() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test11() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.free();
+        sa.getBaseType();
+    }
+
+    /*
+     * Validate a SerialException is thrown when  getBaseTypeName() is invoked after
+     * free() is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test12() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        sa.free();
+        sa.getBaseTypeName();
+    }
+
+    /*
+     * Validate getArray() returns the same Object[] used to create the
+     * SerialArray
+     */
+    @Test
+    public void test13() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        Object[] o = (Object[]) sa.getArray();
+        assertTrue(Arrays.equals(o, coffees));
+    }
+
+    /*
+     * Validate getArray() returns the same Object[] used to create the
+     * SerialArray
+     */
+    @Test
+    public void test14() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        Object[] o = (Object[]) sa.getArray(map);
+        assertTrue(Arrays.equals(o, coffees));
+    }
+
+    /*
+     * Validate getArray() returns the same Object[] used to create the
+     * SerialArray
+     */
+    @Test
+    public void test15() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        Object[] o = (Object[]) sa.getArray(1, 2);
+        assertTrue(Arrays.equals(o, Arrays.copyOfRange(coffees, 1, 3)));
+    }
+
+    /*
+     * Validate getArray() returns the same Object[] used to create the
+     * SerialArray
+     */
+    @Test
+    public void test16() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        Object[] o = (Object[]) sa.getArray(1, 2, map);
+        assertTrue(Arrays.equals(o, Arrays.copyOfRange(coffees, 1, 3)));
+    }
+
+    /*
+     * clone() a SerialArray and check that it is equal to the
+     * object it was cloned from
+     */
+    @Test
+    public void test17() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        SerialArray sa1 = (SerialArray) sa.clone();
+        assertTrue(sa.equals(sa1));
+    }
+
+    /*
+     * Validate that a SerialArray that is serialized & deserialized is equal to
+     * itself
+     */
+    @Test
+    public void test18() throws Exception {
+        SerialArray sa = new SerialArray(a);
+        SerialArray sa1 = serializeDeserializeObject(sa);;
+        assertTrue(sa.equals(sa1));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/test/rowset/serial/SerialBlobTests.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,399 @@
+/*
+ * 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.
+ *
+ * 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 test.rowset.serial;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Arrays;
+import javax.sql.rowset.serial.SerialBlob;
+import javax.sql.rowset.serial.SerialException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.BaseTest;
+import util.StubBlob;
+
+public class SerialBlobTests extends BaseTest {
+
+    // byte[] used to populate SerialBlob
+    private byte[] bytes = new byte[]{1, 2, 3, 4, 5};
+
+    /*
+     * Validate calling free() does not throw an Exception
+     */
+    @Test
+    public void test() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+    }
+
+    /*
+     * Validate calling getBinaryStream() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test01() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.getBinaryStream();
+    }
+
+    /*
+     * Validate calling getBinaryStream() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test02() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.getBinaryStream(1, 5);
+    }
+
+    /*
+     * Validate calling getBytes() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test03() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.getBytes(1, 1);
+    }
+
+    /*
+     * Validate calling getLength() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test04() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.length();
+    }
+
+    /*
+     * Validate calling position() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test05() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.position(new byte[5], 1);
+    }
+
+    /*
+     * Validate calling position() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test06() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.position(new StubBlob(), 1);
+    }
+
+    /*
+     * Validate calling free() after calling setBinaryStream() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test07() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.setBinaryStream(5);
+    }
+
+    /*
+     * Validate calling free() after calling setBytes() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test08() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.setBytes(1, new byte[5]);
+    }
+
+    /*
+     * Validate calling setBytes() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test09() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.setBytes(1, new byte[10], 0, 5);
+    }
+
+    /*
+     * Validate calling truncate() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test10() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        sb.free();
+        sb.truncate(1);
+    }
+
+    /*
+     * Validate getBinaryStream returns the correct bytes
+     */
+    @Test
+    public void test11() throws Exception {
+        byte[] expected = new byte[]{1, 2, 3};
+        SerialBlob sb = new SerialBlob(bytes);
+        InputStream is = sb.getBinaryStream(1, 3);
+        for (byte b : expected) {
+            byte val = (byte) is.read();
+            assertTrue(b == val, val + " does not match " + b);
+        }
+    }
+
+    /*
+     * Validate a SerialException is thrown if pos < 0 for getBinaryStream
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test12() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        InputStream is = sb.getBinaryStream(-1, 3);
+    }
+
+    /*
+     * Validate a SerialException is thrown if pos = 0 for getBinaryStream
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test13() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        InputStream is = sb.getBinaryStream(0, 3);
+    }
+
+    /*
+     * Validate a SerialException is thrown if len > the length of the stream
+     * for getBinaryStream
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test14() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        InputStream is = sb.getBinaryStream(0, 3);
+    }
+
+    /*
+     * Validate a SerialException is thrown if length < 1
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test15() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        InputStream is = sb.getBinaryStream(1, 0);
+    }
+
+    /*
+     * Validate a SerialException is thrown if length > byte array length
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test16() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        InputStream is = sb.getBinaryStream(1, 6);
+    }
+
+    /*
+     * Validate a SerialException is thrown if pos > byte array length
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test17() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        InputStream is = sb.getBinaryStream(bytes.length + 2, 6);
+    }
+
+    /*
+     * Validate that a cloned SerializedBlob bytes match the original
+     */
+    @Test
+    public void test18() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        SerialBlob sb2 = (SerialBlob) sb.clone();
+        assertTrue(
+                Arrays.equals(sb.getBytes(1, (int) sb.length()),
+                        sb2.getBytes(1, (int) sb2.length())),
+                "arrays do not match ");
+    }
+
+    /*
+     * Test clone after free has been called that the clone is not accessible
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test19() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        sb.free();
+        SerialBlob sb2 = (SerialBlob) sb.clone();
+        InputStream is = sb2.getBinaryStream(1, 3);
+    }
+
+    /*
+     * Validate that a SerialBlob that is serialized & deserialized is equal to
+     * itself
+     */
+    @Test
+    public void test20() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        SerialBlob sb2 = serializeDeserializeObject(sb);
+        assertTrue(sb.equals(sb2), "SerialBlob not equal");
+    }
+
+    /*
+     * Validate a SerialException is thrown if byte[] is used to
+     * create the SeriablBlob and setBinaryStream is called
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test21() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        sb.setBinaryStream(3);
+    }
+
+    /*
+     * Validate that setBytes will properly write a set of bytes to the
+     * specified location in the SerialBlob and the correct count is returned
+     * for bytes written
+     */
+    @Test
+    public void test22() throws Exception {
+        byte[] diff = new byte[]{7, 8, 9};
+        byte[] expected = new byte[]{1, 7, 8, 9, 5};
+        SerialBlob sb = new SerialBlob(bytes);
+        int written = sb.setBytes(2, diff);
+        assertEquals(written, diff.length);
+        assertTrue(
+                Arrays.equals(sb.getBytes(1, (int) sb.length()),
+                        expected),
+                "arrays do not match ");
+    }
+
+    /*
+     * Validate that setBytes will properly write a set of bytes to the
+     * specified location in the SerialBlob and the correct count is returned
+     * for bytes written
+     */
+    @Test
+    public void test23() throws Exception {
+        int bytesToWrite = 3;
+        byte[] diff = new byte[]{7, 8, 9, 0};
+        byte[] expected = new byte[]{1, 8, 9, 0, 5};
+        SerialBlob sb = new SerialBlob(bytes);
+        int written = sb.setBytes(2, diff, 1, bytesToWrite);
+        assertEquals(written, bytesToWrite);
+        assertTrue(
+                Arrays.equals(sb.getBytes(1, (int) sb.length()),
+                        expected),
+                "arrays do not match ");
+    }
+
+    /*
+     * Validate that truncate reduces the length of the SerlizedBlob to the
+     * specified value
+     */
+    @Test
+    public void test24() throws Exception {
+        SerialBlob sb = new SerialBlob(bytes);
+        sb.truncate(0);
+        assertTrue(sb.length() == 0);
+        sb = new SerialBlob(bytes);
+        sb.truncate(3);
+        assertTrue(sb.length() == 3);
+    }
+
+    /*
+     * Validate getBinaryStream returns the correct bytes
+     */
+    @Test
+    public void test25() throws Exception {
+        byte[] expected = bytes;
+        SerialBlob sb = new SerialBlob(bytes);
+        InputStream is = sb.getBinaryStream();
+        for (byte b : expected) {
+            byte val = (byte) is.read();
+            assertTrue(b == val, val + " does not match " + b);
+        }
+    }
+
+    /*
+     * Validate setBinaryStream returns an OutputStream when passed a Blob
+     */
+    @Test
+    public void test26() throws Exception {
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        OutputStream os = sb.setBinaryStream(0);
+        assertTrue(os != null);
+    }
+
+    /*
+     * Validate that position returns the correct starting location for a
+     * pattern in the SerialBlob
+     */
+    @Test
+    public void test27() throws Exception {
+        long expectedPos = 3; // starting offset is 1 vs 0
+        byte[] pattern = new byte[]{3, 4};
+        SerialBlob sb = new SerialBlob(bytes);
+        long pos = sb.position(pattern, 1);
+        assertEquals(pos, expectedPos);
+    }
+
+    /*
+     * Validate that position returns the correct starting location for a
+     * pattern in the SerialBlob
+     */
+    @Test
+    public void test28() throws Exception {
+        long expectedPos = 3; // starting offset is 1 vs 0
+        byte[] pattern = new byte[]{3, 4, 5};
+        SerialBlob sb = new SerialBlob(bytes);
+        long pos = sb.position(pattern, 2);
+        assertEquals(pos, expectedPos);
+    }
+
+    /*
+     * Validate that position returns the correct starting location for a
+     * pattern in the SerialBlob
+     */
+    @Test
+    public void test29() throws Exception {
+        long expectedPos = 2; // starting offset is 1 vs 0
+        byte[] pattern = new byte[]{4, 6};
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        long pos = sb.position(pattern, 1);
+        assertEquals(pos, expectedPos);
+    }
+
+    /*
+     * Validate that position returns the correct starting location for a
+     * pattern in the SerialBlob
+     */
+    @Test
+    public void test30() throws Exception {
+        long expectedPos = 3; // starting offset is 1 vs 0
+        byte[] pattern = new byte[]{6, 8};
+        SerialBlob sb = new SerialBlob(new StubBlob());
+        long pos = sb.position(pattern, 2);
+        assertEquals(pos, expectedPos);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/test/rowset/serial/SerialClobTests.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,499 @@
+/*
+ * 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.
+ *
+ * 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 test.rowset.serial;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import javax.sql.rowset.serial.SerialClob;
+import javax.sql.rowset.serial.SerialException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.BaseTest;
+import util.StubClob;
+
+public class SerialClobTests extends BaseTest {
+
+    // char[] used to populate SerialClob
+    private final char[] chars;
+
+    public SerialClobTests() {
+        this.chars = new char[]{'h', 'e', 'l', 'l', 'o', ' ', 'w',
+            'o', 'r', 'l', 'd'};
+    }
+
+    /*
+     * Validate calling free() does not throw an Exception
+     */
+    @Test
+    public void test() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+    }
+
+    /*
+     * Validate calling getCharacterStream() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test01() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.getCharacterStream();
+    }
+
+    /*
+     * Validate calling getCharacterStream() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test02() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        sc.free();
+        sc.getCharacterStream();
+    }
+
+    /*
+     * Validate calling getCharacterStream() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test03() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.getCharacterStream(1, 5);
+    }
+
+    /*
+     * Validate calling getSubString() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test04() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.getSubString(1, 1);
+    }
+
+    /*
+     * Validate calling truncate() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test05() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.truncate(1);
+    }
+
+    /*
+     * Validate calling getAsciiStream() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test06() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.getAsciiStream();
+    }
+
+    /*
+     * Validate calling length() after calling free() throws an SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test07() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.length();
+    }
+
+    /*
+     * Validate calling position() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test08() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.position("hello", 1);
+    }
+
+    /*
+     * Validate calling position() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test09() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.position(new StubClob(), 1);
+    }
+
+    /*
+     * Validate calling setAsciiStream() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test10() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.setAsciiStream(5);
+    }
+
+    /*
+     * Validate calling setCharacterStream() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test11() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.setCharacterStream(5);
+    }
+
+    /*
+     * Validate calling setString() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test12() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.setString(1, "hello");
+    }
+
+    /*
+     * Validate calling setString() after calling free() throws an
+     * SerialException
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test13() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.free();
+        sc.setString(1, "hello", 0, 5);
+    }
+
+    /*
+     * Test that SerialException is thrown if pos < 0 on a call to
+     * getCharacterStream
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test14() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        sc.getCharacterStream(-1, 5);
+    }
+
+    /*
+     * Test that SerialException is thrown if pos = 0 on a call to
+     * getCharacterStream
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test15() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        sc.getCharacterStream(0, 5);
+    }
+
+    /*
+     * Test that SerialException is thrown if pos = 0 on a call to
+     * getCharacterStream
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test16() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        sc.getCharacterStream(1, 100);
+    }
+
+    /*
+     * Test that SerialException is thrown if length = 0 on a call to
+     * getCharacterStream
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test17() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        sc.getCharacterStream(1, 0);
+    }
+
+    /*
+     * Test that SerialException is thrown if pos > length on a call to
+     * getCharacterStream
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test18() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        sc.getCharacterStream(100, 5);
+    }
+
+    /*
+     * Clone a SerialClob and check that it is equal to itself
+     */
+    @Test
+    public void test19() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        SerialClob sc1 = (SerialClob) sc.clone();
+        assertTrue(sc.equals(sc1), "SerialClobs not equal");
+    }
+
+    /*
+     * Validate that a getAsciiStream() returns an InputStream when a Clob is
+     * used to create the SerialClob
+     */
+    @Test
+    public void test20() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        InputStream is = sc.getAsciiStream();
+        assertTrue(is != null);
+    }
+
+    /*
+     * Validate that a getCharacterStream() returns an Reader when a Clob is
+     * used to create the SerialClob
+     */
+    @Test
+    public void test21() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        Reader is = sc.getCharacterStream();
+        assertTrue(is != null);
+    }
+
+    /*
+     * Validate that a getCharacterStream() returns an Reader when a char[] is
+     * used to create the SerialClob
+     */
+    @Test
+    public void test22() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        Reader is = sc.getCharacterStream();
+        assertTrue(is != null);
+    }
+
+    /*
+     * Validate that a getSubString() returns the correct value when a char[] is
+     * used to create the SerialClob
+     */
+    @Test
+    public void test23() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        String expected = "world";
+        assertEquals(expected, sc.getSubString(7, 5));
+    }
+
+    /*
+     * Validate that a getSubString() returns the correct value when a Clob is
+     * used to create the SerialClob
+     */
+    @Test
+    public void test24() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        String expected = "test string";
+        assertEquals(expected, sc.getSubString(5, 11));
+    }
+
+    /*
+     * Validate that position() returns the correct value when a Clob is used to
+     * create the SerialClob
+     */
+    @Test
+    public void test25() throws Exception {
+        long expectedPos = 5;
+        SerialClob sc = new SerialClob(new StubClob());
+        String expected = "test string";
+        long pos = sc.position(expected, 1);
+        assertEquals(expectedPos, pos);
+    }
+
+    /*
+     * Validate that position returned is -1 when an the search string is not
+     * part of the SerialClob
+     */
+    @Test
+    public void test26() throws Exception {
+        long expectedPos = -1;
+        SerialClob sc = new SerialClob(chars);
+        String expected = "test string";
+        long pos = sc.position(expected, 1);
+        assertEquals(expectedPos, pos);
+    }
+
+    /*
+     * Validate that position() returned is -1 when an the search string is not
+     * part of the SerialClob
+     */
+    @Test
+    public void test27() throws Exception {
+        long expectedPos = -1;
+        SerialClob sc = new SerialClob(new StubClob());
+        String expected = "I am Batman";
+        long pos = sc.position(expected, 2);
+        assertEquals(expectedPos, pos);
+    }
+
+    /*
+     * Validate that position() returns the correct value when a char[] is used
+     * to create the SerialClob
+     */
+    @Test
+    public void test28() throws Exception {
+        long expectedPos = 2;
+        SerialClob sc = new SerialClob(chars);
+        String expected = "ello";
+        long pos = sc.position(expected, 1);
+        assertEquals(expectedPos, pos);
+    }
+
+    /*
+     * Validate that position() returns the correct value when a SerialClob is
+     * used for the search argument
+     */
+    @Test
+    public void test29() throws Exception {
+        long expectedPos = 21;
+        String expected = "Batman";
+        String buf = "I am Joker, not the Batman, hahaha";
+        SerialClob sc = new SerialClob(expected.toCharArray());
+        SerialClob sc1 = new SerialClob(buf.toCharArray());
+        long pos = sc1.position(sc, 1);
+        assertEquals(expectedPos, pos);
+    }
+
+    /*
+     * Validate that position() returns the correct value when a SerialClob is
+     * used for the search argument
+     */
+    @Test
+    public void test30() throws Exception {
+        long expectedPos = 17;
+        String expected = "012";
+        SerialClob sc = new SerialClob(expected.toCharArray());
+        SerialClob sc1 = new SerialClob(new StubClob());
+        long pos = sc1.position(sc, 1);
+        assertEquals(expectedPos, pos);
+    }
+
+    /*
+     * Check that setString() updates the appropriate characters in the
+     * SerialClob
+     */
+    @Test
+    public void test31() throws Exception {
+        String val = "Hello, I am Bruce Wayne";
+        String val1 = "the Batman!";
+        String expected = "Hello, I am the Batman!";
+        SerialClob sc = new SerialClob(val.toCharArray());
+        int written = sc.setString(13, val1);
+        assertEquals(val1.length(), written);
+        assertTrue(expected.equals(sc.getSubString(1, (int) sc.length())));
+    }
+
+    /*
+     * Check that setString() updates the appropriate characters in the
+     * SerialClob
+     */
+    @Test(enabled = false)
+    public void test32() throws Exception {
+        int expectedWritten = 9;
+        String val = "Hi, I am Catwoman!!!!!!";
+        String val1 = "Hahaha the Joker, who are you?!";
+        String expected = "Hi, I am the Joker!";
+        SerialClob sc = new SerialClob(val.toCharArray());
+        int written = sc.setString(10, val1, 8, expectedWritten+1);
+        assertEquals(written, expectedWritten);
+
+    }
+
+    /*
+     * Check that setCharacterStream() returns a non-null Writer for an
+     * SerialClob created from a Clob
+     */
+    @Test
+    public void test33() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        Writer w = sc.setCharacterStream(1);
+        assertTrue(w != null);
+    }
+
+    /*
+     * Check that setAsciiStream() returns a non-null OutputStream for an SerialClob
+     * created from a Clob
+     */
+    @Test
+    public void test34() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        OutputStream os = sc.setAsciiStream(1);
+        assertTrue(os != null);
+    }
+
+    /*
+     * Check that truncate() truncates the length of the SerialClob to the
+     * specified size
+     */
+    @Test
+    public void test35() throws Exception {
+        SerialClob sc = new SerialClob(new StubClob());
+        sc.truncate(0);
+        assertTrue(sc.length() == 0);
+        sc = new SerialClob(chars);
+        sc.truncate(5);
+        assertTrue(sc.length() == 5);
+    }
+
+    /*
+     * Check that getCharacterStream() returns a Reader and that the char[] that
+     * was specified to create the SerialClob can be returned via the Reader
+     */
+    @Test
+    public void test36() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        Reader r = sc.getCharacterStream();
+        for (char c : chars) {
+            char val = (char) r.read();
+            assertTrue(c == val, val + " does not match " + c);
+        }
+    }
+
+    /*
+     * Check that getCharacterStream() returns a Reader and that the char[] that
+     * was specified to create the SerialClob can be returned via the Reader
+     */
+    @Test(enabled = false)
+    public void test37() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        String expected = "ello w";
+        Reader r = sc.getCharacterStream(2, 6);
+        for (char c : expected.toCharArray()) {
+            char val = (char) r.read();
+            assertTrue(c == val, val + " does not match " + c);
+        }
+    }
+
+    /*
+     * Validate that a SerialClob that is serialized & deserialized is equal to
+     * itself
+     */
+    @Test
+    public void test38() throws Exception {
+        SerialClob sc = new SerialClob(chars);
+        SerialClob sc2 = serializeDeserializeObject(sc);
+        assertTrue(sc.equals(sc2), "SerialClobs not equal");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/test/rowset/serial/SerialDataLinkTests.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ *
+ * 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 test.rowset.serial;
+
+import java.net.URL;
+import javax.sql.rowset.serial.SerialDatalink;
+import javax.sql.rowset.serial.SerialException;
+import static org.testng.Assert.*;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import util.BaseTest;
+
+public class SerialDataLinkTests extends BaseTest {
+
+    private URL u;
+    private URL u1;
+    private SerialDatalink dl;
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+        u = new URL("http://www.oracle.com/");
+        u1 = new URL("http://www.usatoday.com/");
+        dl = new SerialDatalink(u);
+    }
+
+    /*
+     * Validate that a SerialException is thrown if the URL is null
+     */
+    @Test(expectedExceptions = SerialException.class)
+    public void test() throws Exception {
+        SerialDatalink dl1 = new SerialDatalink(null);
+    }
+
+    /*
+     * Validate that getDatalink() returns the same URL used to create the
+     * SerialDatalink object
+     */
+    @Test
+    public void test01() throws Exception {
+        URL u2 = dl.getDatalink();
+        assertTrue(u2.equals(u));
+        assertTrue(u2.sameFile(u));
+    }
+
+    /*
+     * Validate that URL returned from getDatalink() differs from a URL that was
+     * not used to create the SerialDatalink
+     */
+    @Test
+    public void test02() throws Exception {
+        URL u2 = dl.getDatalink();
+        assertFalse(u2.equals(u1));
+        assertFalse(u2.sameFile(u1));
+    }
+
+    /*
+     * Create a clone of a SerialDatalink and validate that it is equal to the
+     * SerialDatalink it was cloned from
+     */
+    @Test
+    public void test03() throws Exception {
+        SerialDatalink dl2 = (SerialDatalink) dl.clone();
+        assertTrue(dl.equals(dl2));
+        SerialDatalink dl3 = new SerialDatalink(u1);
+        assertFalse(dl2.equals(dl3));
+    }
+
+    /*
+     * Validate that a SerialDatalink that is serialized & deserialized is
+     * equal to itself
+     */
+    @Test
+    public void test04() throws Exception {
+        SerialDatalink dl2 = serializeDeserializeObject(dl);
+        SerialDatalink dl3 = new SerialDatalink(u);
+        assertTrue(dl.equals(dl2));
+        assertTrue(dl3.equals(dl2));
+    }
+
+    /**
+     * Validate that a SerialDatalink that is serialized & deserialized is not equal
+     * to to a SerialDatalink created using a different URL
+     */
+    @Test
+    public void test05() throws Exception {
+        SerialDatalink dl2 = serializeDeserializeObject(dl);
+        SerialDatalink d3 = new SerialDatalink(u1);
+        assertFalse(d3.equals(dl2));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/test/rowset/serial/SerialExceptionTests.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ *
+ * 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 test.rowset.serial;
+
+import java.sql.SQLException;
+import javax.sql.rowset.serial.SerialException;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.BaseTest;
+
+public class SerialExceptionTests extends BaseTest {
+
+    /*
+     * Create SerialException with no-arg constructor
+     */
+    @Test
+    public void test01() {
+        SerialException ex = new SerialException();
+        assertTrue(ex.getMessage() == null
+                && ex.getSQLState() == null
+                && ex.getCause() == null
+                && ex.getErrorCode() == 0);
+    }
+
+    /*
+     * Create SerialException with message
+     */
+    @Test
+    public void test02() {
+        SerialException ex = new SerialException(reason);
+        assertTrue(ex.getMessage().equals(reason)
+                && ex.getSQLState() == null
+                && ex.getCause() == null
+                && ex.getErrorCode() == 0);
+    }
+
+    /*
+     * Validate that the ordering of the returned Exceptions is correct using
+     * for-each loop
+     */
+    @Test
+    public void test03() {
+        SerialException ex = new SerialException("Exception 1");
+        ex.initCause(t1);
+        SerialException ex1 = new SerialException("Exception 2");
+        SerialException ex2 = new SerialException("Exception 3");
+        ex2.initCause(t2);
+        ex.setNextException(ex1);
+        ex.setNextException(ex2);
+        int num = 0;
+        for (Throwable e : ex) {
+            assertTrue(msgs[num++].equals(e.getMessage()));
+        }
+    }
+
+    /*
+     * Validate that the ordering of the returned Exceptions is correct using
+     * traditional while loop
+     */
+    @Test
+    public void test04() {
+        SQLException ex = new SerialException("Exception 1");
+        ex.initCause(t1);
+        SerialException ex1 = new SerialException("Exception 2");
+        SerialException ex2 = new SerialException("Exception 3");
+        ex2.initCause(t2);
+        ex.setNextException(ex1);
+        ex.setNextException(ex2);
+        int num = 0;
+        while (ex != null) {
+            assertTrue(msgs[num++].equals(ex.getMessage()));
+            Throwable c = ex.getCause();
+            while (c != null) {
+                assertTrue(msgs[num++].equals(c.getMessage()));
+                c = c.getCause();
+            }
+            ex = ex.getNextException();
+        }
+    }
+
+    /*
+     * Serialize a SerialException and make sure you can read it back properly
+     */
+    @Test
+    public void test05() throws Exception {
+        SerialException e = new SerialException(reason);
+        SerialException ex1 = createSerializedException(e);
+        assertTrue(ex1.getMessage().equals(reason)
+                && ex1.getSQLState() == null
+                && ex1.getCause() == null
+                && ex1.getErrorCode() == 0);;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/test/rowset/serial/SerialJavaObjectTests.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ *
+ * 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 test.rowset.serial;
+
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import javax.sql.rowset.RowSetMetaDataImpl;
+import javax.sql.rowset.serial.SerialException;
+import javax.sql.rowset.serial.SerialJavaObject;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+import util.BaseTest;
+
+public class SerialJavaObjectTests extends BaseTest {
+
+    /*
+     * Validate that an NPE is thrown when null is specified to create
+     * the SerialJavaObject
+     */
+    @Test(expectedExceptions = NullPointerException.class)
+    public void test() throws Exception {
+        SerialJavaObject sjo = new SerialJavaObject(null);
+    }
+
+    /*
+     * Validate that an SerialExcepion is thrown when the object specified
+     * contains public static fields
+     */
+    @Test(expectedExceptions = SerialException.class, enabled = false)
+    public void test01() throws Exception {
+        SerialJavaObject sjo = new SerialJavaObject(new RowSetMetaDataImpl());
+    }
+
+    /*
+     * Validate that an getFields()s returns the same Field[] for the object
+     * used to create the SerialJavaObject
+     */
+    @Test
+    public void test02() throws Exception {
+        SerialException e = new SerialException();
+        SerialJavaObject sjo = new SerialJavaObject(e);
+        Field[] f = e.getClass().getFields();
+        assertTrue(Arrays.equals(f, sjo.getFields()));
+        assertFalse(Arrays.equals("hello".getClass().getFields(),
+                sjo.getFields()));
+    }
+
+    /*
+     * clone() a SerialJavaObject and check that it is equal to the
+     * object it was cloned from
+     */
+    @Test
+    public void test03() throws Exception {
+        SerialJavaObject sjo = new SerialJavaObject("Hello");
+        SerialJavaObject sjo2 = (SerialJavaObject) sjo.clone();
+        assertTrue(sjo.equals(sjo2));
+    }
+
+    /**
+     * Validate that a SerialJavaObject that is serialized & deserialized is
+     * equal to itself
+     */
+    @Test
+    public void test04() throws Exception {
+        SerialJavaObject sjo = new SerialJavaObject("Hello");
+        SerialJavaObject sjo2 = serializeDeserializeObject(sjo);
+        assertTrue(sjo.equals(sjo2));
+    }
+
+    /*
+     * Validate that a getObject() returns an object used to create the
+     * SerialJavaObject
+     */
+    @Test
+    public void test05() throws Exception {
+        String s = "Hello world";
+        SerialJavaObject sjo = new SerialJavaObject(s);
+        assertTrue(s.equals(sjo.getObject()));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/test/rowset/serial/SerialRefTests.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,131 @@
+/*
+ * 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.
+ *
+ * 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 test.rowset.serial;
+
+import java.sql.Ref;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import javax.sql.rowset.serial.SerialRef;
+import static org.testng.Assert.*;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import util.BaseTest;
+import util.StubRef;
+import util.SuperHero;
+
+public class SerialRefTests extends BaseTest {
+
+    private static Map<String, Class<?>> map = new HashMap<>();
+    private Ref ref;
+    private final String sqlType = "SUPERHERO";
+    private SuperHero hero;
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+        map.put(sqlType, Class.forName("util.SuperHero"));
+        hero = new SuperHero(sqlType, "Bruce", "Wayne", 1939, "Batman");
+        ref = new StubRef(sqlType, hero);
+    }
+
+    /*
+     * Validate that a SQLException() is thrown if the Ref is null
+     */
+    @Test(expectedExceptions = SQLException.class)
+    public void test01() throws Exception {
+        SerialRef sr = new SerialRef(null);
+    }
+
+    /*
+     * Validate that a SQLException() is thrown if the typeName is null in the
+     * Ref used to create the SerialRef
+     */
+    @Test(expectedExceptions = SQLException.class)
+    public void test02() throws Exception {
+        SerialRef sr = new SerialRef(new StubRef(null, hero));
+    }
+
+    /*
+     * Validate that getBaseTypeName() returns the same SQLType specified
+     * to create the Ref
+     */
+    @Test
+    public void test03() throws Exception {
+        SerialRef sr = new SerialRef(ref);
+        assertEquals(sr.getBaseTypeName(), sqlType);
+    }
+
+    /*
+     * Validate that getObject() returns the same object used to create the Ref
+     */
+    @Test
+    public void test04() throws Exception {
+        SerialRef sr = new SerialRef(ref);
+        assertTrue(hero.equals(sr.getObject()));
+    }
+
+    /*
+     * Validate that getObject() returns the same object used to create the Ref
+     */
+    @Test(enabled = false)
+    public void test05() throws Exception {
+        SerialRef sr = new SerialRef(ref);
+        assertTrue(hero.equals(sr.getObject(map)));
+    }
+
+    /*
+     * Validate that setObject() can be used to change the value of the object
+     * pointed to by the SerialRef
+     */
+    @Test
+    public void test06() throws Exception {
+        SerialRef sr = new SerialRef(ref);
+        assertTrue(hero.equals(sr.getObject()));
+        SuperHero h = new SuperHero(sqlType, "Dick", "Grayson", 1940, "Robin");
+        sr.setObject(h);
+        assertFalse(hero.equals(sr.getObject()));
+    }
+
+    /*
+     * clone() a SerialRef and check that it is equal to the
+     * object it was cloned from
+     */
+    @Test
+    public void test09() throws Exception {
+        SerialRef sr = new SerialRef(ref);
+        SerialRef sr1 = (SerialRef) sr.clone();
+        assertTrue(sr.equals(sr1));
+    }
+
+    /**
+     * Validate that a SerialRef that is serialized & deserialized is equal to
+     * itself for the Object & baseTypeName
+     */
+    @Test
+    public void test10() throws Exception {
+        SerialRef sr = new SerialRef(ref);
+        SerialRef sr1 = serializeDeserializeObject(sr);
+        assertTrue(sr1.getObject().equals(sr.getObject())
+                && sr1.getBaseTypeName().equals(sr.getBaseTypeName()));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/test/rowset/serial/SerialStructTests.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ *
+ * 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 test.rowset.serial;
+
+import java.sql.Struct;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import javax.sql.rowset.serial.SerialStruct;
+import static org.testng.Assert.*;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import util.BaseTest;
+import util.StubStruct;
+import util.SuperHero;
+
+public class SerialStructTests extends BaseTest {
+
+    private static Map<String, Class<?>> map = new HashMap<>();
+    private Object[] attributes;
+    private Struct struct;
+    private final String sqlType = "SUPERHERO";
+    private SuperHero hero;
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+        attributes = new Object[]{"Bruce", "Wayne", 1939,
+            "Batman"};
+        map.put(sqlType, Class.forName("util.SuperHero"));
+        struct = new StubStruct(sqlType, attributes);
+        hero = new SuperHero(sqlType, "Bruce", "Wayne", 1939, "Batman");
+    }
+
+    /*
+     * Validate that getSQLTypeName() returns the same SQLType specified by
+     * the Struct used to create the object
+     */
+    @Test
+    public void test01() throws Exception {
+        SerialStruct ss = new SerialStruct(struct, map);
+        assertEquals(ss.getSQLTypeName(), sqlType);
+    }
+
+    /*
+     * Validate that getSQLTypeName() returns the same SQLType specified by
+     * the Struct used to create the object
+     */
+    @Test
+    public void test02() throws Exception {
+        SerialStruct ss = new SerialStruct(hero, map);
+        assertEquals(ss.getSQLTypeName(), sqlType);
+    }
+
+    /*
+     * Validate that getAttributes() returns the same attributes specified by
+     * the Struct used to create the object
+     */
+    @Test
+    public void test03() throws Exception {
+        SerialStruct ss = new SerialStruct(struct, map);
+        assertTrue(Arrays.equals(attributes,
+                ss.getAttributes()));
+    }
+
+    /*
+     * Validate that getAttributes() returns the same attributes specified by
+     * the Struct used to create the object
+     */
+    @Test
+    public void test04() throws Exception {
+        SerialStruct ss = new SerialStruct(hero, map);
+        assertTrue(Arrays.equals(attributes,
+                ss.getAttributes()));
+    }
+
+    /*
+     * Validate that getAttributes() returns the
+     same attributes specified by
+     * the Struct used to create the object
+     */
+    @Test
+    public void test05() throws Exception {
+        SerialStruct ss = new SerialStruct(struct, map);
+        assertTrue(Arrays.equals(attributes,
+                ss.getAttributes(map)));
+    }
+
+    /*
+     * Validate that getAttributes() returns the same attributes specified by
+     * the Struct used to create the object
+     */
+    @Test
+    public void test06() throws Exception {
+        SerialStruct ss = new SerialStruct(hero, map);
+        assertTrue(Arrays.equals(attributes,
+                ss.getAttributes(map)));
+    }
+
+    /*
+     * clone() a SerialStruct and check that it is equal to the
+     * object it was cloned from
+     */
+    @Test
+    public void test07() throws Exception {
+        SerialStruct ss = new SerialStruct(struct, map);
+        SerialStruct ss1 = (SerialStruct) ss.clone();
+        assertTrue(ss.equals(ss1));
+    }
+
+    /**
+     * Validate that a SerialStruct that is serialized & deserialized is equal
+     * to itself
+     */
+    @Test
+    public void test08() throws Exception {
+        SerialStruct ss = new SerialStruct(struct, map);
+        SerialStruct ss1 = serializeDeserializeObject(ss);;
+        assertTrue(ss.equals(ss1));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/util/BaseTest.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ *
+ * 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 util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.sql.SQLException;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+
+public class BaseTest {
+
+    protected final String reason = "reason";
+    protected final String state = "SQLState";
+    protected final String cause = "java.lang.Throwable: cause";
+    protected final Throwable t = new Throwable("cause");
+    protected final Throwable t1 = new Throwable("cause 1");
+    protected final Throwable t2 = new Throwable("cause 2");
+    protected final int errorCode = 21;
+    protected final String[] msgs = {"Exception 1", "cause 1", "Exception 2",
+        "Exception 3", "cause 2"};
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+    }
+
+    @AfterMethod
+    public void tearDownMethod() throws Exception {
+    }
+
+    /*
+     * Take some form of SQLException, serialize and deserialize it
+     */
+    @SuppressWarnings("unchecked")
+    protected <T extends SQLException> T
+            createSerializedException(T ex)
+            throws IOException, ClassNotFoundException {
+        return (T) serializeDeserializeObject(ex);
+    }
+
+    /*
+     * Utility method to serialize and deserialize an object
+     */
+    @SuppressWarnings("unchecked")
+    protected <T> T serializeDeserializeObject(T o)
+            throws IOException, ClassNotFoundException {
+        T o1;
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {
+            oos.writeObject(o);
+        }
+        try (ObjectInputStream ois
+                = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()))) {
+            o1 = (T) ois.readObject();
+        }
+        return o1;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/util/StubArray.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,99 @@
+/*
+ * 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.
+ *
+ * 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 util;
+
+import java.sql.Array;
+import java.sql.JDBCType;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.Map;
+
+public class StubArray implements Array {
+
+    private String typeName;
+    Object[] elements;
+
+    public StubArray(String name, Object[] values) {
+        typeName = name;
+        elements = Arrays.copyOf(values, values.length);
+
+    }
+
+    @Override
+    public String getBaseTypeName() throws SQLException {
+        return typeName;
+    }
+
+    @Override
+    public int getBaseType() throws SQLException {
+        return JDBCType.valueOf(typeName).getVendorTypeNumber();
+    }
+
+    @Override
+    public Object getArray() throws SQLException {
+        return Arrays.copyOf(elements, elements.length);
+    }
+
+    @Override
+    public Object getArray(Map<String, Class<?>> map) throws SQLException {
+        return getArray();
+    }
+
+    @Override
+    public Object getArray(long index, int count) throws SQLException {
+        return getArray();
+    }
+
+    @Override
+    public Object getArray(long index, int count, Map<String, Class<?>> map) throws SQLException {
+        return getArray();
+    }
+
+    @Override
+    public ResultSet getResultSet() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ResultSet getResultSet(long index, int count) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void free() throws SQLException {
+        elements = null;
+        typeName = null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/util/StubBlob.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,100 @@
+/*
+ * 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.
+ *
+ * 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 util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.sql.Blob;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class StubBlob implements Blob {
+
+    private byte[] bytes;
+
+    public StubBlob() {
+        bytes = new byte[]{2, 4, 6, 8};
+    }
+
+    public long length() throws SQLException {
+        return bytes.length;
+    }
+
+    public byte[] getBytes(long pos, int length)
+            throws SQLException {
+        return Arrays.copyOfRange(bytes, (int) pos - 1, length);
+    }
+
+    public InputStream getBinaryStream()
+            throws SQLException {
+        return null;
+    }
+
+    public long position(byte[] pattern, long start)
+            throws SQLException {
+        return 0;
+    }
+
+    public long position(Blob pattern, long start)
+            throws SQLException {
+        return 0;
+    }
+
+    public int setBytes(long pos, byte[] bytes)
+            throws SQLException {
+        return 0;
+    }
+
+    public int setBytes(long pos, byte[] bytes, int offset, int len)
+            throws SQLException {
+        return 0;
+    }
+
+    public OutputStream setBinaryStream(long pos)
+            throws SQLException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream oos = null;
+        try {
+            oos = new ObjectOutputStream(baos);
+        } catch (IOException ex) {
+            Logger.getLogger(StubBlob.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        return oos;
+    }
+
+    public void truncate(long len)
+            throws SQLException {
+    }
+
+    public void free() throws SQLException {
+    }
+
+    public InputStream getBinaryStream(long pos, long length) throws SQLException {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/util/StubClob.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ *
+ * 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 util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.sql.Clob;
+import java.sql.SQLException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class StubClob implements Clob {
+
+    public String buf = "The test string 0123456789";
+
+    @Override
+    public String getSubString(long pos, int length) throws SQLException {
+        return buf;
+    }
+
+    @Override
+    public long length() throws SQLException {
+        return buf.length();
+    }
+
+    @Override
+    public Reader getCharacterStream() throws SQLException {
+        return new StringReader(buf);
+    }
+
+    @Override
+    public InputStream getAsciiStream() throws SQLException {
+        return new java.io.StringBufferInputStream(buf);
+    }
+
+    @Override
+    public int setString(long pos, String str) throws SQLException {
+        return str.length();
+    }
+
+    @Override
+    public int setString(long pos, String str, int offset, int len) throws SQLException {
+        return len;
+    }
+
+    @Override
+    public long position(String searchstr, long start) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public long position(Clob searchstr, long start) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public OutputStream setAsciiStream(long pos) throws SQLException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream oos = null;
+        try {
+            oos = new ObjectOutputStream(baos);
+        } catch (IOException ex) {
+            Logger.getLogger(StubBlob.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        return oos;
+    }
+
+    @Override
+    public Writer setCharacterStream(long pos) throws SQLException {
+        return new StringWriter();
+    }
+
+    @Override
+    public void truncate(long len) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void free() throws SQLException {
+    }
+
+    @Override
+    public Reader getCharacterStream(long pos, long length) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/util/StubRef.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 util;
+
+import java.io.Serializable;
+import java.sql.Ref;
+import java.sql.SQLException;
+import java.util.Map;
+
+public class StubRef implements Ref, Serializable {
+
+    private final String baseTypeName;
+    private Object obj;
+
+    public StubRef(String type, Object o) {
+        baseTypeName = type;
+        obj = o;
+    }
+
+    @Override
+    public String getBaseTypeName() throws SQLException {
+        return baseTypeName;
+    }
+
+    @Override
+    public Object getObject(Map<String, Class<?>> map) throws SQLException {
+        return obj;
+    }
+
+    @Override
+    public Object getObject() throws SQLException {
+        return getObject(null);
+    }
+
+    @Override
+    public void setObject(Object value) throws SQLException {
+        obj = value;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/util/StubStruct.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ *
+ * 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 util;
+
+import java.sql.SQLException;
+import java.sql.Struct;
+import java.util.Arrays;
+import java.util.Map;
+
+public class StubStruct implements Struct {
+
+    private final String type;
+    private final Object[] attribs;
+
+    public StubStruct(String type, Object[] o) {
+        this.type = type;
+        this.attribs = Arrays.copyOf(o, o.length);
+    }
+
+    @Override
+    public String getSQLTypeName() throws SQLException {
+        return type;
+    }
+
+    @Override
+    public Object[] getAttributes() throws SQLException {
+        return attribs;
+    }
+
+    @Override
+    public Object[] getAttributes(Map<String, Class<?>> map) throws SQLException {
+        return attribs;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/sql/testng/util/SuperHero.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ *
+ * 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 util;
+
+import java.io.Serializable;
+import java.sql.SQLData;
+import java.sql.SQLException;
+import java.sql.SQLInput;
+import java.sql.SQLOutput;
+
+public class SuperHero implements SQLData, Serializable {
+
+    private String first;
+    private String last;
+    private final String type;
+    private Integer firstYear;
+    private String secretIdentity;
+
+    public SuperHero(String sqlType, String fname, String lname, Integer year,
+            String identity) {
+        first = fname;
+        last = lname;
+        type = sqlType;
+        firstYear = year;
+        secretIdentity = identity;
+    }
+
+    @Override
+    public String getSQLTypeName() throws SQLException {
+        return type;
+    }
+
+    @Override
+    public void readSQL(SQLInput stream, String typeName) throws SQLException {
+        first = stream.readString();
+        last = stream.readString();
+        firstYear = stream.readInt();
+        secretIdentity = stream.readString();
+    }
+
+    @Override
+    public void writeSQL(SQLOutput stream) throws SQLException {
+        stream.writeString(first);
+        stream.writeString(last);
+        stream.writeInt(firstYear);
+        stream.writeString(secretIdentity);
+    }
+
+    @Override
+    public String toString() {
+        return "[ name =" + first + " " + last + " "
+                + firstYear + " " + secretIdentity + " ]";
+    }
+
+    public void setIdentity(String identity) {
+        secretIdentity = identity;
+    }
+
+    public String getIdentity() {
+        return secretIdentity;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof SuperHero) {
+            SuperHero ss = (SuperHero) obj;
+            return first.equals(ss.first) && last.equals(ss.last)
+                    && firstYear.equals(ss.firstYear)
+                    && type.equals(ss.type)
+                    && secretIdentity.equals(ss.secretIdentity);
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return ((31 + first.hashCode()) * 31) * 31
+                + ((31 + last.hashCode()) * 31) * 31
+                + ((31 + firstYear.hashCode()) * 31) * 31
+                + ((31 + type.hashCode()) * 31) * 31
+                + secretIdentity.hashCode();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/xml/ws/8043129/MailTest.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,148 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8043129
+ * @summary JAF initialisation in SAAJ clashing with the one in javax.mail
+ * @author mkos
+ * @library javax.mail.jar
+ * @build MailTest
+ * @run main MailTest
+ */
+
+import javax.activation.CommandMap;
+import javax.activation.MailcapCommandMap;
+import javax.mail.BodyPart;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Multipart;
+import javax.mail.Session;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.MimeMultipart;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+public class MailTest {
+
+    String host = null;
+    String user = "";
+    String password = null;
+    String from = null;
+    String to = null;
+
+    public static void main(String[] args) {
+        MailTest t = new MailTest();
+
+        t.user = "somebody@somewhere.com";
+        t.from = "somebody@somewhere.com";
+        t.to = "somebody@somewhere.com";
+
+        t.user = "somebody@somewhere.com";
+        t.password = "somepassword";
+        t.host = "somehost";
+
+        t.sendMail();    //this works
+
+        t.addSoapAttachement();
+        t.sendMail();    //after addAttachmentPart to soapmessage it do not work
+
+        // workaroundJAFSetup();
+        // t.sendMail();    //after workaround works again
+    }
+
+    void addSoapAttachement() {
+        try {
+            MessageFactory messageFactory = MessageFactory.newInstance();
+            SOAPMessage message = messageFactory.createMessage();
+            AttachmentPart a = message.createAttachmentPart();
+            a.setContentType("binary/octet-stream");
+            message.addAttachmentPart(a);
+        } catch (SOAPException e) {
+            e.printStackTrace();
+        }
+    }
+
+    void sendMail() {
+
+        try {
+            Properties props = new Properties();
+            props.put("mail.smtp.host", host);
+            props.put("mail.smtp.auth", "true");
+
+            Session session = Session.getInstance(props);
+            session.setDebug(true);
+
+            // Define message
+            MimeMessage message = new MimeMessage(session);
+            message.setFrom(new InternetAddress(from));
+            message.addRecipients(Message.RecipientType.TO, to);
+            message.setSubject("this is a multipart test");
+
+            Multipart multipart = new MimeMultipart();
+
+            BodyPart messageBodyPart1 = new MimeBodyPart();
+            messageBodyPart1.setText("please send also this Content\n ciao!");
+            multipart.addBodyPart(messageBodyPart1);
+
+            BodyPart messageBodyPart2 = new MimeBodyPart();
+            messageBodyPart2.setContent("<b>please</b> send also this Content <br>ciao!", "text/html; charset=UTF-8");
+            multipart.addBodyPart(messageBodyPart2);
+
+            message.setContent(multipart);
+
+            /*
+                Transport tr = session.getTransport("smtp");
+                tr.connect(host,user, password);
+                tr.sendMessage(message,InternetAddress.parse(to));
+                tr.close();
+            */
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            message.writeTo(baos);
+            String output = baos.toString();
+            System.out.println("output = " + output);
+            if (output.contains("also this Content")) {
+                System.out.println("Test PASSED.");
+            } else {
+                System.out.println("Test FAILED, missing content.");
+                throw new IllegalStateException("Test FAILED, missing content.");
+            }
+        } catch (MessagingException ignored) {
+        } catch (IOException ignored) {
+        }
+    }
+
+    // this is how the error can be worked around ...
+    static void workaroundJAFSetup() {
+        MailcapCommandMap mailMap = (MailcapCommandMap) CommandMap.getDefaultCommandMap();
+        mailMap.addMailcap("multipart/mixed;;x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
+    }
+}
Binary file test/javax/xml/ws/8043129/javax.mail.jar has changed
--- a/test/sun/management/jdp/JdpDefaultsTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jdp/JdpDefaultsTest.java	Fri May 23 09:05:24 2014 -0700
@@ -28,7 +28,7 @@
  * @test JdpDefaultsTest
  * @summary Assert that we can read JDP packets from a multicast socket connection, on default IP and port.
  * @library /lib/testlibrary
- * @build ClientConnection JdpTestUtil JdpTestCase JdpOnTestCase DynamicLauncher
+ * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOnTestCase DynamicLauncher
  * @run main JdpDefaultsTest
  */
 
--- a/test/sun/management/jdp/JdpOffTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jdp/JdpOffTest.java	Fri May 23 09:05:24 2014 -0700
@@ -29,7 +29,7 @@
  * @test JdpOffTest.java
  * @summary Assert that no JDP packets are sent to the default address and port.
  * @library /lib/testlibrary
- * @build ClientConnection JdpTestUtil JdpTestCase JdpOffTestCase DynamicLauncher
+ * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOffTestCase DynamicLauncher
  * @run main JdpOffTest
  */
 
--- a/test/sun/management/jdp/JdpSpecificAddressTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jdp/JdpSpecificAddressTest.java	Fri May 23 09:05:24 2014 -0700
@@ -28,7 +28,7 @@
  * @test JdpSpecificAddressTest
  * @summary Assert that we can read JDP packets from a multicast socket connection, on specific IP and port.
  * @library /lib/testlibrary
- * @build ClientConnection JdpTestUtil JdpTestCase JdpOnTestCase DynamicLauncher
+ * @build jdk.testlibrary.* ClientConnection JdpTestUtil JdpTestCase JdpOnTestCase DynamicLauncher
  * @run main JdpSpecificAddressTest
  */
 
--- a/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java	Fri May 23 09:05:24 2014 -0700
@@ -42,9 +42,7 @@
  *          without connection or username/password details.
  *          TestManager will attempt a connection to the address obtained from
  *          both agent properties and jvmstat buffer.
- * @build jdk.testlibrary.ProcessTools
- * @build jdk.testlibrary.Utils
- * @build TestManager TestApplication
+ * @build jdk.testlibrary.* TestManager TestApplication
  * @run main/othervm/timeout=300 -XX:+UsePerfData LocalManagementTest
  */
 
--- a/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.java	Fri May 23 09:05:24 2014 -0700
@@ -28,11 +28,7 @@
  * @library /lib/testlibrary
  * @bug 6557093
  * @summary Check SSL config file permission for out-of-the-box management
- * @build jdk.testlibrary.Utils
- * @build jdk.testlibrary.ProcessTools
- * @build jdk.testlibrary.OutputAnalyzer
- * @build AbstractFilePermissionTest
- * @build Dummy
+ * @build jdk.testlibrary.* AbstractFilePermissionTest Dummy
  * @run main/timeout=300 PasswordFilePermissionTest
  *
  * @author Taras Ledkov
--- a/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh	Fri May 23 09:05:24 2014 -0700
@@ -27,11 +27,7 @@
 # @summary Test RMI Bootstrap
 #
 # @library /lib/testlibrary
-# @library /lib/testlibrary
-# @build jdk.testlibrary.Utils
-# @build TestLogger
-# @build Utils
-# @build RmiBootstrapTest
+# @build jdk.testlibrary.* TestLogger Utils RmiBootstrapTest
 # @run shell/timeout=300  RmiBootstrapTest.sh
 
 # Define the Java class test name
--- a/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java	Fri May 23 09:05:24 2014 -0700
@@ -42,10 +42,7 @@
  * @library /lib/testlibrary
  * @bug 6228231
  * @summary Test that RMI registry uses SSL.
- * @build jdk.testlibrary.Utils
- * @build jdk.testlibrary.ProcessTools
- * @build jdk.testlibrary.OutputAnalyzer
- * @build RmiRegistrySslTestApp
+ * @build jdk.testlibrary.* RmiRegistrySslTestApp
  * @run main/timeout=300 RmiRegistrySslTest
  * @author Luis-Miguel Alventosa, Taras Ledkov
  */
--- a/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh	Fri May 23 09:05:24 2014 -0700
@@ -27,10 +27,7 @@
 # @summary Test RMI Bootstrap with SSL
 #
 # @library /lib/testlibrary
-# @build jdk.testlibrary.Utils
-# @build TestLogger
-# @build Utils
-# @build RmiBootstrapTest
+# @build jdk.testlibrary.* TestLogger Utils RmiBootstrapTest
 # @run shell/timeout=300  RmiSslBootstrapTest.sh
 
 # Define the Java class test name
--- a/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java	Fri May 23 09:05:24 2014 -0700
@@ -27,12 +27,7 @@
  * @test
  * @library /lib/testlibrary
  * @bug 6557093
- * @bug 6557093
- * @build jdk.testlibrary.Utils
- * @build jdk.testlibrary.ProcessTools
- * @build jdk.testlibrary.OutputAnalyzer
- * @build Dummy
- * @build AbstractFilePermissionTest
+ * @build jdk.testlibrary.* Dummy AbstractFilePermissionTest
  * @summary Check SSL config file permission for out-of-the-box management
  * @run main/timeout=300 SSLConfigFilePermissionTest
  *
--- a/test/sun/management/jmxremote/startstop/JMXStartStopTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/management/jmxremote/startstop/JMXStartStopTest.java	Fri May 23 09:05:24 2014 -0700
@@ -54,10 +54,7 @@
  * @test
  * @bug 7110104
  * @library /lib/testlibrary
- * @build jdk.testlibrary.ProcessTools
- * @build jdk.testlibrary.JDKToolLauncher
- * @build jdk.testlibrary.Utils
- * @build JMXStartStopTest JMXStartStopDoSomething
+ * @build jdk.testlibrary.* JMXStartStopTest JMXStartStopDoSomething
  * @run main/othervm JMXStartStopTest
  * @summary Makes sure that enabling/disabling the management agent through
  *          JCMD achieves the desired results
--- a/test/sun/security/krb5/auto/ReplayCacheTestProc.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/security/krb5/auto/ReplayCacheTestProc.java	Fri May 23 09:05:24 2014 -0700
@@ -40,7 +40,6 @@
 import java.security.MessageDigest;
 import java.util.*;
 
-import com.sun.security.auth.module.UnixSystem;
 import sun.security.jgss.GSSUtil;
 import sun.security.krb5.internal.APReq;
 import sun.security.krb5.internal.rcache.AuthTime;
@@ -79,13 +78,7 @@
                 mode = -1;
             }
 
-            try {
-                UnixSystem us = new com.sun.security.auth.module.UnixSystem();
-                uid = us.getUid();
-            } catch (Throwable e) {
-                // Cannot be only Exception, might be UnsatisfiedLinkError
-                uid = -1;
-            }
+            uid = sun.misc.VM.geteuid();
 
             KDC kdc = KDC.create(OneKDC.REALM, HOST, 0, true);
             for (int i=0; i<nu; i++) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/text/resources/Format/Bug8037343.java	Fri May 23 09:05:24 2014 -0700
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8037343
+ * @summary updating dateformat for es_DO
+ */
+
+import java.text.DateFormat;
+import java.util.Calendar;
+import java.util.Locale;
+
+public class Bug8037343
+{
+
+    public static void main(String[] arg)
+    {
+        final Locale esDO = new Locale("es", "DO");
+        final String expectedShort = "31/03/12";
+        final String expectedMedium = "31/03/2012";
+
+        int errors = 0;
+        DateFormat format;
+        String result;
+
+        Calendar cal = Calendar.getInstance(esDO);
+        cal.set(Calendar.DAY_OF_MONTH, 31);
+        cal.set(Calendar.MONTH, Calendar.MARCH);
+        cal.set(Calendar.YEAR, 2012);
+
+        format = DateFormat.getDateInstance(DateFormat.SHORT, esDO);
+        result = format.format(cal.getTime());
+        if (!expectedShort.equals(result)) {
+            System.out.println(String.format("Short Date format for es_DO is not as expected. Expected: [%s] Actual: [%s]", expectedShort, result));
+            errors++;
+        }
+
+        format = DateFormat.getDateInstance(DateFormat.MEDIUM, esDO);
+        result = format.format(cal.getTime());
+        if (!expectedMedium.equals(result)) {
+            System.out.println(String.format("Medium Date format for es_DO is not as expected. Expected: [%s] Actual: [%s]", expectedMedium, result));
+            errors++;
+        }
+
+        if (errors > 0) {
+            throw new RuntimeException();
+        }
+    }
+
+}
--- a/test/sun/text/resources/LocaleData	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/text/resources/LocaleData	Fri May 23 09:05:24 2014 -0700
@@ -483,8 +483,8 @@
 FormatData/es_DO/TimePatterns/3=hh:mm a
 FormatData/es_DO/DatePatterns/0=EEEE d' de 'MMMM' de 'yyyy
 FormatData/es_DO/DatePatterns/1=d' de 'MMMM' de 'yyyy
-FormatData/es_DO/DatePatterns/2=MM/dd/yyyy
-FormatData/es_DO/DatePatterns/3=MM/dd/yy
+# FormatData/es_DO/DatePatterns/2=MM/dd/yyyy # Changed: see bug 8037343
+# FormatData/es_DO/DatePatterns/3=MM/dd/yy # Changed: see bug 8037343
 FormatData/es_DO/DateTimePatterns/0={1} {0}
 FormatData/es_DO/NumberElements/0=.
 FormatData/es_DO/NumberElements/1=,
@@ -7692,3 +7692,7 @@
 FormatData/es_EC/TimePatterns/1=H:mm:ss z
 FormatData/es_EC/TimePatterns/2=H:mm:ss
 FormatData/es_EC/TimePatterns/3=H:mm
+
+# bug 8037343
+FormatData/es_DO/DatePatterns/2=dd/MM/yyyy
+FormatData/es_DO/DatePatterns/3=dd/MM/yy
--- a/test/sun/text/resources/LocaleDataTest.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/text/resources/LocaleDataTest.java	Fri May 23 09:05:24 2014 -0700
@@ -36,6 +36,7 @@
  *      6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
  *      7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
  *      7114053 7074882 7040556 8013836 8021121 6192407 6931564 8027695 8017142
+ *      8037343
  * @summary Verify locale data
  *
  */
--- a/test/sun/tools/jcmd/TestJcmdSanity.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/tools/jcmd/TestJcmdSanity.java	Fri May 23 09:05:24 2014 -0700
@@ -41,7 +41,7 @@
  * @bug 7104647 7154822
  * @library /lib/testlibrary
  * @build jdk.testlibrary.*
- * @run main TestJcmdSanity
+ * @run main/othervm -XX:+UsePerfData TestJcmdSanity
  */
 public class TestJcmdSanity {
 
--- a/test/sun/tools/jstat/JStatInterval.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/tools/jstat/JStatInterval.java	Fri May 23 09:05:24 2014 -0700
@@ -28,8 +28,7 @@
  * @summary Test checks case when target application finishes execution and jstat didn't complete work.
             jstat is started with interval = 100 (jstat -compiler 100) and monitored application finishes
             after 500ms. This shouldn't cause crash or hang in target application or in jstat.
- * @build jdk.testlibrary.ProcessTools jdk.testlibrary.JDKToolLauncher
- * @build JStatInterval
+ * @build jdk.testlibrary.* JStatInterval
  * @run main JStatInterval
  */
 
--- a/test/sun/tools/jstatd/TestJstatdDefaults.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/tools/jstatd/TestJstatdDefaults.java	Fri May 23 09:05:24 2014 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 4990825
  * @library /lib/testlibrary
- * @build JstatdTest JstatGCUtilParser
+ * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser
  * @run main/timeout=60 TestJstatdDefaults
  */
 public class TestJstatdDefaults {
--- a/test/sun/tools/jstatd/TestJstatdExternalRegistry.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/tools/jstatd/TestJstatdExternalRegistry.java	Fri May 23 09:05:24 2014 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 4990825 7092186
  * @library /lib/testlibrary
- * @build JstatdTest JstatGCUtilParser
+ * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser
  * @run main/timeout=60 TestJstatdExternalRegistry
  */
 public class TestJstatdExternalRegistry {
--- a/test/sun/tools/jstatd/TestJstatdPort.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/tools/jstatd/TestJstatdPort.java	Fri May 23 09:05:24 2014 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 4990825
  * @library /lib/testlibrary
- * @build JstatdTest JstatGCUtilParser
+ * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser
  * @run main/timeout=60 TestJstatdPort
  */
 public class TestJstatdPort {
--- a/test/sun/tools/jstatd/TestJstatdPortAndServer.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/tools/jstatd/TestJstatdPortAndServer.java	Fri May 23 09:05:24 2014 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 4990825
  * @library /lib/testlibrary
- * @build JstatdTest JstatGCUtilParser
+ * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser
  * @run main/timeout=60 TestJstatdPortAndServer
  */
 public class TestJstatdPortAndServer {
--- a/test/sun/tools/jstatd/TestJstatdServer.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/tools/jstatd/TestJstatdServer.java	Fri May 23 09:05:24 2014 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 4990825
  * @library /lib/testlibrary
- * @build JstatdTest JstatGCUtilParser
+ * @build jdk.testlibrary.* JstatdTest JstatGCUtilParser
  * @run main/timeout=60 TestJstatdServer
  */
 public class TestJstatdServer {
--- a/test/sun/tools/jstatd/TestJstatdUsage.java	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/tools/jstatd/TestJstatdUsage.java	Fri May 23 09:05:24 2014 -0700
@@ -28,7 +28,7 @@
  * @test
  * @bug 4990825
  * @library /lib/testlibrary
- * @build jdk.testlibrary.JDKToolLauncher jdk.testlibrary.OutputAnalyzer
+ * @build jdk.testlibrary.*
  * @run main TestJstatdUsage
  */
 public class TestJstatdUsage {
--- a/test/sun/util/calendar/zi/tzdata/VERSION	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/util/calendar/zi/tzdata/VERSION	Fri May 23 09:05:24 2014 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2014b
+tzdata2014c
--- a/test/sun/util/calendar/zi/tzdata/africa	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/util/calendar/zi/tzdata/africa	Fri May 23 09:05:24 2014 -0700
@@ -358,11 +358,54 @@
 # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
 # </a>
 
+# From Ahmad El-Dardiry (2014-05-07):
+# Egypt is to change back to Daylight system on May 15
+# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx
+
+# From Gunther Vermier (2015-05-13):
+# our Egypt office confirms that the change will be at 15 May "midnight" (24:00)
+
+# From Paul Eggert (2014-05-13):
+# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says
+# the change is because of blackouts in Cairo, even though Ahram Online (cited
+# above) says DST had no affect on electricity consumption.  The AP story says
+# DST will not be observed during Ramadan.  There is no information about when
+# DST will end.  See:
+# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833
+#
+# For now, guess that later transitions will use 2010's rules, and that
+# Egypt will agree with Morocco (see below) about the date Ramadan starts and
+# ends, though (unlike Morocco) it will switch at 00:00 standard time.  In
+# Egypt the spring-forward transitions are removed for 2020-2022, when the
+# guessed spring-forward date falls during the estimated Ramadan, and all
+# transitions removed for 2023-2038, where the estimated Ramadan falls entirely
+# outside the guessed daylight-saving time.  Ramadan intrudes on the guessed
+# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff.
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
 Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2014	only	-	May	15	24:00	1:00	S
+Rule	Egypt	2014	only	-	Jun	29	 0:00s	0	-
+Rule	Egypt	2014	only	-	Jul	29	 0:00s	1:00	S
+Rule	Egypt	2014	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2015	2019	-	Apr	lastFri	 0:00s	1:00	S
+Rule	Egypt	2015	only	-	Jun	18	 0:00s	0	-
+Rule	Egypt	2015	only	-	Jul	18	 0:00s	1:00	S
+Rule	Egypt	2016	only	-	Jun	 7	 0:00s	0	-
+Rule	Egypt	2016	only	-	Jul	 7	 0:00s	1:00	S
+Rule	Egypt	2017	only	-	May	27	 0:00s	0	-
+Rule	Egypt	2017	only	-	Jun	26	 0:00s	1:00	S
+Rule	Egypt	2018	only	-	May	16	 0:00s	0	-
+Rule	Egypt	2018	only	-	Jun	15	 0:00s	1:00	S
+Rule	Egypt	2019	only	-	May	 6	 0:00s	0	-
+Rule	Egypt	2019	only	-	Jun	 5	 0:00s	1:00	S
+Rule	Egypt	2020	only	-	May	24	 0:00s	1:00	S
+Rule	Egypt	2021	only	-	May	13	 0:00s	1:00	S
+Rule	Egypt	2022	only	-	May	 3	 0:00s	1:00	S
+Rule	Egypt	2023	max	-	Apr	lastFri	 0:00s	1:00	S
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:09 -	LMT	1900 Oct
--- a/test/sun/util/calendar/zi/tzdata/asia	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/util/calendar/zi/tzdata/asia	Fri May 23 09:05:24 2014 -0700
@@ -1370,22 +1370,6 @@
 # "Jordan will switch to winter time on Friday, October 27".
 #
 
-# From Phil Pizzey (2009-04-02):
-# ...I think I may have spotted an error in the timezone data for
-# Jordan.
-# The current (2009d) asia file shows Jordan going to daylight
-# saving
-# time on the last Thursday in March.
-#
-# Rule  Jordan      2000  max	-  Mar   lastThu     0:00s 1:00  S
-#
-# However timeanddate.com, which I usually find reliable, shows Jordan
-# going to daylight saving time on the last Friday in March since 2002.
-# Please see
-# <a href="http://www.timeanddate.com/worldclock/timezone.html?n=11">
-# http://www.timeanddate.com/worldclock/timezone.html?n=11
-# </a>
-
 # From Steffen Thorsen (2009-04-02):
 # This single one might be good enough, (2009-03-24, Arabic):
 # <a href="http://petra.gov.jo/Artical.aspx?Lng=2&Section=8&Artical=95279">
--- a/test/sun/util/calendar/zi/tzdata/europe	Tue May 13 10:29:12 2014 -0700
+++ b/test/sun/util/calendar/zi/tzdata/europe	Fri May 23 09:05:24 2014 -0700
@@ -2989,6 +2989,10 @@
 # From Alexander Krivenyshev (2014-03-17):
 # time change at 2:00 (2am) on March 30, 2014
 # http://vz.ru/news/2014/3/17/677464.html
+# From Paul Eggert (2014-03-30):
+# Simferopol and Sevastopol reportedly changed their central town clocks
+# late the previous day, but this appears to have been ceremonial
+# and the discrepancies are small enough to not worry about.
 			2:00	EU	EE%sT	2014 Mar 30 2:00
 			4:00	-	MSK