changeset 9979:de42513e996d

Merge
author prr
date Mon, 05 May 2014 12:49:13 -0700
parents d01841fda7a8 f3905a67a72c
children d41dba23eca9
files make/lib/Awt2dLibraries.gmk
diffstat 109 files changed, 2253 insertions(+), 1282 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon May 05 09:41:41 2014 -0700
+++ b/.hgtags	Mon May 05 12:49:13 2014 -0700
@@ -253,3 +253,4 @@
 9e7bd44ea85c72318130379c34b98716b9c7c248 jdk9-b08
 2cef452ba711b17950da275fd15931925799f07c jdk9-b09
 ab06ba2894313a47e4969ca37792ff119c49e711 jdk9-b10
+47feccd164b7187a0147693a922ee47c6629643c jdk9-b11
--- a/make/data/jdwp/jdwp.spec	Mon May 05 09:41:41 2014 -0700
+++ b/make/data/jdwp/jdwp.spec	Mon May 05 12:49:13 2014 -0700
@@ -1147,7 +1147,8 @@
         (ErrorSet
             (Error INVALID_CLASS     "clazz is not the ID of a class.")
             (Error INVALID_OBJECT    "clazz is not a known ID.")
-            (Error INVALID_METHODID  "methodID is not the ID of a method.")
+            (Error INVALID_METHODID  "methodID is not the ID of a static method in "
+                                     "this class type or one of its superclasses.")
             (Error INVALID_THREAD)
             (Error THREAD_NOT_SUSPENDED)
             (Error VM_DEAD)
@@ -1250,6 +1251,83 @@
     )
 )
 (CommandSet InterfaceType=5
+    (Command InvokeMethod=1
+        "Invokes a static method. "
+        "The method must not be a static initializer. "
+        "The method must be a member of the interface type. "
+        "<p>Since JDWP version 1.8 "
+        "<p>"
+        "The method invocation will occur in the specified thread. "
+        "Method invocation can occur only if the specified thread "
+        "has been suspended by an event. "
+        "Method invocation is not supported "
+        "when the target VM has been suspended by the front-end. "
+        "<p>"
+        "The specified method is invoked with the arguments in the specified "
+        "argument list. "
+        "The method invocation is synchronous; the reply packet is not "
+        "sent until the invoked method returns in the target VM. "
+        "The return value (possibly the void value) is "
+        "included in the reply packet. "
+        "If the invoked method throws an exception, the "
+        "exception object ID is set in the reply packet; otherwise, the "
+        "exception object ID is null. "
+        "<p>"
+        "For primitive arguments, the argument value's type must match the "
+        "argument's type exactly. For object arguments, there must exist a "
+        "widening reference conversion from the argument value's type to the "
+        "argument's type and the argument's type must be loaded. "
+        "<p>"
+        "By default, all threads in the target VM are resumed while "
+        "the method is being invoked if they were previously "
+        "suspended by an event or by a command. "
+        "This is done to prevent the deadlocks "
+        "that will occur if any of the threads own monitors "
+        "that will be needed by the invoked method. It is possible that "
+        "breakpoints or other events might occur during the invocation. "
+        "Note, however, that this implicit resume acts exactly like "
+        "the ThreadReference resume command, so if the thread's suspend "
+        "count is greater than 1, it will remain in a suspended state "
+        "during the invocation. By default, when the invocation completes, "
+        "all threads in the target VM are suspended, regardless their state "
+        "before the invocation. "
+        "<p>"
+        "The resumption of other threads during the invoke can be prevented "
+        "by specifying the INVOKE_SINGLE_THREADED "
+        "bit flag in the <code>options</code> field; however, "
+        "there is no protection against or recovery from the deadlocks "
+        "described above, so this option should be used with great caution. "
+        "Only the specified thread will be resumed (as described for all "
+        "threads above). Upon completion of a single threaded invoke, the invoking thread "
+        "will be suspended once again. Note that any threads started during "
+        "the single threaded invocation will not be suspended when the "
+        "invocation completes. "
+        "<p>"
+        "If the target VM is disconnected during the invoke (for example, through "
+        "the VirtualMachine dispose command) the method invocation continues. "
+        (Out
+            (interfaceType clazz "The interface type ID.")
+            (threadObject thread "The thread in which to invoke.")
+            (method methodID "The method to invoke.")
+            (Repeat arguments
+                (value arg "The argument value.")
+            )
+            (int options "Invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
+        )
+        (Reply
+            (value returnValue "The returned value.")
+            (tagged-object exception "The thrown exception.")
+        )
+        (ErrorSet
+            (Error INVALID_CLASS     "clazz is not the ID of an interface.")
+            (Error INVALID_OBJECT    "clazz is not a known ID.")
+            (Error INVALID_METHODID  "methodID is not the ID of a static method in this "
+                                     "interface type or is the ID of a static initializer.")
+            (Error INVALID_THREAD)
+            (Error THREAD_NOT_SUSPENDED)
+            (Error VM_DEAD)
+        )
+    )
 )
 (CommandSet Method=6
     (Command LineTable=1
@@ -1543,7 +1621,7 @@
         "<p>"
         "By default, all threads in the target VM are resumed while "
         "the method is being invoked if they were previously "
-        "suspended by an event or by command. "
+        "suspended by an event or by a command. "
         "This is done to prevent the deadlocks "
         "that will occur if any of the threads own monitors "
         "that will be needed by the invoked method. It is possible that "
@@ -1586,7 +1664,9 @@
             (Error INVALID_OBJECT)
             (Error INVALID_CLASS     "clazz is not the ID of a reference "
                                      "type.")
-            (Error INVALID_METHODID  "methodID is not the ID of a method.")
+            (Error INVALID_METHODID  "methodID is not the ID of an instance method "
+                                     "in this object's type or one of its superclasses, "
+                                     "superinterfaces, or implemented interfaces.")
             (Error INVALID_THREAD)
             (Error THREAD_NOT_SUSPENDED)
             (Error VM_DEAD)
--- a/make/lib/Awt2dLibraries.gmk	Mon May 05 09:41:41 2014 -0700
+++ b/make/lib/Awt2dLibraries.gmk	Mon May 05 12:49:13 2014 -0700
@@ -815,6 +815,10 @@
   BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
 endif
 
+# Libfontmanager doesn't actually need X_LIBS to link, but if building
+# on a Solaris machine without X installed, using a devkit, linking
+# to libawt_xawt will fail without the -L parameters from X_LIBS. Filter
+# out the -R parameters since they aren't needed.
 $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
     LIBRARY := fontmanager, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
@@ -833,7 +837,8 @@
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
     LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
-    LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
+    LDFLAGS_SUFFIX_solaris := $(filter-out -R%, $(X_LIBS)) \
+        -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
     LDFLAGS_SUFFIX_aix := -lawt -lawt_xawt $(LIBM) $(LIBCXX) -ljava -ljvm,\
     LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
         -ljava -ljvm, \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/back/InterfaceTypeImpl.c	Mon May 05 12:49:13 2014 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "util.h"
+#include "InterfaceTypeImpl.h"
+#include "inStream.h"
+#include "outStream.h"
+
+static jboolean
+invokeStatic(PacketInputStream *in, PacketOutputStream *out)
+{
+    return sharedInvoke(in, out);
+}
+
+void *InterfaceType_Cmds[] = { (void *)0x1
+    , (void *)invokeStatic
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/back/InterfaceTypeImpl.h	Mon May 05 12:49:13 2014 -0700
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 1998, 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.
+ */
+extern void *InterfaceType_Cmds[];
--- a/src/share/back/VirtualMachineImpl.c	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/back/VirtualMachineImpl.c	Mon May 05 12:49:13 2014 -0700
@@ -36,7 +36,7 @@
 
 static char *versionName = "Java Debug Wire Protocol (Reference Implementation)";
 static int majorVersion = 1;  /* JDWP major version */
-static int minorVersion = 6;  /* JDWP minor version */
+static int minorVersion = 8;  /* JDWP minor version */
 
 static jboolean
 version(PacketInputStream *in, PacketOutputStream *out)
--- a/src/share/back/debugDispatch.c	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/back/debugDispatch.c	Mon May 05 12:49:13 2014 -0700
@@ -29,6 +29,7 @@
 #include "VirtualMachineImpl.h"
 #include "ReferenceTypeImpl.h"
 #include "ClassTypeImpl.h"
+#include "InterfaceTypeImpl.h"
 #include "ArrayTypeImpl.h"
 #include "FieldImpl.h"
 #include "MethodImpl.h"
@@ -67,6 +68,7 @@
     l1Array[JDWP_COMMAND_SET(VirtualMachine)] = (void *)VirtualMachine_Cmds;
     l1Array[JDWP_COMMAND_SET(ReferenceType)] = (void *)ReferenceType_Cmds;
     l1Array[JDWP_COMMAND_SET(ClassType)] = (void *)ClassType_Cmds;
+    l1Array[JDWP_COMMAND_SET(InterfaceType)] = (void *)InterfaceType_Cmds;
     l1Array[JDWP_COMMAND_SET(ArrayType)] = (void *)ArrayType_Cmds;
 
     l1Array[JDWP_COMMAND_SET(Field)] = (void *)Field_Cmds;
--- a/src/share/back/util.c	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/back/util.c	Mon May 05 12:49:13 2014 -0700
@@ -591,6 +591,8 @@
         invokeType = INVOKE_CONSTRUCTOR;
     } else if (inStream_command(in) == JDWP_COMMAND(ClassType, InvokeMethod)) {
         invokeType = INVOKE_STATIC;
+    } else if (inStream_command(in) == JDWP_COMMAND(InterfaceType, InvokeMethod)) {
+        invokeType = INVOKE_STATIC;
     } else if (inStream_command(in) == JDWP_COMMAND(ObjectReference, InvokeMethod)) {
         invokeType = INVOKE_INSTANCE;
     } else {
--- a/src/share/classes/com/sun/jdi/ClassType.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/jdi/ClassType.java	Mon May 05 12:49:13 2014 -0700
@@ -103,7 +103,7 @@
      * <p>
      * Object values must be assignment compatible with the field type
      * (This implies that the field type must be loaded through the
-     * enclosing class's class loader). Primitive values must be
+     * enclosing class' class loader). Primitive values must be
      * either assignment compatible with the field type or must be
      * convertible to the field type without loss of information.
      * See JLS section 5.2 for more information on assignment
@@ -153,7 +153,7 @@
      * <p>
      * Object arguments must be assignment compatible with the argument type
      * (This implies that the argument type must be loaded through the
-     * enclosing class's class loader). Primitive arguments must be
+     * enclosing class' class loader). Primitive arguments must be
      * either assignment compatible with the argument type or must be
      * convertible to the argument type without loss of information.
      * If the method being called accepts a variable number of arguments,
@@ -216,7 +216,7 @@
      * @return a {@link Value} mirror of the invoked method's return value.
      * @throws java.lang.IllegalArgumentException if the method is not
      * a member of this class or a superclass, if the size of the argument list
-     * does not match the number of declared arguemnts for the method, or
+     * does not match the number of declared arguments for the method, or
      * if the method is an initializer, constructor or static intializer.
      * @throws {@link InvalidTypeException} if any argument in the
      * argument list is not assignable to the corresponding method argument
@@ -230,7 +230,7 @@
      * @throws InvalidTypeException If the arguments do not meet this requirement --
      *         Object arguments must be assignment compatible with the argument
      *         type.  This implies that the argument type must be
-     *         loaded through the enclosing class's class loader.
+     *         loaded through the enclosing class' class loader.
      *         Primitive arguments must be either assignment compatible with the
      *         argument type or must be convertible to the argument type without loss
      *         of information. See JLS section 5.2 for more information on assignment
@@ -267,7 +267,7 @@
      * <p>
      * Object arguments must be assignment compatible with the argument type
      * (This implies that the argument type must be loaded through the
-     * enclosing class's class loader). Primitive arguments must be
+     * enclosing class' class loader). Primitive arguments must be
      * either assignment compatible with the argument type or must be
      * convertible to the argument type without loss of information.
      * If the method being called accepts a variable number of arguments,
@@ -335,7 +335,7 @@
      * @throws InvalidTypeException If the arguments do not meet this requirement --
      *         Object arguments must be assignment compatible with the argument
      *         type.  This implies that the argument type must be
-     *         loaded through the enclosing class's class loader.
+     *         loaded through the enclosing class' class loader.
      *         Primitive arguments must be either assignment compatible with the
      *         argument type or must be convertible to the argument type without loss
      *         of information. See JLS section 5.2 for more information on assignment
--- a/src/share/classes/com/sun/jdi/InterfaceType.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/jdi/InterfaceType.java	Mon May 05 12:49:13 2014 -0700
@@ -79,4 +79,123 @@
      * If none exist, returns a zero length List.
      */
     List<ClassType> implementors();
+
+    /**
+     * Invokes the specified static {@link Method} in the
+     * target VM. The
+     * specified method must be defined in this interface.
+     * The method must be a static method
+     * but not a static initializer.
+     * <p>
+     * The method invocation will occur in the specified thread.
+     * Method invocation can occur only if the specified thread
+     * has been suspended by an event which occurred in that thread.
+     * Method invocation is not supported
+     * when the target VM has been suspended through
+     * {@link VirtualMachine#suspend} or when the specified thread
+     * is suspended through {@link ThreadReference#suspend}.
+     * <p>
+     * The specified method is invoked with the arguments in the specified
+     * argument list.  The method invocation is synchronous; this method
+     * does not return until the invoked method returns in the target VM.
+     * If the invoked method throws an exception, this method will throw
+     * an {@link InvocationException} which contains a mirror to the exception
+     * object thrown.
+     * <p>
+     * Object arguments must be assignment compatible with the argument type
+     * (This implies that the argument type must be loaded through the
+     * enclosing class' class loader). Primitive arguments must be
+     * either assignment compatible with the argument type or must be
+     * convertible to the argument type without loss of information.
+     * If the method being called accepts a variable number of arguments,
+     * then the last argument type is an array of some component type.
+     * The argument in the matching position can be omitted, or can be null,
+     * an array of the same component type, or an argument of the
+     * component type followed by any number of other arguments of the same
+     * type. If the argument is omitted, then a 0 length array of the
+     * component type is passed.  The component type can be a primitive type.
+     * Autoboxing is not supported.
+     *
+     * See Section 5.2 of
+     * <cite>The Java&trade; Language Specification</cite>
+     * for more information on assignment compatibility.
+     * <p>
+     * By default, all threads in the target VM are resumed while
+     * the method is being invoked if they were previously
+     * suspended by an event or by {@link VirtualMachine#suspend} or
+     * {@link ThreadReference#suspend}. This is done to prevent the deadlocks
+     * that will occur if any of the threads own monitors
+     * that will be needed by the invoked method.
+     * Note, however, that this implicit resume acts exactly like
+     * {@link ThreadReference#resume}, so if the thread's suspend
+     * count is greater than 1, it will remain in a suspended state
+     * during the invocation and thus a deadlock could still occur.
+     * By default, when the invocation completes,
+     * all threads in the target VM are suspended, regardless their state
+     * before the invocation.
+     * It is possible that
+     * breakpoints or other events might occur during the invocation.
+     * This can cause deadlocks as described above. It can also cause a deadlock
+     * if invokeMethod is called from the client's event handler thread.  In this
+     * case, this thread will be waiting for the invokeMethod to complete and
+     * won't read the EventSet that comes in for the new event.  If this
+     * new EventSet is SUSPEND_ALL, then a deadlock will occur because no
+     * one will resume the EventSet.  To avoid this, all EventRequests should
+     * be disabled before doing the invokeMethod, or the invokeMethod should
+     * not be done from the client's event handler thread.
+     * <p>
+     * The resumption of other threads during the invocation can be prevented
+     * by specifying the {@link #INVOKE_SINGLE_THREADED}
+     * bit flag in the <code>options</code> argument; however,
+     * there is no protection against or recovery from the deadlocks
+     * described above, so this option should be used with great caution.
+     * Only the specified thread will be resumed (as described for all
+     * threads above). Upon completion of a single threaded invoke, the invoking thread
+     * will be suspended once again. Note that any threads started during
+     * the single threaded invocation will not be suspended when the
+     * invocation completes.
+     * <p>
+     * If the target VM is disconnected during the invoke (for example, through
+     * {@link VirtualMachine#dispose}) the method invocation continues.
+     *
+     * @param thread the thread in which to invoke.
+     * @param method the {@link Method} to invoke.
+     * @param arguments the list of {@link Value} arguments bound to the
+     * invoked method. Values from the list are assigned to arguments
+     * in the order they appear in the method signature.
+     * @param options the integer bit flag options.
+     * @return a {@link Value} mirror of the invoked method's return value.
+     * @throws java.lang.IllegalArgumentException if the method is not
+     * a member of this interface, if the size of the argument list
+     * does not match the number of declared arguments for the method, or
+     * if the method is not static or is a static initializer.
+     * @throws {@link InvalidTypeException} if any argument in the
+     * argument list is not assignable to the corresponding method argument
+     * type.
+     * @throws ClassNotLoadedException if any argument type has not yet been loaded
+     * through the appropriate class loader.
+     * @throws IncompatibleThreadStateException if the specified thread has not
+     * been suspended by an event.
+     * @throws InvocationException if the method invocation resulted in
+     * an exception in the target VM.
+     * @throws InvalidTypeException If the arguments do not meet this requirement --
+     *         Object arguments must be assignment compatible with the argument
+     *         type.  This implies that the argument type must be
+     *         loaded through the enclosing class' class loader.
+     *         Primitive arguments must be either assignment compatible with the
+     *         argument type or must be convertible to the argument type without loss
+     *         of information. See JLS section 5.2 for more information on assignment
+     *         compatibility.
+     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
+     *
+     * @since 1.8
+     */
+    default Value invokeMethod(ThreadReference thread, Method method,
+                       List<? extends Value> arguments, int options)
+            throws InvalidTypeException,
+            ClassNotLoadedException,
+            IncompatibleThreadStateException,
+            InvocationException {
+        throw new UnsupportedOperationException();
+    }
 }
--- a/src/share/classes/com/sun/jdi/Method.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/jdi/Method.java	Mon May 05 12:49:13 2014 -0700
@@ -138,6 +138,18 @@
     boolean isAbstract();
 
     /**
+     * Determine if this method is a default method
+     *
+     * @return <code>true</code> if the method is declared default;
+     * false otherwise
+     *
+     * @since 1.8
+     */
+    default boolean isDefault() {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
      * Determine if this method is synchronized.
      *
      * @return <code>true</code> if the method is declared synchronized;
--- a/src/share/classes/com/sun/jdi/ObjectReference.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/jdi/ObjectReference.java	Mon May 05 12:49:13 2014 -0700
@@ -194,10 +194,10 @@
      * {@link #INVOKE_NONVIRTUAL} bit flag in the <code>options</code>
      * argument. If this flag is set, the specified method is invoked
      * whether or not it is overridden for this object's runtime type.
-     * The method, in this case, must not belong to an interface and
-     * must not be abstract. This option is useful for performing method
-     * invocations like those done with the <code>super</code> keyword in
-     * the Java programming language.
+     * The method, in this case, must have an implementation, either in a class
+     * or an interface. This option is useful for performing method invocations
+     * like those done with the <code>super</code> keyword in the Java programming
+     * language.
      * <p>
      * By default, all threads in the target VM are resumed while
      * the method is being invoked if they were previously
@@ -246,10 +246,10 @@
      * @return a {@link Value} mirror of the invoked method's return value.
      * @throws java.lang.IllegalArgumentException if the method is not
      * a member of this object's class, if the size of the argument list
-     * does not match the number of declared arguemnts for the method,
+     * does not match the number of declared arguments for the method,
      * if the method is a constructor or static intializer, or
      * if {@link #INVOKE_NONVIRTUAL} is specified and the method is
-     * either abstract or an interface member.
+     * either abstract or a non-default interface member.
      * @throws {@link InvalidTypeException} if any argument in the
      * argument list is not assignable to the corresponding method argument
      * type.
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java	Mon May 05 12:49:13 2014 -0700
@@ -87,6 +87,10 @@
             new Algorithm("", "SHA1withDSA", "Signature")
         );
         algorithmsMap.put(
+            XMLSignature.ALGO_ID_SIGNATURE_DSA_SHA256,
+            new Algorithm("", "SHA256withDSA", "Signature")
+        );
+        algorithmsMap.put(
             XMLSignature.ALGO_ID_SIGNATURE_NOT_RECOMMENDED_RSA_MD5,
             new Algorithm("", "MD5withRSA", "Signature")
         );
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java	Mon May 05 12:49:13 2014 -0700
@@ -380,7 +380,12 @@
      * This method registers the default algorithms.
      */
     public static void registerDefaultAlgorithms() {
-        algorithmHash.put(SignatureDSA.URI, SignatureDSA.class);
+        algorithmHash.put(
+            XMLSignature.ALGO_ID_SIGNATURE_DSA, SignatureDSA.class
+        );
+        algorithmHash.put(
+            XMLSignature.ALGO_ID_SIGNATURE_DSA_SHA256, SignatureDSA.SHA256.class
+        );
         algorithmHash.put(
             XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1, SignatureBaseRSA.SignatureRSASHA1.class
         );
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/SignatureDSA.java	Mon May 05 12:49:13 2014 -0700
@@ -31,13 +31,15 @@
 import java.security.SecureRandom;
 import java.security.Signature;
 import java.security.SignatureException;
+import java.security.interfaces.DSAKey;
 import java.security.spec.AlgorithmParameterSpec;
 
 import com.sun.org.apache.xml.internal.security.algorithms.JCEMapper;
 import com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithmSpi;
+import com.sun.org.apache.xml.internal.security.signature.XMLSignature;
 import com.sun.org.apache.xml.internal.security.signature.XMLSignatureException;
 import com.sun.org.apache.xml.internal.security.utils.Base64;
-import com.sun.org.apache.xml.internal.security.utils.Constants;
+import com.sun.org.apache.xml.internal.security.utils.JavaUtils;
 
 public class SignatureDSA extends SignatureAlgorithmSpi {
 
@@ -45,19 +47,19 @@
     private static java.util.logging.Logger log =
         java.util.logging.Logger.getLogger(SignatureDSA.class.getName());
 
-    /** Field URI */
-    public static final String URI = Constants.SignatureSpecNS + "dsa-sha1";
-
     /** Field algorithm */
     private java.security.Signature signatureAlgorithm = null;
 
+    /** size of Q */
+    private int size;
+
     /**
      * Method engineGetURI
      *
      * @inheritDoc
      */
     protected String engineGetURI() {
-        return SignatureDSA.URI;
+        return XMLSignature.ALGO_ID_SIGNATURE_DSA;
     }
 
     /**
@@ -66,7 +68,7 @@
      * @throws XMLSignatureException
      */
     public SignatureDSA() throws XMLSignatureException {
-        String algorithmID = JCEMapper.translateURItoJCEID(SignatureDSA.URI);
+        String algorithmID = JCEMapper.translateURItoJCEID(engineGetURI());
         if (log.isLoggable(java.util.logging.Level.FINE)) {
             log.log(java.util.logging.Level.FINE, "Created SignatureDSA using " + algorithmID);
         }
@@ -110,7 +112,8 @@
                 log.log(java.util.logging.Level.FINE, "Called DSA.verify() on " + Base64.encode(signature));
             }
 
-            byte[] jcebytes = SignatureDSA.convertXMLDSIGtoASN1(signature);
+            byte[] jcebytes = JavaUtils.convertDsaXMLDSIGtoASN1(signature,
+                                                                size/8);
 
             return this.signatureAlgorithm.verify(jcebytes);
         } catch (SignatureException ex) {
@@ -150,6 +153,7 @@
             }
             throw new XMLSignatureException("empty", ex);
         }
+        size = ((DSAKey)publicKey).getParams().getQ().bitLength();
     }
 
     /**
@@ -159,7 +163,7 @@
         try {
             byte jcebytes[] = this.signatureAlgorithm.sign();
 
-            return SignatureDSA.convertASN1toXMLDSIG(jcebytes);
+            return JavaUtils.convertDsaASN1toXMLDSIG(jcebytes, size/8);
         } catch (IOException ex) {
             throw new XMLSignatureException("empty", ex);
         } catch (SignatureException ex) {
@@ -185,6 +189,7 @@
         } catch (InvalidKeyException ex) {
             throw new XMLSignatureException("empty", ex);
         }
+        size = ((DSAKey)privateKey).getParams().getQ().bitLength();
     }
 
     /**
@@ -204,6 +209,7 @@
         } catch (InvalidKeyException ex) {
             throw new XMLSignatureException("empty", ex);
         }
+        size = ((DSAKey)privateKey).getParams().getQ().bitLength();
     }
 
     /**
@@ -258,100 +264,6 @@
     }
 
     /**
-     * Converts an ASN.1 DSA value to a XML Signature DSA Value.
-     *
-     * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
-     * pairs; the XML Signature requires the core BigInteger values.
-     *
-     * @param asn1Bytes
-     * @return the decode bytes
-     *
-     * @throws IOException
-     * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
-     */
-    private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[]) throws IOException {
-
-        byte rLength = asn1Bytes[3];
-        int i;
-
-        for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--);
-
-        byte sLength = asn1Bytes[5 + rLength];
-        int j;
-
-        for (j = sLength;
-            (j > 0) && (asn1Bytes[(6 + rLength + sLength) - j] == 0); j--);
-
-        if ((asn1Bytes[0] != 48) || (asn1Bytes[1] != asn1Bytes.length - 2)
-            || (asn1Bytes[2] != 2) || (i > 20)
-            || (asn1Bytes[4 + rLength] != 2) || (j > 20)) {
-            throw new IOException("Invalid ASN.1 format of DSA signature");
-        }
-        byte xmldsigBytes[] = new byte[40];
-
-        System.arraycopy(asn1Bytes, (4 + rLength) - i, xmldsigBytes, 20 - i, i);
-        System.arraycopy(asn1Bytes, (6 + rLength + sLength) - j, xmldsigBytes,
-                         40 - j, j);
-
-        return xmldsigBytes;
-    }
-
-    /**
-     * Converts a XML Signature DSA Value to an ASN.1 DSA value.
-     *
-     * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
-     * pairs; the XML Signature requires the core BigInteger values.
-     *
-     * @param xmldsigBytes
-     * @return the encoded ASN.1 bytes
-     *
-     * @throws IOException
-     * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
-     */
-    private static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[]) throws IOException {
-
-        if (xmldsigBytes.length != 40) {
-            throw new IOException("Invalid XMLDSIG format of DSA signature");
-        }
-
-        int i;
-
-        for (i = 20; (i > 0) && (xmldsigBytes[20 - i] == 0); i--);
-
-        int j = i;
-
-        if (xmldsigBytes[20 - i] < 0) {
-            j += 1;
-        }
-
-        int k;
-
-        for (k = 20; (k > 0) && (xmldsigBytes[40 - k] == 0); k--);
-
-        int l = k;
-
-        if (xmldsigBytes[40 - k] < 0) {
-            l += 1;
-        }
-
-        byte asn1Bytes[] = new byte[6 + j + l];
-
-        asn1Bytes[0] = 48;
-        asn1Bytes[1] = (byte) (4 + j + l);
-        asn1Bytes[2] = 2;
-        asn1Bytes[3] = (byte) j;
-
-        System.arraycopy(xmldsigBytes, 20 - i, asn1Bytes, (4 + j) - i, i);
-
-        asn1Bytes[4 + j] = 2;
-        asn1Bytes[5 + j] = (byte) l;
-
-        System.arraycopy(xmldsigBytes, 40 - k, asn1Bytes, (6 + j + l) - k, k);
-
-        return asn1Bytes;
-    }
-
-    /**
      * Method engineSetHMACOutputLength
      *
      * @param HMACOutputLength
@@ -373,4 +285,15 @@
     ) throws XMLSignatureException {
         throw new XMLSignatureException("algorithms.CannotUseAlgorithmParameterSpecOnDSA");
     }
+
+    public static class SHA256 extends SignatureDSA {
+
+        public SHA256() throws XMLSignatureException {
+            super();
+        }
+
+        public String engineGetURI() {
+            return XMLSignature.ALGO_ID_SIGNATURE_DSA_SHA256;
+        }
+    }
 }
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java	Mon May 05 12:49:13 2014 -0700
@@ -85,6 +85,10 @@
     public static final String ALGO_ID_SIGNATURE_DSA =
         Constants.SignatureSpecNS + "dsa-sha1";
 
+    /** Signature - Optional DSAwithSHA256 */
+    public static final String ALGO_ID_SIGNATURE_DSA_SHA256 =
+        Constants.SignatureSpec11NS + "dsa-sha256";
+
     /** Signature - Recommended RSAwithSHA1 */
     public static final String ALGO_ID_SIGNATURE_RSA =
         Constants.SignatureSpecNS + "rsa-sha1";
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java	Mon May 05 12:49:13 2014 -0700
@@ -145,4 +145,98 @@
 
         return retBytes;
     }
+
+    /**
+     * Converts an ASN.1 DSA value to a XML Signature DSA Value.
+     *
+     * The JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
+     * pairs (see section 2.2.2 of RFC 3279); the XML Signature requires the
+     * core BigInteger values.
+     *
+     * @param asn1Bytes the ASN.1 encoded bytes
+     * @param size size of r and s in bytes
+     * @return the XML Signature encoded bytes
+     * @throws IOException if the bytes are not encoded correctly
+     * @see <A HREF="http://www.w3.org/TR/xmldsig-core1/#sec-DSA">6.4.1 DSA</A>
+     */
+    public static byte[] convertDsaASN1toXMLDSIG(byte[] asn1Bytes, int size)
+        throws IOException
+    {
+        if (asn1Bytes[0] != 48 || asn1Bytes[1] != asn1Bytes.length - 2
+            || asn1Bytes[2] != 2) {
+            throw new IOException("Invalid ASN.1 format of DSA signature");
+        }
+
+        byte rLength = asn1Bytes[3];
+        int i;
+        for (i = rLength; i > 0 && asn1Bytes[4 + rLength - i] == 0; i--);
+
+        byte sLength = asn1Bytes[5 + rLength];
+        int j;
+        for (j = sLength;
+             j > 0 && asn1Bytes[6 + rLength + sLength - j] == 0; j--);
+
+        if (i > size || asn1Bytes[4 + rLength] != 2 || j > size) {
+            throw new IOException("Invalid ASN.1 format of DSA signature");
+        } else {
+            byte[] xmldsigBytes = new byte[size * 2];
+            System.arraycopy(asn1Bytes, 4 + rLength - i, xmldsigBytes,
+                             size - i, i);
+            System.arraycopy(asn1Bytes, 6 + rLength + sLength - j,
+                             xmldsigBytes, size * 2 - j, j);
+            return xmldsigBytes;
+        }
+    }
+
+    /**
+     * Converts an XML Signature DSA Value to a ASN.1 DSA value.
+     *
+     * The JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
+     * pairs (see section 2.2.2 of RFC 3279); the XML Signature requires the
+     * core BigInteger values.
+     *
+     * @param xmldsigBytes the XML Signature encoded bytes
+     * @param size size of r and s in bytes
+     * @return the ASN.1 encoded bytes
+     * @throws IOException if the bytes are not encoded correctly
+     * @see <A HREF="http://www.w3.org/TR/xmldsig-core1/#sec-DSA">6.4.1 DSA</A>
+     */
+    public static byte[] convertDsaXMLDSIGtoASN1(byte[] xmldsigBytes, int size)
+        throws IOException
+    {
+        int totalSize = size * 2;
+        if (xmldsigBytes.length != totalSize) {
+            throw new IOException("Invalid XMLDSIG format of DSA signature");
+        }
+
+        int i;
+        for (i = size; i > 0 && xmldsigBytes[size - i] == 0; i--);
+
+        int j = i;
+        if (xmldsigBytes[size - i] < 0) {
+            j++;
+        }
+
+        int k;
+        for (k = size; k > 0 && xmldsigBytes[totalSize - k] == 0; k--);
+
+        int l = k;
+        if (xmldsigBytes[totalSize - k] < 0) {
+            l++;
+        }
+
+        byte[] asn1Bytes = new byte[6 + j + l];
+        asn1Bytes[0] = 48;
+        asn1Bytes[1] = (byte)(4 + j + l);
+        asn1Bytes[2] = 2;
+        asn1Bytes[3] = (byte)j;
+        System.arraycopy(xmldsigBytes, size - i, asn1Bytes, 4 + j - i, i);
+
+        asn1Bytes[4 + j] = 2;
+        asn1Bytes[5 + j] = (byte) l;
+        System.arraycopy(xmldsigBytes, totalSize - k, asn1Bytes,
+                         6 + j + l - k, k);
+
+        return asn1Bytes;
+    }
 }
--- a/src/share/classes/com/sun/tools/example/debug/expr/LValue.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/LValue.java	Mon May 05 12:49:13 2014 -0700
@@ -559,6 +559,9 @@
             } else if (refType instanceof ClassType) {
                 ClassType clazz = (ClassType)refType;
                 return jdiValue = clazz.invokeMethod(thread, matchingMethod, methodArguments, 0);
+            } else if (refType instanceof InterfaceType) {
+                InterfaceType iface = (InterfaceType)refType;
+                return jdiValue = iface.invokeMethod(thread, matchingMethod, methodArguments, 0);
             } else {
                 throw new InvalidTypeException("Cannot invoke static method on " +
                                          refType.name());
--- a/src/share/classes/com/sun/tools/jdi/ClassTypeImpl.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/ClassTypeImpl.java	Mon May 05 12:49:13 2014 -0700
@@ -29,9 +29,27 @@
 
 import java.util.*;
 
-public class ClassTypeImpl extends ReferenceTypeImpl
+final public class ClassTypeImpl extends InvokableTypeImpl
     implements ClassType
 {
+    private static class IResult implements InvocationResult {
+        final private JDWP.ClassType.InvokeMethod rslt;
+
+        public IResult(JDWP.ClassType.InvokeMethod rslt) {
+            this.rslt = rslt;
+        }
+
+        @Override
+        public ObjectReferenceImpl getException() {
+            return rslt.exception;
+        }
+
+        @Override
+        public ValueImpl getResult() {
+            return rslt.returnValue;
+        }
+    }
+
     private boolean cachedSuperclass = false;
     private ClassType superclass = null;
     private int lastLine = -1;
@@ -65,6 +83,7 @@
         return superclass;
     }
 
+    @Override
     public List<InterfaceType> interfaces()  {
         if (interfaces == null) {
             interfaces = getInterfaces();
@@ -72,26 +91,9 @@
         return interfaces;
     }
 
-    void addInterfaces(List<InterfaceType> list) {
-        List<InterfaceType> immediate = interfaces();
-        list.addAll(interfaces());
-
-        Iterator<InterfaceType> iter = immediate.iterator();
-        while (iter.hasNext()) {
-            InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-            interfaze.addSuperinterfaces(list);
-        }
-
-        ClassTypeImpl superclass = (ClassTypeImpl)superclass();
-        if (superclass != null) {
-            superclass.addInterfaces(list);
-        }
-    }
-
-    public List<InterfaceType> allInterfaces()  {
-        List<InterfaceType> all = new ArrayList<InterfaceType>();
-        addInterfaces(all);
-        return all;
+    @Override
+    public List<InterfaceType> allInterfaces() {
+        return getAllInterfaces();
     }
 
     public List<ClassType> subclasses() {
@@ -159,28 +161,6 @@
         }
     }
 
-    PacketStream sendInvokeCommand(final ThreadReferenceImpl thread,
-                                   final MethodImpl method,
-                                   final ValueImpl[] args,
-                                   final int options) {
-        CommandSender sender =
-            new CommandSender() {
-                public PacketStream send() {
-                    return JDWP.ClassType.InvokeMethod.enqueueCommand(
-                                          vm, ClassTypeImpl.this, thread,
-                                          method.ref(), args, options);
-                }
-        };
-
-        PacketStream stream;
-        if ((options & INVOKE_SINGLE_THREADED) != 0) {
-            stream = thread.sendResumingCommand(sender);
-        } else {
-            stream = vm.sendResumingCommand(sender);
-        }
-        return stream;
-    }
-
     PacketStream sendNewInstanceCommand(final ThreadReferenceImpl thread,
                                    final MethodImpl method,
                                    final ValueImpl[] args,
@@ -203,52 +183,6 @@
         return stream;
     }
 
-    public Value invokeMethod(ThreadReference threadIntf, Method methodIntf,
-                              List<? extends Value> origArguments, int options)
-                                   throws InvalidTypeException,
-                                          ClassNotLoadedException,
-                                          IncompatibleThreadStateException,
-                                          InvocationException {
-        validateMirror(threadIntf);
-        validateMirror(methodIntf);
-        validateMirrorsOrNulls(origArguments);
-
-        MethodImpl method = (MethodImpl)methodIntf;
-        ThreadReferenceImpl thread = (ThreadReferenceImpl)threadIntf;
-
-        validateMethodInvocation(method);
-
-        List<? extends Value> arguments = method.validateAndPrepareArgumentsForInvoke(origArguments);
-
-        ValueImpl[] args = arguments.toArray(new ValueImpl[0]);
-        JDWP.ClassType.InvokeMethod ret;
-        try {
-            PacketStream stream =
-                sendInvokeCommand(thread, method, args, options);
-            ret = JDWP.ClassType.InvokeMethod.waitForReply(vm, stream);
-        } catch (JDWPException exc) {
-            if (exc.errorCode() == JDWP.Error.INVALID_THREAD) {
-                throw new IncompatibleThreadStateException();
-            } else {
-                throw exc.toJDIException();
-            }
-        }
-
-        /*
-         * There is an implict VM-wide suspend at the conclusion
-         * of a normal (non-single-threaded) method invoke
-         */
-        if ((options & INVOKE_SINGLE_THREADED) == 0) {
-            vm.notifySuspend();
-        }
-
-        if (ret.exception != null) {
-            throw new InvocationException(ret.exception);
-        } else {
-            return ret.returnValue;
-        }
-    }
-
     public ObjectReference newInstance(ThreadReference threadIntf,
                                        Method methodIntf,
                                        List<? extends Value> origArguments,
@@ -311,58 +245,6 @@
        return method;
    }
 
-   public List<Method> allMethods() {
-        ArrayList<Method> list = new ArrayList<Method>(methods());
-
-        ClassType clazz = superclass();
-        while (clazz != null) {
-            list.addAll(clazz.methods());
-            clazz = clazz.superclass();
-        }
-
-        /*
-         * Avoid duplicate checking on each method by iterating through
-         * duplicate-free allInterfaces() rather than recursing
-         */
-        for (InterfaceType interfaze : allInterfaces()) {
-            list.addAll(interfaze.methods());
-        }
-
-        return list;
-    }
-
-    List<ReferenceType> inheritedTypes() {
-        List<ReferenceType> inherited = new ArrayList<ReferenceType>();
-        if (superclass() != null) {
-            inherited.add(0, (ReferenceType)superclass()); /* insert at front */
-        }
-        for (ReferenceType rt : interfaces()) {
-            inherited.add(rt);
-        }
-        return inherited;
-    }
-
-    void validateMethodInvocation(Method method)
-                                   throws InvalidTypeException,
-                                          InvocationException {
-        /*
-         * Method must be in this class or a superclass.
-         */
-        ReferenceTypeImpl declType = (ReferenceTypeImpl)method.declaringType();
-        if (!declType.isAssignableFrom(this)) {
-            throw new IllegalArgumentException("Invalid method");
-        }
-
-        /*
-         * Method must be a static and not a static initializer
-         */
-        if (!method.isStatic()) {
-            throw new IllegalArgumentException("Cannot invoke instance method on a class type");
-        } else if (method.isStaticInitializer()) {
-            throw new IllegalArgumentException("Cannot invoke static initializer");
-        }
-    }
-
     void validateConstructorInvocation(Method method)
                                    throws InvalidTypeException,
                                           InvocationException {
@@ -382,51 +264,33 @@
         }
     }
 
-    @Override
-    void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces) {
-        /*
-         * Add methods from
-         * parent types first, so that the methods in this class will
-         * overwrite them in the hash table
-         */
-
-        Iterator<InterfaceType> iter = interfaces().iterator();
-        while (iter.hasNext()) {
-            InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-            if (!seenInterfaces.contains(interfaze)) {
-                interfaze.addVisibleMethods(methodMap, seenInterfaces);
-                seenInterfaces.add(interfaze);
-            }
-        }
-
-        ClassTypeImpl clazz = (ClassTypeImpl)superclass();
-        if (clazz != null) {
-            clazz.addVisibleMethods(methodMap, seenInterfaces);
-        }
-
-        addToMethodMap(methodMap, methods());
-    }
-
-    boolean isAssignableTo(ReferenceType type) {
-        ClassTypeImpl superclazz = (ClassTypeImpl)superclass();
-        if (this.equals(type)) {
-            return true;
-        } else if ((superclazz != null) && superclazz.isAssignableTo(type)) {
-            return true;
-        } else {
-            List<InterfaceType> interfaces = interfaces();
-            Iterator<InterfaceType> iter = interfaces.iterator();
-            while (iter.hasNext()) {
-                InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-                if (interfaze.isAssignableTo(type)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
 
     public String toString() {
        return "class " + name() + " (" + loaderString() + ")";
     }
+
+    @Override
+    CommandSender getInvokeMethodSender(ThreadReferenceImpl thread,
+                                        MethodImpl method,
+                                        ValueImpl[] args,
+                                        int options) {
+        return () ->
+            JDWP.ClassType.InvokeMethod.enqueueCommand(vm,
+                                                       ClassTypeImpl.this,
+                                                       thread,
+                                                       method.ref(),
+                                                       args,
+                                                       options);
+    }
+
+    @Override
+    InvocationResult waitForReply(PacketStream stream) throws JDWPException {
+        return new IResult(JDWP.ClassType.InvokeMethod.waitForReply(vm, stream));
+    }
+
+    @Override
+    boolean canInvoke(Method method) {
+        // Method must be in this class or a superclass.
+        return ((ReferenceTypeImpl)method.declaringType()).isAssignableFrom(this);
+    }
 }
--- a/src/share/classes/com/sun/tools/jdi/InterfaceTypeImpl.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/InterfaceTypeImpl.java	Mon May 05 12:49:13 2014 -0700
@@ -29,14 +29,31 @@
 
 import java.util.List;
 import java.util.ArrayList;
-import java.util.Map;
-import java.util.Iterator;
 import java.util.Collections;
 import java.util.Set;
 import java.lang.ref.SoftReference;
 
-public class InterfaceTypeImpl extends ReferenceTypeImpl
-                               implements InterfaceType {
+final public class InterfaceTypeImpl extends InvokableTypeImpl
+                                     implements InterfaceType {
+
+    private static class IResult implements InvocationResult {
+        final private JDWP.InterfaceType.InvokeMethod rslt;
+
+        public IResult(JDWP.InterfaceType.InvokeMethod rslt) {
+            this.rslt = rslt;
+        }
+
+        @Override
+        public ObjectReferenceImpl getException() {
+            return rslt.exception;
+        }
+
+        @Override
+        public ValueImpl getResult() {
+            return rslt.returnValue;
+        }
+
+    }
 
     private SoftReference<List<InterfaceType>> superinterfacesRef = null;
 
@@ -81,102 +98,6 @@
         return implementors;
     }
 
-    @Override
-    void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces) {
-        /*
-         * Add methods from
-         * parent types first, so that the methods in this class will
-         * overwrite them in the hash table
-         */
-
-        for (InterfaceType interfaze : superinterfaces()) {
-            if (!seenInterfaces.contains(interfaze)) {
-                ((InterfaceTypeImpl)interfaze).addVisibleMethods(methodMap, seenInterfaces);
-                seenInterfaces.add(interfaze);
-            }
-        }
-
-        addToMethodMap(methodMap, methods());
-    }
-
-    public List<Method> allMethods() {
-        ArrayList<Method> list = new ArrayList<Method>(methods());
-
-        /*
-         * It's more efficient if don't do this
-         * recursively.
-         */
-        for (InterfaceType interfaze : allSuperinterfaces()) {
-            list.addAll(interfaze.methods());
-        }
-
-        return list;
-    }
-
-    List<InterfaceType> allSuperinterfaces() {
-        ArrayList<InterfaceType> list = new ArrayList<InterfaceType>();
-        addSuperinterfaces(list);
-        return list;
-    }
-
-    void addSuperinterfaces(List<InterfaceType> list) {
-        /*
-         * This code is a little strange because it
-         * builds the list with a more suitable order than the
-         * depth-first approach a normal recursive solution would
-         * take. Instead, all direct superinterfaces precede all
-         * indirect ones.
-         */
-
-        /*
-         * Get a list of direct superinterfaces that's not already in the
-         * list being built.
-         */
-        List<InterfaceType> immediate = new ArrayList<InterfaceType>(superinterfaces());
-        Iterator<InterfaceType> iter = immediate.iterator();
-        while (iter.hasNext()) {
-            InterfaceType interfaze = iter.next();
-            if (list.contains(interfaze)) {
-                iter.remove();
-            }
-        }
-
-        /*
-         * Add all new direct superinterfaces
-         */
-        list.addAll(immediate);
-
-        /*
-         * Recurse for all new direct superinterfaces.
-         */
-        iter = immediate.iterator();
-        while (iter.hasNext()) {
-            InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next();
-            interfaze.addSuperinterfaces(list);
-        }
-    }
-
-    boolean isAssignableTo(ReferenceType type) {
-
-        // Exact match?
-        if (this.equals(type)) {
-            return true;
-        } else {
-            // Try superinterfaces.
-            for (InterfaceType interfaze : superinterfaces()) {
-                if (((InterfaceTypeImpl)interfaze).isAssignableTo(type)) {
-                    return true;
-                }
-            }
-
-            return false;
-        }
-    }
-
-    List<InterfaceType> inheritedTypes() {
-        return superinterfaces();
-    }
-
     public boolean isInitialized() {
         return isPrepared();
     }
@@ -184,4 +105,39 @@
     public String toString() {
        return "interface " + name() + " (" + loaderString() + ")";
     }
-}
+
+    @Override
+    InvocationResult waitForReply(PacketStream stream) throws JDWPException {
+        return new IResult(JDWP.InterfaceType.InvokeMethod.waitForReply(vm, stream));
+    }
+
+    @Override
+    CommandSender getInvokeMethodSender(final ThreadReferenceImpl thread,
+                                        final MethodImpl method,
+                                        final ValueImpl[] args,
+                                        final int options) {
+        return () ->
+            JDWP.InterfaceType.InvokeMethod.enqueueCommand(vm,
+                                                           InterfaceTypeImpl.this,
+                                                           thread,
+                                                           method.ref(),
+                                                           args,
+                                                           options);
+    }
+
+    @Override
+    ClassType superclass() {
+        return null;
+    }
+
+    @Override
+    List<InterfaceType> interfaces() {
+        return superinterfaces();
+    }
+
+    @Override
+    boolean canInvoke(Method method) {
+        // method must be directly in this interface
+        return this.equals(method.declaringType());
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java	Mon May 05 12:49:13 2014 -0700
@@ -0,0 +1,305 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.jdi;
+
+import com.sun.jdi.ClassNotLoadedException;
+import com.sun.jdi.ClassType;
+import com.sun.jdi.IncompatibleThreadStateException;
+import com.sun.jdi.InterfaceType;
+import com.sun.jdi.InvalidTypeException;
+import com.sun.jdi.InvocationException;
+import com.sun.jdi.Method;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * A supertype for ReferenceTypes allowing method invocations
+ */
+abstract class InvokableTypeImpl extends ReferenceTypeImpl {
+    /**
+     * The invocation result wrapper
+     * It is necessary because both ClassType and InterfaceType
+     * use their own type to represent the invocation result
+     */
+    static interface InvocationResult {
+        ObjectReferenceImpl getException();
+        ValueImpl getResult();
+    }
+
+    InvokableTypeImpl(VirtualMachine aVm, long aRef) {
+        super(aVm, aRef);
+    }
+
+    /**
+     * Method invocation support.
+     * Shared by ClassType and InterfaceType
+     * @param threadIntf the thread in which to invoke.
+     * @param methodIntf method the {@link Method} to invoke.
+     * @param origArguments the list of {@link Value} arguments bound to the
+     * invoked method. Values from the list are assigned to arguments
+     * in the order they appear in the method signature.
+     * @param options the integer bit flag options.
+     * @return a {@link Value} mirror of the invoked method's return value.
+     * @throws java.lang.IllegalArgumentException if the method is not
+     * a member of this type, if the size of the argument list
+     * does not match the number of declared arguments for the method, or
+     * if the method is not static or is a static initializer.
+     * @throws {@link InvalidTypeException} if any argument in the
+     * argument list is not assignable to the corresponding method argument
+     * type.
+     * @throws ClassNotLoadedException if any argument type has not yet been loaded
+     * through the appropriate class loader.
+     * @throws IncompatibleThreadStateException if the specified thread has not
+     * been suspended by an event.
+     * @throws InvocationException if the method invocation resulted in
+     * an exception in the target VM.
+     * @throws InvalidTypeException If the arguments do not meet this requirement --
+     *         Object arguments must be assignment compatible with the argument
+     *         type.  This implies that the argument type must be
+     *         loaded through the enclosing class's class loader.
+     *         Primitive arguments must be either assignment compatible with the
+     *         argument type or must be convertible to the argument type without loss
+     *         of information. See JLS section 5.2 for more information on assignment
+     *         compatibility.
+     * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
+     */
+    final public Value invokeMethod(ThreadReference threadIntf, Method methodIntf,
+                                    List<? extends Value> origArguments, int options)
+                                        throws InvalidTypeException,
+                                               ClassNotLoadedException,
+                                               IncompatibleThreadStateException,
+                                               InvocationException {
+        validateMirror(threadIntf);
+        validateMirror(methodIntf);
+        validateMirrorsOrNulls(origArguments);
+        MethodImpl method = (MethodImpl) methodIntf;
+        ThreadReferenceImpl thread = (ThreadReferenceImpl) threadIntf;
+        validateMethodInvocation(method);
+        List<? extends Value> arguments = method.validateAndPrepareArgumentsForInvoke(origArguments);
+        ValueImpl[] args = arguments.toArray(new ValueImpl[0]);
+        InvocationResult ret;
+        try {
+            PacketStream stream = sendInvokeCommand(thread, method, args, options);
+            ret = waitForReply(stream);
+        } catch (JDWPException exc) {
+            if (exc.errorCode() == JDWP.Error.INVALID_THREAD) {
+                throw new IncompatibleThreadStateException();
+            } else {
+                throw exc.toJDIException();
+            }
+        }
+        /*
+         * There is an implict VM-wide suspend at the conclusion
+         * of a normal (non-single-threaded) method invoke
+         */
+        if ((options & ClassType.INVOKE_SINGLE_THREADED) == 0) {
+            vm.notifySuspend();
+        }
+        if (ret.getException() != null) {
+            throw new InvocationException(ret.getException());
+        } else {
+            return ret.getResult();
+        }
+    }
+
+    @Override
+    boolean isAssignableTo(ReferenceType type) {
+        ClassTypeImpl superclazz = (ClassTypeImpl) superclass();
+        if (this.equals(type)) {
+            return true;
+        } else if ((superclazz != null) && superclazz.isAssignableTo(type)) {
+            return true;
+        } else {
+            List<InterfaceType> interfaces = interfaces();
+            Iterator<InterfaceType> iter = interfaces.iterator();
+            while (iter.hasNext()) {
+                InterfaceTypeImpl interfaze = (InterfaceTypeImpl) iter.next();
+                if (interfaze.isAssignableTo(type)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    @Override
+    final void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces) {
+        /*
+         * Add methods from
+         * parent types first, so that the methods in this class will
+         * overwrite them in the hash table
+         */
+        Iterator<InterfaceType> iter = interfaces().iterator();
+        while (iter.hasNext()) {
+            InterfaceTypeImpl interfaze = (InterfaceTypeImpl) iter.next();
+            if (!seenInterfaces.contains(interfaze)) {
+                interfaze.addVisibleMethods(methodMap, seenInterfaces);
+                seenInterfaces.add(interfaze);
+            }
+        }
+        ClassTypeImpl clazz = (ClassTypeImpl) superclass();
+        if (clazz != null) {
+            clazz.addVisibleMethods(methodMap, seenInterfaces);
+        }
+        addToMethodMap(methodMap, methods());
+    }
+
+    final void addInterfaces(List<InterfaceType> list) {
+        List<InterfaceType> immediate = interfaces();
+        list.addAll(interfaces());
+        Iterator<InterfaceType> iter = immediate.iterator();
+        while (iter.hasNext()) {
+            InterfaceTypeImpl interfaze = (InterfaceTypeImpl) iter.next();
+            interfaze.addInterfaces(list);
+        }
+        ClassTypeImpl superclass = (ClassTypeImpl) superclass();
+        if (superclass != null) {
+            superclass.addInterfaces(list);
+        }
+    }
+
+    /**
+     * Returns all the implemented interfaces recursively
+     * @return A list of all the implemented interfaces (recursively)
+     */
+    final List<InterfaceType> getAllInterfaces() {
+        List<InterfaceType> all = new ArrayList<>();
+        addInterfaces(all);
+        return all;
+    }
+
+    /**
+     * Shared implementation of {@linkplain ClassType#allMethods()} and
+     * {@linkplain InterfaceType#allMethods()}
+     * @return A list of all methods (recursively)
+     */
+    public final List<Method> allMethods() {
+        ArrayList<Method> list = new ArrayList<>(methods());
+        ClassType clazz = superclass();
+        while (clazz != null) {
+            list.addAll(clazz.methods());
+            clazz = clazz.superclass();
+        }
+        /*
+         * Avoid duplicate checking on each method by iterating through
+         * duplicate-free allInterfaces() rather than recursing
+         */
+        for (InterfaceType interfaze : getAllInterfaces()) {
+            list.addAll(interfaze.methods());
+        }
+        return list;
+    }
+
+    @Override
+    final List<ReferenceType> inheritedTypes() {
+        List<ReferenceType> inherited = new ArrayList<>();
+        if (superclass() != null) {
+            inherited.add(0, superclass()); /* insert at front */
+        }
+        for (ReferenceType rt : interfaces()) {
+            inherited.add(rt);
+        }
+        return inherited;
+    }
+
+    private PacketStream sendInvokeCommand(final ThreadReferenceImpl thread,
+                                           final MethodImpl method,
+                                           final ValueImpl[] args,
+                                           final int options) {
+        CommandSender sender = getInvokeMethodSender(thread, method, args, options);
+        PacketStream stream;
+        if ((options & ClassType.INVOKE_SINGLE_THREADED) != 0) {
+            stream = thread.sendResumingCommand(sender);
+        } else {
+            stream = vm.sendResumingCommand(sender);
+        }
+        return stream;
+    }
+
+    private void validateMethodInvocation(Method method)
+                                            throws InvalidTypeException,
+                                                   InvocationException {
+        if (!canInvoke(method)) {
+            throw new IllegalArgumentException("Invalid method");
+        }
+        /*
+         * Method must be a static and not a static initializer
+         */
+        if (!method.isStatic()) {
+            throw new IllegalArgumentException("Cannot invoke instance method on a class/interface type");
+        } else if (method.isStaticInitializer()) {
+            throw new IllegalArgumentException("Cannot invoke static initializer");
+        }
+    }
+
+    /**
+     * A subclass will provide specific {@linkplain CommandSender}
+     * @param thread the current invocation thread
+     * @param method the method to invoke
+     * @param args the arguments to pass to the method
+     * @param options the integer bit flag options
+     * @return the specific {@literal CommandSender} instance
+     */
+    abstract CommandSender getInvokeMethodSender(ThreadReferenceImpl thread,
+                                                 MethodImpl method,
+                                                 ValueImpl[] args,
+                                                 int options);
+
+    /**
+     * Waits for the reply to the last sent command
+     * @param stream the stream to listen for the reply on
+     * @return the {@linkplain InvocationResult} instance
+     * @throws JDWPException when something goes wrong in JDWP
+     */
+    abstract InvocationResult waitForReply(PacketStream stream) throws JDWPException;
+
+    /**
+     * Get the {@linkplain ReferenceType} superclass
+     * @return the superclass or null
+     */
+    abstract ClassType superclass();
+
+    /**
+     * Get the implemented/extended interfaces
+     * @return the list of implemented/extended interfaces
+     */
+    abstract List<InterfaceType> interfaces();
+
+    /**
+     * Checks the provided method whether it can be invoked
+     * @param method the method to check
+     * @return {@code TRUE} if the implementation knows how to invoke the method,
+     *         {@code FALSE} otherwise
+     */
+    abstract boolean canInvoke(Method method);
+}
--- a/src/share/classes/com/sun/tools/jdi/MethodImpl.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/MethodImpl.java	Mon May 05 12:49:13 2014 -0700
@@ -187,6 +187,13 @@
         return isModifierSet(VMModifiers.ABSTRACT);
     }
 
+    public boolean isDefault() {
+        return !isModifierSet(VMModifiers.ABSTRACT) &&
+               !isModifierSet(VMModifiers.STATIC) &&
+               !isModifierSet(VMModifiers.PRIVATE) &&
+               declaringType() instanceof InterfaceType;
+    }
+
     public boolean isSynchronized() {
         return isModifierSet(VMModifiers.SYNCHRONIZED);
     }
--- a/src/share/classes/com/sun/tools/jdi/ObjectReferenceImpl.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/ObjectReferenceImpl.java	Mon May 05 12:49:13 2014 -0700
@@ -277,7 +277,6 @@
     void validateMethodInvocation(Method method, int options)
                                          throws InvalidTypeException,
                                          InvocationException {
-
         /*
          * Method must be in this object's class, a superclass, or
          * implemented interface
@@ -287,6 +286,19 @@
             throw new IllegalArgumentException("Invalid method");
         }
 
+        if (declType instanceof ClassTypeImpl) {
+            validateClassMethodInvocation(method, options);
+        } else if (declType instanceof InterfaceTypeImpl) {
+            validateIfaceMethodInvocation(method, options);
+        } else {
+            throw new InvalidTypeException();
+        }
+    }
+
+    void validateClassMethodInvocation(Method method, int options)
+                                         throws InvalidTypeException,
+                                         InvocationException {
+
         ClassTypeImpl clazz = invokableReferenceType(method);
 
         /*
@@ -300,9 +312,7 @@
          * For nonvirtual invokes, method must have a body
          */
         if ((options & INVOKE_NONVIRTUAL) != 0) {
-            if (method.declaringType() instanceof InterfaceType) {
-                throw new IllegalArgumentException("Interface method");
-            } else if (method.isAbstract()) {
+            if (method.isAbstract()) {
                 throw new IllegalArgumentException("Abstract method");
             }
         }
@@ -324,7 +334,7 @@
              */
             Method invoker = clazz.concreteMethodByName(method.name(),
                                                         method.signature());
-            //  isAssignableFrom check above guarantees non-null
+            //  invoker is supposed to be non-null under normal circumstances
             invokedClass = (ClassTypeImpl)invoker.declaringType();
         }
         /* The above code is left over from previous versions.
@@ -332,6 +342,17 @@
          */
     }
 
+    void validateIfaceMethodInvocation(Method method, int options)
+                                         throws InvalidTypeException,
+                                         InvocationException {
+        /*
+         * Only default methods allowed for nonvirtual invokes
+         */
+        if (!method.isDefault()) {
+            throw new IllegalArgumentException("Not a default method");
+        }
+    }
+
     PacketStream sendInvokeCommand(final ThreadReferenceImpl thread,
                                    final ClassTypeImpl refType,
                                    final MethodImpl method,
@@ -370,7 +391,10 @@
         ThreadReferenceImpl thread = (ThreadReferenceImpl)threadIntf;
 
         if (method.isStatic()) {
-            if (referenceType() instanceof ClassType) {
+            if (referenceType() instanceof InterfaceType) {
+                InterfaceType type = (InterfaceType)referenceType();
+                return type.invokeMethod(thread, method, origArguments, options);
+            } else if (referenceType() instanceof ClassType) {
                 ClassType type = (ClassType)referenceType();
                 return type.invokeMethod(thread, method, origArguments, options);
             } else {
--- a/src/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/VirtualMachineManagerImpl.java	Mon May 05 12:49:13 2014 -0700
@@ -48,7 +48,7 @@
     private ResourceBundle messages = null;
     private int vmSequenceNumber = 0;
     private static final int majorVersion = 1;
-    private static final int minorVersion = 6;
+    private static final int minorVersion = 8;
 
     private static final Object lock = new Object();
     private static VirtualMachineManagerImpl vmm;
--- a/src/share/classes/java/lang/Math.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/lang/Math.java	Mon May 05 12:49:13 2014 -0700
@@ -1904,51 +1904,36 @@
          * are naturally handled without any additional testing
          */
 
-        // First check for NaN values
-        if (Double.isNaN(start) || Double.isNaN(direction)) {
-            // return a NaN derived from the input NaN(s)
-            return start + direction;
+        /*
+         * IEEE 754 floating-point numbers are lexicographically
+         * ordered if treated as signed-magnitude integers.
+         * Since Java's integers are two's complement,
+         * incrementing the two's complement representation of a
+         * logically negative floating-point value *decrements*
+         * the signed-magnitude representation. Therefore, when
+         * the integer representation of a floating-point value
+         * is negative, the adjustment to the representation is in
+         * the opposite direction from what would initially be expected.
+         */
+
+        // Branch to descending case first as it is more costly than ascending
+        // case due to start != 0.0d conditional.
+        if (start > direction) { // descending
+            if (start != 0.0d) {
+                final long transducer = Double.doubleToRawLongBits(start);
+                return Double.longBitsToDouble(transducer + ((transducer > 0L) ? -1L : 1L));
+            } else { // start == 0.0d && direction < 0.0d
+                return -Double.MIN_VALUE;
+            }
+        } else if (start < direction) { // ascending
+            // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0)
+            // then bitwise convert start to integer.
+            final long transducer = Double.doubleToRawLongBits(start + 0.0d);
+            return Double.longBitsToDouble(transducer + ((transducer >= 0L) ? 1L : -1L));
         } else if (start == direction) {
             return direction;
-        } else {        // start > direction or start < direction
-            // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0)
-            // then bitwise convert start to integer.
-            long transducer = Double.doubleToRawLongBits(start + 0.0d);
-
-            /*
-             * IEEE 754 floating-point numbers are lexicographically
-             * ordered if treated as signed- magnitude integers .
-             * Since Java's integers are two's complement,
-             * incrementing" the two's complement representation of a
-             * logically negative floating-point value *decrements*
-             * the signed-magnitude representation. Therefore, when
-             * the integer representation of a floating-point values
-             * is less than zero, the adjustment to the representation
-             * is in the opposite direction than would be expected at
-             * first .
-             */
-            if (direction > start) { // Calculate next greater value
-                transducer = transducer + (transducer >= 0L ? 1L:-1L);
-            } else  { // Calculate next lesser value
-                assert direction < start;
-                if (transducer > 0L)
-                    --transducer;
-                else
-                    if (transducer < 0L )
-                        ++transducer;
-                    /*
-                     * transducer==0, the result is -MIN_VALUE
-                     *
-                     * The transition from zero (implicitly
-                     * positive) to the smallest negative
-                     * signed magnitude value must be done
-                     * explicitly.
-                     */
-                    else
-                        transducer = DoubleConsts.SIGN_BIT_MASK | 1L;
-            }
-
-            return Double.longBitsToDouble(transducer);
+        } else { // isNaN(start) || isNaN(direction)
+            return start + direction;
         }
     }
 
@@ -2003,51 +1988,36 @@
          * are naturally handled without any additional testing
          */
 
-        // First check for NaN values
-        if (Float.isNaN(start) || Double.isNaN(direction)) {
-            // return a NaN derived from the input NaN(s)
-            return start + (float)direction;
+        /*
+         * IEEE 754 floating-point numbers are lexicographically
+         * ordered if treated as signed-magnitude integers.
+         * Since Java's integers are two's complement,
+         * incrementing the two's complement representation of a
+         * logically negative floating-point value *decrements*
+         * the signed-magnitude representation. Therefore, when
+         * the integer representation of a floating-point value
+         * is negative, the adjustment to the representation is in
+         * the opposite direction from what would initially be expected.
+         */
+
+        // Branch to descending case first as it is more costly than ascending
+        // case due to start != 0.0f conditional.
+        if (start > direction) { // descending
+            if (start != 0.0f) {
+                final int transducer = Float.floatToRawIntBits(start);
+                return Float.intBitsToFloat(transducer + ((transducer > 0) ? -1 : 1));
+            } else { // start == 0.0f && direction < 0.0f
+                return -Float.MIN_VALUE;
+            }
+        } else if (start < direction) { // ascending
+            // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0)
+            // then bitwise convert start to integer.
+            final int transducer = Float.floatToRawIntBits(start + 0.0f);
+            return Float.intBitsToFloat(transducer + ((transducer >= 0) ? 1 : -1));
         } else if (start == direction) {
             return (float)direction;
-        } else {        // start > direction or start < direction
-            // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0)
-            // then bitwise convert start to integer.
-            int transducer = Float.floatToRawIntBits(start + 0.0f);
-
-            /*
-             * IEEE 754 floating-point numbers are lexicographically
-             * ordered if treated as signed- magnitude integers .
-             * Since Java's integers are two's complement,
-             * incrementing" the two's complement representation of a
-             * logically negative floating-point value *decrements*
-             * the signed-magnitude representation. Therefore, when
-             * the integer representation of a floating-point values
-             * is less than zero, the adjustment to the representation
-             * is in the opposite direction than would be expected at
-             * first.
-             */
-            if (direction > start) {// Calculate next greater value
-                transducer = transducer + (transducer >= 0 ? 1:-1);
-            } else  { // Calculate next lesser value
-                assert direction < start;
-                if (transducer > 0)
-                    --transducer;
-                else
-                    if (transducer < 0 )
-                        ++transducer;
-                    /*
-                     * transducer==0, the result is -MIN_VALUE
-                     *
-                     * The transition from zero (implicitly
-                     * positive) to the smallest negative
-                     * signed magnitude value must be done
-                     * explicitly.
-                     */
-                    else
-                        transducer = FloatConsts.SIGN_BIT_MASK | 1;
-            }
-
-            return Float.intBitsToFloat(transducer);
+        } else { // isNaN(start) || isNaN(direction)
+            return start + (float)direction;
         }
     }
 
@@ -2077,12 +2047,13 @@
      * @since 1.6
      */
     public static double nextUp(double d) {
-        if( Double.isNaN(d) || d == Double.POSITIVE_INFINITY)
+        // Use a single conditional and handle the likely cases first.
+        if (d < Double.POSITIVE_INFINITY) {
+            // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0).
+            final long transducer = Double.doubleToRawLongBits(d + 0.0D);
+            return Double.longBitsToDouble(transducer + ((transducer >= 0L) ? 1L : -1L));
+        } else { // d is NaN or +Infinity
             return d;
-        else {
-            d += 0.0d;
-            return Double.longBitsToDouble(Double.doubleToRawLongBits(d) +
-                                           ((d >= 0.0d)?+1L:-1L));
         }
     }
 
@@ -2112,12 +2083,13 @@
      * @since 1.6
      */
     public static float nextUp(float f) {
-        if( Float.isNaN(f) || f == FloatConsts.POSITIVE_INFINITY)
+        // Use a single conditional and handle the likely cases first.
+        if (f < Float.POSITIVE_INFINITY) {
+            // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0).
+            final int transducer = Float.floatToRawIntBits(f + 0.0F);
+            return Float.intBitsToFloat(transducer + ((transducer >= 0) ? 1 : -1));
+        } else { // f is NaN or +Infinity
             return f;
-        else {
-            f += 0.0f;
-            return Float.intBitsToFloat(Float.floatToRawIntBits(f) +
-                                        ((f >= 0.0f)?+1:-1));
         }
     }
 
--- a/src/share/classes/java/nio/package.html	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/nio/package.html	Mon May 05 12:49:13 2014 -0700
@@ -121,7 +121,7 @@
   available.  </p></li>
 
   <li><p> A byte buffer provides access to its content as either a heterogeneous
-  or homogeneous sequence of <a href="ByteBuffer.html#bin">binary data</i></a>
+  or homogeneous sequence of <a href="ByteBuffer.html#bin"><i>binary data</i></a>
   of any non-boolean primitive type, in either big-endian or little-endian <a
   href="ByteOrder.html">byte order</a>.  </p></li>
 
--- a/src/share/classes/java/sql/package.html	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/sql/package.html	Mon May 05 12:49:13 2014 -0700
@@ -323,10 +323,10 @@
 
 <ul>
   <li><a href="http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html">
-          Lesson:JDBC Basics(The Javaxx Tutorials &gt; JDBC(&#0153;) Database Access)</a>
+          Lesson:JDBC Basics(The Javaxx Tutorials &gt; JDBC&trade; Database Access)</a>
 
  <li><a href="http://www.oracle.com/technetwork/java/index-142838.html">
-          <i>JDBC&#0153;API Tutorial and Reference, Third Edition</i></a>
+          <i>JDBC&trade; API Tutorial and Reference, Third Edition</i></a>
 </ul>
 
 </body>
--- a/src/share/classes/java/time/DayOfWeek.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/DayOfWeek.java	Mon May 05 12:49:13 2014 -0700
@@ -201,7 +201,7 @@
      * Gets the day-of-week {@code int} value.
      * <p>
      * The values are numbered following the ISO-8601 standard, from 1 (Monday) to 7 (Sunday).
-     * See {@link WeekFields#dayOfWeek} for localized week-numbering.
+     * See {@link java.time.temporal.WeekFields#dayOfWeek()} for localized week-numbering.
      *
      * @return the day-of-week, from 1 (Monday) to 7 (Sunday)
      */
@@ -288,7 +288,7 @@
     /**
      * Gets the value of the specified field from this day-of-week as an {@code int}.
      * <p>
-     * This queries this day-of-week for the value for the specified field.
+     * This queries this day-of-week for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -321,7 +321,7 @@
     /**
      * Gets the value of the specified field from this day-of-week as a {@code long}.
      * <p>
-     * This queries this day-of-week for the value for the specified field.
+     * This queries this day-of-week for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -419,7 +419,7 @@
      * The adjustment is equivalent to using {@link Temporal#with(TemporalField, long)}
      * passing {@link ChronoField#DAY_OF_WEEK} as the field.
      * Note that this adjusts forwards or backwards within a Monday to Sunday week.
-     * See {@link WeekFields#dayOfWeek} for localized week start days.
+     * See {@link java.time.temporal.WeekFields#dayOfWeek()} for localized week start days.
      * See {@code TemporalAdjuster} for other adjusters with more control,
      * such as {@code next(MONDAY)}.
      * <p>
--- a/src/share/classes/java/time/Duration.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/Duration.java	Mon May 05 12:49:13 2014 -0700
@@ -546,7 +546,7 @@
      * They are returned in the order seconds, nanos.
      * <p>
      * This set can be used in conjunction with {@link #get(TemporalUnit)}
-     * to access the entire state of the period.
+     * to access the entire state of the duration.
      *
      * @return a list containing the seconds and nanos units, not null
      */
@@ -686,8 +686,8 @@
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param amountToAdd  the amount of the period, measured in terms of the unit, positive or negative
-     * @param unit  the unit that the period is measured in, must have an exact duration, not null
+     * @param amountToAdd  the amount to add, measured in terms of the unit, positive or negative
+     * @param unit  the unit that the amount is measured in, must have an exact duration, not null
      * @return a {@code Duration} based on this duration with the specified duration added, not null
      * @throws UnsupportedTemporalTypeException if the unit is not supported
      * @throws ArithmeticException if numeric overflow occurs
@@ -848,8 +848,8 @@
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param amountToSubtract  the amount of the period, measured in terms of the unit, positive or negative
-     * @param unit  the unit that the period is measured in, must have an exact duration, not null
+     * @param amountToSubtract  the amount to subtract, measured in terms of the unit, positive or negative
+     * @param unit  the unit that the amount is measured in, must have an exact duration, not null
      * @return a {@code Duration} based on this duration with the specified duration subtracted, not null
      * @throws ArithmeticException if numeric overflow occurs
      */
--- a/src/share/classes/java/time/Instant.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/Instant.java	Mon May 05 12:49:13 2014 -0700
@@ -530,7 +530,7 @@
     /**
      * Gets the value of the specified field from this instant as an {@code int}.
      * <p>
-     * This queries this instant for the value for the specified field.
+     * This queries this instant for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -571,7 +571,7 @@
     /**
      * Gets the value of the specified field from this instant as a {@code long}.
      * <p>
-     * This queries this instant for the value for the specified field.
+     * This queries this instant for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
--- a/src/share/classes/java/time/LocalDate.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/LocalDate.java	Mon May 05 12:49:13 2014 -0700
@@ -280,7 +280,7 @@
      * @param dayOfYear  the day-of-year to represent, from 1 to 366
      * @return the local date, not null
      * @throws DateTimeException if the value of any field is out of range,
-     *  or if the day-of-year is invalid for the month-year
+     *  or if the day-of-year is invalid for the year
      */
     public static LocalDate ofYearDay(int year, int dayOfYear) {
         YEAR.checkValidValue(year);
@@ -308,7 +308,7 @@
      *
      * @param epochDay  the Epoch Day to convert, based on the epoch 1970-01-01
      * @return the local date, not null
-     * @throws DateTimeException if the epoch days exceeds the supported date range
+     * @throws DateTimeException if the epoch day exceeds the supported date range
      */
     public static LocalDate ofEpochDay(long epochDay) {
         long zeroDay = epochDay + DAYS_0000_TO_1970;
@@ -515,7 +515,7 @@
     /**
      * Checks if the specified unit is supported.
      * <p>
-     * This checks if the specified unit can be added to, or subtracted from, this date-time.
+     * This checks if the specified unit can be added to, or subtracted from, this date.
      * If false, then calling the {@link #plus(long, TemporalUnit)} and
      * {@link #minus(long, TemporalUnit) minus} methods will throw an exception.
      * <p>
@@ -592,7 +592,7 @@
     /**
      * Gets the value of the specified field from this date as an {@code int}.
      * <p>
-     * This queries this date for the value for the specified field.
+     * This queries this date for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -600,7 +600,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date, except {@code EPOCH_DAY} and {@code PROLEPTIC_MONTH}
-     * which are too large to fit in an {@code int} and throw a {@code DateTimeException}.
+     * which are too large to fit in an {@code int} and throw an {@code UnsupportedTemporalTypeException}.
      * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
@@ -627,7 +627,7 @@
     /**
      * Gets the value of the specified field from this date as a {@code long}.
      * <p>
-     * This queries this date for the value for the specified field.
+     * This queries this date for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -875,7 +875,9 @@
      * <p>
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
+     * <p>
+     * A selection of common adjustments is provided in
+     * {@link java.time.temporal.TemporalAdjusters TemporalAdjusters}.
      * These include finding the "last day of the month" and "next Wednesday".
      * Key date-time classes also implement the {@code TemporalAdjuster} interface,
      * such as {@link Month} and {@link java.time.MonthDay MonthDay}.
@@ -885,7 +887,7 @@
      * For example this code returns a date on the last day of July:
      * <pre>
      *  import static java.time.Month.*;
-     *  import static java.time.temporal.Adjusters.*;
+     *  import static java.time.temporal.TemporalAdjusters.*;
      *
      *  result = localDate.with(JULY).with(lastDayOfMonth());
      * </pre>
@@ -1041,7 +1043,8 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this date with the year altered.
+     * Returns a copy of this {@code LocalDate} with the year altered.
+     * <p>
      * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
      * <p>
      * This instance is immutable and unaffected by this method call.
@@ -1059,7 +1062,8 @@
     }
 
     /**
-     * Returns a copy of this date with the month-of-year altered.
+     * Returns a copy of this {@code LocalDate} with the month-of-year altered.
+     * <p>
      * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
      * <p>
      * This instance is immutable and unaffected by this method call.
@@ -1077,7 +1081,8 @@
     }
 
     /**
-     * Returns a copy of this date with the day-of-month altered.
+     * Returns a copy of this {@code LocalDate} with the day-of-month altered.
+     * <p>
      * If the resulting date is invalid, an exception is thrown.
      * <p>
      * This instance is immutable and unaffected by this method call.
@@ -1095,7 +1100,8 @@
     }
 
     /**
-     * Returns a copy of this date with the day-of-year altered.
+     * Returns a copy of this {@code LocalDate} with the day-of-year altered.
+     * <p>
      * If the resulting date is invalid, an exception is thrown.
      * <p>
      * This instance is immutable and unaffected by this method call.
@@ -1245,7 +1251,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalDate} with the specified period in years added.
+     * Returns a copy of this {@code LocalDate} with the specified number of years added.
      * <p>
      * This method adds the specified amount to the years field in three steps:
      * <ol>
@@ -1273,7 +1279,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDate} with the specified period in months added.
+     * Returns a copy of this {@code LocalDate} with the specified number of months added.
      * <p>
      * This method adds the specified amount to the months field in three steps:
      * <ol>
@@ -1304,7 +1310,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDate} with the specified period in weeks added.
+     * Returns a copy of this {@code LocalDate} with the specified number of weeks added.
      * <p>
      * This method adds the specified amount in weeks to the days field incrementing
      * the month and year fields as necessary to ensure the result remains valid.
@@ -1402,11 +1408,11 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalDate} with the specified period in years subtracted.
+     * Returns a copy of this {@code LocalDate} with the specified number of years subtracted.
      * <p>
      * This method subtracts the specified amount from the years field in three steps:
      * <ol>
-     * <li>Subtract the input years to the year field</li>
+     * <li>Subtract the input years from the year field</li>
      * <li>Check if the resulting date would be invalid</li>
      * <li>Adjust the day-of-month to the last valid day if necessary</li>
      * </ol>
@@ -1426,11 +1432,11 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDate} with the specified period in months subtracted.
+     * Returns a copy of this {@code LocalDate} with the specified number of months subtracted.
      * <p>
      * This method subtracts the specified amount from the months field in three steps:
      * <ol>
-     * <li>Subtract the input months to the month-of-year field</li>
+     * <li>Subtract the input months from the month-of-year field</li>
      * <li>Check if the resulting date would be invalid</li>
      * <li>Adjust the day-of-month to the last valid day if necessary</li>
      * </ol>
@@ -1450,7 +1456,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDate} with the specified period in weeks subtracted.
+     * Returns a copy of this {@code LocalDate} with the specified number of weeks subtracted.
      * <p>
      * This method subtracts the specified amount in weeks from the days field decrementing
      * the month and year fields as necessary to ensure the result remains valid.
--- a/src/share/classes/java/time/LocalDateTime.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/LocalDateTime.java	Mon May 05 12:49:13 2014 -0700
@@ -428,7 +428,7 @@
     /**
      * Obtains an instance of {@code LocalDateTime} from a temporal object.
      * <p>
-     * This obtains an offset time based on the specified temporal.
+     * This obtains a local date-time based on the specified temporal.
      * A {@code TemporalAccessor} represents an arbitrary set of date and time information,
      * which this factory converts to an instance of {@code LocalDateTime}.
      * <p>
@@ -656,7 +656,7 @@
     /**
      * Gets the value of the specified field from this date-time as an {@code int}.
      * <p>
-     * This queries this date-time for the value for the specified field.
+     * This queries this date-time for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -665,7 +665,7 @@
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time, except {@code NANO_OF_DAY}, {@code MICRO_OF_DAY},
      * {@code EPOCH_DAY} and {@code PROLEPTIC_MONTH} which are too large to fit in
-     * an {@code int} and throw a {@code DateTimeException}.
+     * an {@code int} and throw a {@code UnsupportedTemporalTypeException}.
      * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
@@ -693,7 +693,7 @@
     /**
      * Gets the value of the specified field from this date-time as a {@code long}.
      * <p>
-     * This queries this date-time for the value for the specified field.
+     * This queries this date-time for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -878,7 +878,9 @@
      * <p>
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
+     * <p>
+     * A selection of common adjustments is provided in
+     * {@link java.time.temporal.TemporalAdjusters TemporalAdjusters}.
      * These include finding the "last day of the month" and "next Wednesday".
      * Key date-time classes also implement the {@code TemporalAdjuster} interface,
      * such as {@link Month} and {@link java.time.MonthDay MonthDay}.
@@ -888,7 +890,7 @@
      * For example this code returns a date on the last day of July:
      * <pre>
      *  import static java.time.Month.*;
-     *  import static java.time.temporal.Adjusters.*;
+     *  import static java.time.temporal.TemporalAdjusters.*;
      *
      *  result = localDateTime.with(JULY).with(lastDayOfMonth());
      * </pre>
@@ -974,6 +976,7 @@
     //-----------------------------------------------------------------------
     /**
      * Returns a copy of this {@code LocalDateTime} with the year altered.
+     * <p>
      * The time does not affect the calculation and will be the same in the result.
      * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
      * <p>
@@ -989,6 +992,7 @@
 
     /**
      * Returns a copy of this {@code LocalDateTime} with the month-of-year altered.
+     * <p>
      * The time does not affect the calculation and will be the same in the result.
      * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
      * <p>
@@ -1004,7 +1008,8 @@
 
     /**
      * Returns a copy of this {@code LocalDateTime} with the day-of-month altered.
-     * If the resulting {@code LocalDateTime} is invalid, an exception is thrown.
+     * <p>
+     * If the resulting date-time is invalid, an exception is thrown.
      * The time does not affect the calculation and will be the same in the result.
      * <p>
      * This instance is immutable and unaffected by this method call.
@@ -1020,7 +1025,8 @@
 
     /**
      * Returns a copy of this {@code LocalDateTime} with the day-of-year altered.
-     * If the resulting {@code LocalDateTime} is invalid, an exception is thrown.
+     * <p>
+     * If the resulting date-time is invalid, an exception is thrown.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1035,7 +1041,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalDateTime} with the hour-of-day value altered.
+     * Returns a copy of this {@code LocalDateTime} with the hour-of-day altered.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1049,7 +1055,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the minute-of-hour value altered.
+     * Returns a copy of this {@code LocalDateTime} with the minute-of-hour altered.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1063,7 +1069,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the second-of-minute value altered.
+     * Returns a copy of this {@code LocalDateTime} with the second-of-minute altered.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1077,7 +1083,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the nano-of-second value altered.
+     * Returns a copy of this {@code LocalDateTime} with the nano-of-second altered.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1109,7 +1115,7 @@
      * @param unit  the unit to truncate to, not null
      * @return a {@code LocalDateTime} based on this date-time with the time truncated, not null
      * @throws DateTimeException if unable to truncate
-     * @throws UnsupportedTemporalTypeException if the field is not supported
+     * @throws UnsupportedTemporalTypeException if the unit is not supported
      */
     public LocalDateTime truncatedTo(TemporalUnit unit) {
         return with(date, time.truncatedTo(unit));
@@ -1192,7 +1198,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in years added.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of years added.
      * <p>
      * This method adds the specified amount to the years field in three steps:
      * <ol>
@@ -1217,7 +1223,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in months added.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of months added.
      * <p>
      * This method adds the specified amount to the months field in three steps:
      * <ol>
@@ -1242,7 +1248,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in weeks added.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of weeks added.
      * <p>
      * This method adds the specified amount in weeks to the days field incrementing
      * the month and year fields as necessary to ensure the result remains valid.
@@ -1262,7 +1268,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in days added.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of days added.
      * <p>
      * This method adds the specified amount to the days field incrementing the
      * month and year fields as necessary to ensure the result remains valid.
@@ -1283,7 +1289,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in hours added.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of hours added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1296,7 +1302,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in minutes added.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of minutes added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1309,7 +1315,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in seconds added.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of seconds added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1322,7 +1328,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in nanoseconds added.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of nanoseconds added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1391,7 +1397,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in years subtracted.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of years subtracted.
      * <p>
      * This method subtracts the specified amount from the years field in three steps:
      * <ol>
@@ -1415,7 +1421,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in months subtracted.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of months subtracted.
      * <p>
      * This method subtracts the specified amount from the months field in three steps:
      * <ol>
@@ -1439,7 +1445,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in weeks subtracted.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of weeks subtracted.
      * <p>
      * This method subtracts the specified amount in weeks from the days field decrementing
      * the month and year fields as necessary to ensure the result remains valid.
@@ -1458,9 +1464,9 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in days subtracted.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of days subtracted.
      * <p>
-     * This method subtracts the specified amount from the days field incrementing the
+     * This method subtracts the specified amount from the days field decrementing the
      * month and year fields as necessary to ensure the result remains valid.
      * The result is only invalid if the maximum/minimum year is exceeded.
      * <p>
@@ -1478,7 +1484,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in hours subtracted.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of hours subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1491,7 +1497,7 @@
    }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in minutes subtracted.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of minutes subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1504,7 +1510,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in seconds subtracted.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of seconds subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1517,7 +1523,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalDateTime} with the specified period in nanoseconds subtracted.
+     * Returns a copy of this {@code LocalDateTime} with the specified number of nanoseconds subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1575,7 +1581,7 @@
      * what the result of this method will be.
      * <p>
      * The result of this method is obtained by invoking the
-     * {@link java.time.temporal.TemporalQuery#queryFrom(TemporalAccessor)} method on the
+     * {@link TemporalQuery#queryFrom(TemporalAccessor)} method on the
      * specified query passing {@code this} as the argument.
      *
      * @param <R> the type of the result
--- a/src/share/classes/java/time/LocalTime.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/LocalTime.java	Mon May 05 12:49:13 2014 -0700
@@ -93,7 +93,7 @@
 import java.util.Objects;
 
 /**
- * A time without time-zone in the ISO-8601 calendar system,
+ * A time without a time-zone in the ISO-8601 calendar system,
  * such as {@code 10:15:30}.
  * <p>
  * {@code LocalTime} is an immutable date-time object that represents a time,
@@ -101,7 +101,7 @@
  * Time is represented to nanosecond precision.
  * For example, the value "13:45.30.123456789" can be stored in a {@code LocalTime}.
  * <p>
- * It does not store or represent a date or time-zone.
+ * This class does not store or represent a date or time-zone.
  * Instead, it is a description of the local time as seen on a wall clock.
  * It cannot represent an instant on the time-line without additional information
  * such as an offset or time-zone.
@@ -280,7 +280,7 @@
         return ofNanoOfDay(secsOfDay * NANOS_PER_SECOND + now.getNano());
     }
 
-    //------------------------get-----------------------------------------------
+    //-----------------------------------------------------------------------
     /**
      * Obtains an instance of {@code LocalTime} from an hour and minute.
      * <p>
@@ -395,7 +395,7 @@
      * on extracting the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY} field.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code LocalTime::from}.
+     * allowing it to be used as a query via method reference, {@code LocalTime::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the local time, not null
@@ -418,7 +418,7 @@
      * The string must represent a valid time and is parsed using
      * {@link java.time.format.DateTimeFormatter#ISO_LOCAL_TIME}.
      *
-     * @param text the text to parse such as "10:15:30", not null
+     * @param text  the text to parse such as "10:15:30", not null
      * @return the parsed local time, not null
      * @throws DateTimeParseException if the text cannot be parsed
      */
@@ -524,7 +524,7 @@
     /**
      * Checks if the specified unit is supported.
      * <p>
-     * This checks if the specified unit can be added to, or subtracted from, this date-time.
+     * This checks if the specified unit can be added to, or subtracted from, this time.
      * If false, then calling the {@link #plus(long, TemporalUnit)} and
      * {@link #minus(long, TemporalUnit) minus} methods will throw an exception.
      * <p>
@@ -589,7 +589,7 @@
     /**
      * Gets the value of the specified field from this time as an {@code int}.
      * <p>
-     * This queries this time for the value for the specified field.
+     * This queries this time for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -597,7 +597,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this time, except {@code NANO_OF_DAY} and {@code MICRO_OF_DAY}
-     * which are too large to fit in an {@code int} and throw a {@code DateTimeException}.
+     * which are too large to fit in an {@code int} and throw a {@code UnsupportedTemporalTypeException}.
      * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
@@ -624,7 +624,7 @@
     /**
      * Gets the value of the specified field from this time as a {@code long}.
      * <p>
-     * This queries this time for the value for the specified field.
+     * This queries this time for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -858,7 +858,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalTime} with the hour-of-day value altered.
+     * Returns a copy of this {@code LocalTime} with the hour-of-day altered.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -875,7 +875,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the minute-of-hour value altered.
+     * Returns a copy of this {@code LocalTime} with the minute-of-hour altered.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -892,7 +892,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the second-of-minute value altered.
+     * Returns a copy of this {@code LocalTime} with the second-of-minute altered.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -909,7 +909,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the nano-of-second value altered.
+     * Returns a copy of this {@code LocalTime} with the nano-of-second altered.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -929,7 +929,7 @@
     /**
      * Returns a copy of this {@code LocalTime} with the time truncated.
      * <p>
-     * Truncating the time returns a copy of the original time with fields
+     * Truncation returns a copy of the original time with fields
      * smaller than the specified unit set to zero.
      * For example, truncating with the {@link ChronoUnit#MINUTES minutes} unit
      * will set the second-of-minute and nano-of-second field to zero.
@@ -1059,7 +1059,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalTime} with the specified period in hours added.
+     * Returns a copy of this {@code LocalTime} with the specified number of hours added.
      * <p>
      * This adds the specified number of hours to this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1078,7 +1078,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the specified period in minutes added.
+     * Returns a copy of this {@code LocalTime} with the specified number of minutes added.
      * <p>
      * This adds the specified number of minutes to this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1103,7 +1103,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the specified period in seconds added.
+     * Returns a copy of this {@code LocalTime} with the specified number of seconds added.
      * <p>
      * This adds the specified number of seconds to this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1130,7 +1130,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the specified period in nanoseconds added.
+     * Returns a copy of this {@code LocalTime} with the specified number of nanoseconds added.
      * <p>
      * This adds the specified number of nanoseconds to this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1208,7 +1208,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code LocalTime} with the specified period in hours subtracted.
+     * Returns a copy of this {@code LocalTime} with the specified number of hours subtracted.
      * <p>
      * This subtracts the specified number of hours from this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1223,7 +1223,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the specified period in minutes subtracted.
+     * Returns a copy of this {@code LocalTime} with the specified number of minutes subtracted.
      * <p>
      * This subtracts the specified number of minutes from this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1238,7 +1238,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the specified period in seconds subtracted.
+     * Returns a copy of this {@code LocalTime} with the specified number of seconds subtracted.
      * <p>
      * This subtracts the specified number of seconds from this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1253,7 +1253,7 @@
     }
 
     /**
-     * Returns a copy of this {@code LocalTime} with the specified period in nanoseconds subtracted.
+     * Returns a copy of this {@code LocalTime} with the specified number of nanoseconds subtracted.
      * <p>
      * This subtracts the specified number of nanoseconds from this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1470,14 +1470,13 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Compares this {@code LocalTime} to another time.
+     * Compares this time to another time.
      * <p>
      * The comparison is based on the time-line position of the local times within a day.
      * It is "consistent with equals", as defined by {@link Comparable}.
      *
      * @param other  the other time to compare to, not null
      * @return the comparator value, negative if less, positive if greater
-     * @throws NullPointerException if {@code other} is null
      */
     @Override
     public int compareTo(LocalTime other) {
@@ -1495,26 +1494,24 @@
     }
 
     /**
-     * Checks if this {@code LocalTime} is after the specified time.
+     * Checks if this time is after the specified time.
      * <p>
      * The comparison is based on the time-line position of the time within a day.
      *
      * @param other  the other time to compare to, not null
      * @return true if this is after the specified time
-     * @throws NullPointerException if {@code other} is null
      */
     public boolean isAfter(LocalTime other) {
         return compareTo(other) > 0;
     }
 
     /**
-     * Checks if this {@code LocalTime} is before the specified time.
+     * Checks if this time is before the specified time.
      * <p>
      * The comparison is based on the time-line position of the time within a day.
      *
      * @param other  the other time to compare to, not null
      * @return true if this point is before the specified time
-     * @throws NullPointerException if {@code other} is null
      */
     public boolean isBefore(LocalTime other) {
         return compareTo(other) < 0;
--- a/src/share/classes/java/time/Month.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/Month.java	Mon May 05 12:49:13 2014 -0700
@@ -202,7 +202,7 @@
      * chronology, or can be converted to a {@code LocalDate}.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code Month::from}.
+     * allowing it to be used as a query via method reference, {@code Month::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the month-of-year, not null
@@ -315,7 +315,7 @@
     /**
      * Gets the value of the specified field from this month-of-year as an {@code int}.
      * <p>
-     * This queries this month for the value for the specified field.
+     * This queries this month for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -348,7 +348,7 @@
     /**
      * Gets the value of the specified field from this month-of-year as a {@code long}.
      * <p>
-     * This queries this month for the value for the specified field.
+     * This queries this month for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
--- a/src/share/classes/java/time/MonthDay.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/MonthDay.java	Mon May 05 12:49:13 2014 -0700
@@ -90,8 +90,8 @@
  * A month-day in the ISO-8601 calendar system, such as {@code --12-03}.
  * <p>
  * {@code MonthDay} is an immutable date-time object that represents the combination
- * of a year and month. Any field that can be derived from a month and day, such as
- * quarter-of-year, can be obtained.
+ * of a month and day-of-month. Any field that can be derived from a month and day,
+ * such as quarter-of-year, can be obtained.
  * <p>
  * This class does not store or represent a year, time or time-zone.
  * For example, the value "December 3rd" can be stored in a {@code MonthDay}.
@@ -154,7 +154,7 @@
     /**
      * Obtains the current month-day from the system clock in the default time-zone.
      * <p>
-     * This will query the {@link java.time.Clock#systemDefaultZone() system clock} in the default
+     * This will query the {@link Clock#systemDefaultZone() system clock} in the default
      * time-zone to obtain the current month-day.
      * <p>
      * Using this method will prevent the ability to use an alternate clock for testing
@@ -169,7 +169,7 @@
     /**
      * Obtains the current month-day from the system clock in the specified time-zone.
      * <p>
-     * This will query the {@link Clock#system(java.time.ZoneId) system clock} to obtain the current month-day.
+     * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current month-day.
      * Specifying the time-zone avoids dependence on the default time-zone.
      * <p>
      * Using this method will prevent the ability to use an alternate clock for testing
@@ -258,7 +258,7 @@
      * chronology, or can be converted to a {@code LocalDate}.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code MonthDay::from}.
+     * allowing it to be used as a query via method reference, {@code MonthDay::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the month-day, not null
@@ -389,7 +389,7 @@
     /**
      * Gets the value of the specified field from this month-day as an {@code int}.
      * <p>
-     * This queries this month-day for the value for the specified field.
+     * This queries this month-day for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -420,7 +420,7 @@
     /**
      * Gets the value of the specified field from this month-day as a {@code long}.
      * <p>
-     * This queries this month-day for the value for the specified field.
+     * This queries this month-day for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -501,7 +501,7 @@
      * This method checks whether this month and day and the input year form
      * a valid date. This can only return false for February 29th.
      *
-     * @param year  the year to validate, an out of range value returns false
+     * @param year  the year to validate
      * @return true if the year is valid for this month-day
      * @see Year#isValidMonthDay(MonthDay)
      */
@@ -685,7 +685,7 @@
     }
 
     /**
-     * Is this month-day after the specified month-day.
+     * Checks if this month-day is after the specified month-day.
      *
      * @param other  the other month-day to compare to, not null
      * @return true if this is after the specified month-day
@@ -695,7 +695,7 @@
     }
 
     /**
-     * Is this month-day before the specified month-day.
+     * Checks if this month-day is before the specified month-day.
      *
      * @param other  the other month-day to compare to, not null
      * @return true if this point is before the specified month-day
--- a/src/share/classes/java/time/OffsetDateTime.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/OffsetDateTime.java	Mon May 05 12:49:13 2014 -0700
@@ -199,7 +199,7 @@
     /**
      * Obtains the current date-time from the system clock in the default time-zone.
      * <p>
-     * This will query the {@link java.time.Clock#systemDefaultZone() system clock} in the default
+     * This will query the {@link Clock#systemDefaultZone() system clock} in the default
      * time-zone to obtain the current date-time.
      * The offset will be calculated from the time-zone in the clock.
      * <p>
@@ -215,7 +215,7 @@
     /**
      * Obtains the current date-time from the system clock in the specified time-zone.
      * <p>
-     * This will query the {@link Clock#system(java.time.ZoneId) system clock} to obtain the current date-time.
+     * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current date-time.
      * Specifying the time-zone avoids dependence on the default time-zone.
      * The offset will be calculated from the specified time-zone.
      * <p>
@@ -345,7 +345,7 @@
      * those fields that are equivalent to the relevant objects.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code OffsetDateTime::from}.
+     * allowing it to be used as a query via method reference, {@code OffsetDateTime::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the offset date-time, not null
@@ -566,7 +566,7 @@
     /**
      * Gets the value of the specified field from this date-time as an {@code int}.
      * <p>
-     * This queries this date-time for the value for the specified field.
+     * This queries this date-time for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -575,7 +575,7 @@
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time, except {@code NANO_OF_DAY}, {@code MICRO_OF_DAY},
      * {@code EPOCH_DAY}, {@code PROLEPTIC_MONTH} and {@code INSTANT_SECONDS} which are too
-     * large to fit in an {@code int} and throw a {@code DateTimeException}.
+     * large to fit in an {@code int} and throw a {@code UnsupportedTemporalTypeException}.
      * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
@@ -608,7 +608,7 @@
     /**
      * Gets the value of the specified field from this date-time as a {@code long}.
      * <p>
-     * This queries this date-time for the value for the specified field.
+     * This queries this date-time for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -703,7 +703,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Gets the {@code LocalDateTime} part of this offset date-time.
+     * Gets the {@code LocalDateTime} part of this date-time.
      * <p>
      * This returns a {@code LocalDateTime} with the same year, month, day and time
      * as this date-time.
@@ -795,10 +795,10 @@
     /**
      * Gets the day-of-week field, which is an enum {@code DayOfWeek}.
      * <p>
-     * This method returns the enum {@link java.time.DayOfWeek} for the day-of-week.
+     * This method returns the enum {@link DayOfWeek} for the day-of-week.
      * This avoids confusion as to what {@code int} values mean.
      * If you need access to the primitive {@code int} value then the enum
-     * provides the {@link java.time.DayOfWeek#getValue() int value}.
+     * provides the {@link DayOfWeek#getValue() int value}.
      * <p>
      * Additional information can be obtained from the {@code DayOfWeek}.
      * This includes textual names of the values.
@@ -868,7 +868,8 @@
      * <p>
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
+     * A selection of common adjustments is provided in
+     * {@link java.time.temporal.TemporalAdjusters TemporalAdjusters}.
      * These include finding the "last day of the month" and "next Wednesday".
      * Key date-time classes also implement the {@code TemporalAdjuster} interface,
      * such as {@link Month} and {@link java.time.MonthDay MonthDay}.
@@ -878,7 +879,7 @@
      * For example this code returns a date on the last day of July:
      * <pre>
      *  import static java.time.Month.*;
-     *  import static java.time.temporal.Adjusters.*;
+     *  import static java.time.temporal.TemporalAdjusters.*;
      *
      *  result = offsetDateTime.with(JULY).with(lastDayOfMonth());
      * </pre>
@@ -920,7 +921,7 @@
     /**
      * Returns a copy of this date-time with the specified field set to a new value.
      * <p>
-     * TThis returns an {@code OffsetDateTime}, based on this one, with the value
+     * This returns an {@code OffsetDateTime}, based on this one, with the value
      * for the specified field changed.
      * This can be used to change any supported field, such as the year, month or day-of-month.
      * If it is not possible to set the value, because the field is not supported or for
@@ -979,7 +980,8 @@
     //-----------------------------------------------------------------------
     /**
      * Returns a copy of this {@code OffsetDateTime} with the year altered.
-     * The offset does not affect the calculation and will be the same in the result.
+     * <p>
+     * The time and offset do not affect the calculation and will be the same in the result.
      * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
      * <p>
      * This instance is immutable and unaffected by this method call.
@@ -994,7 +996,8 @@
 
     /**
      * Returns a copy of this {@code OffsetDateTime} with the month-of-year altered.
-     * The offset does not affect the calculation and will be the same in the result.
+     * <p>
+     * The time and offset do not affect the calculation and will be the same in the result.
      * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
      * <p>
      * This instance is immutable and unaffected by this method call.
@@ -1009,8 +1012,9 @@
 
     /**
      * Returns a copy of this {@code OffsetDateTime} with the day-of-month altered.
+     * <p>
      * If the resulting {@code OffsetDateTime} is invalid, an exception is thrown.
-     * The offset does not affect the calculation and will be the same in the result.
+     * The time and offset do not affect the calculation and will be the same in the result.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1025,6 +1029,8 @@
 
     /**
      * Returns a copy of this {@code OffsetDateTime} with the day-of-year altered.
+     * <p>
+     * The time and offset do not affect the calculation and will be the same in the result.
      * If the resulting {@code OffsetDateTime} is invalid, an exception is thrown.
      * <p>
      * This instance is immutable and unaffected by this method call.
@@ -1040,9 +1046,9 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the hour-of-day value altered.
+     * Returns a copy of this {@code OffsetDateTime} with the hour-of-day altered.
      * <p>
-     * The offset does not affect the calculation and will be the same in the result.
+     * The date and offset do not affect the calculation and will be the same in the result.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1055,9 +1061,9 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the minute-of-hour value altered.
+     * Returns a copy of this {@code OffsetDateTime} with the minute-of-hour altered.
      * <p>
-     * The offset does not affect the calculation and will be the same in the result.
+     * The date and offset do not affect the calculation and will be the same in the result.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1070,9 +1076,9 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the second-of-minute value altered.
+     * Returns a copy of this {@code OffsetDateTime} with the second-of-minute altered.
      * <p>
-     * The offset does not affect the calculation and will be the same in the result.
+     * The date and offset do not affect the calculation and will be the same in the result.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1085,15 +1091,15 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the nano-of-second value altered.
+     * Returns a copy of this {@code OffsetDateTime} with the nano-of-second altered.
      * <p>
-     * The offset does not affect the calculation and will be the same in the result.
+     * The date and offset do not affect the calculation and will be the same in the result.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @param nanoOfSecond  the nano-of-second to set in the result, from 0 to 999,999,999
      * @return an {@code OffsetDateTime} based on this date-time with the requested nanosecond, not null
-     * @throws DateTimeException if the nanos value is invalid
+     * @throws DateTimeException if the nano value is invalid
      */
     public OffsetDateTime withNano(int nanoOfSecond) {
         return with(dateTime.withNano(nanoOfSecond), offset);
@@ -1187,7 +1193,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in years added.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of years added.
      * <p>
      * This method adds the specified amount to the years field in three steps:
      * <ol>
@@ -1211,7 +1217,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in months added.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of months added.
      * <p>
      * This method adds the specified amount to the months field in three steps:
      * <ol>
@@ -1235,13 +1241,13 @@
     }
 
     /**
-     * Returns a copy of this OffsetDateTime with the specified period in weeks added.
+     * Returns a copy of this OffsetDateTime with the specified number of weeks added.
      * <p>
      * This method adds the specified amount in weeks to the days field incrementing
      * the month and year fields as necessary to ensure the result remains valid.
      * The result is only invalid if the maximum/minimum year is exceeded.
      * <p>
-     * For example, 2008-12-31 plus one week would result in the 2009-01-07.
+     * For example, 2008-12-31 plus one week would result in 2009-01-07.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1254,13 +1260,13 @@
     }
 
     /**
-     * Returns a copy of this OffsetDateTime with the specified period in days added.
+     * Returns a copy of this OffsetDateTime with the specified number of days added.
      * <p>
      * This method adds the specified amount to the days field incrementing the
      * month and year fields as necessary to ensure the result remains valid.
      * The result is only invalid if the maximum/minimum year is exceeded.
      * <p>
-     * For example, 2008-12-31 plus one day would result in the 2009-01-01.
+     * For example, 2008-12-31 plus one day would result in 2009-01-01.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1273,7 +1279,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in hours added.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of hours added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1286,7 +1292,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in minutes added.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of minutes added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1299,7 +1305,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in seconds added.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of seconds added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1312,7 +1318,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in nanoseconds added.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of nanoseconds added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1376,11 +1382,11 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in years subtracted.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of years subtracted.
      * <p>
      * This method subtracts the specified amount from the years field in three steps:
      * <ol>
-     * <li>Subtract the input years to the year field</li>
+     * <li>Subtract the input years from the year field</li>
      * <li>Check if the resulting date would be invalid</li>
      * <li>Adjust the day-of-month to the last valid day if necessary</li>
      * </ol>
@@ -1400,11 +1406,11 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in months subtracted.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of months subtracted.
      * <p>
      * This method subtracts the specified amount from the months field in three steps:
      * <ol>
-     * <li>Subtract the input months to the month-of-year field</li>
+     * <li>Subtract the input months from the month-of-year field</li>
      * <li>Check if the resulting date would be invalid</li>
      * <li>Adjust the day-of-month to the last valid day if necessary</li>
      * </ol>
@@ -1424,13 +1430,13 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in weeks subtracted.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of weeks subtracted.
      * <p>
      * This method subtracts the specified amount in weeks from the days field decrementing
      * the month and year fields as necessary to ensure the result remains valid.
      * The result is only invalid if the maximum/minimum year is exceeded.
      * <p>
-     * For example, 2008-12-31 minus one week would result in the 2009-01-07.
+     * For example, 2008-12-31 minus one week would result in 2009-01-07.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1443,13 +1449,13 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in days subtracted.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of days subtracted.
      * <p>
-     * This method subtracts the specified amount from the days field incrementing the
+     * This method subtracts the specified amount from the days field decrementing the
      * month and year fields as necessary to ensure the result remains valid.
      * The result is only invalid if the maximum/minimum year is exceeded.
      * <p>
-     * For example, 2008-12-31 minus one day would result in the 2009-01-01.
+     * For example, 2008-12-31 minus one day would result in 2009-01-01.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1462,7 +1468,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in hours subtracted.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of hours subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1475,7 +1481,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in minutes subtracted.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of minutes subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1488,7 +1494,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in seconds subtracted.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of seconds subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1501,7 +1507,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetDateTime} with the specified period in nanoseconds subtracted.
+     * Returns a copy of this {@code OffsetDateTime} with the specified number of nanoseconds subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1598,7 +1604,7 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified date-time.
      * The result will be negative if the end is before the start.
-     * For example, the period in days between two date-times can be calculated
+     * For example, the amount in days between two date-times can be calculated
      * using {@code startDateTime.until(endDateTime, DAYS)}.
      * <p>
      * The {@code Temporal} passed to this method is converted to a
@@ -1608,7 +1614,7 @@
      * <p>
      * The calculation returns a whole number, representing the number of
      * complete units between the two date-times.
-     * For example, the period in months between 2012-06-15T00:00Z and 2012-08-14T23:59Z
+     * For example, the amount in months between 2012-06-15T00:00Z and 2012-08-14T23:59Z
      * will only be one month as it is one minute short of two months.
      * <p>
      * There are two equivalent ways of using this method.
@@ -1769,7 +1775,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Compares this {@code OffsetDateTime} to another date-time.
+     * Compares this date-time to another date-time.
      * <p>
      * The comparison is based on the instant then on the local date-time.
      * It is "consistent with equals", as defined by {@link Comparable}.
--- a/src/share/classes/java/time/OffsetTime.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/OffsetTime.java	Mon May 05 12:49:13 2014 -0700
@@ -153,14 +153,14 @@
     /**
      * Obtains the current time from the system clock in the default time-zone.
      * <p>
-     * This will query the {@link java.time.Clock#systemDefaultZone() system clock} in the default
+     * This will query the {@link Clock#systemDefaultZone() system clock} in the default
      * time-zone to obtain the current time.
      * The offset will be calculated from the time-zone in the clock.
      * <p>
      * Using this method will prevent the ability to use an alternate clock for testing
      * because the clock is hard-coded.
      *
-     * @return the current time using the system clock, not null
+     * @return the current time using the system clock and default time-zone, not null
      */
     public static OffsetTime now() {
         return now(Clock.systemDefaultZone());
@@ -169,7 +169,7 @@
     /**
      * Obtains the current time from the system clock in the specified time-zone.
      * <p>
-     * This will query the {@link Clock#system(java.time.ZoneId) system clock} to obtain the current time.
+     * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current time.
      * Specifying the time-zone avoids dependence on the default time-zone.
      * The offset will be calculated from the specified time-zone.
      * <p>
@@ -277,7 +277,7 @@
      * those fields that are equivalent to the relevant objects.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code OffsetTime::from}.
+     * allowing it to be used as a query via method reference, {@code OffsetTime::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the offset time, not null
@@ -402,7 +402,7 @@
     /**
      * Checks if the specified unit is supported.
      * <p>
-     * This checks if the specified unit can be added to, or subtracted from, this date-time.
+     * This checks if the specified unit can be added to, or subtracted from, this offset-time.
      * If false, then calling the {@link #plus(long, TemporalUnit)} and
      * {@link #minus(long, TemporalUnit) minus} methods will throw an exception.
      * <p>
@@ -473,7 +473,7 @@
     /**
      * Gets the value of the specified field from this time as an {@code int}.
      * <p>
-     * This queries this time for the value for the specified field.
+     * This queries this time for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -481,7 +481,7 @@
      * If the field is a {@link ChronoField} then the query is implemented here.
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this time, except {@code NANO_OF_DAY} and {@code MICRO_OF_DAY}
-     * which are too large to fit in an {@code int} and throw a {@code DateTimeException}.
+     * which are too large to fit in an {@code int} and throw a {@code UnsupportedTemporalTypeException}.
      * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
@@ -505,7 +505,7 @@
     /**
      * Gets the value of the specified field from this time as a {@code long}.
      * <p>
-     * This queries this time for the value for the specified field.
+     * This queries this time for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -575,7 +575,7 @@
      * <p>
      * This method returns an object with the specified {@code ZoneOffset} and a {@code LocalTime}
      * adjusted by the difference between the two offsets.
-     * This will result in the old and new objects representing the same instant an an implied day.
+     * This will result in the old and new objects representing the same instant on an implied day.
      * This is useful for finding the local time in a different offset.
      * For example, if this time represents {@code 10:30+02:00} and the offset specified is
      * {@code +03:00}, then this method will return {@code 11:30+03:00}.
@@ -737,7 +737,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code OffsetTime} with the hour-of-day value altered.
+     * Returns a copy of this {@code OffsetTime} with the hour-of-day altered.
      * <p>
      * The offset does not affect the calculation and will be the same in the result.
      * <p>
@@ -752,7 +752,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the minute-of-hour value altered.
+     * Returns a copy of this {@code OffsetTime} with the minute-of-hour altered.
      * <p>
      * The offset does not affect the calculation and will be the same in the result.
      * <p>
@@ -767,7 +767,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the second-of-minute value altered.
+     * Returns a copy of this {@code OffsetTime} with the second-of-minute altered.
      * <p>
      * The offset does not affect the calculation and will be the same in the result.
      * <p>
@@ -782,7 +782,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the nano-of-second value altered.
+     * Returns a copy of this {@code OffsetTime} with the nano-of-second altered.
      * <p>
      * The offset does not affect the calculation and will be the same in the result.
      * <p>
@@ -884,7 +884,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code OffsetTime} with the specified period in hours added.
+     * Returns a copy of this {@code OffsetTime} with the specified number of hours added.
      * <p>
      * This adds the specified number of hours to this time, returning a new time.
      * The calculation wraps around midnight.
@@ -899,7 +899,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the specified period in minutes added.
+     * Returns a copy of this {@code OffsetTime} with the specified number of minutes added.
      * <p>
      * This adds the specified number of minutes to this time, returning a new time.
      * The calculation wraps around midnight.
@@ -914,7 +914,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the specified period in seconds added.
+     * Returns a copy of this {@code OffsetTime} with the specified number of seconds added.
      * <p>
      * This adds the specified number of seconds to this time, returning a new time.
      * The calculation wraps around midnight.
@@ -929,7 +929,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the specified period in nanoseconds added.
+     * Returns a copy of this {@code OffsetTime} with the specified number of nanoseconds added.
      * <p>
      * This adds the specified number of nanoseconds to this time, returning a new time.
      * The calculation wraps around midnight.
@@ -995,7 +995,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code OffsetTime} with the specified period in hours subtracted.
+     * Returns a copy of this {@code OffsetTime} with the specified number of hours subtracted.
      * <p>
      * This subtracts the specified number of hours from this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1010,7 +1010,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the specified period in minutes subtracted.
+     * Returns a copy of this {@code OffsetTime} with the specified number of minutes subtracted.
      * <p>
      * This subtracts the specified number of minutes from this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1025,7 +1025,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the specified period in seconds subtracted.
+     * Returns a copy of this {@code OffsetTime} with the specified number of seconds subtracted.
      * <p>
      * This subtracts the specified number of seconds from this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1040,7 +1040,7 @@
     }
 
     /**
-     * Returns a copy of this {@code OffsetTime} with the specified period in nanoseconds subtracted.
+     * Returns a copy of this {@code OffsetTime} with the specified number of nanoseconds subtracted.
      * <p>
      * This subtracts the specified number of nanoseconds from this time, returning a new time.
      * The calculation wraps around midnight.
@@ -1130,7 +1130,7 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified time.
      * The result will be negative if the end is before the start.
-     * For example, the period in hours between two times can be calculated
+     * For example, the amount in hours between two times can be calculated
      * using {@code startTime.until(endTime, HOURS)}.
      * <p>
      * The {@code Temporal} passed to this method is converted to a
@@ -1140,7 +1140,7 @@
      * <p>
      * The calculation returns a whole number, representing the number of
      * complete units between the two times.
-     * For example, the period in hours between 11:30Z and 13:29Z will only
+     * For example, the amount in hours between 11:30Z and 13:29Z will only
      * be one hour as it is one minute short of two hours.
      * <p>
      * There are two equivalent ways of using this method.
@@ -1165,7 +1165,7 @@
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param endExclusive  the end date, exclusive, which is converted to an {@code OffsetTime}, not null
+     * @param endExclusive  the end time, exclusive, which is converted to an {@code OffsetTime}, not null
      * @param unit  the unit to measure the amount in, not null
      * @return the amount of time between this time and the end time
      * @throws DateTimeException if the amount cannot be calculated, or the end
@@ -1258,7 +1258,6 @@
      *
      * @param other  the other time to compare to, not null
      * @return the comparator value, negative if less, positive if greater
-     * @throws NullPointerException if {@code other} is null
      */
     @Override
     public int compareTo(OffsetTime other) {
--- a/src/share/classes/java/time/Period.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/Period.java	Mon May 05 12:49:13 2014 -0700
@@ -616,7 +616,7 @@
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param amountToAdd  the period to add, not null
+     * @param amountToAdd  the amount to add, not null
      * @return a {@code Period} based on this period with the requested period added, not null
      * @throws DateTimeException if the specified amount has a non-ISO chronology or
      *  contains an invalid unit
@@ -705,7 +705,7 @@
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @param amountToSubtract  the period to subtract, not null
+     * @param amountToSubtract  the amount to subtract, not null
      * @return a {@code Period} based on this period with the requested period subtracted, not null
      * @throws DateTimeException if the specified amount has a non-ISO chronology or
      *  contains an invalid unit
--- a/src/share/classes/java/time/Year.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/Year.java	Mon May 05 12:49:13 2014 -0700
@@ -164,7 +164,7 @@
     /**
      * Obtains the current year from the system clock in the default time-zone.
      * <p>
-     * This will query the {@link java.time.Clock#systemDefaultZone() system clock} in the default
+     * This will query the {@link Clock#systemDefaultZone() system clock} in the default
      * time-zone to obtain the current year.
      * <p>
      * Using this method will prevent the ability to use an alternate clock for testing
@@ -179,7 +179,7 @@
     /**
      * Obtains the current year from the system clock in the specified time-zone.
      * <p>
-     * This will query the {@link Clock#system(java.time.ZoneId) system clock} to obtain the current year.
+     * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current year.
      * Specifying the time-zone avoids dependence on the default time-zone.
      * <p>
      * Using this method will prevent the ability to use an alternate clock for testing
@@ -240,7 +240,7 @@
      * chronology, or can be converted to a {@code LocalDate}.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code Year::from}.
+     * allowing it to be used as a query via method reference, {@code Year::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the year, not null
@@ -375,7 +375,7 @@
     /**
      * Checks if the specified unit is supported.
      * <p>
-     * This checks if the specified unit can be added to, or subtracted from, this date-time.
+     * This checks if the specified unit can be added to, or subtracted from, this year.
      * If false, then calling the {@link #plus(long, TemporalUnit)} and
      * {@link #minus(long, TemporalUnit) minus} methods will throw an exception.
      * <p>
@@ -441,7 +441,7 @@
     /**
      * Gets the value of the specified field from this year as an {@code int}.
      * <p>
-     * This queries this year for the value for the specified field.
+     * This queries this year for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -472,7 +472,7 @@
     /**
      * Gets the value of the specified field from this year as a {@code long}.
      * <p>
-     * This queries this year for the value for the specified field.
+     * This queries this year for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -720,13 +720,13 @@
     }
 
     /**
-     * Returns a copy of this year with the specified number of years added.
+     * Returns a copy of this {@code Year} with the specified number of years added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @param yearsToAdd  the years to add, may be negative
-     * @return a {@code Year} based on this year with the period added, not null
-     * @throws DateTimeException if the result exceeds the supported year range
+     * @return a {@code Year} based on this year with the years added, not null
+     * @throws DateTimeException if the result exceeds the supported range
      */
     public Year plusYears(long yearsToAdd) {
         if (yearsToAdd == 0) {
@@ -786,13 +786,13 @@
     }
 
     /**
-     * Returns a copy of this year with the specified number of years subtracted.
+     * Returns a copy of this {@code Year} with the specified number of years subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @param yearsToSubtract  the years to subtract, may be negative
-     * @return a {@code Year} based on this year with the period subtracted, not null
-     * @throws DateTimeException if the result exceeds the supported year range
+     * @return a {@code Year} based on this year with the year subtracted, not null
+     * @throws DateTimeException if the result exceeds the supported range
      */
     public Year minusYears(long yearsToSubtract) {
         return (yearsToSubtract == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-yearsToSubtract));
@@ -871,12 +871,12 @@
      * The result will be negative if the end is before the start.
      * The {@code Temporal} passed to this method is converted to a
      * {@code Year} using {@link #from(TemporalAccessor)}.
-     * For example, the period in decades between two year can be calculated
+     * For example, the amount in decades between two year can be calculated
      * using {@code startYear.until(endYear, DECADES)}.
      * <p>
      * The calculation returns a whole number, representing the number of
      * complete units between the two years.
-     * For example, the period in decades between 2012 and 2031
+     * For example, the amount in decades between 2012 and 2031
      * will only be one decade as it is one year short of two decades.
      * <p>
      * There are two equivalent ways of using this method.
@@ -948,7 +948,7 @@
      * <p>
      * The day-of-year value 366 is only valid in a leap year.
      *
-     * @param dayOfYear  the day-of-year to use, not null
+     * @param dayOfYear  the day-of-year to use, from 1 to 365-366
      * @return the local date formed from this year and the specified date of year, not null
      * @throws DateTimeException if the day of year is zero or less, 366 or greater or equal
      *  to 366 and this is not a leap year
@@ -1025,7 +1025,7 @@
     }
 
     /**
-     * Is this year after the specified year.
+     * Checks if this year is after the specified year.
      *
      * @param other  the other year to compare to, not null
      * @return true if this is after the specified year
@@ -1035,7 +1035,7 @@
     }
 
     /**
-     * Is this year before the specified year.
+     * Checks if this year is before the specified year.
      *
      * @param other  the other year to compare to, not null
      * @return true if this point is before the specified year
--- a/src/share/classes/java/time/YearMonth.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/YearMonth.java	Mon May 05 12:49:13 2014 -0700
@@ -157,9 +157,8 @@
     /**
      * Obtains the current year-month from the system clock in the default time-zone.
      * <p>
-     * This will query the {@link java.time.Clock#systemDefaultZone() system clock} in the default
+     * This will query the {@link Clock#systemDefaultZone() system clock} in the default
      * time-zone to obtain the current year-month.
-     * The zone and offset will be set based on the time-zone in the clock.
      * <p>
      * Using this method will prevent the ability to use an alternate clock for testing
      * because the clock is hard-coded.
@@ -173,7 +172,7 @@
     /**
      * Obtains the current year-month from the system clock in the specified time-zone.
      * <p>
-     * This will query the {@link Clock#system(java.time.ZoneId) system clock} to obtain the current year-month.
+     * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current year-month.
      * Specifying the time-zone avoids dependence on the default time-zone.
      * <p>
      * Using this method will prevent the ability to use an alternate clock for testing
@@ -243,7 +242,7 @@
      * chronology, or can be converted to a {@code LocalDate}.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code YearMonth::from}.
+     * allowing it to be used as a query via method reference, {@code YearMonth::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the year-month, not null
@@ -363,7 +362,7 @@
     /**
      * Checks if the specified unit is supported.
      * <p>
-     * This checks if the specified unit can be added to, or subtracted from, this date-time.
+     * This checks if the specified unit can be added to, or subtracted from, this year-month.
      * If false, then calling the {@link #plus(long, TemporalUnit)} and
      * {@link #minus(long, TemporalUnit) minus} methods will throw an exception.
      * <p>
@@ -430,7 +429,7 @@
     /**
      * Gets the value of the specified field from this year-month as an {@code int}.
      * <p>
-     * This queries this year-month for the value for the specified field.
+     * This queries this year-month for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -462,7 +461,7 @@
     /**
      * Gets the value of the specified field from this year-month as a {@code long}.
      * <p>
-     * This queries this year-month for the value for the specified field.
+     * This queries this year-month for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -819,7 +818,7 @@
     }
 
     /**
-     * Returns a copy of this year-month with the specified period in years added.
+     * Returns a copy of this {@code YearMonth} with the specified number of years added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -836,7 +835,7 @@
     }
 
     /**
-     * Returns a copy of this year-month with the specified period in months added.
+     * Returns a copy of this {@code YearMonth} with the specified number of months added.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -906,7 +905,7 @@
     }
 
     /**
-     * Returns a copy of this year-month with the specified period in years subtracted.
+     * Returns a copy of this {@code YearMonth} with the specified number of years subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -919,7 +918,7 @@
     }
 
     /**
-     * Returns a copy of this year-month with the specified period in months subtracted.
+     * Returns a copy of this {@code YearMonth} with the specified number of months subtracted.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
@@ -1004,12 +1003,12 @@
      * The result will be negative if the end is before the start.
      * The {@code Temporal} passed to this method is converted to a
      * {@code YearMonth} using {@link #from(TemporalAccessor)}.
-     * For example, the period in years between two year-months can be calculated
+     * For example, the amount in years between two year-months can be calculated
      * using {@code startYearMonth.until(endYearMonth, YEARS)}.
      * <p>
      * The calculation returns a whole number, representing the number of
      * complete units between the two year-months.
-     * For example, the period in decades between 2012-06 and 2032-05
+     * For example, the amount in decades between 2012-06 and 2032-05
      * will only be one decade as it is one month short of two decades.
      * <p>
      * There are two equivalent ways of using this method.
@@ -1134,7 +1133,7 @@
     }
 
     /**
-     * Is this year-month after the specified year-month.
+     * Checks if this year-month is after the specified year-month.
      *
      * @param other  the other year-month to compare to, not null
      * @return true if this is after the specified year-month
@@ -1144,7 +1143,7 @@
     }
 
     /**
-     * Is this year-month before the specified year-month.
+     * Checks if this year-month is before the specified year-month.
      *
      * @param other  the other year-month to compare to, not null
      * @return true if this point is before the specified year-month
--- a/src/share/classes/java/time/ZoneId.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/ZoneId.java	Mon May 05 12:49:13 2014 -0700
@@ -453,7 +453,7 @@
      * zones over offset-based zones using {@link TemporalQueries#zone()}.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code ZoneId::from}.
+     * allowing it to be used as a query via method reference, {@code ZoneId::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the zone ID, not null
--- a/src/share/classes/java/time/ZoneOffset.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/ZoneOffset.java	Mon May 05 12:49:13 2014 -0700
@@ -89,7 +89,7 @@
 /**
  * A time-zone offset from Greenwich/UTC, such as {@code +02:00}.
  * <p>
- * A time-zone offset is the period of time that a time-zone differs from Greenwich/UTC.
+ * A time-zone offset is the amount of time that a time-zone differs from Greenwich/UTC.
  * This is usually a fixed number of hours and minutes.
  * <p>
  * Different parts of the world have different time-zone offsets.
@@ -334,7 +334,7 @@
      * on extracting the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} field.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code ZoneOffset::from}.
+     * allowing it to be used as a query via method reference, {@code ZoneOffset::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the zone-offset, not null
@@ -564,7 +564,7 @@
     /**
      * Gets the value of the specified field from this offset as an {@code int}.
      * <p>
-     * This queries this offset for the value for the specified field.
+     * This queries this offset for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -599,7 +599,7 @@
     /**
      * Gets the value of the specified field from this offset as a {@code long}.
      * <p>
-     * This queries this offset for the value for the specified field.
+     * This queries this offset for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
--- a/src/share/classes/java/time/ZonedDateTime.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/ZonedDateTime.java	Mon May 05 12:49:13 2014 -0700
@@ -418,7 +418,7 @@
      * <p>
      * Converting an instant to a zoned date-time is simple as there is only one valid
      * offset for each instant. If the valid offset is different to the offset specified,
-     * the the date-time and offset of the zoned date-time will differ from those specified.
+     * then the date-time and offset of the zoned date-time will differ from those specified.
      * <p>
      * If the {@code ZoneId} to be used is a {@code ZoneOffset}, this method is equivalent
      * to {@link #of(LocalDateTime, ZoneId)}.
@@ -469,6 +469,7 @@
      * @param offset  the zone offset, not null
      * @param zone  the time-zone, not null
      * @return the zoned date-time, not null
+     * @throws DateTimeException if the combination of arguments is invalid
      */
     public static ZonedDateTime ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) {
         Objects.requireNonNull(localDateTime, "localDateTime");
@@ -538,7 +539,7 @@
      * those fields that are equivalent to the relevant objects.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code ZonedDateTime::from}.
+     * allowing it to be used as a query via method reference, {@code ZonedDateTime::from}.
      *
      * @param temporal  the temporal object to convert, not null
      * @return the zoned date-time, not null
@@ -782,7 +783,7 @@
     /**
      * Gets the value of the specified field from this date-time as an {@code int}.
      * <p>
-     * This queries this date-time for the value for the specified field.
+     * This queries this date-time for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -791,7 +792,7 @@
      * The {@link #isSupported(TemporalField) supported fields} will return valid
      * values based on this date-time, except {@code NANO_OF_DAY}, {@code MICRO_OF_DAY},
      * {@code EPOCH_DAY}, {@code PROLEPTIC_MONTH} and {@code INSTANT_SECONDS} which are too
-     * large to fit in an {@code int} and throw a {@code DateTimeException}.
+     * large to fit in an {@code int} and throw a {@code UnsupportedTemporalTypeException}.
      * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.
      * <p>
      * If the field is not a {@code ChronoField}, then the result of this method
@@ -824,7 +825,7 @@
     /**
      * Gets the value of the specified field from this date-time as a {@code long}.
      * <p>
-     * This queries this date-time for the value for the specified field.
+     * This queries this date-time for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
@@ -1182,7 +1183,8 @@
      * <p>
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
+     * A selection of common adjustments is provided in
+     * {@link java.time.temporal.TemporalAdjusters TemporalAdjusters}.
      * These include finding the "last day of the month" and "next Wednesday".
      * Key date-time classes also implement the {@code TemporalAdjuster} interface,
      * such as {@link Month} and {@link java.time.MonthDay MonthDay}.
@@ -1192,7 +1194,7 @@
      * For example this code returns a date on the last day of July:
      * <pre>
      *  import static java.time.Month.*;
-     *  import static java.time.temporal.Adjusters.*;
+     *  import static java.time.temporal.TemporalAdjusters.*;
      *
      *  result = zonedDateTime.with(JULY).with(lastDayOfMonth());
      * </pre>
@@ -1313,7 +1315,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the year value altered.
+     * Returns a copy of this {@code ZonedDateTime} with the year altered.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#withYear(int) changing the year} of the local date-time.
@@ -1335,7 +1337,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the month-of-year value altered.
+     * Returns a copy of this {@code ZonedDateTime} with the month-of-year altered.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#withMonth(int) changing the month} of the local date-time.
@@ -1357,7 +1359,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the day-of-month value altered.
+     * Returns a copy of this {@code ZonedDateTime} with the day-of-month altered.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#withDayOfMonth(int) changing the day-of-month} of the local date-time.
@@ -1404,7 +1406,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the hour-of-day value altered.
+     * Returns a copy of this {@code ZonedDateTime} with the hour-of-day altered.
      * <p>
      * This operates on the local time-line,
      * {@linkplain LocalDateTime#withHour(int) changing the time} of the local date-time.
@@ -1426,7 +1428,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the minute-of-hour value altered.
+     * Returns a copy of this {@code ZonedDateTime} with the minute-of-hour altered.
      * <p>
      * This operates on the local time-line,
      * {@linkplain LocalDateTime#withMinute(int) changing the time} of the local date-time.
@@ -1448,7 +1450,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the second-of-minute value altered.
+     * Returns a copy of this {@code ZonedDateTime} with the second-of-minute altered.
      * <p>
      * This operates on the local time-line,
      * {@linkplain LocalDateTime#withSecond(int) changing the time} of the local date-time.
@@ -1470,7 +1472,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the nano-of-second value altered.
+     * Returns a copy of this {@code ZonedDateTime} with the nano-of-second altered.
      * <p>
      * This operates on the local time-line,
      * {@linkplain LocalDateTime#withNano(int) changing the time} of the local date-time.
@@ -1506,7 +1508,7 @@
      * {@link ChronoUnit#DAYS DAYS}. Other units throw an exception.
      * <p>
      * This operates on the local time-line,
-     * {@link LocalDateTime#truncatedTo(java.time.temporal.TemporalUnit) truncating}
+     * {@link LocalDateTime#truncatedTo(TemporalUnit) truncating}
      * the underlying local date-time. This is then converted back to a
      * {@code ZonedDateTime}, using the zone ID to obtain the offset.
      * <p>
@@ -1607,7 +1609,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in years added.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of years added.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#plusYears(long) adding years} to the local date-time.
@@ -1629,7 +1631,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in months added.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of months added.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#plusMonths(long) adding months} to the local date-time.
@@ -1651,7 +1653,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in weeks added.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of weeks added.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#plusWeeks(long) adding weeks} to the local date-time.
@@ -1673,7 +1675,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in days added.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of days added.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#plusDays(long) adding days} to the local date-time.
@@ -1696,7 +1698,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in hours added.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of hours added.
      * <p>
      * This operates on the instant time-line, such that adding one hour will
      * always be a duration of one hour later.
@@ -1724,7 +1726,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in minutes added.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of minutes added.
      * <p>
      * This operates on the instant time-line, such that adding one minute will
      * always be a duration of one minute later.
@@ -1742,7 +1744,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in seconds added.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of seconds added.
      * <p>
      * This operates on the instant time-line, such that adding one second will
      * always be a duration of one second later.
@@ -1760,7 +1762,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in nanoseconds added.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of nanoseconds added.
      * <p>
      * This operates on the instant time-line, such that adding one nano will
      * always be a duration of one nano later.
@@ -1848,7 +1850,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in years subtracted.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of years subtracted.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#minusYears(long) subtracting years} to the local date-time.
@@ -1870,7 +1872,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in months subtracted.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of months subtracted.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#minusMonths(long) subtracting months} to the local date-time.
@@ -1892,7 +1894,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in weeks subtracted.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of weeks subtracted.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#minusWeeks(long) subtracting weeks} to the local date-time.
@@ -1914,7 +1916,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in days subtracted.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of days subtracted.
      * <p>
      * This operates on the local time-line,
      * {@link LocalDateTime#minusDays(long) subtracting days} to the local date-time.
@@ -1937,7 +1939,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in hours subtracted.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of hours subtracted.
      * <p>
      * This operates on the instant time-line, such that subtracting one hour will
      * always be a duration of one hour earlier.
@@ -1965,7 +1967,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in minutes subtracted.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of minutes subtracted.
      * <p>
      * This operates on the instant time-line, such that subtracting one minute will
      * always be a duration of one minute earlier.
@@ -1983,7 +1985,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in seconds subtracted.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of seconds subtracted.
      * <p>
      * This operates on the instant time-line, such that subtracting one second will
      * always be a duration of one second earlier.
@@ -2001,7 +2003,7 @@
     }
 
     /**
-     * Returns a copy of this {@code ZonedDateTime} with the specified period in nanoseconds subtracted.
+     * Returns a copy of this {@code ZonedDateTime} with the specified number of nanoseconds subtracted.
      * <p>
      * This operates on the instant time-line, such that subtracting one nano will
      * always be a duration of one nano earlier.
@@ -2028,7 +2030,7 @@
      * what the result of this method will be.
      * <p>
      * The result of this method is obtained by invoking the
-     * {@link java.time.temporal.TemporalQuery#queryFrom(TemporalAccessor)} method on the
+     * {@link TemporalQuery#queryFrom(TemporalAccessor)} method on the
      * specified query passing {@code this} as the argument.
      *
      * @param <R> the type of the result
@@ -2049,7 +2051,7 @@
      * objects in terms of a single {@code TemporalUnit}.
      * The start and end points are {@code this} and the specified date-time.
      * The result will be negative if the end is before the start.
-     * For example, the period in days between two date-times can be calculated
+     * For example, the amount in days between two date-times can be calculated
      * using {@code startDateTime.until(endDateTime, DAYS)}.
      * <p>
      * The {@code Temporal} passed to this method is converted to a
@@ -2059,7 +2061,7 @@
      * <p>
      * The calculation returns a whole number, representing the number of
      * complete units between the two date-times.
-     * For example, the period in months between 2012-06-15T00:00Z and 2012-08-14T23:59Z
+     * For example, the amount in months between 2012-06-15T00:00Z and 2012-08-14T23:59Z
      * will only be one month as it is one minute short of two months.
      * <p>
      * There are two equivalent ways of using this method.
--- a/src/share/classes/java/time/chrono/ChronoLocalDate.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/ChronoLocalDate.java	Mon May 05 12:49:13 2014 -0700
@@ -249,8 +249,8 @@
      * This allows dates in different calendar systems to be compared based
      * on the position of the date on the local time-line.
      * The underlying comparison is equivalent to comparing the epoch-day.
+     *
      * @return a comparator that compares in time-line order ignoring the chronology
-     *
      * @see #isAfter
      * @see #isBefore
      * @see #isEqual
--- a/src/share/classes/java/time/chrono/ChronoLocalDateImpl.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/ChronoLocalDateImpl.java	Mon May 05 12:49:13 2014 -0700
@@ -227,7 +227,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this date with the specified period in years added.
+     * Returns a copy of this date with the specified number of years added.
      * <p>
      * This adds the specified period in years to the date.
      * In some cases, adding years can cause the resulting date to become invalid.
@@ -243,7 +243,7 @@
     abstract D plusYears(long yearsToAdd);
 
     /**
-     * Returns a copy of this date with the specified period in months added.
+     * Returns a copy of this date with the specified number of months added.
      * <p>
      * This adds the specified period in months to the date.
      * In some cases, adding months can cause the resulting date to become invalid.
@@ -259,7 +259,7 @@
     abstract D plusMonths(long monthsToAdd);
 
     /**
-     * Returns a copy of this date with the specified period in weeks added.
+     * Returns a copy of this date with the specified number of weeks added.
      * <p>
      * This adds the specified period in weeks to the date.
      * In some cases, adding weeks can cause the resulting date to become invalid.
@@ -292,7 +292,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Returns a copy of this date with the specified period in years subtracted.
+     * Returns a copy of this date with the specified number of years subtracted.
      * <p>
      * This subtracts the specified period in years to the date.
      * In some cases, subtracting years can cause the resulting date to become invalid.
@@ -313,7 +313,7 @@
     }
 
     /**
-     * Returns a copy of this date with the specified period in months subtracted.
+     * Returns a copy of this date with the specified number of months subtracted.
      * <p>
      * This subtracts the specified period in months to the date.
      * In some cases, subtracting months can cause the resulting date to become invalid.
@@ -334,7 +334,7 @@
     }
 
     /**
-     * Returns a copy of this date with the specified period in weeks subtracted.
+     * Returns a copy of this date with the specified number of weeks subtracted.
      * <p>
      * This subtracts the specified period in weeks to the date.
      * In some cases, subtracting weeks can cause the resulting date to become invalid.
--- a/src/share/classes/java/time/chrono/ChronoLocalDateTime.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/ChronoLocalDateTime.java	Mon May 05 12:49:13 2014 -0700
@@ -131,7 +131,6 @@
      * The underlying comparison is equivalent to comparing the epoch-day and nano-of-day.
      *
      * @return a comparator that compares in time-line order ignoring the chronology
-     *
      * @see #isAfter
      * @see #isBefore
      * @see #isEqual
@@ -323,7 +322,7 @@
      * what the result of this method will be.
      * <p>
      * The result of this method is obtained by invoking the
-     * {@link java.time.temporal.TemporalQuery#queryFrom(TemporalAccessor)} method on the
+     * {@link TemporalQuery#queryFrom(TemporalAccessor)} method on the
      * specified query passing {@code this} as the argument.
      *
      * @param <R> the type of the result
--- a/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/ChronoZonedDateTime.java	Mon May 05 12:49:13 2014 -0700
@@ -132,7 +132,6 @@
      * The underlying comparison is equivalent to comparing the epoch-second and nano-of-second.
      *
      * @return a comparator that compares in time-line order ignoring the chronology
-     *
      * @see #isAfter
      * @see #isBefore
      * @see #isEqual
@@ -292,7 +291,7 @@
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
-     * @return a {@code ZoneChronoDateTime} based on this date-time with the earlier offset, not null
+     * @return a {@code ChronoZonedDateTime} based on this date-time with the earlier offset, not null
      * @throws DateTimeException if no rules can be found for the zone
      * @throws DateTimeException if no rules are valid for this date-time
      */
@@ -319,7 +318,7 @@
     ChronoZonedDateTime<D> withLaterOffsetAtOverlap();
 
     /**
-     * Returns a copy of this ZonedDateTime with a different time-zone,
+     * Returns a copy of this date-time with a different time-zone,
      * retaining the local date-time if possible.
      * <p>
      * This method changes the time-zone and retains the local date-time.
@@ -470,7 +469,7 @@
      * what the result of this method will be.
      * <p>
      * The result of this method is obtained by invoking the
-     * {@link java.time.temporal.TemporalQuery#queryFrom(TemporalAccessor)} method on the
+     * {@link TemporalQuery#queryFrom(TemporalAccessor)} method on the
      * specified query passing {@code this} as the argument.
      *
      * @param <R> the type of the result
--- a/src/share/classes/java/time/chrono/Chronology.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/Chronology.java	Mon May 05 12:49:13 2014 -0700
@@ -132,8 +132,9 @@
  * The set of available chronologies can be extended by applications.
  * Adding a new calendar system requires the writing of an implementation of
  * {@code Chronology}, {@code ChronoLocalDate} and {@code Era}.
- * The majority of the logic specific to the calendar system will be in
- * {@code ChronoLocalDate}. The {@code Chronology} subclass acts as a factory.
+ * The majority of the logic specific to the calendar system will be in the
+ * {@code ChronoLocalDate} implementation.
+ * The {@code Chronology} implementation acts as a factory.
  * <p>
  * To permit the discovery of additional chronologies, the {@link java.util.ServiceLoader ServiceLoader}
  * is used. A file must be added to the {@code META-INF/services} directory with the
@@ -167,7 +168,7 @@
      * If the specified temporal object does not have a chronology, {@link IsoChronology} is returned.
      * <p>
      * This method matches the signature of the functional interface {@link TemporalQuery}
-     * allowing it to be used in queries via method reference, {@code Chronology::from}.
+     * allowing it to be used as a query via method reference, {@code Chronology::from}.
      *
      * @param temporal  the temporal to convert, not null
      * @return the chronology, not null
@@ -413,7 +414,7 @@
      * The alternate clock may be introduced using {@link Clock dependency injection}.
      *
      * @implSpec
-     * The default implementation invokes {@link #date(TemporalAccessor)} )}.
+     * The default implementation invokes {@link #date(TemporalAccessor)}.
      *
      * @param clock  the clock to use, not null
      * @return the current local date, not null
@@ -622,7 +623,7 @@
      * The parameters control the style of the returned text and the locale.
      *
      * @implSpec
-     * The default implementation behaves as the the formatter was used to
+     * The default implementation behaves as though the formatter was used to
      * format the chronology textual name.
      *
      * @param style  the style of the text required, not null
--- a/src/share/classes/java/time/chrono/Era.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/Era.java	Mon May 05 12:49:13 2014 -0700
@@ -182,7 +182,7 @@
     /**
      * Gets the value of the specified field from this era as an {@code int}.
      * <p>
-     * This queries this era for the value for the specified field.
+     * This queries this era for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
@@ -215,7 +215,7 @@
     /**
      * Gets the value of the specified field from this era as a {@code long}.
      * <p>
-     * This queries this era for the value for the specified field.
+     * This queries this era for the value of the specified field.
      * If it is not possible to return the value, because the field is not supported
      * or for some other reason, an exception is thrown.
      * <p>
--- a/src/share/classes/java/time/chrono/HijrahChronology.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/HijrahChronology.java	Mon May 05 12:49:13 2014 -0700
@@ -394,7 +394,7 @@
      * Gets the ID of the chronology.
      * <p>
      * The ID uniquely identifies the {@code Chronology}. It can be used to
-     * lookup the {@code Chronology} using {@link #of(String)}.
+     * lookup the {@code Chronology} using {@link Chronology#of(String)}.
      *
      * @return the chronology ID, non-null
      * @see #getCalendarType()
@@ -409,7 +409,7 @@
      * <p>
      * The calendar type is an identifier defined by the
      * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      *
      * @return the calendar system type; non-null if the calendar has
      *    a standard type, otherwise null
--- a/src/share/classes/java/time/chrono/IsoChronology.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/IsoChronology.java	Mon May 05 12:49:13 2014 -0700
@@ -143,7 +143,7 @@
      * Gets the ID of the chronology - 'ISO'.
      * <p>
      * The ID uniquely identifies the {@code Chronology}.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      *
      * @return the chronology ID - 'ISO'
      * @see #getCalendarType()
@@ -158,7 +158,7 @@
      * <p>
      * The calendar type is an identifier defined by the
      * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      * It can also be used as part of a locale, accessible via
      * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
      *
--- a/src/share/classes/java/time/chrono/JapaneseChronology.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/JapaneseChronology.java	Mon May 05 12:49:13 2014 -0700
@@ -150,7 +150,7 @@
      * Gets the ID of the chronology - 'Japanese'.
      * <p>
      * The ID uniquely identifies the {@code Chronology}.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      *
      * @return the chronology ID - 'Japanese'
      * @see #getCalendarType()
@@ -165,7 +165,7 @@
      * <p>
      * The calendar type is an identifier defined by the
      * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      * It can also be used as part of a locale, accessible via
      * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
      *
--- a/src/share/classes/java/time/chrono/MinguoChronology.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/MinguoChronology.java	Mon May 05 12:49:13 2014 -0700
@@ -132,7 +132,7 @@
      * Gets the ID of the chronology - 'Minguo'.
      * <p>
      * The ID uniquely identifies the {@code Chronology}.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      *
      * @return the chronology ID - 'Minguo'
      * @see #getCalendarType()
@@ -147,7 +147,7 @@
      * <p>
      * The calendar type is an identifier defined by the
      * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      * It can also be used as part of a locale, accessible via
      * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
      *
--- a/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/chrono/ThaiBuddhistChronology.java	Mon May 05 12:49:13 2014 -0700
@@ -168,7 +168,7 @@
      * Gets the ID of the chronology - 'ThaiBuddhist'.
      * <p>
      * The ID uniquely identifies the {@code Chronology}.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      *
      * @return the chronology ID - 'ThaiBuddhist'
      * @see #getCalendarType()
@@ -183,7 +183,7 @@
      * <p>
      * The calendar type is an identifier defined by the
      * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
-     * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+     * It can be used to lookup the {@code Chronology} using {@link Chronology#of(String)}.
      * It can also be used as part of a locale, accessible via
      * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
      *
--- a/src/share/classes/java/time/format/DateTimeFormatter.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/format/DateTimeFormatter.java	Mon May 05 12:49:13 2014 -0700
@@ -117,7 +117,7 @@
  * {@code parse(CharSequence text, DateTimeFormatter formatter)}.
  * <p>For example:
  * <blockquote><pre>
- *  String text = date.toString(formatter);
+ *  String text = date.format(formatter);
  *  LocalDate date = LocalDate.parse(text, formatter);
  * </pre></blockquote>
  * <p>
@@ -266,7 +266,7 @@
  * For example:
  * <blockquote><pre>
  *  DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy MM dd");
- *  String text = date.toString(formatter);
+ *  String text = date.format(formatter);
  *  LocalDate date = LocalDate.parse(text, formatter);
  * </pre></blockquote>
  * <p>
@@ -1976,7 +1976,7 @@
      * Errors are returned using the error index field of the {@code ParsePosition}
      * instead of {@code DateTimeParseException}.
      * The returned error index will be set to an index indicative of the error.
-     * Callers must check for errors before using the context.
+     * Callers must check for errors before using the result.
      * <p>
      * If the formatter parses the same field more than once with different values,
      * the result will be an error.
--- a/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Mon May 05 12:49:13 2014 -0700
@@ -137,7 +137,6 @@
  * <li>ChronologyText - the name of the chronology</li>
  * <li>Literal - a text literal</li>
  * <li>Nested and Optional - formats can be nested or made optional</li>
- * <li>Other - the printer and parser interfaces can be used to add user supplied formatting</li>
  * </ul>
  * In addition, any of the elements may be decorated by padding, either with spaces or any other character.
  * <p>
@@ -194,8 +193,8 @@
      * The locale and chronology are used to lookup the locale specific format
      * for the requested dateStyle and/or timeStyle.
      *
-     * @param dateStyle  the FormatStyle for the date
-     * @param timeStyle  the FormatStyle for the time
+     * @param dateStyle  the FormatStyle for the date, null for time-only pattern
+     * @param timeStyle  the FormatStyle for the time, null for date-only pattern
      * @param chrono  the Chronology, non-null
      * @param locale  the locale, non-null
      * @return the locale and Chronology specific formatting pattern
@@ -747,9 +746,9 @@
      * defines the connection between each value and the text:
      * <pre>
      * Map&lt;Long, String&gt; map = new HashMap&lt;&gt;();
-     * map.put(1, "JNY");
-     * map.put(2, "FBY");
-     * map.put(3, "MCH");
+     * map.put(1L, "JNY");
+     * map.put(2L, "FBY");
+     * map.put(3L, "MCH");
      * ...
      * builder.appendText(MONTH_OF_YEAR, map);
      * </pre>
@@ -841,7 +840,7 @@
      * <p>
      * The {@linkplain ResolverStyle resolver style} has no effect on instant parsing.
      * The end-of-day time of '24:00' is handled as midnight at the start of the following day.
-     * The leap-second time of '23:59:59' is handled to some degree, see
+     * The leap-second time of '23:59:60' is handled to some degree, see
      * {@link DateTimeFormatter#parsedLeapSecond()} for full details.
      * <p>
      * An alternative to this method is to format/parse the instant as a single
@@ -864,7 +863,7 @@
      * Appends the zone offset, such as '+01:00', to the formatter.
      * <p>
      * This appends an instruction to format/parse the offset ID to the builder.
-     * This is equivalent to calling {@code appendOffset("HH:MM:ss", "Z")}.
+     * This is equivalent to calling {@code appendOffset("+HH:MM:ss", "Z")}.
      *
      * @return this, for chaining, not null
      */
@@ -1049,7 +1048,7 @@
      *   "GMT+01:30"               -- ZoneOffset.of("+01:30")
      * </pre>
      * <p>
-     * Note that this method is is identical to {@code appendZoneId()} except
+     * Note that this method is identical to {@code appendZoneId()} except
      * in the mechanism used to obtain the zone.
      * Note also that parsing accepts offsets, whereas formatting will never
      * produce one.
@@ -1107,7 +1106,7 @@
      *   "GMT+01:30"               -- ZoneOffset.of("GMT+01:30")
      * </pre>
      * <p>
-     * Note that this method is is identical to {@code appendZoneId()} except
+     * Note that this method is identical to {@code appendZoneId()} except
      * in the mechanism used to obtain the zone.
      *
      * @return this, for chaining, not null
@@ -1132,7 +1131,7 @@
      * for the locale set in the {@link DateTimeFormatter}.
      * If the temporal object being printed represents an instant, then the text
      * will be the summer or winter time text as appropriate.
-     * If the lookup for text does not find any suitable reuslt, then the
+     * If the lookup for text does not find any suitable result, then the
      * {@link ZoneId#getId() ID} will be printed instead.
      * If the zone cannot be obtained then an exception is thrown unless the
      * section of the formatter is optional.
@@ -1168,7 +1167,7 @@
      * for the locale set in the {@link DateTimeFormatter}.
      * If the temporal object being printed represents an instant, then the text
      * will be the summer or winter time text as appropriate.
-     * If the lookup for text does not find any suitable reuslt, then the
+     * If the lookup for text does not find any suitable result, then the
      * {@link ZoneId#getId() ID} will be printed instead.
      * If the zone cannot be obtained then an exception is thrown unless the
      * section of the formatter is optional.
@@ -1182,7 +1181,7 @@
      * zone. This method also allows a set of preferred {@link ZoneId} to be
      * specified for parsing. The matched preferred zone id will be used if the
      * textural zone name being parsed is not unique.
-     *
+     * <p>
      * If the zone cannot be parsed then an exception is thrown unless the
      * section of the formatter is optional.
      *
@@ -1227,7 +1226,6 @@
      * <p>
      * The calendar system name will be output during a format.
      * If the chronology cannot be obtained then an exception will be thrown.
-     * The calendar system name is obtained from the Chronology.
      *
      * @param textStyle  the text style to use, not null
      * @return this, for chaining, not null
@@ -1453,7 +1451,7 @@
      *    LLLLL   5      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.NARROW_STANDALONE)
      *
      *    w       1      append special localized WeekFields element for numeric week-of-year
-     *    ww      1      append special localized WeekFields element for numeric week-of-year, zero-padded
+     *    ww      2      append special localized WeekFields element for numeric week-of-year, zero-padded
      *    W       1      append special localized WeekFields element for numeric week-of-month
      *    d       1      appendValue(ChronoField.DAY_OF_MONTH)
      *    dd      2      appendValue(ChronoField.DAY_OF_MONTH, 2)
@@ -1880,7 +1878,6 @@
      * <p>
      * During parsing, the padding and decorated element are parsed.
      * If parsing is lenient, then the pad width is treated as a maximum.
-     * If parsing is case insensitive, then the pad character is matched ignoring case.
      * The padding is parsed greedily. Thus, if the decorated element starts with
      * the pad character, it will not be parsed.
      *
--- a/src/share/classes/java/time/format/DecimalStyle.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/format/DecimalStyle.java	Mon May 05 12:49:13 2014 -0700
@@ -62,7 +62,6 @@
 package java.time.format;
 
 import java.text.DecimalFormatSymbols;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Locale;
@@ -138,7 +137,7 @@
      *     of(Locale.getDefault(Locale.Category.FORMAT))}.
      *
      * @see java.util.Locale.Category#FORMAT
-     * @return the info, not null
+     * @return the decimal style, not null
      */
     public static DecimalStyle ofDefaultLocale() {
         return of(Locale.getDefault(Locale.Category.FORMAT));
@@ -150,7 +149,7 @@
      * This method provides access to locale sensitive decimal style symbols.
      *
      * @param locale  the locale, not null
-     * @return the info, not null
+     * @return the decimal style, not null
      */
     public static DecimalStyle of(Locale locale) {
         Objects.requireNonNull(locale, "locale");
@@ -340,7 +339,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Checks if this DecimalStyle is equal another DecimalStyle.
+     * Checks if this DecimalStyle is equal to another DecimalStyle.
      *
      * @param obj  the object to check, null returns false
      * @return true if this is equal to the other date
--- a/src/share/classes/java/time/temporal/IsoFields.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/temporal/IsoFields.java	Mon May 05 12:49:13 2014 -0700
@@ -638,7 +638,7 @@
 
     //-----------------------------------------------------------------------
     /**
-     * Implementation of the period unit.
+     * Implementation of the unit.
      */
     private static enum Unit implements TemporalUnit {
 
--- a/src/share/classes/java/time/temporal/Temporal.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/temporal/Temporal.java	Mon May 05 12:49:13 2014 -0700
@@ -157,7 +157,8 @@
      * This adjusts this date-time according to the rules of the specified adjuster.
      * A simple adjuster might simply set the one of the fields, such as the year field.
      * A more complex adjuster might set the date to the last day of the month.
-     * A selection of common adjustments is provided in {@link TemporalAdjuster}.
+     * A selection of common adjustments is provided in
+     * {@link java.time.temporal.TemporalAdjusters TemporalAdjusters}.
      * These include finding the "last day of the month" and "next Wednesday".
      * The adjuster is responsible for handling special cases, such as the varying
      * lengths of month and leap years.
@@ -287,7 +288,7 @@
      * This provides equivalent, safe behavior for immutable and mutable implementations.
      *
      * @param amountToAdd  the amount of the specified unit to add, may be negative
-     * @param unit  the unit of the period to add, not null
+     * @param unit  the unit of the amount to add, not null
      * @return an object of the same type with the specified period added, not null
      * @throws DateTimeException if the unit cannot be added
      * @throws UnsupportedTemporalTypeException if the unit is not supported
@@ -359,7 +360,7 @@
      * </pre>
      *
      * @param amountToSubtract  the amount of the specified unit to subtract, may be negative
-     * @param unit  the unit of the period to subtract, not null
+     * @param unit  the unit of the amount to subtract, not null
      * @return an object of the same type with the specified period subtracted, not null
      * @throws DateTimeException if the unit cannot be subtracted
      * @throws UnsupportedTemporalTypeException if the unit is not supported
@@ -378,12 +379,12 @@
      * The start and end points are {@code this} and the specified temporal.
      * The end point is converted to be of the same type as the start point if different.
      * The result will be negative if the end is before the start.
-     * For example, the period in hours between two temporal objects can be
+     * For example, the amount in hours between two temporal objects can be
      * calculated using {@code startTime.until(endTime, HOURS)}.
      * <p>
      * The calculation returns a whole number, representing the number of
      * complete units between the two temporals.
-     * For example, the period in hours between the times 11:30 and 13:29
+     * For example, the amount in hours between the times 11:30 and 13:29
      * will only be one hour as it is one minute short of two hours.
      * <p>
      * There are two equivalent ways of using this method.
--- a/src/share/classes/java/time/temporal/TemporalAccessor.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/temporal/TemporalAccessor.java	Mon May 05 12:49:13 2014 -0700
@@ -180,7 +180,7 @@
     /**
      * Gets the value of the specified field as an {@code int}.
      * <p>
-     * This queries the date-time for the value for the specified field.
+     * This queries the date-time for the value of the specified field.
      * The returned value will always be within the valid range of values for the field.
      * If the date-time cannot return the value, because the field is unsupported or for
      * some other reason, an exception will be thrown.
@@ -229,7 +229,7 @@
     /**
      * Gets the value of the specified field as a {@code long}.
      * <p>
-     * This queries the date-time for the value for the specified field.
+     * This queries the date-time for the value of the specified field.
      * The returned value may be outside the valid range of values for the field.
      * If the date-time cannot return the value, because the field is unsupported or for
      * some other reason, an exception will be thrown.
--- a/src/share/classes/java/time/temporal/TemporalField.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/temporal/TemporalField.java	Mon May 05 12:49:13 2014 -0700
@@ -116,7 +116,7 @@
      * For example, in the field 'MonthOfYear', the unit is 'Months'.
      * See also {@link #getRangeUnit()}.
      *
-     * @return the period unit defining the base unit of the field, not null
+     * @return the unit defining the base unit of the field, not null
      */
     TemporalUnit getBaseUnit();
 
@@ -130,7 +130,7 @@
      * The range is never null. For example, the 'Year' field is shorthand for
      * 'YearOfForever'. It therefore has a unit of 'Years' and a range of 'Forever'.
      *
-     * @return the period unit defining the range of the field, not null
+     * @return the unit defining the range of the field, not null
      */
     TemporalUnit getRangeUnit();
 
@@ -179,7 +179,7 @@
      * Checks if this field is supported by the temporal object.
      * <p>
      * This determines whether the temporal accessor supports this field.
-     * If this returns false, the the temporal cannot be queried for this field.
+     * If this returns false, then the temporal cannot be queried for this field.
      * <p>
      * There are two equivalent ways of using this method.
      * The first is to invoke this method directly.
--- a/src/share/classes/java/time/temporal/TemporalUnit.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/temporal/TemporalUnit.java	Mon May 05 12:49:13 2014 -0700
@@ -221,7 +221,7 @@
      * @param temporal  the temporal object to adjust, not null
      * @param amount  the amount of this unit to add, positive or negative
      * @return the adjusted temporal object, not null
-     * @throws DateTimeException if the period cannot be added
+     * @throws DateTimeException if the amount cannot be added
      * @throws UnsupportedTemporalTypeException if the unit is not supported by the temporal
      */
     <R extends Temporal> R addTo(R temporal, long amount);
--- a/src/share/classes/java/time/zone/ZoneOffsetTransition.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/time/zone/ZoneOffsetTransition.java	Mon May 05 12:49:13 2014 -0700
@@ -83,7 +83,7 @@
  * The discontinuity is normally a gap in spring and an overlap in autumn.
  * {@code ZoneOffsetTransition} models the transition between the two offsets.
  * <p>
- * Gaps occur where there are local date-times that simply do not not exist.
+ * Gaps occur where there are local date-times that simply do not exist.
  * An example would be when the offset changes from {@code +03:00} to {@code +04:00}.
  * This might be described as 'the clocks will move forward one hour tonight at 1am'.
  * <p>
@@ -334,7 +334,7 @@
     /**
      * Does this transition represent a gap in the local time-line.
      * <p>
-     * Gaps occur where there are local date-times that simply do not not exist.
+     * Gaps occur where there are local date-times that simply do not exist.
      * An example would be when the offset changes from {@code +01:00} to {@code +02:00}.
      * This might be described as 'the clocks will move forward one hour tonight at 1am'.
      *
--- a/src/share/classes/java/util/ArrayList.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/ArrayList.java	Mon May 05 12:49:13 2014 -0700
@@ -70,9 +70,9 @@
  * unsynchronized access to the list:<pre>
  *   List list = Collections.synchronizedList(new ArrayList(...));</pre>
  *
- * <p><a name="fail-fast">
+ * <p id="fail-fast">
  * The iterators returned by this class's {@link #iterator() iterator} and
- * {@link #listIterator(int) listIterator} methods are <em>fail-fast</em>:</a>
+ * {@link #listIterator(int) listIterator} methods are <em>fail-fast</em>:
  * if the list is structurally modified at any time after the iterator is
  * created, in any way except through the iterator's own
  * {@link ListIterator#remove() remove} or
--- a/src/share/classes/java/util/Arrays.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/Arrays.java	Mon May 05 12:49:13 2014 -0700
@@ -2561,7 +2561,7 @@
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.<p>
+     * two array references are considered equal if both are <tt>null</tt>.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
@@ -2590,7 +2590,7 @@
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.<p>
+     * two array references are considered equal if both are <tt>null</tt>.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
@@ -2619,7 +2619,7 @@
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.<p>
+     * two array references are considered equal if both are <tt>null</tt>.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
@@ -2648,7 +2648,7 @@
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.<p>
+     * two array references are considered equal if both are <tt>null</tt>.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
@@ -2677,7 +2677,7 @@
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.<p>
+     * two array references are considered equal if both are <tt>null</tt>.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
@@ -2706,7 +2706,7 @@
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.<p>
+     * two array references are considered equal if both are <tt>null</tt>.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
@@ -2735,7 +2735,7 @@
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.<p>
+     * two array references are considered equal if both are <tt>null</tt>.
      *
      * Two doubles <tt>d1</tt> and <tt>d2</tt> are considered equal if:
      * <pre>    <tt>new Double(d1).equals(new Double(d2))</tt></pre>
@@ -2770,7 +2770,7 @@
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.<p>
+     * two array references are considered equal if both are <tt>null</tt>.
      *
      * Two floats <tt>f1</tt> and <tt>f2</tt> are considered equal if:
      * <pre>    <tt>new Float(f1).equals(new Float(f2))</tt></pre>
@@ -2807,7 +2807,7 @@
      * and <tt>e2</tt> are considered <i>equal</i> if <tt>(e1==null ? e2==null
      * : e1.equals(e2))</tt>.  In other words, the two arrays are equal if
      * they contain the same elements in the same order.  Also, two array
-     * references are considered equal if both are <tt>null</tt>.<p>
+     * references are considered equal if both are <tt>null</tt>.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
--- a/src/share/classes/java/util/Hashtable.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/Hashtable.java	Mon May 05 12:49:13 2014 -0700
@@ -26,7 +26,6 @@
 package java.util;
 
 import java.io.*;
-import java.util.concurrent.ThreadLocalRandom;
 import java.util.function.BiConsumer;
 import java.util.function.Function;
 import java.util.function.BiFunction;
@@ -92,8 +91,10 @@
  * ConcurrentModificationException}.  Thus, in the face of concurrent
  * modification, the iterator fails quickly and cleanly, rather than risking
  * arbitrary, non-deterministic behavior at an undetermined time in the future.
- * The Enumerations returned by Hashtable's keys and elements methods are
- * <em>not</em> fail-fast.
+ * The Enumerations returned by Hashtable's {@link #keys keys} and
+ * {@link #elements elements} methods are <em>not</em> fail-fast; if the
+ * Hashtable is structurally modified at any time after the enumeration is
+ * created then the results of enumerating are undefined.
  *
  * <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
  * as it is, generally speaking, impossible to make any hard guarantees in the
@@ -115,6 +116,9 @@
  * to use {@link java.util.concurrent.ConcurrentHashMap} in place of
  * {@code Hashtable}.
  *
+ * @param <K> the type of keys maintained by this map
+ * @param <V> the type of mapped values
+ *
  * @author  Arthur van Hoff
  * @author  Josh Bloch
  * @author  Neal Gafter
@@ -246,6 +250,9 @@
 
     /**
      * Returns an enumeration of the keys in this hashtable.
+     * Use the Enumeration methods on the returned object to fetch the keys
+     * sequentially. If the hashtable is structurally modified while enumerating
+     * over the keys then the results of enumerating are undefined.
      *
      * @return  an enumeration of the keys in this hashtable.
      * @see     Enumeration
@@ -260,7 +267,8 @@
     /**
      * Returns an enumeration of the values in this hashtable.
      * Use the Enumeration methods on the returned object to fetch the elements
-     * sequentially.
+     * sequentially. If the hashtable is structurally modified while enumerating
+     * over the values then the results of enumerating are undefined.
      *
      * @return  an enumeration of the values in this hashtable.
      * @see     java.util.Enumeration
@@ -417,8 +425,6 @@
     }
 
     private void addEntry(int hash, K key, V value, int index) {
-        modCount++;
-
         Entry<?,?> tab[] = table;
         if (count >= threshold) {
             // Rehash the table if the threshold is exceeded
@@ -434,6 +440,7 @@
         Entry<K,V> e = (Entry<K,V>) tab[index];
         tab[index] = new Entry<>(hash, key, value, e);
         count++;
+        modCount++;
     }
 
     /**
@@ -494,12 +501,12 @@
         Entry<K,V> e = (Entry<K,V>)tab[index];
         for(Entry<K,V> prev = null ; e != null ; prev = e, e = e.next) {
             if ((e.hash == hash) && e.key.equals(key)) {
-                modCount++;
                 if (prev != null) {
                     prev.next = e.next;
                 } else {
                     tab[index] = e.next;
                 }
+                modCount++;
                 count--;
                 V oldValue = e.value;
                 e.value = null;
@@ -528,9 +535,9 @@
      */
     public synchronized void clear() {
         Entry<?,?> tab[] = table;
-        modCount++;
         for (int index = tab.length; --index >= 0; )
             tab[index] = null;
+        modCount++;
         count = 0;
     }
 
@@ -719,14 +726,14 @@
             Entry<K,V> e = (Entry<K,V>)tab[index];
             for(Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
                 if (e.hash==hash && e.equals(entry)) {
-                    modCount++;
                     if (prev != null)
                         prev.next = e.next;
                     else
                         tab[index] = e.next;
 
+                    e.value = null; // clear for gc.
+                    modCount++;
                     count--;
-                    e.value = null;
                     return true;
                 }
             }
@@ -939,14 +946,14 @@
         Entry<K,V> e = (Entry<K,V>)tab[index];
         for (Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
             if ((e.hash == hash) && e.key.equals(key) && e.value.equals(value)) {
-                modCount++;
                 if (prev != null) {
                     prev.next = e.next;
                 } else {
                     tab[index] = e.next;
                 }
+                e.value = null; // clear for gc
+                modCount++;
                 count--;
-                e.value = null;
                 return true;
             }
         }
@@ -1030,12 +1037,12 @@
             if (e.hash == hash && e.key.equals(key)) {
                 V newValue = remappingFunction.apply(key, e.value);
                 if (newValue == null) {
-                    modCount++;
                     if (prev != null) {
                         prev.next = e.next;
                     } else {
                         tab[index] = e.next;
                     }
+                    modCount++;
                     count--;
                 } else {
                     e.value = newValue;
@@ -1059,12 +1066,12 @@
             if (e.hash == hash && Objects.equals(e.key, key)) {
                 V newValue = remappingFunction.apply(key, e.value);
                 if (newValue == null) {
-                    modCount++;
                     if (prev != null) {
                         prev.next = e.next;
                     } else {
                         tab[index] = e.next;
                     }
+                    modCount++;
                     count--;
                 } else {
                     e.value = newValue;
@@ -1094,12 +1101,12 @@
             if (e.hash == hash && e.key.equals(key)) {
                 V newValue = remappingFunction.apply(e.value, value);
                 if (newValue == null) {
-                    modCount++;
                     if (prev != null) {
                         prev.next = e.next;
                     } else {
                         tab[index] = e.next;
                     }
+                    modCount++;
                     count--;
                 } else {
                     e.value = newValue;
@@ -1298,24 +1305,24 @@
      * by passing an Enumeration.
      */
     private class Enumerator<T> implements Enumeration<T>, Iterator<T> {
-        Entry<?,?>[] table = Hashtable.this.table;
+        final Entry<?,?>[] table = Hashtable.this.table;
         int index = table.length;
         Entry<?,?> entry;
         Entry<?,?> lastReturned;
-        int type;
+        final int type;
 
         /**
          * Indicates whether this Enumerator is serving as an Iterator
          * or an Enumeration.  (true -> Iterator).
          */
-        boolean iterator;
+        final boolean iterator;
 
         /**
          * The modCount value that the iterator believes that the backing
          * Hashtable should have.  If this expectation is violated, the iterator
          * has detected concurrent modification.
          */
-        protected int expectedModCount = modCount;
+        protected int expectedModCount = Hashtable.this.modCount;
 
         Enumerator(int type, boolean iterator) {
             this.type = type;
@@ -1360,7 +1367,7 @@
         }
 
         public T next() {
-            if (modCount != expectedModCount)
+            if (Hashtable.this.modCount != expectedModCount)
                 throw new ConcurrentModificationException();
             return nextElement();
         }
@@ -1381,14 +1388,14 @@
                 Entry<K,V> e = (Entry<K,V>)tab[index];
                 for(Entry<K,V> prev = null; e != null; prev = e, e = e.next) {
                     if (e == lastReturned) {
-                        modCount++;
-                        expectedModCount++;
                         if (prev == null)
                             tab[index] = e.next;
                         else
                             prev.next = e.next;
-                        count--;
+                        expectedModCount++;
                         lastReturned = null;
+                        Hashtable.this.modCount++;
+                        Hashtable.this.count--;
                         return;
                     }
                 }
--- a/src/share/classes/java/util/Locale.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/Locale.java	Mon May 05 12:49:13 2014 -0700
@@ -951,7 +951,6 @@
      * functionality, this method should only be used if the caller is
      * prepared to reinitialize locale-sensitive code running within the
      * same Java Virtual Machine.
-     * <p>
      *
      * @param category - the specified category to set the default locale
      * @param newLocale - the new default locale
--- a/src/share/classes/java/util/Properties.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/Properties.java	Mon May 05 12:49:13 2014 -0700
@@ -754,7 +754,6 @@
      * <p>
      * After the entries have been written, the output stream is flushed.
      * The output stream remains open after this method returns.
-     * <p>
      *
      * @param   writer      an output character stream writer.
      * @param   comments   a description of the property list.
@@ -802,7 +801,7 @@
      * <p>
      * After the entries have been written, the output stream is flushed.
      * The output stream remains open after this method returns.
-     * <p>
+     *
      * @param   out      an output stream.
      * @param   comments   a description of the property list.
      * @exception  IOException if writing this property list to the specified
--- a/src/share/classes/java/util/PropertyPermission.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/PropertyPermission.java	Mon May 05 12:49:13 2014 -0700
@@ -193,7 +193,7 @@
     /**
      * Checks two PropertyPermission objects for equality. Checks that <i>obj</i> is
      * a PropertyPermission, and has the same name and actions as this object.
-     * <P>
+     *
      * @param obj the object we are testing for equality with this object.
      * @return true if obj is a PropertyPermission, and has the same name and
      * actions as this PropertyPermission object.
@@ -369,7 +369,6 @@
     /**
      * Returns a new PermissionCollection object for storing
      * PropertyPermission objects.
-     * <p>
      *
      * @return a new PermissionCollection object suitable for storing
      * PropertyPermissions.
--- a/src/share/classes/java/util/Vector.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/Vector.java	Mon May 05 12:49:13 2014 -0700
@@ -45,9 +45,9 @@
  * capacity of a vector before inserting a large number of
  * components; this reduces the amount of incremental reallocation.
  *
- * <p><a name="fail-fast">
+ * <p id="fail-fast">
  * The iterators returned by this class's {@link #iterator() iterator} and
- * {@link #listIterator(int) listIterator} methods are <em>fail-fast</em></a>:
+ * {@link #listIterator(int) listIterator} methods are <em>fail-fast</em>:
  * if the vector is structurally modified at any time after the iterator is
  * created, in any way except through the iterator's own
  * {@link ListIterator#remove() remove} or
@@ -56,7 +56,9 @@
  * concurrent modification, the iterator fails quickly and cleanly, rather
  * than risking arbitrary, non-deterministic behavior at an undetermined
  * time in the future.  The {@link Enumeration Enumerations} returned by
- * the {@link #elements() elements} method are <em>not</em> fail-fast.
+ * the {@link #elements() elements} method are <em>not</em> fail-fast; if the
+ * Vector is structurally modified at any time after the enumeration is
+ * created then the results of enumerating are undefined.
  *
  * <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
  * as it is, generally speaking, impossible to make any hard guarantees in the
@@ -74,6 +76,8 @@
  * implementation is not needed, it is recommended to use {@link
  * ArrayList} in place of {@code Vector}.
  *
+ * @param <E> Type of component elements
+ *
  * @author  Lee Boynton
  * @author  Jonathan Payne
  * @see Collection
@@ -330,7 +334,9 @@
      * Returns an enumeration of the components of this vector. The
      * returned {@code Enumeration} object will generate all items in
      * this vector. The first item generated is the item at index {@code 0},
-     * then the item at index {@code 1}, and so on.
+     * then the item at index {@code 1}, and so on. If the vector is
+     * structurally modified while enumerating over the elements then the
+     * results of enumerating are undefined.
      *
      * @return  an enumeration of the components of this vector
      * @see     Iterator
@@ -553,7 +559,6 @@
      *         ({@code index < 0 || index >= size()})
      */
     public synchronized void removeElementAt(int index) {
-        modCount++;
         if (index >= elementCount) {
             throw new ArrayIndexOutOfBoundsException(index + " >= " +
                                                      elementCount);
@@ -565,6 +570,7 @@
         if (j > 0) {
             System.arraycopy(elementData, index + 1, elementData, index, j);
         }
+        modCount++;
         elementCount--;
         elementData[elementCount] = null; /* to let gc do its work */
     }
@@ -593,7 +599,6 @@
      *         ({@code index < 0 || index > size()})
      */
     public synchronized void insertElementAt(E obj, int index) {
-        modCount++;
         if (index > elementCount) {
             throw new ArrayIndexOutOfBoundsException(index
                                                      + " > " + elementCount);
@@ -601,6 +606,7 @@
         ensureCapacityHelper(elementCount + 1);
         System.arraycopy(elementData, index, elementData, index + 1, elementCount - index);
         elementData[index] = obj;
+        modCount++;
         elementCount++;
     }
 
@@ -616,8 +622,8 @@
      * @param   obj   the component to be added
      */
     public synchronized void addElement(E obj) {
+        ensureCapacityHelper(elementCount + 1);
         modCount++;
-        ensureCapacityHelper(elementCount + 1);
         elementData[elementCount++] = obj;
     }
 
@@ -653,11 +659,11 @@
      * method (which is part of the {@link List} interface).
      */
     public synchronized void removeAllElements() {
-        modCount++;
         // Let gc do its work
         for (int i = 0; i < elementCount; i++)
             elementData[i] = null;
 
+        modCount++;
         elementCount = 0;
     }
 
@@ -705,12 +711,15 @@
      * of the Vector <em>only</em> if the caller knows that the Vector
      * does not contain any null elements.)
      *
+     * @param <T> type of array elements. The same type as {@code <E>} or a
+     * supertype of {@code <E>}.
      * @param a the array into which the elements of the Vector are to
      *          be stored, if it is big enough; otherwise, a new array of the
      *          same runtime type is allocated for this purpose.
      * @return an array containing the elements of the Vector
-     * @throws ArrayStoreException if the runtime type of a is not a supertype
-     * of the runtime type of every element in this Vector
+     * @throws ArrayStoreException if the runtime type of a, {@code <T>}, is not
+     * a supertype of the runtime type, {@code <E>}, of every element in this
+     * Vector
      * @throws NullPointerException if the given array is null
      * @since 1.2
      */
@@ -778,8 +787,8 @@
      * @since 1.2
      */
     public synchronized boolean add(E e) {
+        ensureCapacityHelper(elementCount + 1);
         modCount++;
-        ensureCapacityHelper(elementCount + 1);
         elementData[elementCount++] = e;
         return true;
     }
@@ -879,14 +888,18 @@
      * @throws NullPointerException if the specified collection is null
      * @since 1.2
      */
-    public synchronized boolean addAll(Collection<? extends E> c) {
-        modCount++;
+    public boolean addAll(Collection<? extends E> c) {
         Object[] a = c.toArray();
         int numNew = a.length;
-        ensureCapacityHelper(elementCount + numNew);
-        System.arraycopy(a, 0, elementData, elementCount, numNew);
-        elementCount += numNew;
-        return numNew != 0;
+        if (numNew > 0) {
+            synchronized (this) {
+                ensureCapacityHelper(elementCount + numNew);
+                System.arraycopy(a, 0, elementData, elementCount, numNew);
+                modCount++;
+                elementCount += numNew;
+            }
+        }
+        return numNew > 0;
     }
 
     /**
@@ -951,22 +964,25 @@
      * @since 1.2
      */
     public synchronized boolean addAll(int index, Collection<? extends E> c) {
-        modCount++;
         if (index < 0 || index > elementCount)
             throw new ArrayIndexOutOfBoundsException(index);
 
         Object[] a = c.toArray();
         int numNew = a.length;
-        ensureCapacityHelper(elementCount + numNew);
 
-        int numMoved = elementCount - index;
-        if (numMoved > 0)
-            System.arraycopy(elementData, index, elementData, index + numNew,
-                             numMoved);
+        if (numNew > 0) {
+            ensureCapacityHelper(elementCount + numNew);
 
-        System.arraycopy(a, 0, elementData, index, numNew);
-        elementCount += numNew;
-        return numNew != 0;
+            int numMoved = elementCount - index;
+            if (numMoved > 0)
+                System.arraycopy(elementData, index, elementData,
+                        index + numNew, numMoved);
+
+             System.arraycopy(a, 0, elementData, index, numNew);
+             elementCount += numNew;
+             modCount++;
+        }
+        return numNew > 0;
     }
 
     /**
@@ -1047,12 +1063,12 @@
      * (If {@code toIndex==fromIndex}, this operation has no effect.)
      */
     protected synchronized void removeRange(int fromIndex, int toIndex) {
-        modCount++;
         int numMoved = elementCount - toIndex;
         System.arraycopy(elementData, toIndex, elementData, fromIndex,
                          numMoved);
 
         // Let gc do its work
+        modCount++;
         int newElementCount = elementCount - (toIndex-fromIndex);
         while (elementCount != newElementCount)
             elementData[--elementCount] = null;
@@ -1420,7 +1436,7 @@
         }
 
         public long estimateSize() {
-            return (long) (getFence() - index);
+            return getFence() - index;
         }
 
         public int characteristics() {
--- a/src/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Mon May 05 12:49:13 2014 -0700
@@ -80,7 +80,6 @@
  * {@link ReadLock#tryLock()} and {@link WriteLock#tryLock()} methods
  * do not honor this fair setting and will immediately acquire the lock
  * if it is possible, regardless of waiting threads.)
- * <p>
  * </dl>
  *
  * <li><b>Reentrancy</b>
--- a/src/share/classes/java/util/jar/Pack200.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/jar/Pack200.java	Mon May 05 12:49:13 2014 -0700
@@ -224,7 +224,7 @@
      * Note: Unless otherwise noted, passing a <tt>null</tt> argument to a
      * constructor or method in this class will cause a {@link NullPointerException}
      * to be thrown.
-     * <p>
+     *
      * @since 1.5
      */
     public interface Packer {
--- a/src/share/classes/java/util/jar/package.html	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/jar/package.html	Mon May 05 12:49:13 2014 -0700
@@ -43,8 +43,7 @@
       file format. See 
       <a href="../zip/package-summary.html#package_description">java.util.zip
       package description.</a> <p>
-      In JAR files, all file names must be encoded in the UTF-8 encoding. 
-<p>
+      In JAR files, all file names must be encoded in the UTF-8 encoding.
   <li><a href="../../../../technotes/guides/jar/jar.html">
       Manifest and Signature Specification</a> - The manifest format specification.
 </ul>
--- a/src/share/classes/java/util/logging/ConsoleHandler.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/ConsoleHandler.java	Mon May 05 12:49:13 2014 -0700
@@ -62,7 +62,7 @@
  * <li>   com.foo.MyHandler.level=INFO </li>
  * <li>   com.foo.MyHandler.formatter=java.util.logging.SimpleFormatter </li>
  * </ul>
- * <p>
+ *
  * @since 1.4
  */
 public class ConsoleHandler extends StreamHandler {
@@ -86,7 +86,7 @@
      * <p>
      * The logging request was made initially to a <tt>Logger</tt> object,
      * which initialized the <tt>LogRecord</tt> and forwarded it here.
-     * <p>
+     *
      * @param  record  description of the log event. A null record is
      *                 silently ignored and is not published
      */
--- a/src/share/classes/java/util/logging/FileHandler.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/FileHandler.java	Mon May 05 12:49:13 2014 -0700
@@ -243,7 +243,7 @@
     /**
      * Construct a default <tt>FileHandler</tt>.  This will be configured
      * entirely from <tt>LogManager</tt> properties (or their default values).
-     * <p>
+     *
      * @exception  IOException if there are IO problems opening the files.
      * @exception  SecurityException  if a security manager exists and if
      *             the caller does not have <tt>LoggingPermission("control"))</tt>.
--- a/src/share/classes/java/util/logging/Formatter.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/Formatter.java	Mon May 05 12:49:13 2014 -0700
@@ -105,7 +105,6 @@
      *     java.text.MessageFormat  is used to format the string.
      * <li>Otherwise no formatting is performed.
      * </ul>
-     * <p>
      *
      * @param  record  the log record containing the raw message
      * @return   a localized and formatted message
--- a/src/share/classes/java/util/logging/Handler.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/Handler.java	Mon May 05 12:49:13 2014 -0700
@@ -158,7 +158,7 @@
      * <p>
      * Some <tt>Handlers</tt> may not use <tt>Formatters</tt>, in
      * which case the <tt>Formatter</tt> will be remembered, but not used.
-     * <p>
+     *
      * @param newFormatter the <tt>Formatter</tt> to use (may not be null)
      * @exception  SecurityException  if a security manager exists and if
      *             the caller does not have <tt>LoggingPermission("control")</tt>.
@@ -329,7 +329,7 @@
      * may make other <tt>Handler</tt> specific checks that might prevent a
      * handler from logging the <tt>LogRecord</tt>. It will return false if
      * the <tt>LogRecord</tt> is null.
-     * <p>
+     *
      * @param record  a <tt>LogRecord</tt>
      * @return true if the <tt>LogRecord</tt> would be logged.
      *
--- a/src/share/classes/java/util/logging/Level.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/Level.java	Mon May 05 12:49:13 2014 -0700
@@ -195,7 +195,7 @@
     /**
      * Create a named Level with a given integer value and a
      * given localization resource name.
-     * <p>
+     *
      * @param name  the name of the Level, for example "SEVERE".
      * @param value an integer value for the level.
      * @param resourceBundleName name of a resource bundle to use in
--- a/src/share/classes/java/util/logging/LogManager.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/LogManager.java	Mon May 05 12:49:13 2014 -0700
@@ -1130,7 +1130,7 @@
      * is no strong reference to the Logger. The caller of this method
      * must check the return value for null in order to properly handle
      * the case where the Logger has been garbage collected.
-     * <p>
+     *
      * @param name name of the logger
      * @return  matching logger or null if none is found
      */
@@ -1151,7 +1151,7 @@
      * return value from {@code LogManager.getLogger()} for null to properly
      * handle the case where the Logger has been garbage collected in the
      * time since its name was returned by this method.
-     * <p>
+     *
      * @return  enumeration of logger name strings
      */
     public Enumeration<String> getLoggerNames() {
--- a/src/share/classes/java/util/logging/Logger.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/Logger.java	Mon May 05 12:49:13 2014 -0700
@@ -338,7 +338,7 @@
      * suitable per-Logger granularity. Developers also need to keep a
      * strong reference to their Logger objects to prevent them from
      * being garbage collected.
-     * <p>
+     *
      * @deprecated Initialization of this field is prone to deadlocks.
      * The field must be initialized by the Logger class initialization
      * which may cause deadlocks with the LogManager class initialization.
@@ -526,7 +526,7 @@
      * name is used.  If the named Logger already exists and has
      * a different resource bundle name then an IllegalArgumentException
      * is thrown.
-     * <p>
+     *
      * @param   name    A name for the logger.  This should
      *                          be a dot-separated name and should normally
      *                          be based on the package name or class name
@@ -595,7 +595,6 @@
      * from the root logger. Changing its parent via the
      * {@link #setParent(java.util.logging.Logger) setParent} method
      * will still require the security permission specified by that method.
-     * <p>
      *
      * @return a newly created private Logger
      */
@@ -621,7 +620,7 @@
      * from the root logger.  Changing its parent via the
      * {@link #setParent(java.util.logging.Logger) setParent} method
      * will still require the security permission specified by that method.
-     * <p>
+     *
      * @param   resourceBundleName  name of ResourceBundle to be used for localizing
      *                          messages for this logger.
      *          May be null if none of the messages require localization.
@@ -776,7 +775,7 @@
      * If the logger is currently enabled for the given message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   msg     The string message (or a key in the message catalog)
      */
@@ -796,7 +795,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
@@ -815,7 +814,7 @@
      * If the logger is currently enabled for the given message
      * level then a corresponding LogRecord is created and forwarded
      * to all the registered output Handler objects.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   msg     The string message (or a key in the message catalog)
      * @param   param1  parameter to the message
@@ -836,7 +835,7 @@
      * If the logger is currently enabled for the given message
      * level then a corresponding LogRecord is created and forwarded
      * to all the registered output Handler objects.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   msg     The string message (or a key in the message catalog)
      * @param   params  array of parameters to the message
@@ -861,7 +860,7 @@
      * property, rather than the LogRecord parameters property.  Thus it is
      * processed specially by output Formatters and is not treated
      * as a formatting parameter to the LogRecord message property.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   msg     The string message (or a key in the message catalog)
      * @param   thrown  Throwable associated with log message.
@@ -887,7 +886,7 @@
      * property, rather than the LogRecord parameters property.  Thus it is
      * processed specially by output Formatters and is not treated
      * as a formatting parameter to the LogRecord message property.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   thrown  Throwable associated with log message.
      * @param   msgSupplier   A function, which when called, produces the
@@ -914,7 +913,7 @@
      * If the logger is currently enabled for the given message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -938,7 +937,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -964,7 +963,7 @@
      * If the logger is currently enabled for the given message
      * level then a corresponding LogRecord is created and forwarded
      * to all the registered output Handler objects.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -991,7 +990,7 @@
      * If the logger is currently enabled for the given message
      * level then a corresponding LogRecord is created and forwarded
      * to all the registered output Handler objects.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -1022,7 +1021,7 @@
      * property, rather than the LogRecord parameters property.  Thus it is
      * processed specially by output Formatters and is not treated
      * as a formatting parameter to the LogRecord message property.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -1054,7 +1053,7 @@
      * property, rather than the LogRecord parameters property.  Thus it is
      * processed specially by output Formatters and is not treated
      * as a formatting parameter to the LogRecord message property.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -1113,7 +1112,7 @@
      * The msg string is localized using the named resource bundle.  If the
      * resource bundle name is null, or an empty String or invalid
      * then the msg string is not localized.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -1147,7 +1146,7 @@
      * The msg string is localized using the named resource bundle.  If the
      * resource bundle name is null, or an empty String or invalid
      * then the msg string is not localized.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -1184,7 +1183,7 @@
      * The msg string is localized using the named resource bundle.  If the
      * resource bundle name is null, or an empty String or invalid
      * then the msg string is not localized.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -1220,7 +1219,7 @@
      * The {@code msg} string is localized using the given resource bundle.
      * If the resource bundle is {@code null}, then the {@code msg} string is not
      * localized.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    Name of the class that issued the logging request
      * @param   sourceMethod   Name of the method that issued the logging request
@@ -1260,7 +1259,7 @@
      * property, rather than the LogRecord parameters property.  Thus it is
      * processed specially by output Formatters and is not treated
      * as a formatting parameter to the LogRecord message property.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that issued the logging request
@@ -1301,7 +1300,7 @@
      * property, rather than the LogRecord parameters property.  Thus it is
      * processed specially by output Formatters and is not treated
      * as a formatting parameter to the LogRecord message property.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., SEVERE
      * @param   sourceClass    Name of the class that issued the logging request
      * @param   sourceMethod   Name of the method that issued the logging request
@@ -1333,7 +1332,7 @@
      * This is a convenience method that can be used to log entry
      * to a method.  A LogRecord with message "ENTRY", log level
      * FINER, and the given sourceMethod and sourceClass is logged.
-     * <p>
+     *
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that is being entered
      */
@@ -1348,7 +1347,7 @@
      * to a method.  A LogRecord with message "ENTRY {0}", log level
      * FINER, and the given sourceMethod, sourceClass, and parameter
      * is logged.
-     * <p>
+     *
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that is being entered
      * @param   param1         parameter to the method being entered
@@ -1365,7 +1364,7 @@
      * format {N} indicator for each entry in the parameter array),
      * log level FINER, and the given sourceMethod, sourceClass, and
      * parameters is logged.
-     * <p>
+     *
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of method that is being entered
      * @param   params         array of parameters to the method being entered
@@ -1389,7 +1388,7 @@
      * This is a convenience method that can be used to log returning
      * from a method.  A LogRecord with message "RETURN", log level
      * FINER, and the given sourceMethod and sourceClass is logged.
-     * <p>
+     *
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of the method
      */
@@ -1405,7 +1404,7 @@
      * from a method.  A LogRecord with message "RETURN {0}", log level
      * FINER, and the gives sourceMethod, sourceClass, and result
      * object is logged.
-     * <p>
+     *
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod   name of the method
      * @param   result  Object that is being returned
@@ -1430,7 +1429,7 @@
      * property, rather than the LogRecord parameters property.  Thus it is
      * processed specially by output Formatters and is not treated
      * as a formatting parameter to the LogRecord message property.
-     * <p>
+     *
      * @param   sourceClass    name of class that issued the logging request
      * @param   sourceMethod  name of the method.
      * @param   thrown  The Throwable that is being thrown.
@@ -1456,7 +1455,7 @@
      * If the logger is currently enabled for the SEVERE message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   msg     The string message (or a key in the message catalog)
      */
     public void severe(String msg) {
@@ -1469,7 +1468,7 @@
      * If the logger is currently enabled for the WARNING message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   msg     The string message (or a key in the message catalog)
      */
     public void warning(String msg) {
@@ -1482,7 +1481,7 @@
      * If the logger is currently enabled for the INFO message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   msg     The string message (or a key in the message catalog)
      */
     public void info(String msg) {
@@ -1495,7 +1494,7 @@
      * If the logger is currently enabled for the CONFIG message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   msg     The string message (or a key in the message catalog)
      */
     public void config(String msg) {
@@ -1508,7 +1507,7 @@
      * If the logger is currently enabled for the FINE message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   msg     The string message (or a key in the message catalog)
      */
     public void fine(String msg) {
@@ -1521,7 +1520,7 @@
      * If the logger is currently enabled for the FINER message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   msg     The string message (or a key in the message catalog)
      */
     public void finer(String msg) {
@@ -1534,7 +1533,7 @@
      * If the logger is currently enabled for the FINEST message
      * level then the given message is forwarded to all the
      * registered output Handler objects.
-     * <p>
+     *
      * @param   msg     The string message (or a key in the message catalog)
      */
     public void finest(String msg) {
@@ -1554,7 +1553,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
      * @since   1.8
@@ -1571,7 +1570,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
      * @since   1.8
@@ -1588,7 +1587,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
      * @since   1.8
@@ -1605,7 +1604,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
      * @since   1.8
@@ -1622,7 +1621,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
      * @since   1.8
@@ -1639,7 +1638,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
      * @since   1.8
@@ -1656,7 +1655,7 @@
      * level then the message is constructed by invoking the provided
      * supplier function and forwarded to all the registered output
      * Handler objects.
-     * <p>
+     *
      * @param   msgSupplier   A function, which when called, produces the
      *                        desired log message
      * @since   1.8
@@ -1769,7 +1768,7 @@
 
     /**
      * Get the Handlers associated with this logger.
-     * <p>
+     *
      * @return  an array of all registered Handlers
      */
     public Handler[] getHandlers() {
@@ -2015,7 +2014,7 @@
      * the LogManager to update a Logger when the namespace changes.
      * <p>
      * It should not be called from application code.
-     * <p>
+     *
      * @param  parent   the new parent logger
      * @throws  SecurityException  if a security manager exists and if
      *          the caller does not have LoggingPermission("control").
--- a/src/share/classes/java/util/logging/MemoryHandler.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/MemoryHandler.java	Mon May 05 12:49:13 2014 -0700
@@ -82,7 +82,7 @@
  * <li>   com.foo.MyHandler.level=INFO </li>
  * <li>   com.foo.MyHandler.formatter=java.util.logging.SimpleFormatter </li>
  * </ul>
- * <p>
+ *
  * @since 1.4
  */
 
@@ -267,7 +267,7 @@
      * whether it satisfies any <tt>Filter</tt>.  However it does <b>not</b>
      * check whether the <tt>LogRecord</tt> would result in a "push" of the
      * buffer contents. It will return false if the <tt>LogRecord</tt> is null.
-     * <p>
+     *
      * @param record  a <tt>LogRecord</tt>
      * @return true if the <tt>LogRecord</tt> would be logged.
      *
--- a/src/share/classes/java/util/logging/StreamHandler.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/StreamHandler.java	Mon May 05 12:49:13 2014 -0700
@@ -71,7 +71,7 @@
  * <li>   com.foo.MyHandler.level=INFO </li>
  * <li>   com.foo.MyHandler.formatter=java.util.logging.SimpleFormatter </li>
  * </ul>
- * <p>
+ *
  * @since 1.4
  */
 
@@ -91,7 +91,7 @@
     /**
      * Create a <tt>StreamHandler</tt> with a given <tt>Formatter</tt>
      * and output stream.
-     * <p>
+     *
      * @param out         the target output stream
      * @param formatter   Formatter to be used to format output
      */
@@ -224,7 +224,7 @@
      * This method checks if the <tt>LogRecord</tt> has an appropriate level and
      * whether it satisfies any <tt>Filter</tt>.  It will also return false if
      * no output stream has been assigned yet or the LogRecord is null.
-     * <p>
+     *
      * @param record  a <tt>LogRecord</tt>
      * @return true if the <tt>LogRecord</tt> would be logged.
      *
--- a/src/share/classes/java/util/logging/package.html	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/logging/package.html	Mon May 05 12:49:13 2014 -0700
@@ -54,18 +54,18 @@
          When a problem occurs in the field, it may be necessary to return the captured logging
          information to the original development team for diagnosis. This logging
          information may be extremely detailed and fairly inscrutable. Such information might include
-         detailed tracing on the internal execution of particular subsystems.           
+         detailed tracing on the internal execution of particular subsystems.
 
    <LI> <I>Problem diagnosis by developers</I>. The Logging APIs may also be
            used to help debug an application under development. This may 
            include logging information generated by the target application
-           as well as logging information generated by lower-level libraries.          
+           as well as logging information generated by lower-level libraries.
            Note however that while this use is perfectly reasonable,
            the logging APIs are not intended to replace the normal debugging 
            and profiling tools that may already exist in the development environment. 
 </OL>
 
-</P>
+<p>
 The key elements of this package include:
 <UL>
    <LI> <I>Logger</I>: The main entity on which applications make 
@@ -111,7 +111,7 @@
 log, logp, logrb, severe, throwing, and warning methods)  
 will accept null values 
 for all arguments except for the initial Level argument (if any).
-<p>
+
 <H2>Related Documentation</H2>
 <P>
 For an overview of control flow, 
--- a/src/share/classes/java/util/prefs/PreferenceChangeListener.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/prefs/PreferenceChangeListener.java	Mon May 05 12:49:13 2014 -0700
@@ -39,7 +39,7 @@
     /**
      * This method gets called when a preference is added, removed or when
      * its value is changed.
-     * <p>
+     *
      * @param evt A PreferenceChangeEvent object describing the event source
      *          and the preference that has changed.
      */
--- a/src/share/classes/java/util/regex/Matcher.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/regex/Matcher.java	Mon May 05 12:49:13 2014 -0700
@@ -830,7 +830,7 @@
      *
      * <p> The replacement string may contain references to subsequences
      * captured during the previous match: Each occurrence of
-     * <tt>$</tt><i>g</i><tt></tt> will be replaced by the result of
+     * <tt>$</tt><i>g</i> will be replaced by the result of
      * evaluating {@link #group(int) group}<tt>(</tt><i>g</i><tt>)</tt>.
      * The first number after the <tt>$</tt> is always treated as part of
      * the group reference. Subsequent numbers are incorporated into g if
--- a/src/share/classes/java/util/zip/package.html	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/java/util/zip/package.html	Mon May 05 12:49:13 2014 -0700
@@ -39,45 +39,35 @@
 
 <h2>Package Specification</h2>
 
-</a>
 <ul>
   <li><a href="http://www.info-zip.org/doc/appnote-19970311-iz.zip">
       Info-ZIP Application Note 970311
       </a> - a detailed description of the Info-ZIP format upon which
       the <code>java.util.zip</code> classes are based.
-<p>
-  <a name="zip64">
-  <li>An implementation may optionally support the ZIP64(tm) format extensions
-      defined by the 
+  <li><a name="zip64">An implementation may optionally support the ZIP64(tm) format extensions
+      defined by the </a>
       <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">
       PKWARE ZIP File Format Specification</a>. The ZIP64(tm) format extensions
       are used to overcome the size limitations of the original ZIP format.
-<p>
-  <a name="lang_encoding">
-  <li>APPENDIX D of <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">
+  <li><a name="lang_encoding">APPENDIX D of </a><a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">
       PKWARE ZIP File Format Specification</a> - Language Encoding Flag (EFS) to
       encode ZIP entry filename and comment fields using UTF-8.
-<p>
   <li><a href="http://www.ietf.org/rfc/rfc1950.txt">
       ZLIB Compressed Data Format Specification version 3.3</a>
       &nbsp;
       <a href="http://www.ietf.org/rfc/rfc1950.txt.pdf">(pdf)</a>
       (RFC 1950)
-<p>
   <li><a href="http://www.ietf.org/rfc/rfc1951.txt">
       DEFLATE Compressed Data Format Specification version 1.3</a>
       &nbsp;
       <a href="http://www.ietf.org/rfc/rfc1951.txt.pdf">(pdf)</a>
       (RFC 1951)
-<p>
   <li><a href="http://www.ietf.org/rfc/rfc1952.txt">
       GZIP file format specification version 4.3</a>
       &nbsp;
       <a href="http://www.ietf.org/rfc/rfc1952.txt.pdf">(pdf)</a>
       (RFC 1952)
-<p>
   <li>CRC-32 checksum is described in RFC 1952 (above)
-<p>
   <li>Adler-32 checksum is described in RFC 1950 (above)
 </ul>
 
--- a/src/share/classes/javax/sql/PooledConnection.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/PooledConnection.java	Mon May 05 12:49:13 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,6 @@
  * <code>ConnectionPool</code> method <code>addStatementEventListener</code>.
  *  Thus, when an application closes its  <code>PreparedStatement</code>,
  * the underlying prepared statement is recycled rather than being closed.
- * <P>
  *
  * @since 1.4
  */
@@ -154,10 +153,10 @@
          * wish to be notified when  <code>PreparedStatement</code>s created by the
          * connection are closed or are detected to be invalid may use this method
          * to register a <code>StatementEventListener</code> with this <code>PooledConnection</code> object.
-         * <p>
+         *
          * @param listener      an component which implements the <code>StatementEventListener</code>
          *                                      interface that is to be registered with this <code>PooledConnection</code> object
-         * <p>
+         *
          * @since 1.6
          */
         public void addStatementEventListener(StatementEventListener listener);
@@ -166,11 +165,11 @@
          * Removes the specified <code>StatementEventListener</code> from the list of
          * components that will be notified when the driver detects that a
          * <code>PreparedStatement</code> has been closed or is invalid.
-         * <p>
+         *
          * @param listener      the component which implements the
          *                                      <code>StatementEventListener</code> interface that was previously
          *                                      registered with this <code>PooledConnection</code> object
-         * <p>
+         *
          * @since 1.6
          */
         public void removeStatementEventListener(StatementEventListener listener);
--- a/src/share/classes/javax/sql/StatementEvent.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/StatementEvent.java	Mon May 05 12:49:13 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
  * registered with a <code>PooledConnection</code>. This occurs when the driver determines that a
  * <code>PreparedStatement</code> that is associated with the <code>PooledConnection</code> has been closed or the driver determines
  * is invalid.
- * <p>
+ *
  * @since 1.6
  */
 public class StatementEvent extends EventObject {
@@ -50,11 +50,11 @@
          * Constructs a <code>StatementEvent</code> with the specified <code>PooledConnection</code> and
          * <code>PreparedStatement</code>.  The <code>SQLException</code> contained in the event defaults to
          * null.
-         * <p>
+         *
          * @param con                   The <code>PooledConnection</code> that the closed or invalid
          * <code>PreparedStatement</code>is associated with.
          * @param statement             The <code>PreparedStatement</code> that is being closed or is invalid
-         * <p>
+         *
          * @throws IllegalArgumentException if <code>con</code> is null.
          *
          * @since 1.6
@@ -71,7 +71,7 @@
         /**
          * Constructs a <code>StatementEvent</code> with the specified <code>PooledConnection</code>,
          * <code>PreparedStatement</code> and <code>SQLException</code>
-         * <p>
+         *
          * @param con                   The <code>PooledConnection</code> that the closed or invalid <code>PreparedStatement</code>
          * is associated with.
          * @param statement             The <code>PreparedStatement</code> that is being closed or is invalid
@@ -79,7 +79,7 @@
          *                                              the application
          *
          * @throws IllegalArgumentException if <code>con</code> is null.
-         * <p>
+         *
          * @since 1.6
          */
         public StatementEvent(PooledConnection con,
@@ -94,9 +94,9 @@
 
         /**
          * Returns the <code>PreparedStatement</code> that is being closed or is invalid
-         * <p>
+         *
          * @return      The <code>PreparedStatement</code> that is being closed or is invalid
-         * <p>
+         *
          * @since 1.6
          */
         public PreparedStatement getStatement() {
@@ -106,9 +106,9 @@
 
         /**
          * Returns the <code>SQLException</code> the driver is about to throw
-         * <p>
+         *
          * @return      The <code>SQLException</code> the driver is about to throw
-         * <p>
+         *
          * @since 1.6
          */
         public SQLException getSQLException() {
--- a/src/share/classes/javax/sql/StatementEventListener.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/StatementEventListener.java	Mon May 05 12:49:13 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@
  * <p>
  * Methods which allow a component to register a StatementEventListener with a
  * <code>PooledConnection</code> have been added to the <code>PooledConnection</code> interface.
- * <p>
+ *
  * @since 1.6
  */
 public interface StatementEventListener  extends java.util.EventListener{
@@ -72,13 +72,13 @@
          * <code>PreparedStatement</code> is invalid. The driver calls this method
          * just before it throws the <code>SQLException</code>,
          * contained in the given event, to the application.
-         * <p>
-         * @param event         an event object describing the source of the event,
-         *                                      the statement that is invalid and the exception the
-         *                                      driver is about to throw.  The source of the event is
-         *                                      the <code>PooledConnection</code> which the invalid <code>PreparedStatement</code>
-         * is associated with.
-         * <p>
+         *
+         * @param event    an event object describing the source of the event,
+         *                 the statement that is invalid and the exception the
+         *                 driver is about to throw.  The source of the event is
+         *                 the <code>PooledConnection</code> which the invalid <code>PreparedStatement</code>
+         *                 is associated with.
+         *
          * @since 1.6
          */
         void statementErrorOccurred(StatementEvent event);
--- a/src/share/classes/javax/sql/package.html	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/package.html	Mon May 05 12:49:13 2014 -0700
@@ -2,7 +2,7 @@
 <html>
 <head>
 <!--
-Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
 This code is free software; you can redistribute it and/or modify it
@@ -36,10 +36,9 @@
 the Java<sup><font size=-2>TM</font></sup> programming language.
 This package supplements the <code>java.sql</code>
 package and, as of the version 1.4 release, is included in the 
-Java Platform, Standard Edition
-(Java SE<sup><font size=-2>TM</sup></font>).
+Java Platform, Standard Edition (Java SE&trade;).
 It remains an essential part of the Java Platform, Enterprise Edition
-(Java EE<sup><font size=-2>TM</sup></font>).
+(Java EE&trade;).
 <P>
 The <code>javax.sql</code> package provides for the following:
 <OL>
@@ -145,7 +144,6 @@
 <code>PreparedStatement</code> is closed or there is an error, the connection 
 pool manager (being a listener)
 gets a notification that includes a <code>StatementEvent</code> object.
-<p>
 
 <H2>Distributed Transactions</H2>
 
@@ -203,14 +201,12 @@
 it rows, or moves its cursor, it also notifies each listener that is registered 
 with it.  The listener reacts by carrying out its implementation of the 
 notification method called on it.
-<P>
   <LI><code>RowSetEvent</code><br>
 As part of its internal notification process, a <code>RowSet</code> object
 creates an instance of <code>RowSetEvent</code> and passes it to the listener.
 The listener can use this <code>RowSetEvent</code> object to find out which rowset
 had the event.
 </UL>
-<P>
 <LI>Metadata 
 <UL>
   <LI><code>RowSetMetaData</code><br>
@@ -226,7 +222,6 @@
 method <code>execute</code>, the <code>RowSet</code> object will contain
 a new set of rows, and its <code>RowSetMetaData</code> object will have been
 internally updated to contain information about the new columns.
-<P>
 </UL>
 <LI>The Reader/Writer Facility<br>
 A <code>RowSet</code> object that implements the <code>RowSetInternal</code>
@@ -248,7 +243,7 @@
 (2) the connection that was passed to it, if any.  A rowset uses the 
 <code>RowSetInternal</code> methods behind the scenes to get access to
 this information.  An application does not normally invoke these methods directly.
-<P>
+
   <LI><code>RowSetReader</code><br>
 A disconnected <code>RowSet</code> object that has implemented the 
 <code>RowSetInternal</code> interface can call on its reader (the 
@@ -269,7 +264,6 @@
 back to the underlying data source.  Implementations may vary widely, but
 generally, a writer will do the following:
 
-<P>
 <UL>
   <LI>Make a connection to the data source 
   <LI>Check to see whether there is a conflict, that is, whether
@@ -291,7 +285,6 @@
 JDBC technology driver that implements the JDBC 4.0 API.
 You must check your driver documentation to be sure that it implements
 the particular features you want to use.
-<P>
 
 <h2>Package Specification</h2>
 
@@ -307,7 +300,7 @@
 
 <ul>
   <li><a href="http://www.oracle.com/technetwork/java/index-142838.html">
-          <i>JDBC&#0153;API Tutorial and Reference, Third Edition</i></a>
+          <i>JDBC&#8482;API Tutorial and Reference, Third Edition</i></a>
 </ul>
 </body>
 </html>
--- a/src/share/classes/javax/sql/rowset/BaseRowSet.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/BaseRowSet.java	Mon May 05 12:49:13 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
@@ -70,7 +70,6 @@
  *  <li>Fields for storing stream instances
  *  <li>Constants for indicating the type of a stream
  *  </ul>
- *  <p>
  * </UL>
  *
  * <h3>2.0 Setting Properties</h3>
@@ -981,7 +980,7 @@
      * the specified concurrency. The default concurrency for any <code>RowSet</code>
      * object (connected or disconnected) is <code>ResultSet.CONCUR_UPDATABLE</code>,
      * but this method may be called at any time to change the concurrency.
-     * <P>
+     *
      * @param concurrency one of the following constants:
      *                    <code>ResultSet.CONCUR_READ_ONLY</code> or
      *                    <code>ResultSet.CONCUR_UPDATABLE</code>
@@ -1419,7 +1418,6 @@
      * form a subset of the actual rows returned by the original query. This is
      * an implementation variance determined by the specific <code>SyncProvider</code>
      * object employed by the disconnected <code>RowSet</code> object.
-     * <P>
      *
      * @param rows the number of rows to fetch; <code>0</code> to let the
      *        driver decide what the best fetch size is; must not be less
@@ -1466,7 +1464,7 @@
      * <P>
      * An application can call the method <code>setConcurrency</code> at any time
      * to change a <code>RowSet</code> object's concurrency.
-     * <p>
+     *
      * @return the concurrency type for this <code>RowSet</code>
      *     object, which must be one of the following:
      *     <code>ResultSet.CONCUR_READ_ONLY</code> or
@@ -1737,7 +1735,7 @@
      * <p>
      * NOTE: <code>JdbcRowSet</code> does not require the <code>populate</code> method
      * as it is undefined in this class.
-     * <p>
+     *
      * @param parameterIndex the ordinal number of the placeholder parameter
      *        in this <code>RowSet</code> object's command that is to be set.
      *        The first parameter is 1, the second is 2, and so on; must be
@@ -1867,7 +1865,7 @@
      * <P>
      * NOTE: <code>JdbcRowSet</code> does not require the <code>populate</code> method
      * as it is undefined in this class.
-     * S
+     *
      * @param parameterIndex the ordinal number of the placeholder parameter
      *        in this <code>RowSet</code> object's command that is to be set.
      *        The first parameter is 1, the second is 2, and so on; must be
@@ -1933,7 +1931,7 @@
      * <p>
      * NOTE: <code>JdbcRowSet</code> does not require the <code>populate</code> method
      * as it is undefined in this class.
-     * <p>
+     *
      * @param parameterIndex the ordinal number of the placeholder parameter
      *        in this <code>RowSet</code> object's command that is to be set.
      *        The first parameter is 1, the second is 2, and so on; must be
@@ -3579,7 +3577,7 @@
    * @exception SQLException if a database access error occurs or
    * this method is called on a closed <code>CallableStatement</code>
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-     * @since 1.6
+   * @since 1.6
   */
   public void setAsciiStream(String parameterName, java.io.InputStream x)
           throws SQLException{
@@ -3651,7 +3649,7 @@
   * <code>Reader</code> reads the data till end-of-file is reached. The
   * driver does the necessary conversion from Java character format to
   * the national character set in the database.
-
+  *
   * <P><B>Note:</B> This stream object can either be a standard
   * Java stream object or your own subclass that implements the
   * standard interface.
--- a/src/share/classes/javax/sql/rowset/CachedRowSet.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/CachedRowSet.java	Mon May 05 12:49:13 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
@@ -998,7 +998,6 @@
     * available within the internal <code>RowSet</code> tabular structure by
     * virtue of a key already set either on the <code>RowSet</code> object
     * itself or on the underlying SQL data.
-    * <P>
     *
     * @return a <code>Collection</code> object that contains the values in
     * each row in this <code>CachedRowSet</code> object
--- a/src/share/classes/javax/sql/rowset/JdbcRowSet.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/JdbcRowSet.java	Mon May 05 12:49:13 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
@@ -116,7 +116,6 @@
  * <code>CachedRowSet</code>&trade;
  * reference implementation to account for the different
  * requirements of connected and disconnected <code>RowSet</code> objects.
- * <p>
  *
  * @author Jonathan Bruce
  */
--- a/src/share/classes/javax/sql/rowset/package.html	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/package.html	Mon May 05 12:49:13 2014 -0700
@@ -5,7 +5,7 @@
   <meta http-equiv="Content-Type"
  content="text/html; charset=iso-8859-1">
 <!--
-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
@@ -76,7 +76,7 @@
 technology-enabled driver ("JDBC driver"). In addition, a <code>JdbcRowSet</code>
 object provides a fully updatable and scrollable tabular 
 data structure as defined in the JDBC 3.0 specification.
-<p>
+
 <li><a href="CachedRowSet.html">
 <b><code>CachedRowSet</code>&trade;</b></a>
  - A <tt>CachedRowSet</tt> object is a JavaBeans&trade;
@@ -92,7 +92,7 @@
 Further details on this mechanism are discussed in the <a
 href="spi/package-summary.html"><code>javax.sql.rowset.spi</code></a> package
 specification.
-<p>
+
 <li><a href="WebRowSet.html"><b><code>WebRowSet</code></b></a> - A 
 <code>WebRowSet</code> object is an extension of <tt>CachedRowSet</tt>
 that can read and write a <code>RowSet</code> object in a well formed XML format.
@@ -108,7 +108,7 @@
 Schema is defined and published at
 <a href="http://java.sun.com/xml/ns/jdbc/webrowset.xsd">
 <code>http://java.sun.com/xml/ns/jdbc/webrowset.xsd</code></a>.
-<p>   
+
 <li><a href="FilteredRowSet.html"><b><code>FilteredRowSet</code></b></a> - A
 <tt>FilteredRowSet</tt> object provides filtering functionality in a programmatic
 and extensible way. There are many instances when a <tt>RowSet</tt> <code>object</code>
@@ -124,7 +124,7 @@
 considered as bi-directional. No standard filters are defined;
 however, sufficient mechanics are specified to permit any required filter to be
 implemented.
-<p>
+
 <li><a href="JoinRowSet.html"><b><code>JoinRowSet</code></b></a> - The <tt>JoinRowSet</tt>
 interface  describes a mechanism by which relationships can be established between 
 two or more standard <code>RowSet</code> implementations. Any number of <tt>RowSet</tt>
@@ -146,7 +146,7 @@
 should also consult the <i>Implementer's Guide</i> in the <a
 href="spi/package-summary.html">javax.sql.rowset.spi</a> package for guidelines
 on <a href="spi/SyncProvider.html"><code>SyncProvider</code></a> implementations.
-<p>
+
 <ul>
 <li><b>3.1 Constructor</b>
 <p>
@@ -215,11 +215,10 @@
   in addition to providing a set of constants for stream type designation.<br>
               </td>
             </tr>
-                               
-      </tbody>                    
+      </tbody>
     </table>
     </blockquote>
-<p>
+
 <li><b>3.3 Connected RowSet Requirements</b>
 <p>
 The <code>JdbcRowSet</code> describes a <code>RowSet</code> object that <b>must</b> always
@@ -231,7 +230,6 @@
 or a <code>RowSetWriter</code> object. They can safely rely on the JDBC driver to
 supply their needs by virtue of the presence of an underlying updatable and scrollable
 <code>ResultSet</code> implementation.
-<p>
 
 <li>
 <b>3.4 Disconnected RowSet Requirements</b>
@@ -248,7 +246,7 @@
 synchronization is required. A disconnected <code>RowSet</code> object should 
 therefore ensure that no 
 extraneous references remain on the <code>Connection</code> object.
-<p>
+
 <li><b>3.5 Role of RowSetMetaDataImpl</b>
 <p>
 The <code>RowsetMetaDataImpl</code> class is a utility class that provides an implementation of the
@@ -256,7 +254,7 @@
 method implementations for metadata for both connected and disconnected 
 <code>RowSet</code> objects. All implementations are free to use this standard
 implementation but are not required to do so.
-<p>
+
 <li><b>3.6 RowSetWarning Class</b>
 <p>
 The <code>RowSetWarning</code> class provides warnings that can be set
@@ -273,8 +271,6 @@
 be chained on it.  If a warning is returned, <code>getNextWarning</code> can be called
 on it, and so on until there are no more warnings.
 
-
-<P>
 <li><b>3.7 The Joinable Interface</b>
 <P>
 The <code>Joinable</code> interface provides both connected and disconnected 
--- a/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java	Mon May 05 12:49:13 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
@@ -164,7 +164,7 @@
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code>
      * implementation.
-     * <p>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *     if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -182,7 +182,7 @@
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code>
      * implementation.
-     * <p>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *     if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -201,7 +201,7 @@
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code>
      * implementation.
-     * <p>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *     if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -219,7 +219,7 @@
      * This method does not perform type-safe checking to determine if the
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code> implementation.
-     * <P>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *       if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -237,7 +237,7 @@
      * This method does not perform type-safe checking to determine if the
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code> implementation.
-     * <P>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *       if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -255,7 +255,7 @@
      * This method does not perform type-safe checking to determine if the
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code> implementation.
-     * <P>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *       if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -273,7 +273,7 @@
      * This method does not perform type-safe checking to determine if the
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code> implementation.
-     * <P>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *       if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -291,7 +291,7 @@
      * This method does not perform type-safe checking to determine if the
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code> implementation.
-     * <P>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *       if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -309,7 +309,7 @@
      * This method does not perform type-safe checking to determine if the
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code> implementation.
-     * <P>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *       if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -326,7 +326,7 @@
      * This method does not perform type-safe checking to determine if the
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code> implementation.
-     * <P>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *       if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
@@ -343,7 +343,7 @@
      * This method does not perform type-safe checking to determine if the
      * returned type is the expected type; this responsibility is delegated
      * to the UDT mapping as defined by a <code>SQLData</code> implementation.
-     * <P>
+     *
      * @return the next attribute in this <code>SQLInputImpl</code> object;
      *       if the value is <code>SQL NULL</code>, return <code>null</code>
      * @throws SQLException if the read position is located at an invalid
--- a/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java	Mon May 05 12:49:13 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
@@ -76,7 +76,7 @@
     /**
       * Constructs a new <code>SerialDatalink</code> object from the given
       * <code>java.net.URL</code> object.
-      * <P>
+      *
       * @param url the {@code URL} to create the {@code SerialDataLink} from
       * @throws SerialException if url parameter is a null
       */
--- a/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java	Mon May 05 12:49:13 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
@@ -70,7 +70,6 @@
 
     /**
      * Constructor for <code>SerialJavaObject</code> helper class.
-     * <p>
      *
      * @param obj the Java <code>Object</code> to be serialized
      * @throws SerialException if the object is found not to be serializable
--- a/src/share/classes/javax/sql/rowset/spi/package.html	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/package.html	Mon May 05 12:49:13 2014 -0700
@@ -1,14 +1,14 @@
 <!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
 <html>
 <head>
-                    
+
   <meta http-equiv="Content-Type"
  content="text/html; charset=iso-8859-1">
-                    
+
   <meta name="GENERATOR"
  content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]">
 <!--
-Copyright (c) 2003, 2010, 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
@@ -32,7 +32,7 @@
 questions.
 -->
   <title>javax.sql.rowset.spi</title>
-   
+
 </head>
   <body bgcolor="#ffffff">
 
@@ -46,7 +46,7 @@
 it with the <code>SyncFactory</code> singleton. (See the class comment for
 <code>SyncProvider</code> for a full explanation of the registration process and 
 the naming convention to be used.)
-<P>
+
 <h2>Table of Contents</h2>
 <ul>
 <li><a href="#pkgspec">1.0 Package Specification</a>
@@ -57,7 +57,7 @@
 <li><a href="#reldocs">6.0 Related Documentation</a>
 </ul>
 
-<h3><a name="pkgspec">1.0 Package Specification</h3>
+<h3><a name="pkgspec">1.0 Package Specification</a></h3>
 <P>
 The following classes and interfaces make up the <code>javax.sql.rowset.spi</code>
 package:
@@ -155,7 +155,7 @@
            using locks; rather, it checks to see if there is a conflict
            before trying to synchronize the <code>RowSet</code> object and the
            data source. If there is a conflict, it does nothing, meaning that
-		   changes to the <code>RowSet</code> object are not persisted to the data
+           changes to the <code>RowSet</code> object are not persisted to the data
            source.
        <LI><B><tt>RIXMLProvider</tt></B> <BR>
             A synchronization provider that can be used with a
@@ -201,10 +201,8 @@
 synchronization mechanisms.  A vendor can make its implementation available by 
 registering the fully qualified class name with Oracle Corporation at
 <code>jdbc@sun.com</code>. This process is discussed in further detail below. 
-<P>
 
-<a name="arch"><h3>2.0 Service Provider Interface Architecture</h3>
-<ul>
+<h3><a name="arch">2.0 Service Provider Interface Architecture</a></h3>
 <b>2.1 Overview</b>
 <p>
 The Service Provider Interface provides a pluggable mechanism by which
@@ -229,13 +227,13 @@
 properties are set at run time and apply system-wide per invocation of the Java
 application. See the section <a href="#reldocs">"Related Documentation"</a>
 further related information.
-<p>
+
 <li><b>Property Files</b> - Properties specified in a standard property file.
 This can be specified using a System Property or by modifying a standard
 property file located in the platform run-time. The
 reference implementation of this technology includes a standard property
 file than can be edited to add additional <code>SyncProvider</code> objects.
-<p> 
+
 <li><b>JNDI Context</b> - Available providers can be registered on a JNDI
 context. The <tt>SyncFactory</tt> will attempt to load <tt>SyncProvider</tt>
 objects bound to the context and register them with the factory. This
@@ -258,20 +256,19 @@
 <li> If a <code>SyncProvider</code> object is specified and the <code>SyncFactory</code>
 contains <i>no</i> reference to the provider, a <code>SyncFactoryException</code> is 
 thrown.
-<p>
+
 <li> If a <code>SyncProvider</code> object is specified and the <code>SyncFactory</code>
 contains a reference to the provider, the requested provider is supplied.
-<p>
+
 <li> If no <code>SyncProvider</code> object is specified, the reference
 implementation provider <code>RIOptimisticProvider</code> is supplied.
 </ul>
 <p>
 These policies are explored in more detail in the <a href="SyncFactory.html">
 <code>SyncFactory</code></a> class.
-</ul>
 
-<li><a name="impl"><h3>3.0 SyncProvider Implementer's Guide</h3>
-<ul>
+<h3><a name="impl">3.0 SyncProvider Implementer's Guide</a></h3>
+
 <b>3.1 Requirements</b>
 <p>
 A compliant <code>SyncProvider</code> implementation that is fully pluggable
@@ -300,7 +297,7 @@
 underlying data source, overwriting whatever is there. No attempt is made to compare 
 original values with current values to see if there is a conflict. The 
 <code>RIXMLProvider</code> is implemented with this grade.
-<p>
+
 <li><b>GRADE_CHECK_MODIFIED_AT_COMMIT</b> - A low grade of optimistic synchronization.
 A <code>SyncProvider</code> implementation returning this grade
 will check for conflicts in rows that have changed between the last synchronization 
@@ -309,20 +306,20 @@
 object. If there are no conflicts, changes in the <code>RowSet</code> object will be
 written to the data source. If there are conflicts, no changes are written.
 The <code>RIOptimisticProvider</code> implementation uses this grade.
-<p>
+
 <li><b>GRADE_CHECK_ALL_AT_COMMIT</b> - A high grade of optimistic synchronization.
 A <code>SyncProvider</code> implementation   returning this grade
 will check all rows, including rows that have not changed in the disconnected
 <code>RowSet</code> object. In this way, any changes to rows in the underlying
 data source will be reflected in the disconnected <code>RowSet</code> object
 when the synchronization finishes successfully.
-<p>
+
 <li><b>GRADE_LOCK_WHEN_MODIFIED</b> - A pessimistic grade of synchronization.
 <code>SyncProvider</code> implementations returning this grade will lock
 the row in the originating  data source that corresponds to the row being changed
 in the <code>RowSet</code> object to reduce the possibility of other
 processes modifying the same data in the data source.
-<p>
+
 <li><b>GRADE_LOCK_WHEN_LOADED</b> - A higher pessimistic synchronization grade.
 A <code>SyncProvider</code> implementation returning this grade will lock
 the entire view and/or  table affected by the original query used to
@@ -347,13 +344,13 @@
 <li><b>DATASOURCE_NO_LOCK</b> - No locks remain on the originating data source. 
 This is the default lock setting for all <code>SyncProvider</code> implementations 
 unless otherwise directed by a <code>RowSet</code> object.
-<p>
+
 <li><b>DATASOURCE_ROW_LOCK</b> - A lock is placed on the rows that are touched by
 the original SQL query used to populate the <code>RowSet</code> object.
-<p> 
+
 <li><b>DATASOURCE_TABLE_LOCK</b> - A lock is placed on all tables that are touched
 by the query that was used to populate the <code>RowSet</code> object.
-<p>
+
 <li><b>DATASOURCE_DB_LOCK</b>
 A lock is placed on the entire data source that is used by the <code>RowSet</code>
 object.
@@ -369,7 +366,7 @@
 Indicates that a <code>SyncProvider</code> implementation  supports synchronization
 to the table or tables from which the SQL <code>VIEW</code> used to populate  a
 a <code>RowSet</code> object is derived.
-<p>
+
 <li><b>NONUPDATABLE_VIEW_SYNC</b>
 Indicates that a <code>SyncProvider</code> implementation  does <b>not</b> support
 synchronization to the table or tables from which the SQL <code>VIEW</code> 
@@ -381,7 +378,7 @@
 In the example below, the reference <tt>CachedRowSetImpl</tt> implementation
 reconfigures its current <tt>SyncProvider</tt> object by calling the 
 <tt>setSyncProvider</tt> method.<br>
-       
+
 <PRE>
     CachedRowSetImpl crs = new CachedRowSetImpl();
     crs.setSyncProvider("com.foo.bar.HASyncProvider");
@@ -412,7 +409,7 @@
       // No synchronization with the originating data source provided
     break;
     }
-	  
+
     switch (sync.getDataSourcLock() {
       case: SyncProvider.DATASOURCE_DB_LOCK
        // A lock is placed on the entire datasource that is used by the
@@ -439,14 +436,13 @@
     It is also possible using the static utility method in the
 <code>SyncFactory</code> class to determine the list of <code>SyncProvider</code>
 implementations currently registered with the <code>SyncFactory</code>.
-       
+
 <pre>
-	Enumeration e = SyncFactory.getRegisteredProviders();
-</pre>    
+       Enumeration e = SyncFactory.getRegisteredProviders();
+</pre>
 
-</ul>
 
-<h3><a name="resolving">4.0 Resolving Synchronization Conflicts</h3>
+<h3><a name="resolving">4.0 Resolving Synchronization Conflicts</a></h3>
 
 The interface <code>SyncResolver</code> provides a way for an application to
 decide manually what to do when a conflict occurs. When the <code>CachedRowSet</code>
@@ -491,18 +487,18 @@
 <P>
 The comment for the <code>SyncResolver</code> interface has more detail.
 
-<a name="relspec"><h3>5.0 Related Specifications</h3>
+<h3><a name="relspec">5.0 Related Specifications</a></h3>
 <ul>
-<li><a href="http://java.sun.com/products/jndi">JNDI 1.3</a>
+<li><a href="http://docs.oracle.com/javase/jndi/tutorial/index.html">JNDI</a>
 <li><a href="{@docRoot}/../technotes/guides/logging/index.html">Java Logging
 APIs</a>
 </ul>
-<a name="reldocs"><h3>6.0 Related Documentation</h3>
+<h3><a name="reldocs">6.0 Related Documentation</a></h3>
 <ul>
 <li><a href="{@docRoot}/../technotes/tools/index.html#basic">System
 properties</a>
 <li>Resource Files
-<li><a href="http://java.sun.com/tutorial/jdbc">DataSource for JDBC
+<li><a href="http://docs.oracle.com/javase/tutorial/jdbc/">DataSource for JDBC
 Connections</a>
 </ul>
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java	Mon May 05 12:49:13 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMSignatureMethod.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -34,10 +34,12 @@
 
 import java.io.IOException;
 import java.security.*;
+import java.security.interfaces.DSAKey;
 import java.security.spec.AlgorithmParameterSpec;
 import org.w3c.dom.Element;
 
 import com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureECDSA;
+import com.sun.org.apache.xml.internal.security.utils.JavaUtils;
 import org.jcp.xml.dsig.internal.SignerOutputStream;
 
 /**
@@ -68,6 +70,8 @@
         "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384";
     static final String ECDSA_SHA512 =
         "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";
+    static final String DSA_SHA256 =
+        "http://www.w3.org/2009/xmldsig11#dsa-sha256";
 
     /**
      * Creates a <code>DOMSignatureMethod</code>.
@@ -119,6 +123,8 @@
             return new SHA512withRSA(smElem);
         } else if (alg.equals(SignatureMethod.DSA_SHA1)) {
             return new SHA1withDSA(smElem);
+        } else if (alg.equals(DSA_SHA256)) {
+            return new SHA256withDSA(smElem);
         } else if (alg.equals(ECDSA_SHA1)) {
             return new SHA1withECDSA(smElem);
         } else if (alg.equals(ECDSA_SHA256)) {
@@ -178,7 +184,9 @@
         try {
             Type type = getAlgorithmType();
             if (type == Type.DSA) {
-                return signature.verify(convertXMLDSIGtoASN1(sig));
+                int size = ((DSAKey)key).getParams().getQ().bitLength();
+                return signature.verify(JavaUtils.convertDsaXMLDSIGtoASN1(sig,
+                                                                       size/8));
             } else if (type == Type.ECDSA) {
                 return signature.verify(SignatureECDSA.convertXMLDSIGtoASN1(sig));
             } else {
@@ -222,7 +230,9 @@
         try {
             Type type = getAlgorithmType();
             if (type == Type.DSA) {
-                return convertASN1toXMLDSIG(signature.sign());
+                int size = ((DSAKey)key).getParams().getQ().bitLength();
+                return JavaUtils.convertDsaASN1toXMLDSIG(signature.sign(),
+                                                         size/8);
             } else if (type == Type.ECDSA) {
                 return SignatureECDSA.convertASN1toXMLDSIG(signature.sign());
             } else {
@@ -235,101 +245,6 @@
         }
     }
 
-    /**
-     * Converts an ASN.1 DSA value to a XML Signature DSA Value.
-     *
-     * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
-     * pairs; the XML Signature requires the core BigInteger values.
-     *
-     * @param asn1Bytes
-     *
-     * @throws IOException
-     * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
-     */
-    private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[])
-        throws IOException
-    {
-        byte rLength = asn1Bytes[3];
-        int i;
-
-        for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--);
-
-        byte sLength = asn1Bytes[5 + rLength];
-        int j;
-
-        for (j = sLength;
-            (j > 0) && (asn1Bytes[(6 + rLength + sLength) - j] == 0); j--);
-
-        if ((asn1Bytes[0] != 48) || (asn1Bytes[1] != asn1Bytes.length - 2)
-            || (asn1Bytes[2] != 2) || (i > 20)
-            || (asn1Bytes[4 + rLength] != 2) || (j > 20)) {
-            throw new IOException("Invalid ASN.1 format of DSA signature");
-        } else {
-            byte xmldsigBytes[] = new byte[40];
-
-            System.arraycopy(asn1Bytes, (4+rLength)-i, xmldsigBytes, 20-i, i);
-            System.arraycopy(asn1Bytes, (6+rLength+sLength)-j, xmldsigBytes,
-                             40 - j, j);
-
-            return xmldsigBytes;
-        }
-    }
-
-    /**
-     * Converts a XML Signature DSA Value to an ASN.1 DSA value.
-     *
-     * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value
-     * pairs; the XML Signature requires the core BigInteger values.
-     *
-     * @param xmldsigBytes
-     *
-     * @throws IOException
-     * @see <A HREF="http://www.w3.org/TR/xmldsig-core/#dsa-sha1">6.4.1 DSA</A>
-     */
-    private static byte[] convertXMLDSIGtoASN1(byte xmldsigBytes[])
-        throws IOException
-    {
-        if (xmldsigBytes.length != 40) {
-            throw new IOException("Invalid XMLDSIG format of DSA signature");
-        }
-
-        int i;
-
-        for (i = 20; (i > 0) && (xmldsigBytes[20 - i] == 0); i--);
-
-        int j = i;
-
-        if (xmldsigBytes[20 - i] < 0) {
-            j += 1;
-        }
-
-        int k;
-
-        for (k = 20; (k > 0) && (xmldsigBytes[40 - k] == 0); k--);
-
-        int l = k;
-
-        if (xmldsigBytes[40 - k] < 0) {
-            l += 1;
-        }
-
-        byte asn1Bytes[] = new byte[6 + j + l];
-
-        asn1Bytes[0] = 48;
-        asn1Bytes[1] = (byte)(4 + j + l);
-        asn1Bytes[2] = 2;
-        asn1Bytes[3] = (byte)j;
-
-        System.arraycopy(xmldsigBytes, 20 - i, asn1Bytes, (4 + j) - i, i);
-
-        asn1Bytes[4 + j] = 2;
-        asn1Bytes[5 + j] = (byte) l;
-
-        System.arraycopy(xmldsigBytes, 40 - k, asn1Bytes, (6 + j + l) - k, k);
-
-        return asn1Bytes;
-    }
-
     static final class SHA1withRSA extends DOMSignatureMethod {
         SHA1withRSA(AlgorithmParameterSpec params)
             throws InvalidAlgorithmParameterException {
@@ -425,6 +340,25 @@
         }
     }
 
+    static final class SHA256withDSA extends DOMSignatureMethod {
+        SHA256withDSA(AlgorithmParameterSpec params)
+            throws InvalidAlgorithmParameterException {
+            super(params);
+        }
+        SHA256withDSA(Element dmElem) throws MarshalException {
+            super(dmElem);
+        }
+        public String getAlgorithm() {
+            return DSA_SHA256;
+        }
+        String getJCAAlgorithm() {
+            return "SHA256withDSA";
+        }
+        Type getAlgorithmType() {
+            return Type.DSA;
+        }
+    }
+
     static final class SHA1withECDSA extends DOMSignatureMethod {
         SHA1withECDSA(AlgorithmParameterSpec params)
             throws InvalidAlgorithmParameterException {
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java	Mon May 05 12:49:13 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMXMLSignatureFactory.java 1333869 2012-05-04 10:42:44Z coheigea $
@@ -239,6 +239,8 @@
             return new DOMSignatureMethod.SHA512withRSA(params);
         } else if (algorithm.equals(SignatureMethod.DSA_SHA1)) {
             return new DOMSignatureMethod.SHA1withDSA(params);
+        } else if (algorithm.equals(DOMSignatureMethod.DSA_SHA256)) {
+            return new DOMSignatureMethod.SHA256withDSA(params);
         } else if (algorithm.equals(SignatureMethod.HMAC_SHA1)) {
             return new DOMHMACSignatureMethod.SHA1(params);
         } else if (algorithm.equals(DOMHMACSignatureMethod.HMAC_SHA256)) {
--- a/src/share/classes/sun/launcher/LauncherHelper.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/sun/launcher/LauncherHelper.java	Mon May 05 12:49:13 2014 -0700
@@ -69,6 +69,14 @@
 
 public enum LauncherHelper {
     INSTANCE;
+
+    // used to identify JavaFX applications
+    private static final String JAVAFX_APPLICATION_MARKER =
+            "JavaFX-Application-Class";
+    private static final String JAVAFX_APPLICATION_CLASS_NAME =
+            "javafx.application.Application";
+    private static final String JAVAFX_FXHELPER_CLASS_NAME_SUFFIX =
+            "sun.launcher.LauncherHelper$FXHelper";
     private static final String MAIN_CLASS = "Main-Class";
 
     private static StringBuilder outBuf = new StringBuilder();
@@ -418,7 +426,8 @@
              * exists to enforce compliance with the jar specification
              */
             if (mainAttrs.containsKey(
-                    new Attributes.Name(FXHelper.JAVAFX_APPLICATION_MARKER))) {
+                    new Attributes.Name(JAVAFX_APPLICATION_MARKER))) {
+                FXHelper.setFXLaunchParameters(jarname, LM_JAR);
                 return FXHelper.class.getName();
             }
 
@@ -516,9 +525,9 @@
          * the main class may or may not have a main method, so do this before
          * validating the main class.
          */
-        if (mainClass.equals(FXHelper.class) ||
-                FXHelper.doesExtendFXApplication(mainClass)) {
-            // Will abort() if there are problems with the FX runtime
+        if (JAVAFX_FXHELPER_CLASS_NAME_SUFFIX.equals(mainClass.getName()) ||
+            doesExtendFXApplication(mainClass)) {
+            // Will abort() if there are problems with FX runtime
             FXHelper.setFXLaunchParameters(what, mode);
             return FXHelper.class;
         }
@@ -537,6 +546,21 @@
         return appClass;
     }
 
+    /*
+     * Check if the given class is a JavaFX Application class. This is done
+     * in a way that does not cause the Application class to load or throw
+     * ClassNotFoundException if the JavaFX runtime is not available.
+     */
+    private static boolean doesExtendFXApplication(Class<?> mainClass) {
+        for (Class<?> sc = mainClass.getSuperclass(); sc != null;
+                sc = sc.getSuperclass()) {
+            if (sc.getName().equals(JAVAFX_APPLICATION_CLASS_NAME)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     // Check the existence and signature of main and abort if incorrect
     static void validateMainClass(Class<?> mainClass) {
         Method mainMethod;
@@ -545,7 +569,7 @@
         } catch (NoSuchMethodException nsme) {
             // invalid main or not FX application, abort with an error
             abort(null, "java.launcher.cls.error4", mainClass.getName(),
-                  FXHelper.JAVAFX_APPLICATION_CLASS_NAME);
+                  JAVAFX_APPLICATION_CLASS_NAME);
             return; // Avoid compiler issues
         }
 
@@ -668,11 +692,7 @@
     }
 
     static final class FXHelper {
-        // Marker entry in jar manifest that designates a JavaFX application jar
-        private static final String JAVAFX_APPLICATION_MARKER =
-                "JavaFX-Application-Class";
-        private static final String JAVAFX_APPLICATION_CLASS_NAME =
-                "javafx.application.Application";
+
         private static final String JAVAFX_LAUNCHER_CLASS_NAME =
                 "com.sun.javafx.application.LauncherImpl";
 
@@ -742,21 +762,6 @@
             }
         }
 
-        /*
-         * Check if the given class is a JavaFX Application class. This is done
-         * in a way that does not cause the Application class to load or throw
-         * ClassNotFoundException if the JavaFX runtime is not available.
-         */
-        private static boolean doesExtendFXApplication(Class<?> mainClass) {
-            for (Class<?> sc = mainClass.getSuperclass(); sc != null;
-                    sc = sc.getSuperclass()) {
-                if (sc.getName().equals(JAVAFX_APPLICATION_CLASS_NAME)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
         public static void main(String... args) throws Exception {
             if (fxLauncherMethod == null
                     || fxLaunchMode == null
--- a/src/share/classes/sun/nio/ch/PendingFuture.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/sun/nio/ch/PendingFuture.java	Mon May 05 12:49:13 2014 -0700
@@ -35,8 +35,6 @@
  */
 
 final class PendingFuture<V,A> implements Future<V> {
-    private static final CancellationException CANCELLED =
-        new CancellationException();
 
     private final AsynchronousChannel channel;
     private final CompletionHandler<V,? super A> handler;
@@ -180,7 +178,7 @@
                 latch.await();
         }
         if (exc != null) {
-            if (exc == CANCELLED)
+            if (exc instanceof CancellationException)
                 throw new CancellationException();
             throw new ExecutionException(exc);
         }
@@ -197,7 +195,7 @@
                 if (!latch.await(timeout, unit)) throw new TimeoutException();
         }
         if (exc != null) {
-            if (exc == CANCELLED)
+            if (exc instanceof CancellationException)
                 throw new CancellationException();
             throw new ExecutionException(exc);
         }
@@ -205,7 +203,7 @@
     }
 
     Throwable exception() {
-        return (exc != CANCELLED) ? exc : null;
+        return (exc instanceof CancellationException) ? null : exc;
     }
 
     V value() {
@@ -214,7 +212,7 @@
 
     @Override
     public boolean isCancelled() {
-        return (exc == CANCELLED);
+        return (exc instanceof CancellationException);
     }
 
     @Override
@@ -233,7 +231,7 @@
                 ((Cancellable)channel()).onCancel(this);
 
             // set result and cancel timer
-            exc = CANCELLED;
+            exc = new CancellationException();
             haveResult = true;
             if (timeoutTask != null)
                 timeoutTask.cancel(false);
--- a/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java	Mon May 05 09:41:41 2014 -0700
+++ b/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java	Mon May 05 12:49:13 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
@@ -113,7 +113,6 @@
 
         try {
             Cipher cipher = JsseJce.getCipher(JsseJce.CIPHER_RSA_PKCS1);
-            // Cannot generate key here, please don't use Cipher.UNWRAP_MODE!
             cipher.init(Cipher.UNWRAP_MODE, privateKey,
                     new TlsRsaPremasterSecretParameterSpec(
                             maxVersion.v, currentVersion.v),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/EvalInterfaceStatic.sh	Mon May 05 12:49:13 2014 -0700
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+#
+# 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 8031195
+#  @summary JDB allows evaluation of calls to static interface methods
+#  @author Jaroslav Bachorik
+#
+#  @run shell/timeout=300 EvalInterfaceStatic.sh
+
+#  The test exercises the ability to invoke static methods on interfaces.
+#  Static interface methods are a new feature added in JDK8.
+#
+#  The test makes sure that it is, at all, possible to invoke an interface
+#  static method and that the static methods are not inherited by extending
+#  interfaces.
+
+classname=EvalStaticInterfaces
+
+createJavaFile()
+{
+    cat <<EOF > $classname.java.1
+public interface $classname {
+    static String staticMethod1() {
+        return "base:staticMethod1";
+    }
+
+    static String staticMethod2() {
+        return "base:staticMethod2";
+    }
+
+    public static void main(String[] args) {
+        // prove that these work
+        System.out.println("base staticMethod1(): " + $classname.staticMethod1());
+        System.out.println("base staticMethod2(): " + $classname.staticMethod2());
+        System.out.println("overridden staticMethod2(): " + Extended$classname.staticMethod2());
+        System.out.println("base staticMethod3(): " + Extended$classname.staticMethod3());
+
+        gus();
+    }
+
+    static void gus() {
+        int x = 0;             // @1 breakpoint
+    }
+}
+
+interface Extended$classname extends $classname {
+    static String staticMethod2() {
+        return "extended:staticMethod2";
+    }
+
+    static String staticMethod3() {
+        return "extended:staticMethod3";
+    }
+}
+
+
+
+EOF
+}
+
+# drive jdb by sending cmds to it and examining its output
+dojdbCmds()
+{
+    setBkpts @1
+    runToBkpt @1
+
+    cmd eval "$classname.staticMethod1()"
+    jdbFailIfNotPresent "base:staticMethod1" 2
+
+    cmd eval "$classname.staticMethod2()"
+    jdbFailIfNotPresent "base:staticMethod2" 2
+
+    cmd eval "Extended$classname.staticMethod1()"
+    jdbFailIfPresent "base:staticMethod1" 2
+
+    cmd eval "Extended$classname.staticMethod2()"
+    jdbFailIfNotPresent "extended:staticMethod2" 2
+
+    cmd eval "Extended$classname.staticMethod3()"
+    jdbFailIfNotPresent "extended:staticMethod3" 2
+}
+
+
+mysetup()
+{
+    if [ -z "$TESTSRC" ] ; then
+        TESTSRC=.
+    fi
+
+    for ii in . $TESTSRC $TESTSRC/.. ; do
+        if [ -r "$ii/ShellScaffold.sh" ] ; then
+            . $ii/ShellScaffold.sh
+            break
+        fi
+    done
+}
+
+# You could replace this next line with the contents
+# of ShellScaffold.sh and this script will run just the same.
+mysetup
+
+runit
+pass
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/InterfaceMethodsTest.java	Mon May 05 12:49:13 2014 -0700
@@ -0,0 +1,422 @@
+/*
+ * 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 8031195
+ *  @summary  JDI: Add support for static and default methods in interfaces
+ *
+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
+ *  @run build InterfaceMethodsTest
+ *  @run main InterfaceMethodsTest
+ */
+import com.sun.jdi.*;
+import com.sun.jdi.event.*;
+import java.util.Collections;
+
+public class InterfaceMethodsTest extends TestScaffold {
+    private static final int RESULT_A = 1;
+    private static final int RESULT_B = 1;
+    private static final int RESULT_TARGET = 1;
+    static interface InterfaceA {
+        static int staticMethodA() {
+            System.out.println("-InterfaceA: static interface method A-");
+            return RESULT_A;
+        }
+        static int staticMethodB() {
+            System.out.println("-InterfaceA: static interface method B-");
+            return RESULT_A;
+        }
+        default int defaultMethodA() {
+            System.out.println("-InterfaceA: default interface method A-");
+            return RESULT_A;
+        }
+        default int defaultMethodB() {
+            System.out.println("-InterfaceA: default interface method B-");
+            return RESULT_A;
+        }
+        default int defaultMethodC() {
+            System.out.println("-InterfaceA: default interface method C-");
+            return RESULT_A;
+        }
+
+        int implementedMethod();
+    }
+
+    static interface InterfaceB extends InterfaceA {
+        @Override
+        default int defaultMethodC() {
+            System.out.println("-InterfaceB: overridden default interface method C-");
+            return RESULT_B;
+        }
+        default int defaultMethodD() {
+            System.out.println("-InterfaceB: default interface method D-");
+            return RESULT_B;
+        }
+
+        static int staticMethodB() {
+            System.out.println("-InterfaceB: overridden static interface method B-");
+            return RESULT_B;
+        }
+
+        static int staticMethodC() {
+            System.out.println("-InterfaceB: static interface method C-");
+            return RESULT_B;
+        }
+    }
+
+    final static class TargetClass implements InterfaceB {
+        public int classMethod() {
+            System.out.println("-TargetClass: class only method-");
+            return RESULT_TARGET;
+        }
+
+        @Override
+        public int implementedMethod() {
+            System.out.println("-TargetClass: implemented non-default interface method-");
+            return RESULT_TARGET;
+        }
+
+        @Override
+        public int defaultMethodB() {
+            System.out.println("-TargetClass: overridden default interface method D");
+
+            return RESULT_TARGET;
+        }
+
+        public static void main(String[] args) {
+            TargetClass tc = new TargetClass();
+            tc.doTests(tc);
+        }
+
+        private void doTests(TargetClass ref) {
+            // break
+        }
+    }
+
+    public InterfaceMethodsTest(String[] args) {
+        super(args);
+    }
+
+    public static void main(String[] args) throws Exception {
+        new InterfaceMethodsTest(args).startTests();
+    }
+
+    private static final String TEST_CLASS_NAME = InterfaceMethodsTest.class.getName().replace('.', '/');
+    private static final String TARGET_CLASS_NAME = TargetClass.class.getName().replace('.', '/');
+    private static final String INTERFACEA_NAME = InterfaceA.class.getName().replace('.', '/');
+    private static final String INTERFACEB_NAME = InterfaceB.class.getName().replace('.', '/');
+
+    protected void runTests() throws Exception {
+        /*
+         * Get to the top of main()
+         * to determine targetClass and mainThread
+         */
+        BreakpointEvent bpe = startToMain(TARGET_CLASS_NAME);
+
+        bpe = resumeTo(TARGET_CLASS_NAME, "doTests", "(L" + TARGET_CLASS_NAME +";)V");
+
+        mainThread = bpe.thread();
+
+        StackFrame frame = mainThread.frame(0);
+        ObjectReference thisObject = frame.thisObject();
+        ObjectReference ref = (ObjectReference)frame.getArgumentValues().get(0);
+
+        ReferenceType targetClass = bpe.location().declaringType();
+        testImplementationClass(targetClass, thisObject);
+
+        testInterfaceA(ref);
+
+        testInterfaceB(ref);
+
+        /*
+         * resume the target listening for events
+         */
+        listenUntilVMDisconnect();
+
+        /*
+         * deal with results of test
+         * if anything has called failure("foo") testFailed will be true
+         */
+        if (!testFailed) {
+            println("InterfaceMethodsTest: passed");
+        } else {
+            throw new Exception("InterfaceMethodsTest: failed");
+        }
+    }
+
+    private void testInterfaceA(ObjectReference ref) {
+        // Test non-virtual calls on InterfaceA
+
+        ReferenceType ifaceClass = (ReferenceType)vm().classesByName(INTERFACEA_NAME).get(0);
+        /* Default method calls */
+
+        // invoke the InterfaceA's "defaultMethodA"
+        testInvokePos(ifaceClass, ref, "defaultMethodA", "()I", vm().mirrorOf(RESULT_A));
+
+        // invoke the InterfaceA's "defaultMethodB"
+        testInvokePos(ifaceClass, ref, "defaultMethodB", "()I", vm().mirrorOf(RESULT_A));
+
+        // invoke the InterfaceA's "defaultMethodC"
+        testInvokePos(ifaceClass, ref, "defaultMethodC", "()I", vm().mirrorOf(RESULT_A));
+
+        // "defaultMethodD" from InterfaceB is not accessible from here
+        testInvokeNeg(ifaceClass, ref, "defaultMethodD", "()I", vm().mirrorOf(RESULT_B),
+                "Attempted to invoke non-existing method");
+
+        // trying to invoke the asbtract method "implementedMethod"
+        testInvokeNeg(ifaceClass, ref, "implementedMethod", "()I", vm().mirrorOf(TARGET_CLASS_NAME),
+                "Invocation of non-default methods is not supported");
+
+
+        /* Static method calls */
+
+        // invoke interface static method A
+        testInvokePos(ifaceClass, null, "staticMethodA", "()I", vm().mirrorOf(RESULT_A));
+
+        // try to invoke static method A on the instance
+        testInvokePos(ifaceClass, ref, "staticMethodA", "()I", vm().mirrorOf(RESULT_A));
+
+        // invoke interface static method B
+        testInvokePos(ifaceClass, null, "staticMethodB", "()I", vm().mirrorOf(RESULT_A));
+
+        // try to invoke static method B on the instance
+        testInvokePos(ifaceClass, ref, "staticMethodB", "()I", vm().mirrorOf(RESULT_A));
+    }
+
+    private void testInterfaceB(ObjectReference ref) {
+        // Test non-virtual calls on InterfaceB
+        ReferenceType ifaceClass = (ReferenceType)vm().classesByName(INTERFACEB_NAME).get(0);
+
+        /* Default method calls */
+
+        // invoke the inherited "defaultMethodA"
+        testInvokePos(ifaceClass, ref, "defaultMethodA", "()I", vm().mirrorOf(RESULT_A));
+
+        // invoke the inherited "defaultMethodB"
+        testInvokePos(ifaceClass, ref, "defaultMethodB", "()I", vm().mirrorOf(RESULT_A));
+
+        // invoke the inherited and overridden "defaultMethodC"
+        testInvokePos(ifaceClass, ref, "defaultMethodC", "()I", vm().mirrorOf(RESULT_B));
+
+        // invoke InterfaceB only "defaultMethodD"
+        testInvokePos(ifaceClass, ref, "defaultMethodD", "()I", vm().mirrorOf(RESULT_B));
+
+        // "implementedMethod" is not present in InterfaceB
+        testInvokeNeg(ifaceClass, ref, "implementedMethod", "()I", vm().mirrorOf(RESULT_TARGET),
+                "Invocation of non-default methods is not supported");
+
+
+        /* Static method calls*/
+
+        // "staticMethodA" must not be inherited by InterfaceB
+        testInvokeNeg(ifaceClass, null, "staticMethodA", "()I", vm().mirrorOf(RESULT_A),
+                "Static interface methods are not inheritable");
+
+        // however it is possible to call "staticMethodA" on the actual instance
+        testInvokeNeg(ifaceClass, ref, "staticMethodA", "()I", vm().mirrorOf(RESULT_A),
+                "Static interface methods are not inheritable");
+
+        // "staticMethodB" is overridden in InterfaceB
+        testInvokePos(ifaceClass, null, "staticMethodB", "()I", vm().mirrorOf(RESULT_B));
+
+        // the instance invokes the overriden form of "staticMethodB" from InterfaceB
+        testInvokePos(ifaceClass, ref, "staticMethodB", "()I", vm().mirrorOf(RESULT_B));
+
+        // "staticMethodC" is present only in InterfaceB
+        testInvokePos(ifaceClass, null, "staticMethodC", "()I", vm().mirrorOf(RESULT_B));
+
+        // "staticMethodC" should be reachable from the instance too
+        testInvokePos(ifaceClass, ref, "staticMethodC", "()I", vm().mirrorOf(RESULT_B));
+    }
+
+    private void testImplementationClass(ReferenceType targetClass, ObjectReference thisObject) {
+        // Test invocations on the implementation object
+
+        /* Default method calls */
+
+        // "defaultMethodA" is accessible and not overridden
+        testInvokePos(targetClass, thisObject, "defaultMethodA", "()I", vm().mirrorOf(RESULT_TARGET));
+
+        // "defaultMethodB" is accessible and overridden in TargetClass
+        testInvokePos(targetClass, thisObject, "defaultMethodB", "()I", vm().mirrorOf(RESULT_TARGET));
+
+        // "defaultMethodC" is accessible and overridden in InterfaceB
+        testInvokePos(targetClass, thisObject, "defaultMethodC", "()I", vm().mirrorOf(RESULT_TARGET));
+
+        // "defaultMethodD" is accessible
+        testInvokePos(targetClass, thisObject, "defaultMethodD", "()I", vm().mirrorOf(RESULT_TARGET));
+
+
+        /* Non-default instance method calls */
+
+        // "classMethod" declared in TargetClass is accessible
+        testInvokePos(targetClass, thisObject, "classMethod", "()I", vm().mirrorOf(RESULT_TARGET));
+
+        // the abstract "implementedMethod" has been implemented in TargetClass
+        testInvokePos(targetClass, thisObject, "implementedMethod", "()I", vm().mirrorOf(RESULT_TARGET));
+
+
+        /* Static method calls */
+
+        // All the static methods declared by the interfaces are not reachable from the instance of the implementor class
+        testInvokeNeg(targetClass, thisObject, "staticMethodA", "()I", vm().mirrorOf(RESULT_A),
+                "Static interface methods are not inheritable");
+
+        testInvokeNeg(targetClass, thisObject, "staticMethodB", "()I", vm().mirrorOf(RESULT_B),
+                "Static interface methods are not inheritable");
+
+        testInvokeNeg(targetClass, thisObject, "staticMethodC", "()I", vm().mirrorOf(RESULT_B),
+                "Static interface methods are not inheritable");
+
+        // All the static methods declared by the interfaces are not reachable through the implementor class
+        testInvokeNeg(targetClass, null, "staticMethodA", "()I", vm().mirrorOf(RESULT_A),
+                "Static interface methods are not inheritable");
+
+        testInvokeNeg(targetClass, null, "staticMethodB", "()I", vm().mirrorOf(RESULT_B),
+                "Static interface methods are not inheritable");
+
+        testInvokeNeg(targetClass, null, "staticMethodC", "()I", vm().mirrorOf(RESULT_B),
+                "Static interface methods are not inheritable");
+    }
+
+    private void testInvokePos(ReferenceType targetClass, ObjectReference ref, String methodName,
+                               String methodSig, Value value) {
+        logInvocation(ref, methodName, methodSig, targetClass);
+        try {
+            invoke(targetClass, ref, methodName, methodSig, value);
+            System.err.println("--- PASSED");
+        } catch (Exception e) {
+            System.err.println("--- FAILED");
+            failure("FAILED: Invocation failed with error message " + e.getLocalizedMessage());
+        }
+    }
+
+    private void testInvokeNeg(ReferenceType targetClass, ObjectReference ref, String methodName,
+                               String methodSig, Value value, String msg) {
+        logInvocation(ref, methodName, methodSig, targetClass);
+        try {
+            invoke(targetClass, ref, methodName, methodSig, value);
+            System.err.println("--- FAILED");
+            failure("FAILED: " + msg);
+        } catch (Exception e) {
+            System.err.println("--- PASSED");
+
+        }
+    }
+
+    private void invoke(ReferenceType targetClass, ObjectReference ref, String methodName,
+                        String methodSig, Value value)
+    throws Exception {
+        Method method = getMethod(targetClass, methodName, methodSig);
+        if (method == null) {
+            throw new Exception("Can't find method: " + methodName  + " for class = " + targetClass);
+        }
+
+        println("Invoking " + (method.isAbstract() ? "abstract " : " ") + "method: " + method);
+
+        Value returnValue = null;
+        if (ref != null) {
+            returnValue = invokeInstance(ref, method);
+        } else {
+            returnValue = invokeStatic(targetClass, method);
+        }
+
+        println("        return val = " + returnValue);
+        // It has to be the same value as what we passed in!
+        if (returnValue.equals(value)) {
+            println("         " + method.name() + " return value matches: "
+                    + value);
+        } else {
+            if (value != null) {
+                throw new Exception(method.name() + " returned: " + returnValue +
+                                    " expected: " + value );
+            } else {
+                println("         " + method.name() + " return value : " + returnValue);
+            }
+
+        }
+    }
+
+    private Value invokeInstance(ObjectReference ref, Method method) throws Exception {
+        return ref.invokeMethod(mainThread, method, Collections.emptyList(), ObjectReference.INVOKE_NONVIRTUAL);
+    }
+
+    private Value invokeStatic(ReferenceType refType, Method method) throws Exception {
+        if (refType instanceof ClassType) {
+            return ((ClassType)refType).invokeMethod(mainThread, method, Collections.emptyList(), ObjectReference.INVOKE_NONVIRTUAL);
+        } else {
+            return ((InterfaceType)refType).invokeMethod(mainThread, method, Collections.emptyList(), ObjectReference.INVOKE_NONVIRTUAL);
+        }
+    }
+
+    private Method getMethod(ReferenceType rt, String name, String signature) {
+        if (rt == null) return null;
+        Method m = findMethod(rt, name, signature);
+        if (m == null) {
+            if (rt instanceof ClassType) {
+                for (Object ifc : ((ClassType)rt).interfaces()) {
+                    m = getMethod((ReferenceType)ifc, name, signature);
+                    if (m != null) {
+                        break;
+                    }
+                }
+                if (m == null) {
+                    m = getMethod(((ClassType)rt).superclass(), name, signature);
+                } else {
+                    if (m.isStatic()) {
+                        // interface static methods are not inherited
+                        m = null;
+                    }
+                }
+            } else if (rt instanceof InterfaceType) {
+                for(Object ifc : ((InterfaceType)rt).superinterfaces()) {
+                    m = getMethod((ReferenceType)ifc, name, signature);
+                    if (m != null) {
+                        if (m.isStatic()) {
+                            // interface static methods are not inherited
+                            m = null;
+                        }
+                        break;
+                    }
+                }
+            }
+        }
+
+        return m;
+    }
+
+    private void logInvocation(ObjectReference ref, String methodName, String methodSig, ReferenceType targetClass) {
+        if (ref != null) {
+            System.err.println("Invoking: " + ref.referenceType().name() + "." +
+                    methodName + methodSig + " with target of type " +
+                    targetClass.name());
+        } else {
+            System.err.println("Invoking static : " + targetClass.name() + "." +
+                    methodName + methodSig);
+        }
+    }
+}
+
+
+
--- a/test/javax/management/monitor/CounterMonitorDeadlockTest.java	Mon May 05 09:41:41 2014 -0700
+++ b/test/javax/management/monitor/CounterMonitorDeadlockTest.java	Mon May 05 12:49:13 2014 -0700
@@ -98,13 +98,13 @@
             monitorProxy.start();
 
             final int initGetCount = observedProxy.getGetCount();
-            int getCount = initGetCount;
-            for (int i = 0; i < 500; i++) { // 500 * 10 = 5 seconds
-                getCount = observedProxy.getGetCount();
-                if (getCount != initGetCount)
-                    break;
-                Thread.sleep(10);
-            }
+            int getCount;
+            System.out.println("Checking GetCount, possible deadlock if timeout.");
+            do { // 8038322. Until timeout of testing harness
+                Thread.sleep(200);
+            } while ((getCount=observedProxy.getGetCount()) == initGetCount);
+            System.out.println("Done!");
+
             if (getCount <= initGetCount)
                 throw new Exception("Test failed: presumable deadlock");
             // This won't show up as a deadlock in CTRL-\ or in
@@ -131,10 +131,11 @@
                 };
                 mbs.addNotificationListener(monitorName, listener, null, null);
                 observedProxy.setThing(1000);
-                for (int i = 0; i < 500 && notifCount.get() == 0; i++)
-                    Thread.sleep(10);
-                if (notifCount.get() == 0)
-                    throw new Exception("Test failed: presumable deadlock");
+                System.out.println("Waiting notifCount.get() != 0, possible deadlock if timeout.");
+                do {
+                    Thread.sleep(200);
+                } while(notifCount.get() == 0); // 8038322. Until timeout of testing harness
+                System.out.println("Done");
             }
 
         }
--- a/test/javax/xml/crypto/dsig/GenerationTests.java	Mon May 05 09:41:41 2014 -0700
+++ b/test/javax/xml/crypto/dsig/GenerationTests.java	Mon May 05 12:49:13 2014 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 4635230 6283345 6303830 6824440 6867348 7094155 8038184
+ * @bug 4635230 6283345 6303830 6824440 6867348 7094155 8038184 8038349
  * @summary Basic unit tests for generating XML Signatures with JSR 105
  * @compile -XDignore.symbol.file KeySelectors.java SignatureValidator.java
  *     X509KeySelector.java GenerationTests.java
@@ -80,9 +80,10 @@
     private static KeyInfoFactory kifac;
     private static DocumentBuilder db;
     private static CanonicalizationMethod withoutComments;
-    private static SignatureMethod dsaSha1, rsaSha1, rsaSha256, rsaSha384, rsaSha512;
+    private static SignatureMethod dsaSha1, dsaSha256, rsaSha1,
+                                   rsaSha256, rsaSha384, rsaSha512;
     private static DigestMethod sha1, sha256, sha384, sha512;
-    private static KeyInfo dsa, rsa, rsa1024;
+    private static KeyInfo dsa1024, dsa2048, rsa, rsa1024;
     private static KeySelector kvks = new KeySelectors.KeyValueKeySelector();
     private static KeySelector sks;
     private static Key signingKey;
@@ -106,10 +107,13 @@
         "http://www.w3.org/TR/xml-stylesheet";
     private final static String STYLESHEET_B64 =
         "http://www.w3.org/Signature/2002/04/xml-stylesheet.b64";
+    private final static String DSA_SHA256 =
+        "http://www.w3.org/2009/xmldsig11#dsa-sha256";
 
     public static void main(String args[]) throws Exception {
         setup();
-        test_create_signature_enveloped_dsa();
+        test_create_signature_enveloped_dsa(1024);
+        test_create_signature_enveloped_dsa(2048);
         test_create_signature_enveloping_b64_dsa();
         test_create_signature_enveloping_dsa();
         test_create_signature_enveloping_hmac_sha1_40();
@@ -157,15 +161,18 @@
         withoutComments = fac.newCanonicalizationMethod
             (CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec)null);
         dsaSha1 = fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null);
+        dsaSha256 = fac.newSignatureMethod(DSA_SHA256, null);
         sha1 = fac.newDigestMethod(DigestMethod.SHA1, null);
         sha256 = fac.newDigestMethod(DigestMethod.SHA256, null);
         sha384 = fac.newDigestMethod
             ("http://www.w3.org/2001/04/xmldsig-more#sha384", null);
         sha512 = fac.newDigestMethod(DigestMethod.SHA512, null);
-        dsa = kifac.newKeyInfo(Collections.singletonList
+        dsa1024 = kifac.newKeyInfo(Collections.singletonList
             (kifac.newKeyValue(validatingKey)));
+        dsa2048 = kifac.newKeyInfo(Collections.singletonList
+            (kifac.newKeyValue(getPublicKey("DSA", 2048))));
         rsa = kifac.newKeyInfo(Collections.singletonList
-            (kifac.newKeyValue(getPublicKey("RSA"))));
+            (kifac.newKeyValue(getPublicKey("RSA", 512))));
         rsa1024 = kifac.newKeyInfo(Collections.singletonList
             (kifac.newKeyValue(getPublicKey("RSA", 1024))));
         rsaSha1 = fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null);
@@ -180,11 +187,25 @@
         httpUd = new HttpURIDereferencer();
     }
 
-    static void test_create_signature_enveloped_dsa() throws Exception {
-        System.out.println("* Generating signature-enveloped-dsa.xml");
+    static void test_create_signature_enveloped_dsa(int size) throws Exception {
+        System.out.println("* Generating signature-enveloped-dsa-"
+                           + size + ".xml");
+        SignatureMethod sm = null;
+        KeyInfo ki = null;
+        Key privKey;
+        if (size == 1024) {
+            sm = dsaSha1;
+            ki = dsa1024;
+            privKey = signingKey;
+        } else if (size == 2048) {
+            sm = dsaSha256;
+            ki = dsa2048;
+            privKey = getPrivateKey("DSA", 2048);
+        } else throw new RuntimeException("unsupported keysize:" + size);
+
         // create SignedInfo
         SignedInfo si = fac.newSignedInfo
-            (withoutComments, dsaSha1, Collections.singletonList
+            (withoutComments, sm, Collections.singletonList
                 (fac.newReference
                     ("", sha1, Collections.singletonList
                         (fac.newTransform(Transform.ENVELOPED,
@@ -192,7 +213,7 @@
                  null, null)));
 
         // create XMLSignature
-        XMLSignature sig = fac.newXMLSignature(si, dsa);
+        XMLSignature sig = fac.newXMLSignature(si, ki);
 
         Document doc = db.newDocument();
         Element envelope = doc.createElementNS
@@ -201,12 +222,12 @@
             "xmlns", "http://example.org/envelope");
         doc.appendChild(envelope);
 
-        DOMSignContext dsc = new DOMSignContext(signingKey, envelope);
+        DOMSignContext dsc = new DOMSignContext(privKey, envelope);
 
         sig.sign(dsc);
-//      StringWriter sw = new StringWriter();
-//      dumpDocument(doc, sw);
-//      System.out.println(sw.toString());
+//        StringWriter sw = new StringWriter();
+//        dumpDocument(doc, sw);
+//        System.out.println(sw.toString());
 
         DOMValidateContext dvc = new DOMValidateContext
             (kvks, envelope.getFirstChild());
@@ -226,21 +247,21 @@
     static void test_create_signature_enveloping_b64_dsa() throws Exception {
         System.out.println("* Generating signature-enveloping-b64-dsa.xml");
         test_create_signature_enveloping
-            (sha1, dsaSha1, dsa, signingKey, kvks, true);
+            (sha1, dsaSha1, dsa1024, signingKey, kvks, true);
         System.out.println();
     }
 
     static void test_create_signature_enveloping_dsa() throws Exception {
         System.out.println("* Generating signature-enveloping-dsa.xml");
         test_create_signature_enveloping
-            (sha1, dsaSha1, dsa, signingKey, kvks, false);
+            (sha1, dsaSha1, dsa1024, signingKey, kvks, false);
         System.out.println();
     }
 
     static void test_create_signature_enveloping_sha256_dsa() throws Exception {
         System.out.println("* Generating signature-enveloping-sha256-dsa.xml");
         test_create_signature_enveloping
-            (sha256, dsaSha1, dsa, signingKey, kvks, false);
+            (sha256, dsaSha1, dsa1024, signingKey, kvks, false);
         System.out.println();
     }
 
@@ -293,7 +314,7 @@
     static void test_create_signature_enveloping_rsa() throws Exception {
         System.out.println("* Generating signature-enveloping-rsa.xml");
         test_create_signature_enveloping(sha1, rsaSha1, rsa,
-            getPrivateKey("RSA"), kvks, false);
+            getPrivateKey("RSA", 512), kvks, false);
         System.out.println();
     }
 
@@ -301,7 +322,7 @@
         throws Exception {
         System.out.println("* Generating signature-enveloping-sha384-rsa_sha256.xml");
         test_create_signature_enveloping(sha384, rsaSha256, rsa,
-            getPrivateKey("RSA"), kvks, false);
+            getPrivateKey("RSA", 512), kvks, false);
         System.out.println();
     }
 
@@ -323,13 +344,13 @@
 
     static void test_create_signature_external_b64_dsa() throws Exception {
         System.out.println("* Generating signature-external-b64-dsa.xml");
-        test_create_signature_external(dsaSha1, dsa, signingKey, kvks, true);
+        test_create_signature_external(dsaSha1, dsa1024, signingKey, kvks, true);
         System.out.println();
     }
 
     static void test_create_signature_external_dsa() throws Exception {
         System.out.println("* Generating signature-external-dsa.xml");
-        test_create_signature_external(dsaSha1, dsa, signingKey, kvks, false);
+        test_create_signature_external(dsaSha1, dsa1024, signingKey, kvks, false);
         System.out.println();
     }
 
@@ -441,7 +462,7 @@
 
         // create XMLSignature
         XMLSignature sig = fac.newXMLSignature(si, rsa, objs, "signature", null);
-        DOMSignContext dsc = new DOMSignContext(getPrivateKey("RSA"), doc);
+        DOMSignContext dsc = new DOMSignContext(getPrivateKey("RSA", 512), doc);
 
         sig.sign(dsc);
 
@@ -487,7 +508,7 @@
         XMLSignature sig = fac.newXMLSignature(si, rsa,
                                                Collections.singletonList(obj),
                                                "signature", null);
-        DOMSignContext dsc = new DOMSignContext(getPrivateKey("RSA"), doc);
+        DOMSignContext dsc = new DOMSignContext(getPrivateKey("RSA", 512), doc);
         dsc.setIdAttributeNS(nc, null, "Id");
 
         sig.sign(dsc);
@@ -530,7 +551,7 @@
         XMLSignature sig = fac.newXMLSignature(si, rsa,
                                                Collections.singletonList(obj),
                                                "signature", null);
-        DOMSignContext dsc = new DOMSignContext(getPrivateKey("RSA"), doc);
+        DOMSignContext dsc = new DOMSignContext(getPrivateKey("RSA", 512), doc);
         sig.sign(dsc);
     }
 
@@ -1116,6 +1137,16 @@
         "90670890367185141189796";
     private static final String DSA_X =
         "0527140396812450214498055937934275626078768840117";
+    private static final String DSA_2048_Y =
+        "15119007057343785981993995134621348945077524760182795513668325877793414638620983617627033248732235626178802906346261435991040697338468329634416089753032362617771631199351767336660070462291411472735835843440140283101463231807789628656218830720378705090795271104661936237385140354825159080766174663596286149653433914842868551355716015585570827642835307073681358328172009941968323702291677280809277843998510864653406122348712345584706761165794179850728091522094227603562280855104749858249588234915206290448353957550635709520273178475097150818955098638774564910092913714625772708285992586894795017709678223469405896699928";
+    private static final String DSA_2048_P =
+        "18111848663142005571178770624881214696591339256823507023544605891411707081617152319519180201250440615163700426054396403795303435564101919053459832890139496933938670005799610981765220283775567361483662648340339405220348871308593627647076689407931875483406244310337925809427432681864623551598136302441690546585427193224254314088256212718983105131138772434658820375111735710449331518776858786793875865418124429269409118756812841019074631004956409706877081612616347900606555802111224022921017725537417047242635829949739109274666495826205002104010355456981211025738812433088757102520562459649777989718122219159982614304359";
+    private static final String DSA_2048_Q =
+        "19689526866605154788513693571065914024068069442724893395618704484701";
+    private static final String DSA_2048_G =
+        "2859278237642201956931085611015389087970918161297522023542900348087718063098423976428252369340967506010054236052095950169272612831491902295835660747775572934757474194739347115870723217560530672532404847508798651915566434553729839971841903983916294692452760249019857108409189016993380919900231322610083060784269299257074905043636029708121288037909739559605347853174853410208334242027740275688698461842637641566056165699733710043802697192696426360843173620679214131951400148855611740858610821913573088059404459364892373027492936037789337011875710759208498486908611261954026964574111219599568903257472567764789616958430";
+    private static final String DSA_2048_X =
+        "14562787764977288900757387442281559936279834964901963465277698843172";
     private static final String RSA_MOD =
         "010800185049102889923150759252557522305032794699952150943573164381" +
         "936603255999071981574575044810461362008102247767482738822150129277" +
@@ -1138,43 +1169,48 @@
         "204903524890556839550490384015324575598723478554854070823335021842" +
         "210112348400928769";
 
-    private static PublicKey getPublicKey(String algo) throws Exception {
-        return getPublicKey(algo, 512);
-    }
-
     private static PublicKey getPublicKey(String algo, int keysize)
         throws Exception {
         KeyFactory kf = KeyFactory.getInstance(algo);
         KeySpec kspec;
         if (algo.equalsIgnoreCase("DSA")) {
-            kspec = new DSAPublicKeySpec(new BigInteger(DSA_Y),
-                                         new BigInteger(DSA_P),
-                                         new BigInteger(DSA_Q),
-                                         new BigInteger(DSA_G));
+            if (keysize == 1024) {
+                kspec = new DSAPublicKeySpec(new BigInteger(DSA_Y),
+                                             new BigInteger(DSA_P),
+                                             new BigInteger(DSA_Q),
+                                             new BigInteger(DSA_G));
+            } else if (keysize == 2048) {
+                kspec = new DSAPublicKeySpec(new BigInteger(DSA_2048_Y),
+                                             new BigInteger(DSA_2048_P),
+                                             new BigInteger(DSA_2048_Q),
+                                             new BigInteger(DSA_2048_G));
+            } else throw new RuntimeException("Unsupported keysize:" + keysize);
         } else if (algo.equalsIgnoreCase("RSA")) {
             if (keysize == 512) {
                 kspec = new RSAPublicKeySpec(new BigInteger(RSA_MOD),
                                              new BigInteger(RSA_PUB));
-            } else {
+            } else if (keysize == 1024) {
                 kspec = new RSAPublicKeySpec(new BigInteger(RSA_1024_MOD),
                                              new BigInteger(RSA_PUB));
-            }
+            } else throw new RuntimeException("Unsupported keysize:" + keysize);
         } else throw new RuntimeException("Unsupported key algorithm " + algo);
         return kf.generatePublic(kspec);
     }
 
-    private static PrivateKey getPrivateKey(String algo) throws Exception {
-        return getPrivateKey(algo, 512);
-    }
-
     private static PrivateKey getPrivateKey(String algo, int keysize)
         throws Exception {
         KeyFactory kf = KeyFactory.getInstance(algo);
         KeySpec kspec;
         if (algo.equalsIgnoreCase("DSA")) {
-            kspec = new DSAPrivateKeySpec
-                (new BigInteger(DSA_X), new BigInteger(DSA_P),
-                 new BigInteger(DSA_Q), new BigInteger(DSA_G));
+            if (keysize == 1024) {
+                kspec = new DSAPrivateKeySpec
+                    (new BigInteger(DSA_X), new BigInteger(DSA_P),
+                     new BigInteger(DSA_Q), new BigInteger(DSA_G));
+            } else if (keysize == 2048) {
+                kspec = new DSAPrivateKeySpec
+                    (new BigInteger(DSA_2048_X), new BigInteger(DSA_2048_P),
+                     new BigInteger(DSA_2048_Q), new BigInteger(DSA_2048_G));
+            } else throw new RuntimeException("Unsupported keysize:" + keysize);
         } else if (algo.equalsIgnoreCase("RSA")) {
             if (keysize == 512) {
                 kspec = new RSAPrivateKeySpec
--- a/test/javax/xml/crypto/dsig/KeySelectors.java	Mon May 05 09:41:41 2014 -0700
+++ b/test/javax/xml/crypto/dsig/KeySelectors.java	Mon May 05 12:49:13 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -175,7 +175,8 @@
         //@@@FIXME: this should also work for key types other than DSA/RSA
         static boolean algEquals(String algURI, String algName) {
             if (algName.equalsIgnoreCase("DSA") &&
-                algURI.equals(SignatureMethod.DSA_SHA1)) {
+                algURI.equals(SignatureMethod.DSA_SHA1) ||
+                algURI.equals("http://www.w3.org/2009/xmldsig11#dsa-sha256")) {
                 return true;
             } else if (algName.equalsIgnoreCase("RSA") &&
                 (algURI.equals(SignatureMethod.RSA_SHA1) ||
--- a/test/tools/launcher/FXLauncherTest.java	Mon May 05 09:41:41 2014 -0700
+++ b/test/tools/launcher/FXLauncherTest.java	Mon May 05 12:49:13 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8001533 8004547
+ * @bug 8001533 8004547 8035782
  * @summary Test launching FX application with java -jar
  * Test uses main method and blank main method, a jfx app class and an incorrest
  * jfx app class, a main-class for the manifest, a bogus one and none.
@@ -373,6 +373,11 @@
                 System.out.println(tr);
                 throw new Exception("jfxrt.jar is being loaded, it should not be!");
             }
+            if (!tr.notContains("sun.launcher.LauncherHelper$FXHelper")) {
+                System.out.println("testing for extraneous 'sun.launcher.LauncherHelper$FXHelper'");
+                System.out.println(tr);
+                throw new Exception("FXHelper is being loaded, it should not be!");
+            }
             for (String p : APP_PARMS) {
                 if (!tr.contains(p)) {
                     System.err.println("ERROR: Did not find "