changeset 24481:4b3abcef30d8

Merge
author twisti
date Fri, 16 May 2014 14:35:37 -0700
parents d2442b4a080f 97e9abb0864b
children 5fc5c8f199e6
files hotspot/src/share/vm/libadt/port.cpp hotspot/src/share/vm/libadt/port.hpp hotspot/src/share/vm/runtime/vmStructs.cpp jdk/src/share/classes/jdk/internal/util/xml/BasicXmlPropertiesProvider.java jdk/src/share/classes/sun/util/spi/XmlPropertiesProvider.java jdk/src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider jdk/src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java jdk/src/solaris/classes/java/lang/UNIXProcess.java.aix jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux jdk/src/solaris/classes/java/lang/UNIXProcess.java.solaris jdk/test/java/util/Properties/CustomProvider.java jdk/test/java/util/Properties/MyXmlPropertiesProvider.java langtools/test/tools/javac/lambda/TargetType16.out
diffstat 398 files changed, 13300 insertions(+), 14093 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu May 15 10:37:52 2014 -0700
+++ b/.hgtags	Fri May 16 14:35:37 2014 -0700
@@ -255,3 +255,4 @@
 8c0bdeecd7c0f9ce3f3762a51991f755cb3a972c jdk9-b10
 0809c9a4d36e6291f1c4384604c4bbf29e975722 jdk9-b11
 0d1f816217dce5e72187f167cc1816080cbeb453 jdk9-b12
+1a30593dcb9802faec3b6edb24d86ca088594e4e jdk9-b13
--- a/.hgtags-top-repo	Thu May 15 10:37:52 2014 -0700
+++ b/.hgtags-top-repo	Fri May 16 14:35:37 2014 -0700
@@ -255,3 +255,4 @@
 fa13f2b926f8426876ec03e7903f3ee0ee150f2e jdk9-b10
 ab55a18a95e1990a588929d5d29db3eb9985fea0 jdk9-b11
 59f6350295f9681fe5956d8bc889bf341914c6cb jdk9-b12
+5800456add07e1a68170a229fb5e27376f8875e5 jdk9-b13
--- a/common/autoconf/boot-jdk.m4	Thu May 15 10:37:52 2014 -0700
+++ b/common/autoconf/boot-jdk.m4	Fri May 16 14:35:37 2014 -0700
@@ -331,8 +331,8 @@
 
   # Finally, set some other options...
 
-  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
-  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
+  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
+  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
   AC_SUBST(BOOT_JDK_SOURCETARGET)
   AC_SUBST(JAVAC_FLAGS)
 ])
--- a/common/autoconf/generated-configure.sh	Thu May 15 10:37:52 2014 -0700
+++ b/common/autoconf/generated-configure.sh	Fri May 16 14:35:37 2014 -0700
@@ -4243,7 +4243,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1398861894
+DATE_WHEN_GENERATED=1399969244
 
 ###############################################################################
 #
@@ -26004,8 +26004,8 @@
 
   # Finally, set some other options...
 
-  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
-  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
+  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
+  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
 
 
 
--- a/common/bin/hgforest.sh	Thu May 15 10:37:52 2014 -0700
+++ b/common/bin/hgforest.sh	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 #
 # Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -23,25 +22,40 @@
 # questions.
 #
 
-# Shell script for a fast parallel forest command
+# Shell script for a fast parallel forest/trees command
 
-global_opts=""
-status_output="/dev/stdout"
-qflag="false"
-vflag="false"
-sflag="false"
+usage() {
+      echo "usage: $0 [-h|--help] [-q|--quiet] [-v|--verbose] [-s|--sequential] [--] <command> [commands...]" > ${status_output}
+      echo "Environment variables which modify behaviour:"
+      echo "   HGFOREST_QUIET      : (boolean) If 'true' then standard output is redirected to /dev/null"
+      echo "   HGFOREST_VERBOSE    : (boolean) If 'true' then Mercurial asked to produce verbose output"
+      echo "   HGFOREST_SEQUENTIAL : (boolean) If 'true' then repos are processed sequentially. Disables concurrency"
+      echo "   HGFOREST_GLOBALOPTS : (string, must begin with space) Additional Mercurial global options"
+      echo "   HGFOREST_REDIRECT   : (file path) Redirect standard output to specified file"
+      echo "   HGFOREST_FIFOS      : (boolean) Default behaviour for FIFO detection. Does not override FIFOs disabled"
+      echo "   HGFOREST_CONCURRENCY: (positive integer) Number of repos to process concurrently"
+      echo "   HGFOREST_DEBUG      : (boolean) If 'true' then temp files are retained"
+      exit 1
+}
+
+global_opts="${HGFOREST_GLOBALOPTS:-}"
+status_output="${HGFOREST_REDIRECT:-/dev/stdout}"
+qflag="${HGFOREST_QUIET:-false}"
+vflag="${HGFOREST_VERBOSE:-false}"
+sflag="${HGFOREST_SEQUENTIAL:-false}"
 while [ $# -gt 0 ]
 do
   case $1 in
+    -h | --help )
+      usage
+      ;;
+
     -q | --quiet )
       qflag="true"
-      global_opts="${global_opts} -q"
-      status_output="/dev/null"
       ;;
 
     -v | --verbose )
       vflag="true"
-      global_opts="${global_opts} -v"
       ;;
 
     -s | --sequential )
@@ -63,39 +77,60 @@
   shift
 done
 
+# silence standard output?
+if [ ${qflag} = "true" ] ; then
+  global_opts="${global_opts} -q"
+  status_output="/dev/null"
+fi
 
-command="$1"; shift
-command_args="$@"
+# verbose output?
+if [ ${vflag} = "true" ] ; then
+  global_opts="${global_opts} -v"
+fi
 
-usage() {
-      echo "usage: $0 [-q|--quiet] [-v|--verbose] [-s|--sequential] [--] <command> [commands...]" > ${status_output}
-      exit 1
-}
-
-if [ "x" = "x$command" ] ; then
+# Make sure we have a command.
+if [ $# -lt 1 -o -z "${1:-}" ] ; then
   echo "ERROR: No command to hg supplied!"
   usage
 fi
 
-# Check if we can use fifos for monitoring sub-process completion.
-on_windows=`uname -s | egrep -ic -e 'cygwin|msys'`
-if [ ${on_windows} = "1" ]; then
-  # cygwin has (2014-04-18) broken (single writer only) FIFOs
-  # msys has (2014-04-18) no FIFOs.
-  have_fifos="false"
-else
-  have_fifos="true"
-fi
+command="$1"; shift
+command_args="${@:-}"
 
 # Clean out the temporary directory that stores the pid files.
 tmp=/tmp/forest.$$
 rm -f -r ${tmp}
 mkdir -p ${tmp}
 
+
+if [ "${HGFOREST_DEBUG:-false}" = "true" ] ; then
+  echo "DEBUG: temp files are in: ${tmp}"
+fi
+
+# Check if we can use fifos for monitoring sub-process completion.
+echo "1" > ${tmp}/read
+while_subshell=1
+while read line; do
+  while_subshell=0
+  break;
+done < ${tmp}/read
+rm ${tmp}/read
+
+on_windows=`uname -s | egrep -ic -e 'cygwin|msys'`
+
+if [ ${while_subshell} = "1" -o ${on_windows} = "1" ]; then
+  # cygwin has (2014-04-18) broken (single writer only) FIFOs
+  # msys has (2014-04-18) no FIFOs.
+  # older shells create a sub-shell for redirect to while
+  have_fifos="false"
+else
+  have_fifos="${HGFOREST_FIFOS:-true}"
+fi
+
 safe_interrupt () {
   if [ -d ${tmp} ]; then
     if [ "`ls ${tmp}/*.pid`" != "" ]; then
-      echo "Waiting for processes ( `cat ${tmp}/*.pid | tr '\n' ' '`) to terminate nicely!" > ${status_output}
+      echo "Waiting for processes ( `cat ${tmp}/.*.pid ${tmp}/*.pid 2> /dev/null | tr '\n' ' '`) to terminate nicely!" > ${status_output}
       sleep 1
       # Pipe stderr to dev/null to silence kill, that complains when trying to kill
       # a subprocess that has already exited.
@@ -110,10 +145,12 @@
 
 nice_exit () {
   if [ -d ${tmp} ]; then
-    if [ "`ls ${tmp}`" != "" ]; then
+    if [ "`ls -A ${tmp} 2> /dev/null`" != "" ]; then
       wait
     fi
-    rm -f -r ${tmp}
+    if [ "${HGFOREST_DEBUG:-false}" != "true" ] ; then
+      rm -f -r ${tmp}
+    fi
   fi
 }
 
@@ -128,17 +165,20 @@
 repos=""
 repos_extra=""
 if [ "${command}" = "clone" -o "${command}" = "fclone" -o "${command}" = "tclone" ] ; then
+  # we must be a clone
   if [ ! -f .hg/hgrc ] ; then
     echo "ERROR: Need initial repository to use this script" > ${status_output}
     exit 1
   fi
 
+  # the clone must know where it came from (have a default pull path).
   pull_default=`hg paths default`
   if [ "${pull_default}" = "" ] ; then
     echo "ERROR: Need initial clone with 'hg paths default' defined" > ${status_output}
     exit 1
   fi
 
+  # determine which sub repos need to be cloned.
   for i in ${subrepos} ; do
     if [ ! -f ${i}/.hg/hgrc ] ; then
       repos="${repos} ${i}"
@@ -147,12 +187,15 @@
 
   pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'`
 
-  if [ "${command_args}" != "" ] ; then
+  if [ -n "${command_args}" ] ; then
+    # if there is an "extra sources" path then reparent "extra" repos to that path
     if [ "x${pull_default}" = "x${pull_default_tail}" ] ; then
       echo "ERROR: Need initial clone from non-local source" > ${status_output}
       exit 1
     fi
     pull_extra="${command_args}/${pull_default_tail}"
+
+    # determine which extra subrepos need to be cloned.
     for i in ${subrepos_extra} ; do
       if [ ! -f ${i}/.hg/hgrc ] ; then
         repos_extra="${repos_extra} ${i}"
@@ -160,7 +203,7 @@
     done
   else
     if [ "x${pull_default}" = "x${pull_default_tail}" ] ; then
-      # local source repo. Copy the extras ones that exist there.
+      # local source repo. Clone the "extra" subrepos that exist there.
       for i in ${subrepos_extra} ; do
         if [ -f ${pull_default}/${i}/.hg/hgrc -a ! -f ${i}/.hg/hgrc ] ; then
           # sub-repo there in source but not here
@@ -169,13 +212,17 @@
       done
     fi
   fi
-  at_a_time=2
+
   # Any repos to deal with?
   if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then
     echo "No repositories to process." > ${status_output}
     exit
   fi
+
+  # Repos to process concurrently. Clone does better with low concurrency.
+  at_a_time="${HGFOREST_CONCURRENCY:-2}"
 else
+  # Process command for all of the present repos
   for i in . ${subrepos} ${subrepos_extra} ; do
     if [ -d ${i}/.hg ] ; then
       repos="${repos} ${i}"
@@ -189,6 +236,7 @@
   fi
 
   # any of the repos locked?
+  locked=""
   for i in ${repos} ; do
     if [ -h ${i}/.hg/store/lock -o -f ${i}/.hg/store/lock ] ; then
       locked="${i} ${locked}"
@@ -198,34 +246,39 @@
     echo "ERROR: These repositories are locked: ${locked}" > ${status_output}
     exit 1
   fi
-  at_a_time=8
+
+  # Repos to process concurrently.
+  at_a_time="${HGFOREST_CONCURRENCY:-8}"
 fi
 
 # Echo out what repositories we do a command on.
 echo "# Repositories: ${repos} ${repos_extra}" > ${status_output}
 
 if [ "${command}" = "serve" ] ; then
-  # "serve" is run for all the repos.
+  # "serve" is run for all the repos as one command.
   (
     (
+      cwd=`pwd`
+      serving=`basename ${cwd}`
       (
         echo "[web]"
-        echo "description = $(basename $(pwd))"
+        echo "description = ${serving}"
         echo "allow_push = *"
         echo "push_ssl = False"
 
         echo "[paths]"
-        for i in ${repos} ${repos_extra} ; do
+        for i in ${repos} ; do
           if [ "${i}" != "." ] ; then
-            echo "/$(basename $(pwd))/${i} = ${i}"
+            echo "/${serving}/${i} = ${i}"
           else
-            echo "/$(basename $(pwd)) = $(pwd)"
+            echo "/${serving} = ${cwd}"
           fi
         done
       ) > ${tmp}/serve.web-conf
 
-      echo "serving root repo $(basename $(pwd))"
+      echo "serving root repo ${serving}" > ${status_output}
 
+      echo "hg${global_opts} serve" > ${status_output}
       (PYTHONUNBUFFERED=true hg${global_opts} serve -A ${status_output} -E ${status_output} --pid-file ${tmp}/serve.pid --web-conf ${tmp}/serve.web-conf; echo "$?" > ${tmp}/serve.pid.rc ) 2>&1 &
     ) 2>&1 | sed -e "s@^@serve:   @" > ${status_output}
   ) &
@@ -234,81 +287,93 @@
 
   # n is the number of subprocess started or which might still be running.
   n=0
-  if [ $have_fifos = "true" ]; then
+  if [ ${have_fifos} = "true" ]; then
     # if we have fifos use them to detect command completion.
     mkfifo ${tmp}/fifo
     exec 3<>${tmp}/fifo
-    if [ "${sflag}" = "true" ] ; then
-      # force sequential
-      at_a_time=1
-    fi
   fi
 
+  # iterate over all of the subrepos.
   for i in ${repos} ${repos_extra} ; do
     n=`expr ${n} '+' 1`
     repopidfile=`echo ${i} | sed -e 's@./@@' -e 's@/@_@g'`
     reponame=`echo ${i} | sed -e :a -e 's/^.\{1,20\}$/ &/;ta'`
     pull_base="${pull_default}"
-    for j in $repos_extra ; do
-      if [ "$i" = "$j" ] ; then
-          pull_base="${pull_extra}"
+
+    # regular repo or "extra" repo?
+    for j in ${repos_extra} ; do
+      if [ "${i}" = "${j}" ] ; then
+        # it's an "extra"
+        pull_base="${pull_extra}"
       fi
     done
+
+    # remove trailing slash
     pull_base="`echo ${pull_base} | sed -e 's@[/]*$@@'`"
+
+    # execute the command on the subrepo
     (
       (
         if [ "${command}" = "clone" -o "${command}" = "fclone" -o "${command}" = "tclone" ] ; then
-          pull_newrepo="${pull_base}/${i}"
-          path="`dirname ${i}`"
-          if [ "${path}" != "." ] ; then
+          # some form of clone
+          clone_newrepo="${pull_base}/${i}"
+          parent_path="`dirname ${i}`"
+          if [ "${parent_path}" != "." ] ; then
             times=0
-            while [ ! -d "${path}" ]   ## nested repo, ensure containing dir exists
-            do
+            while [ ! -d "${parent_path}" ] ; do  ## nested repo, ensure containing dir exists
+              if [ "${sflag}" = "true" ] ; then
+                # Missing parent is fatal during sequential operation.
+                echo "ERROR: Missing parent path: ${parent_path}" > ${status_output}
+                exit 1
+              fi
               times=`expr ${times} '+' 1`
               if [ `expr ${times} '%' 10` -eq 0 ] ; then
-                echo "${path} still not created, waiting..." > ${status_output}
+                echo "${parent_path} still not created, waiting..." > ${status_output}
               fi
               sleep 5
             done
           fi
-          echo "hg${global_opts} clone ${pull_newrepo} ${i}" > ${status_output}
-          (PYTHONUNBUFFERED=true hg${global_opts} clone ${pull_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc ) 2>&1 &
+          # run the clone command.
+          echo "hg${global_opts} clone ${clone_newrepo} ${i}" > ${status_output}
+          (PYTHONUNBUFFERED=true hg${global_opts} clone ${clone_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc ) 2>&1 &
         else
+          # run the command.
           echo "cd ${i} && hg${global_opts} ${command} ${command_args}" > ${status_output}
           cd ${i} && (PYTHONUNBUFFERED=true hg${global_opts} ${command} ${command_args}; echo "$?" > ${tmp}/${repopidfile}.pid.rc ) 2>&1 &
         fi
 
         echo $! > ${tmp}/${repopidfile}.pid
       ) 2>&1 | sed -e "s@^@${reponame}:   @" > ${status_output}
-      if [ $have_fifos = "true" ]; then
-        echo "${reponame}" >&3
+      # tell the fifo waiter that this subprocess is done.
+      if [ ${have_fifos} = "true" ]; then
+        echo "${i}" >&3
       fi
     ) &
 
-    if [ $have_fifos = "true" ]; then
-      # check on count of running subprocesses and possibly wait for completion
-      if [ ${at_a_time} -lt ${n} ] ; then
-        # read will block until there are completed subprocesses
-        while read repo_done; do
-          n=`expr ${n} '-' 1`
-          if [ ${n} -lt ${at_a_time} ] ; then
-            # we should start more subprocesses
-            break;
-          fi
-        done <&3
-      fi
+    if [ "${sflag}" = "true" ] ; then
+      # complete this task before starting another.
+      wait
     else
-      if [ "${sflag}" = "false" ] ; then
+      if [ "${have_fifos}" = "true" ]; then
+        # check on count of running subprocesses and possibly wait for completion
+        if [ ${n} -ge ${at_a_time} ] ; then
+          # read will block until there are completed subprocesses
+          while read repo_done; do
+            n=`expr ${n} '-' 1`
+            if [ ${n} -lt ${at_a_time} ] ; then
+              # we should start more subprocesses
+              break;
+            fi
+          done <&3
+        fi
+      else
         # Compare completions to starts
-        completed="`(ls -1 ${tmp}/*.pid.rc 2> /dev/null | wc -l) || echo 0`"
-        while [ ${at_a_time} -lt `expr ${n} '-' ${completed}` ] ; do
+        completed="`(ls -a1 ${tmp}/*.pid.rc 2> /dev/null | wc -l) || echo 0`"
+        while [ `expr ${n} '-' ${completed}` -ge ${at_a_time} ] ; do
           # sleep a short time to give time for something to complete
           sleep 1
-          completed="`(ls -1 ${tmp}/*.pid.rc 2> /dev/null | wc -l) || echo 0`"
+          completed="`(ls -a1 ${tmp}/*.pid.rc 2> /dev/null | wc -l) || echo 0`"
         done
-      else
-        # complete this task before starting another.
-        wait
       fi
     fi
   done
@@ -320,11 +385,12 @@
 # Terminate with exit 0 only if all subprocesses were successful
 ec=0
 if [ -d ${tmp} ]; then
-  for rc in ${tmp}/*.pid.rc ; do
+  rcfiles="`(ls -a ${tmp}/*.pid.rc 2> /dev/null) || echo ''`"
+  for rc in ${rcfiles} ; do
     exit_code=`cat ${rc} | tr -d ' \n\r'`
     if [ "${exit_code}" != "0" ] ; then
-      repo="`echo ${rc} | sed -e s@^${tmp}@@ -e 's@/*\([^/]*\)\.pid\.rc$@\1@' -e 's@_@/@g'`"
-      echo "WARNING: ${repo} exited abnormally ($exit_code)" > ${status_output}
+      repo="`echo ${rc} | sed -e 's@^'${tmp}'@@' -e 's@/*\([^/]*\)\.pid\.rc$@\1@' -e 's@_@/@g'`"
+      echo "WARNING: ${repo} exited abnormally (${exit_code})" > ${status_output}
       ec=1
     fi
   done
--- a/corba/.hgtags	Thu May 15 10:37:52 2014 -0700
+++ b/corba/.hgtags	Fri May 16 14:35:37 2014 -0700
@@ -255,3 +255,4 @@
 3bd4039dfc632fd7fc8418a25a3dcc34d1cd4019 jdk9-b10
 77ea0a2503582a28e4e66be7239a49a0d1dd313f jdk9-b11
 e212cdcc8c11f0ba5acf6f5ddb596c4c545a93f9 jdk9-b12
+088eec4c36f4d7f250fcd19c4969bf698e3d2cdc jdk9-b13
--- a/corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Thu May 15 10:37:52 2014 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java	Fri May 16 14:35:37 2014 -0700
@@ -25,8 +25,6 @@
 
 package com.sun.corba.se.spi.orb;
 
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.util.Map ;
 import java.util.HashMap ;
 import java.util.Properties ;
@@ -44,16 +42,13 @@
 import com.sun.corba.se.spi.protocol.RequestDispatcherRegistry ;
 import com.sun.corba.se.spi.protocol.ClientDelegateFactory ;
 import com.sun.corba.se.spi.protocol.CorbaServerRequestDispatcher ;
-import com.sun.corba.se.spi.protocol.CorbaMessageMediator ;
 import com.sun.corba.se.spi.protocol.PIHandler ;
 import com.sun.corba.se.spi.resolver.LocalResolver ;
 import com.sun.corba.se.spi.resolver.Resolver ;
 import com.sun.corba.se.spi.transport.CorbaContactInfoListFactory ;
-import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo;
 import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketManager;
 import com.sun.corba.se.spi.monitoring.MonitoringConstants;
 import com.sun.corba.se.spi.monitoring.MonitoringManager;
-import com.sun.corba.se.spi.monitoring.MonitoringManagerFactory;
 import com.sun.corba.se.spi.monitoring.MonitoringFactories;
 
 import com.sun.corba.se.spi.ior.IdentifiableFactoryFinder ;
@@ -62,11 +57,6 @@
 import com.sun.corba.se.spi.ior.ObjectKeyFactory ;
 import com.sun.corba.se.spi.ior.IOR ;
 
-import com.sun.corba.se.spi.orbutil.closure.Closure ;
-
-import com.sun.corba.se.spi.orb.Operation ;
-import com.sun.corba.se.spi.orb.ORBData ;
-import com.sun.corba.se.spi.orb.ORBVersion ;
 import com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolManager;
 
 import com.sun.corba.se.spi.oa.OAInvocationInfo ;
@@ -99,8 +89,6 @@
 
 import com.sun.corba.se.impl.presentation.rmi.PresentationManagerImpl ;
 
-import sun.misc.JavaAWTAccess;
-
 public abstract class ORB extends com.sun.corba.se.org.omg.CORBA.ORB
     implements Broker, TypeCodeFactory
 {
@@ -146,9 +134,9 @@
     // This map is needed for resolving recursive type code placeholders
     // based on the unique repository id.
     // XXX Should this be a WeakHashMap for GC?
-    private Map typeCodeMap ;
+    private Map<String, TypeCodeImpl> typeCodeMap;
 
-    private TypeCodeImpl[] primitiveTypeCodeConstants ;
+    private TypeCodeImpl[] primitiveTypeCodeConstants;
 
     // ByteBufferPool - needed by both ORBImpl and ORBSingleton
     ByteBufferPool byteBufferPool;
@@ -169,16 +157,18 @@
     // wrapperMap maintains a table of LogWrapper instances used by
     // different classes to log exceptions.  The key is a StringPair
     // representing LogDomain and ExceptionGroup.
-    private Map wrapperMap ;
+    private Map<StringPair, LogWrapperBase> wrapperMap;
 
     static class Holder {
         static final PresentationManager defaultPresentationManager =
             setupPresentationManager();
     }
 
-    private static final Map<Object, PresentationManager> pmContexts = new HashMap<>();
+    private static final Map<Object, PresentationManager> pmContexts =
+            new ConcurrentHashMap<>();
 
-    private static Map staticWrapperMap = new ConcurrentHashMap();
+    private static Map<StringPair, LogWrapperBase> staticWrapperMap =
+            new ConcurrentHashMap<>();
 
     protected MonitoringManager monitoringManager;
 
@@ -245,28 +235,12 @@
     public static PresentationManager getPresentationManager()
     {
         SecurityManager sm = System.getSecurityManager();
-        JavaAWTAccess javaAwtAccess = sun.misc.SharedSecrets.getJavaAWTAccess();
+        sun.misc.JavaAWTAccess javaAwtAccess = sun.misc.SharedSecrets.getJavaAWTAccess();
         if (sm != null && javaAwtAccess != null) {
-            Object appletContext;
-            try {
-                Class<?> clazz = JavaAWTAccess.class;
-                Method method = clazz.getMethod("getAppletContext");
-                appletContext = method.invoke(javaAwtAccess);
-            } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
-                InternalError err = new InternalError();
-                err.initCause(e);
-                throw err;
-            }
-
+            final Object appletContext = javaAwtAccess.getAppletContext();
             if (appletContext != null) {
-                synchronized (pmContexts) {
-                    PresentationManager pm = pmContexts.get(appletContext);
-                    if (pm == null) {
-                        pm = setupPresentationManager();
-                        pmContexts.put(appletContext, pm);
-                    }
-                    return pm;
-                }
+                return pmContexts.computeIfAbsent(appletContext,
+                    x -> setupPresentationManager());
             }
         }
 
@@ -290,13 +264,13 @@
     {
         // Initialize logging first, since it is needed nearly
         // everywhere (for example, in TypeCodeImpl).
-        wrapperMap = new ConcurrentHashMap();
+        wrapperMap = new ConcurrentHashMap<>();
         wrapper = ORBUtilSystemException.get( this,
             CORBALogDomains.RPC_PRESENTATION ) ;
         omgWrapper = OMGSystemException.get( this,
             CORBALogDomains.RPC_PRESENTATION ) ;
 
-        typeCodeMap = new HashMap();
+        typeCodeMap = new HashMap<>();
 
         primitiveTypeCodeConstants = new TypeCodeImpl[] {
             new TypeCodeImpl(this, TCKind._tk_null),
@@ -363,7 +337,7 @@
     public synchronized TypeCodeImpl getTypeCode(String id)
     {
         checkShutdownState();
-        return (TypeCodeImpl)typeCodeMap.get(id);
+        return typeCodeMap.get(id);
     }
 
     public MonitoringManager getMonitoringManager( ) {
@@ -526,35 +500,23 @@
     /** get the log wrapper class (its type is dependent on the exceptionGroup) for the
      * given log domain and exception group in this ORB instance.
      */
-    public LogWrapperBase getLogWrapper( String logDomain,
-        String exceptionGroup, LogWrapperFactory factory )
+    public LogWrapperBase getLogWrapper(String logDomain,
+        String exceptionGroup, LogWrapperFactory factory)
     {
-        StringPair key = new StringPair( logDomain, exceptionGroup ) ;
-
-        LogWrapperBase logWrapper = (LogWrapperBase)wrapperMap.get( key );
-        if (logWrapper == null) {
-            logWrapper = factory.create( getLogger( logDomain ) );
-            wrapperMap.put( key, logWrapper );
-        }
-
-        return logWrapper;
+        return wrapperMap.computeIfAbsent(
+            new StringPair(logDomain, exceptionGroup),
+            x -> factory.create(getLogger(logDomain)));
     }
 
     /** get the log wrapper class (its type is dependent on the exceptionGroup) for the
      * given log domain and exception group in this ORB instance.
      */
-    public static LogWrapperBase staticGetLogWrapper( String logDomain,
-        String exceptionGroup, LogWrapperFactory factory )
+    public static LogWrapperBase staticGetLogWrapper(String logDomain,
+        String exceptionGroup, LogWrapperFactory factory)
     {
-        StringPair key = new StringPair( logDomain, exceptionGroup ) ;
-
-        LogWrapperBase logWrapper = (LogWrapperBase)staticWrapperMap.get( key );
-        if (logWrapper == null) {
-            logWrapper = factory.create( staticGetLogger( logDomain ) );
-            staticWrapperMap.put( key, logWrapper );
-        }
-
-        return logWrapper;
+        return staticWrapperMap.computeIfAbsent(
+            new StringPair(logDomain, exceptionGroup),
+            x -> factory.create(staticGetLogger(logDomain)));
     }
 
     // get a reference to a ByteBufferPool, a pool of NIO ByteBuffers
--- a/hotspot/.hgtags	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/.hgtags	Fri May 16 14:35:37 2014 -0700
@@ -415,3 +415,4 @@
 ebc44d040cd149d2120d69fe183a3dae7840f4b4 jdk9-b10
 783309c3a1a629a452673399dcfa83ef7eca94d8 jdk9-b11
 1c383bb39e2849ca62cb763f4e182a29b421d60a jdk9-b12
+456ad9c99133803d4e1433124c85a6fd141b9ac9 jdk9-b13
--- a/hotspot/make/aix/makefiles/vm.make	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/make/aix/makefiles/vm.make	Fri May 16 14:35:37 2014 -0700
@@ -136,8 +136,6 @@
 JVM      = jvm
 LIBJVM   = lib$(JVM).so
 
-CFLAGS += -DALLOW_OPERATOR_NEW_USAGE
-
 LIBJVM_DEBUGINFO   = lib$(JVM).debuginfo
 LIBJVM_DIZ         = lib$(JVM).diz
 
--- a/hotspot/make/bsd/makefiles/vm.make	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/make/bsd/makefiles/vm.make	Fri May 16 14:35:37 2014 -0700
@@ -146,9 +146,6 @@
 ifeq ($(OS_VENDOR), Darwin)
   LIBJVM   = lib$(JVM).dylib
   CFLAGS  += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
-  ifeq (${VERSION}, $(filter ${VERSION}, debug fastdebug))
-    CFLAGS += -DALLOW_OPERATOR_NEW_USAGE
-  endif
 
   LIBJVM_DEBUGINFO   = lib$(JVM).dylib.dSYM
   LIBJVM_DIZ         = lib$(JVM).diz
--- a/hotspot/make/windows/projectfiles/common/Makefile	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/make/windows/projectfiles/common/Makefile	Fri May 16 14:35:37 2014 -0700
@@ -93,7 +93,7 @@
 !if "$(HOTSPOT_RELEASE_VERSION)" != ""
 HOTSPOT_RELEASE_VERSION="\\\"$(HOTSPOT_RELEASE_VERSION)\\\""
 !else
-HOTSPOT_RELEASE_VERSION="\\\"$(JRE_RELEASE_VERSION)\\\""
+HOTSPOT_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
 !endif
 # Define HOTSPOT_VM_DISTRO if HOTSPOT_VM_DISTRO is set,
 # and if it is not see if we have the src/closed directory
@@ -105,9 +105,18 @@
 !else
 HOTSPOT_VM_DISTRO="\\\"OpenJDK\\\""
 !endif
+!if "$(JDK_BUILD_NUMBER)" != ""
+JDK_BUILD_NUMBER="\\\"$(JDK_BUILD_NUMBER)\\\""
+!else
+JDK_BUILD_NUMBER="\\\"00\\\""
+!endif
 !endif
 
-ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO)
+JDK_MAJOR_VERSION="\\\"$(JDK_MAJOR_VER)\\\""
+JDK_MINOR_VERSION="\\\"$(JDK_MINOR_VER)\\\""
+JDK_MICRO_VERSION="\\\"$(JDK_MICRO_VER)\\\""
+
+ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) -define JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) -define JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) -define JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) -define JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER)
 ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
 
 $(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
--- a/hotspot/src/os/aix/vm/os_aix.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/os/aix/vm/os_aix.cpp	Fri May 16 14:35:37 2014 -0700
@@ -1871,7 +1871,7 @@
 // properties.
 
 // ShmBkBlock: base class for all blocks in the shared memory bookkeeping
-class ShmBkBlock {
+class ShmBkBlock : public CHeapObj<mtInternal> {
 
   ShmBkBlock* _next;
 
--- a/hotspot/src/os/aix/vm/porting_aix.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/os/aix/vm/porting_aix.cpp	Fri May 16 14:35:37 2014 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "asm/assembler.hpp"
+#include "memory/allocation.hpp"
 #include "loadlib_aix.hpp"
 #include "porting_aix.hpp"
 #include "utilities/debug.hpp"
@@ -67,7 +68,7 @@
 // a primitive string map. Should this turn out to be a performance
 // problem, a better hashmap has to be used.
 class fixed_strings {
-  struct node {
+  struct node : public CHeapObj<mtInternal> {
     char* v;
     node* next;
   };
--- a/hotspot/src/share/vm/adlc/adlc.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/adlc/adlc.hpp	Fri May 16 14:35:37 2014 -0700
@@ -30,12 +30,13 @@
 //
 
 // standard library constants
-#include "stdio.h"
-#include "stdlib.h"
 #include <iostream>
-#include "string.h"
-#include "ctype.h"
-#include "stdarg.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdarg.h>
 #include <sys/types.h>
 
 /* Make sure that we have the intptr_t and uintptr_t definitions */
--- a/hotspot/src/share/vm/adlc/adlparse.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/adlc/adlparse.hpp	Fri May 16 14:35:37 2014 -0700
@@ -64,8 +64,6 @@
 class PeepConstraint;
 class PeepReplace;
 
-// class ostream; // ostream is a typedef in some systems
-
 extern char *toUpper(const char *str);
 
 //---------------------------ADLParser-----------------------------------------
--- a/hotspot/src/share/vm/adlc/filebuff.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/adlc/filebuff.cpp	Fri May 16 14:35:37 2014 -0700
@@ -25,8 +25,6 @@
 // FILEBUFF.CPP - Routines for handling a parser file buffer
 #include "adlc.hpp"
 
-using namespace std;
-
 //------------------------------FileBuff---------------------------------------
 // Create a new parsing buffer
 FileBuff::FileBuff( BufferedFile *fptr, ArchDesc& archDesc) : _fp(fptr), _AD(archDesc) {
--- a/hotspot/src/share/vm/adlc/filebuff.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/adlc/filebuff.hpp	Fri May 16 14:35:37 2014 -0700
@@ -26,9 +26,6 @@
 #define SHARE_VM_ADLC_FILEBUFF_HPP
 
 // FILEBUFF.HPP - Definitions for parser file buffering routines
-#include <iostream>
-
-using namespace std;
 
 // STRUCTURE FOR HANDLING INPUT AND OUTPUT FILES
 
--- a/hotspot/src/share/vm/adlc/output_h.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/adlc/output_h.cpp	Fri May 16 14:35:37 2014 -0700
@@ -211,7 +211,7 @@
     const char *type = oper->ideal_type(globals);
     if (!strcmp(type, "ConI")) {
       if (i > 0) fprintf(fp,", ");
-      fprintf(fp,"  int32          _c%d;\n", i);
+      fprintf(fp,"  int32_t        _c%d;\n", i);
     }
     else if (!strcmp(type, "ConP")) {
       if (i > 0) fprintf(fp,", ");
@@ -307,7 +307,7 @@
     assert(num_consts == 1, "Bad component list detected.\n");
     switch( constant_type ) {
     case Form::idealI : {
-      fprintf(fp,is_ideal_bool ? "BoolTest::mask c%d" : "int32 c%d", i);
+      fprintf(fp,is_ideal_bool ? "BoolTest::mask c%d" : "int32_t c%d", i);
       break;
     }
     case Form::idealN :      { fprintf(fp,"const TypeNarrowOop *c%d", i); break; }
@@ -326,7 +326,7 @@
     while((comp = lst.iter()) != NULL) {
       if (!strcmp(comp->base_type(globals), "ConI")) {
         if (i > 0) fprintf(fp,", ");
-        fprintf(fp,"int32 c%d", i);
+        fprintf(fp,"int32_t c%d", i);
         i++;
       }
       else if (!strcmp(comp->base_type(globals), "ConP")) {
--- a/hotspot/src/share/vm/asm/assembler.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/asm/assembler.cpp	Fri May 16 14:35:37 2014 -0700
@@ -119,7 +119,7 @@
   L.patch_instructions((MacroAssembler*)this);
 }
 
-void AbstractAssembler::generate_stack_overflow_check( int frame_size_in_bytes) {
+void AbstractAssembler::generate_stack_overflow_check(int frame_size_in_bytes) {
   if (UseStackBanging) {
     // Each code entry causes one stack bang n pages down the stack where n
     // is configurable by StackShadowPages.  The setting depends on the maximum
@@ -134,7 +134,7 @@
     // is greater than a page.
 
     const int page_size = os::vm_page_size();
-    int bang_end = StackShadowPages*page_size;
+    int bang_end = StackShadowPages * page_size;
 
     // This is how far the previous frame's stack banging extended.
     const int bang_end_safe = bang_end;
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Fri May 16 14:35:37 2014 -0700
@@ -875,6 +875,7 @@
   int runtime_visible_type_annotations_length = 0;
   u1* runtime_invisible_type_annotations = NULL;
   int runtime_invisible_type_annotations_length = 0;
+  bool runtime_invisible_annotations_exists = false;
   bool runtime_invisible_type_annotations_exists = false;
   while (attributes_count--) {
     cfs->guarantee_more(6, CHECK);  // attribute_name_index, attribute_length
@@ -920,6 +921,10 @@
         }
         generic_signature_index = cfs->get_u2(CHECK);
       } else if (attribute_name == vmSymbols::tag_runtime_visible_annotations()) {
+        if (runtime_visible_annotations != NULL) {
+          classfile_parse_error(
+            "Multiple RuntimeVisibleAnnotations attributes for field in class file %s", CHECK);
+        }
         runtime_visible_annotations_length = attribute_length;
         runtime_visible_annotations = cfs->get_u1_buffer();
         assert(runtime_visible_annotations != NULL, "null visible annotations");
@@ -928,11 +933,18 @@
                           parsed_annotations,
                           CHECK);
         cfs->skip_u1(runtime_visible_annotations_length, CHECK);
-      } else if (PreserveAllAnnotations && attribute_name == vmSymbols::tag_runtime_invisible_annotations()) {
-        runtime_invisible_annotations_length = attribute_length;
-        runtime_invisible_annotations = cfs->get_u1_buffer();
-        assert(runtime_invisible_annotations != NULL, "null invisible annotations");
-        cfs->skip_u1(runtime_invisible_annotations_length, CHECK);
+      } else if (attribute_name == vmSymbols::tag_runtime_invisible_annotations()) {
+        if (runtime_invisible_annotations_exists) {
+          classfile_parse_error(
+            "Multiple RuntimeInvisibleAnnotations attributes for field in class file %s", CHECK);
+        }
+        runtime_invisible_annotations_exists = true;
+        if (PreserveAllAnnotations) {
+          runtime_invisible_annotations_length = attribute_length;
+          runtime_invisible_annotations = cfs->get_u1_buffer();
+          assert(runtime_invisible_annotations != NULL, "null invisible annotations");
+        }
+        cfs->skip_u1(attribute_length, CHECK);
       } else if (attribute_name == vmSymbols::tag_runtime_visible_type_annotations()) {
         if (runtime_visible_type_annotations != NULL) {
           classfile_parse_error(
@@ -2066,7 +2078,9 @@
   int runtime_visible_type_annotations_length = 0;
   u1* runtime_invisible_type_annotations = NULL;
   int runtime_invisible_type_annotations_length = 0;
+  bool runtime_invisible_annotations_exists = false;
   bool runtime_invisible_type_annotations_exists = false;
+  bool runtime_invisible_parameter_annotations_exists = false;
   u1* annotation_default = NULL;
   int annotation_default_length = 0;
 
@@ -2295,6 +2309,10 @@
         cfs->guarantee_more(2, CHECK_(nullHandle));  // generic_signature_index
         generic_signature_index = cfs->get_u2_fast();
       } else if (method_attribute_name == vmSymbols::tag_runtime_visible_annotations()) {
+        if (runtime_visible_annotations != NULL) {
+          classfile_parse_error(
+            "Multiple RuntimeVisibleAnnotations attributes for method in class file %s", CHECK_(nullHandle));
+        }
         runtime_visible_annotations_length = method_attribute_length;
         runtime_visible_annotations = cfs->get_u1_buffer();
         assert(runtime_visible_annotations != NULL, "null visible annotations");
@@ -2302,22 +2320,45 @@
             runtime_visible_annotations_length, &parsed_annotations,
             CHECK_(nullHandle));
         cfs->skip_u1(runtime_visible_annotations_length, CHECK_(nullHandle));
-      } else if (PreserveAllAnnotations && method_attribute_name == vmSymbols::tag_runtime_invisible_annotations()) {
-        runtime_invisible_annotations_length = method_attribute_length;
-        runtime_invisible_annotations = cfs->get_u1_buffer();
-        assert(runtime_invisible_annotations != NULL, "null invisible annotations");
-        cfs->skip_u1(runtime_invisible_annotations_length, CHECK_(nullHandle));
+      } else if (method_attribute_name == vmSymbols::tag_runtime_invisible_annotations()) {
+        if (runtime_invisible_annotations_exists) {
+          classfile_parse_error(
+            "Multiple RuntimeInvisibleAnnotations attributes for method in class file %s", CHECK_(nullHandle));
+        }
+        runtime_invisible_annotations_exists = true;
+        if (PreserveAllAnnotations) {
+          runtime_invisible_annotations_length = method_attribute_length;
+          runtime_invisible_annotations = cfs->get_u1_buffer();
+          assert(runtime_invisible_annotations != NULL, "null invisible annotations");
+        }
+        cfs->skip_u1(method_attribute_length, CHECK_(nullHandle));
       } else if (method_attribute_name == vmSymbols::tag_runtime_visible_parameter_annotations()) {
+        if (runtime_visible_parameter_annotations != NULL) {
+          classfile_parse_error(
+            "Multiple RuntimeVisibleParameterAnnotations attributes for method in class file %s", CHECK_(nullHandle));
+        }
         runtime_visible_parameter_annotations_length = method_attribute_length;
         runtime_visible_parameter_annotations = cfs->get_u1_buffer();
         assert(runtime_visible_parameter_annotations != NULL, "null visible parameter annotations");
         cfs->skip_u1(runtime_visible_parameter_annotations_length, CHECK_(nullHandle));
-      } else if (PreserveAllAnnotations && method_attribute_name == vmSymbols::tag_runtime_invisible_parameter_annotations()) {
-        runtime_invisible_parameter_annotations_length = method_attribute_length;
-        runtime_invisible_parameter_annotations = cfs->get_u1_buffer();
-        assert(runtime_invisible_parameter_annotations != NULL, "null invisible parameter annotations");
-        cfs->skip_u1(runtime_invisible_parameter_annotations_length, CHECK_(nullHandle));
+      } else if (method_attribute_name == vmSymbols::tag_runtime_invisible_parameter_annotations()) {
+        if (runtime_invisible_parameter_annotations_exists) {
+          classfile_parse_error(
+            "Multiple RuntimeInvisibleParameterAnnotations attributes for method in class file %s", CHECK_(nullHandle));
+        }
+        runtime_invisible_parameter_annotations_exists = true;
+        if (PreserveAllAnnotations) {
+          runtime_invisible_parameter_annotations_length = method_attribute_length;
+          runtime_invisible_parameter_annotations = cfs->get_u1_buffer();
+          assert(runtime_invisible_parameter_annotations != NULL, "null invisible parameter annotations");
+        }
+        cfs->skip_u1(method_attribute_length, CHECK_(nullHandle));
       } else if (method_attribute_name == vmSymbols::tag_annotation_default()) {
+        if (annotation_default != NULL) {
+          classfile_parse_error(
+            "Multiple AnnotationDefault attributes for method in class file %s",
+            CHECK_(nullHandle));
+        }
         annotation_default_length = method_attribute_length;
         annotation_default = cfs->get_u1_buffer();
         assert(annotation_default != NULL, "null annotation default");
@@ -2846,6 +2887,8 @@
   u1* runtime_invisible_type_annotations = NULL;
   int runtime_invisible_type_annotations_length = 0;
   bool runtime_invisible_type_annotations_exists = false;
+  bool runtime_invisible_annotations_exists = false;
+  bool parsed_source_debug_ext_annotations_exist = false;
   u1* inner_classes_attribute_start = NULL;
   u4  inner_classes_attribute_length = 0;
   u2  enclosing_method_class_index = 0;
@@ -2873,6 +2916,11 @@
       parse_classfile_sourcefile_attribute(CHECK);
     } else if (tag == vmSymbols::tag_source_debug_extension()) {
       // Check for SourceDebugExtension tag
+      if (parsed_source_debug_ext_annotations_exist) {
+          classfile_parse_error(
+            "Multiple SourceDebugExtension attributes in class file %s", CHECK);
+      }
+      parsed_source_debug_ext_annotations_exist = true;
       parse_classfile_source_debug_extension_attribute((int)attribute_length, CHECK);
     } else if (tag == vmSymbols::tag_inner_classes()) {
       // Check for InnerClasses tag
@@ -2909,6 +2957,10 @@
         }
         parse_classfile_signature_attribute(CHECK);
       } else if (tag == vmSymbols::tag_runtime_visible_annotations()) {
+        if (runtime_visible_annotations != NULL) {
+          classfile_parse_error(
+            "Multiple RuntimeVisibleAnnotations attributes in class file %s", CHECK);
+        }
         runtime_visible_annotations_length = attribute_length;
         runtime_visible_annotations = cfs->get_u1_buffer();
         assert(runtime_visible_annotations != NULL, "null visible annotations");
@@ -2917,11 +2969,18 @@
                           parsed_annotations,
                           CHECK);
         cfs->skip_u1(runtime_visible_annotations_length, CHECK);
-      } else if (PreserveAllAnnotations && tag == vmSymbols::tag_runtime_invisible_annotations()) {
-        runtime_invisible_annotations_length = attribute_length;
-        runtime_invisible_annotations = cfs->get_u1_buffer();
-        assert(runtime_invisible_annotations != NULL, "null invisible annotations");
-        cfs->skip_u1(runtime_invisible_annotations_length, CHECK);
+      } else if (tag == vmSymbols::tag_runtime_invisible_annotations()) {
+        if (runtime_invisible_annotations_exists) {
+          classfile_parse_error(
+            "Multiple RuntimeInvisibleAnnotations attributes in class file %s", CHECK);
+        }
+        runtime_invisible_annotations_exists = true;
+        if (PreserveAllAnnotations) {
+          runtime_invisible_annotations_length = attribute_length;
+          runtime_invisible_annotations = cfs->get_u1_buffer();
+          assert(runtime_invisible_annotations != NULL, "null invisible annotations");
+        }
+        cfs->skip_u1(attribute_length, CHECK);
       } else if (tag == vmSymbols::tag_enclosing_method()) {
         if (parsed_enclosingmethod_attribute) {
           classfile_parse_error("Multiple EnclosingMethod attributes in class file %s", CHECK);
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Fri May 16 14:35:37 2014 -0700
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/altHashing.hpp"
 #include "classfile/javaClasses.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "code/debugInfo.hpp"
 #include "code/pcDesc.hpp"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/classfile/stringTable.cpp	Fri May 16 14:35:37 2014 -0700
@@ -0,0 +1,533 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "classfile/altHashing.hpp"
+#include "classfile/javaClasses.hpp"
+#include "classfile/stringTable.hpp"
+#include "classfile/systemDictionary.hpp"
+#include "gc_interface/collectedHeap.inline.hpp"
+#include "memory/allocation.inline.hpp"
+#include "memory/filemap.hpp"
+#include "memory/gcLocker.inline.hpp"
+#include "oops/oop.inline.hpp"
+#include "oops/oop.inline2.hpp"
+#include "runtime/mutexLocker.hpp"
+#include "utilities/hashtable.inline.hpp"
+#if INCLUDE_ALL_GCS
+#include "gc_implementation/g1/g1StringDedup.hpp"
+#endif
+
+PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
+
+// the number of buckets a thread claims
+const int ClaimChunkSize = 32;
+
+#ifdef ASSERT
+class StableMemoryChecker : public StackObj {
+  enum { _bufsize = wordSize*4 };
+
+  address _region;
+  jint    _size;
+  u1      _save_buf[_bufsize];
+
+  int sample(u1* save_buf) {
+    if (_size <= _bufsize) {
+      memcpy(save_buf, _region, _size);
+      return _size;
+    } else {
+      // copy head and tail
+      memcpy(&save_buf[0],          _region,                      _bufsize/2);
+      memcpy(&save_buf[_bufsize/2], _region + _size - _bufsize/2, _bufsize/2);
+      return (_bufsize/2)*2;
+    }
+  }
+
+ public:
+  StableMemoryChecker(const void* region, jint size) {
+    _region = (address) region;
+    _size   = size;
+    sample(_save_buf);
+  }
+
+  bool verify() {
+    u1 check_buf[sizeof(_save_buf)];
+    int check_size = sample(check_buf);
+    return (0 == memcmp(_save_buf, check_buf, check_size));
+  }
+
+  void set_region(const void* region) { _region = (address) region; }
+};
+#endif
+
+
+// --------------------------------------------------------------------------
+StringTable* StringTable::_the_table = NULL;
+
+bool StringTable::_needs_rehashing = false;
+
+volatile int StringTable::_parallel_claimed_idx = 0;
+
+// Pick hashing algorithm
+unsigned int StringTable::hash_string(const jchar* s, int len) {
+  return use_alternate_hashcode() ? AltHashing::murmur3_32(seed(), s, len) :
+                                    java_lang_String::hash_code(s, len);
+}
+
+oop StringTable::lookup(int index, jchar* name,
+                        int len, unsigned int hash) {
+  int count = 0;
+  for (HashtableEntry<oop, mtSymbol>* l = bucket(index); l != NULL; l = l->next()) {
+    count++;
+    if (l->hash() == hash) {
+      if (java_lang_String::equals(l->literal(), name, len)) {
+        return l->literal();
+      }
+    }
+  }
+  // If the bucket size is too deep check if this hash code is insufficient.
+  if (count >= BasicHashtable<mtSymbol>::rehash_count && !needs_rehashing()) {
+    _needs_rehashing = check_rehash_table(count);
+  }
+  return NULL;
+}
+
+
+oop StringTable::basic_add(int index_arg, Handle string, jchar* name,
+                           int len, unsigned int hashValue_arg, TRAPS) {
+
+  assert(java_lang_String::equals(string(), name, len),
+         "string must be properly initialized");
+  // Cannot hit a safepoint in this function because the "this" pointer can move.
+  No_Safepoint_Verifier nsv;
+
+  // Check if the symbol table has been rehashed, if so, need to recalculate
+  // the hash value and index before second lookup.
+  unsigned int hashValue;
+  int index;
+  if (use_alternate_hashcode()) {
+    hashValue = hash_string(name, len);
+    index = hash_to_index(hashValue);
+  } else {
+    hashValue = hashValue_arg;
+    index = index_arg;
+  }
+
+  // Since look-up was done lock-free, we need to check if another
+  // thread beat us in the race to insert the symbol.
+
+  oop test = lookup(index, name, len, hashValue); // calls lookup(u1*, int)
+  if (test != NULL) {
+    // Entry already added
+    return test;
+  }
+
+  HashtableEntry<oop, mtSymbol>* entry = new_entry(hashValue, string());
+  add_entry(index, entry);
+  return string();
+}
+
+
+oop StringTable::lookup(Symbol* symbol) {
+  ResourceMark rm;
+  int length;
+  jchar* chars = symbol->as_unicode(length);
+  return lookup(chars, length);
+}
+
+
+oop StringTable::lookup(jchar* name, int len) {
+  unsigned int hash = hash_string(name, len);
+  int index = the_table()->hash_to_index(hash);
+  return the_table()->lookup(index, name, len, hash);
+}
+
+
+oop StringTable::intern(Handle string_or_null, jchar* name,
+                        int len, TRAPS) {
+  unsigned int hashValue = hash_string(name, len);
+  int index = the_table()->hash_to_index(hashValue);
+  oop found_string = the_table()->lookup(index, name, len, hashValue);
+
+  // Found
+  if (found_string != NULL) return found_string;
+
+  debug_only(StableMemoryChecker smc(name, len * sizeof(name[0])));
+  assert(!Universe::heap()->is_in_reserved(name),
+         "proposed name of symbol must be stable");
+
+  Handle string;
+  // try to reuse the string if possible
+  if (!string_or_null.is_null()) {
+    string = string_or_null;
+  } else {
+    string = java_lang_String::create_from_unicode(name, len, CHECK_NULL);
+  }
+
+#if INCLUDE_ALL_GCS
+  if (G1StringDedup::is_enabled()) {
+    // Deduplicate the string before it is interned. Note that we should never
+    // deduplicate a string after it has been interned. Doing so will counteract
+    // compiler optimizations done on e.g. interned string literals.
+    G1StringDedup::deduplicate(string());
+  }
+#endif
+
+  // Grab the StringTable_lock before getting the_table() because it could
+  // change at safepoint.
+  MutexLocker ml(StringTable_lock, THREAD);
+
+  // Otherwise, add to symbol to table
+  return the_table()->basic_add(index, string, name, len,
+                                hashValue, CHECK_NULL);
+}
+
+oop StringTable::intern(Symbol* symbol, TRAPS) {
+  if (symbol == NULL) return NULL;
+  ResourceMark rm(THREAD);
+  int length;
+  jchar* chars = symbol->as_unicode(length);
+  Handle string;
+  oop result = intern(string, chars, length, CHECK_NULL);
+  return result;
+}
+
+
+oop StringTable::intern(oop string, TRAPS)
+{
+  if (string == NULL) return NULL;
+  ResourceMark rm(THREAD);
+  int length;
+  Handle h_string (THREAD, string);
+  jchar* chars = java_lang_String::as_unicode_string(string, length, CHECK_NULL);
+  oop result = intern(h_string, chars, length, CHECK_NULL);
+  return result;
+}
+
+
+oop StringTable::intern(const char* utf8_string, TRAPS) {
+  if (utf8_string == NULL) return NULL;
+  ResourceMark rm(THREAD);
+  int length = UTF8::unicode_length(utf8_string);
+  jchar* chars = NEW_RESOURCE_ARRAY(jchar, length);
+  UTF8::convert_to_unicode(utf8_string, chars, length);
+  Handle string;
+  oop result = intern(string, chars, length, CHECK_NULL);
+  return result;
+}
+
+void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
+  buckets_unlink_or_oops_do(is_alive, f, 0, the_table()->table_size(), processed, removed);
+}
+
+void StringTable::possibly_parallel_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
+  // Readers of the table are unlocked, so we should only be removing
+  // entries at a safepoint.
+  assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
+  const int limit = the_table()->table_size();
+
+  for (;;) {
+    // Grab next set of buckets to scan
+    int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
+    if (start_idx >= limit) {
+      // End of table
+      break;
+    }
+
+    int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
+    buckets_unlink_or_oops_do(is_alive, f, start_idx, end_idx, processed, removed);
+  }
+}
+
+void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) {
+  const int limit = the_table()->table_size();
+
+  assert(0 <= start_idx && start_idx <= limit,
+         err_msg("start_idx (%d) is out of bounds", start_idx));
+  assert(0 <= end_idx && end_idx <= limit,
+         err_msg("end_idx (%d) is out of bounds", end_idx));
+  assert(start_idx <= end_idx,
+         err_msg("Index ordering: start_idx=%d, end_idx=%d",
+                 start_idx, end_idx));
+
+  for (int i = start_idx; i < end_idx; i += 1) {
+    HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
+    while (entry != NULL) {
+      assert(!entry->is_shared(), "CDS not used for the StringTable");
+
+      f->do_oop((oop*)entry->literal_addr());
+
+      entry = entry->next();
+    }
+  }
+}
+
+void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed) {
+  const int limit = the_table()->table_size();
+
+  assert(0 <= start_idx && start_idx <= limit,
+         err_msg("start_idx (%d) is out of bounds", start_idx));
+  assert(0 <= end_idx && end_idx <= limit,
+         err_msg("end_idx (%d) is out of bounds", end_idx));
+  assert(start_idx <= end_idx,
+         err_msg("Index ordering: start_idx=%d, end_idx=%d",
+                 start_idx, end_idx));
+
+  for (int i = start_idx; i < end_idx; ++i) {
+    HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
+    HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
+    while (entry != NULL) {
+      assert(!entry->is_shared(), "CDS not used for the StringTable");
+
+      if (is_alive->do_object_b(entry->literal())) {
+        if (f != NULL) {
+          f->do_oop((oop*)entry->literal_addr());
+        }
+        p = entry->next_addr();
+      } else {
+        *p = entry->next();
+        the_table()->free_entry(entry);
+        (*removed)++;
+      }
+      (*processed)++;
+      entry = *p;
+    }
+  }
+}
+
+void StringTable::oops_do(OopClosure* f) {
+  buckets_oops_do(f, 0, the_table()->table_size());
+}
+
+void StringTable::possibly_parallel_oops_do(OopClosure* f) {
+  const int limit = the_table()->table_size();
+
+  for (;;) {
+    // Grab next set of buckets to scan
+    int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
+    if (start_idx >= limit) {
+      // End of table
+      break;
+    }
+
+    int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
+    buckets_oops_do(f, start_idx, end_idx);
+  }
+}
+
+// This verification is part of Universe::verify() and needs to be quick.
+// See StringTable::verify_and_compare() below for exhaustive verification.
+void StringTable::verify() {
+  for (int i = 0; i < the_table()->table_size(); ++i) {
+    HashtableEntry<oop, mtSymbol>* p = the_table()->bucket(i);
+    for ( ; p != NULL; p = p->next()) {
+      oop s = p->literal();
+      guarantee(s != NULL, "interned string is NULL");
+      unsigned int h = java_lang_String::hash_string(s);
+      guarantee(p->hash() == h, "broken hash in string table entry");
+      guarantee(the_table()->hash_to_index(h) == i,
+                "wrong index in string table");
+    }
+  }
+}
+
+void StringTable::dump(outputStream* st) {
+  the_table()->dump_table(st, "StringTable");
+}
+
+StringTable::VerifyRetTypes StringTable::compare_entries(
+                                      int bkt1, int e_cnt1,
+                                      HashtableEntry<oop, mtSymbol>* e_ptr1,
+                                      int bkt2, int e_cnt2,
+                                      HashtableEntry<oop, mtSymbol>* e_ptr2) {
+  // These entries are sanity checked by verify_and_compare_entries()
+  // before this function is called.
+  oop str1 = e_ptr1->literal();
+  oop str2 = e_ptr2->literal();
+
+  if (str1 == str2) {
+    tty->print_cr("ERROR: identical oop values (0x" PTR_FORMAT ") "
+                  "in entry @ bucket[%d][%d] and entry @ bucket[%d][%d]",
+                  (void *)str1, bkt1, e_cnt1, bkt2, e_cnt2);
+    return _verify_fail_continue;
+  }
+
+  if (java_lang_String::equals(str1, str2)) {
+    tty->print_cr("ERROR: identical String values in entry @ "
+                  "bucket[%d][%d] and entry @ bucket[%d][%d]",
+                  bkt1, e_cnt1, bkt2, e_cnt2);
+    return _verify_fail_continue;
+  }
+
+  return _verify_pass;
+}
+
+StringTable::VerifyRetTypes StringTable::verify_entry(int bkt, int e_cnt,
+                                      HashtableEntry<oop, mtSymbol>* e_ptr,
+                                      StringTable::VerifyMesgModes mesg_mode) {
+
+  VerifyRetTypes ret = _verify_pass;  // be optimistic
+
+  oop str = e_ptr->literal();
+  if (str == NULL) {
+    if (mesg_mode == _verify_with_mesgs) {
+      tty->print_cr("ERROR: NULL oop value in entry @ bucket[%d][%d]", bkt,
+                    e_cnt);
+    }
+    // NULL oop means no more verifications are possible
+    return _verify_fail_done;
+  }
+
+  if (str->klass() != SystemDictionary::String_klass()) {
+    if (mesg_mode == _verify_with_mesgs) {
+      tty->print_cr("ERROR: oop is not a String in entry @ bucket[%d][%d]",
+                    bkt, e_cnt);
+    }
+    // not a String means no more verifications are possible
+    return _verify_fail_done;
+  }
+
+  unsigned int h = java_lang_String::hash_string(str);
+  if (e_ptr->hash() != h) {
+    if (mesg_mode == _verify_with_mesgs) {
+      tty->print_cr("ERROR: broken hash value in entry @ bucket[%d][%d], "
+                    "bkt_hash=%d, str_hash=%d", bkt, e_cnt, e_ptr->hash(), h);
+    }
+    ret = _verify_fail_continue;
+  }
+
+  if (the_table()->hash_to_index(h) != bkt) {
+    if (mesg_mode == _verify_with_mesgs) {
+      tty->print_cr("ERROR: wrong index value for entry @ bucket[%d][%d], "
+                    "str_hash=%d, hash_to_index=%d", bkt, e_cnt, h,
+                    the_table()->hash_to_index(h));
+    }
+    ret = _verify_fail_continue;
+  }
+
+  return ret;
+}
+
+// See StringTable::verify() above for the quick verification that is
+// part of Universe::verify(). This verification is exhaustive and
+// reports on every issue that is found. StringTable::verify() only
+// reports on the first issue that is found.
+//
+// StringTable::verify_entry() checks:
+// - oop value != NULL (same as verify())
+// - oop value is a String
+// - hash(String) == hash in entry (same as verify())
+// - index for hash == index of entry (same as verify())
+//
+// StringTable::compare_entries() checks:
+// - oops are unique across all entries
+// - String values are unique across all entries
+//
+int StringTable::verify_and_compare_entries() {
+  assert(StringTable_lock->is_locked(), "sanity check");
+
+  int  fail_cnt = 0;
+
+  // first, verify all the entries individually:
+  for (int bkt = 0; bkt < the_table()->table_size(); bkt++) {
+    HashtableEntry<oop, mtSymbol>* e_ptr = the_table()->bucket(bkt);
+    for (int e_cnt = 0; e_ptr != NULL; e_ptr = e_ptr->next(), e_cnt++) {
+      VerifyRetTypes ret = verify_entry(bkt, e_cnt, e_ptr, _verify_with_mesgs);
+      if (ret != _verify_pass) {
+        fail_cnt++;
+      }
+    }
+  }
+
+  // Optimization: if the above check did not find any failures, then
+  // the comparison loop below does not need to call verify_entry()
+  // before calling compare_entries(). If there were failures, then we
+  // have to call verify_entry() to see if the entry can be passed to
+  // compare_entries() safely. When we call verify_entry() in the loop
+  // below, we do so quietly to void duplicate messages and we don't
+  // increment fail_cnt because the failures have already been counted.
+  bool need_entry_verify = (fail_cnt != 0);
+
+  // second, verify all entries relative to each other:
+  for (int bkt1 = 0; bkt1 < the_table()->table_size(); bkt1++) {
+    HashtableEntry<oop, mtSymbol>* e_ptr1 = the_table()->bucket(bkt1);
+    for (int e_cnt1 = 0; e_ptr1 != NULL; e_ptr1 = e_ptr1->next(), e_cnt1++) {
+      if (need_entry_verify) {
+        VerifyRetTypes ret = verify_entry(bkt1, e_cnt1, e_ptr1,
+                                          _verify_quietly);
+        if (ret == _verify_fail_done) {
+          // cannot use the current entry to compare against other entries
+          continue;
+        }
+      }
+
+      for (int bkt2 = bkt1; bkt2 < the_table()->table_size(); bkt2++) {
+        HashtableEntry<oop, mtSymbol>* e_ptr2 = the_table()->bucket(bkt2);
+        int e_cnt2;
+        for (e_cnt2 = 0; e_ptr2 != NULL; e_ptr2 = e_ptr2->next(), e_cnt2++) {
+          if (bkt1 == bkt2 && e_cnt2 <= e_cnt1) {
+            // skip the entries up to and including the one that
+            // we're comparing against
+            continue;
+          }
+
+          if (need_entry_verify) {
+            VerifyRetTypes ret = verify_entry(bkt2, e_cnt2, e_ptr2,
+                                              _verify_quietly);
+            if (ret == _verify_fail_done) {
+              // cannot compare against this entry
+              continue;
+            }
+          }
+
+          // compare two entries, report and count any failures:
+          if (compare_entries(bkt1, e_cnt1, e_ptr1, bkt2, e_cnt2, e_ptr2)
+              != _verify_pass) {
+            fail_cnt++;
+          }
+        }
+      }
+    }
+  }
+  return fail_cnt;
+}
+
+// Create a new table and using alternate hash code, populate the new table
+// with the existing strings.   Set flag to use the alternate hash code afterwards.
+void StringTable::rehash_table() {
+  assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
+  // This should never happen with -Xshare:dump but it might in testing mode.
+  if (DumpSharedSpaces) return;
+  StringTable* new_table = new StringTable();
+
+  // Rehash the table
+  the_table()->move_to(new_table);
+
+  // Delete the table and buckets (entries are reused in new table).
+  delete _the_table;
+  // Don't check if we need rehashing until the table gets unbalanced again.
+  // Then rehash with a new global seed.
+  _needs_rehashing = false;
+  _the_table = new_table;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/classfile/stringTable.hpp	Fri May 16 14:35:37 2014 -0700
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ *
+ */
+
+#ifndef SHARE_VM_CLASSFILE_STRINGTABLE_HPP
+#define SHARE_VM_CLASSFILE_STRINGTABLE_HPP
+
+#include "memory/allocation.inline.hpp"
+#include "utilities/hashtable.hpp"
+
+class StringTable : public Hashtable<oop, mtSymbol> {
+  friend class VMStructs;
+  friend class Symbol;
+
+private:
+  // The string table
+  static StringTable* _the_table;
+
+  // Set if one bucket is out of balance due to hash algorithm deficiency
+  static bool _needs_rehashing;
+
+  // Claimed high water mark for parallel chunked scanning
+  static volatile int _parallel_claimed_idx;
+
+  static oop intern(Handle string_or_null, jchar* chars, int length, TRAPS);
+  oop basic_add(int index, Handle string_or_null, jchar* name, int len,
+                unsigned int hashValue, TRAPS);
+
+  oop lookup(int index, jchar* chars, int length, unsigned int hashValue);
+
+  // Apply the give oop closure to the entries to the buckets
+  // in the range [start_idx, end_idx).
+  static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
+  // Unlink or apply the give oop closure to the entries to the buckets
+  // in the range [start_idx, end_idx).
+  static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
+
+  StringTable() : Hashtable<oop, mtSymbol>((int)StringTableSize,
+                              sizeof (HashtableEntry<oop, mtSymbol>)) {}
+
+  StringTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
+    : Hashtable<oop, mtSymbol>((int)StringTableSize, sizeof (HashtableEntry<oop, mtSymbol>), t,
+                     number_of_entries) {}
+public:
+  // The string table
+  static StringTable* the_table() { return _the_table; }
+
+  // Size of one bucket in the string table.  Used when checking for rollover.
+  static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); }
+
+  static void create_table() {
+    assert(_the_table == NULL, "One string table allowed.");
+    _the_table = new StringTable();
+  }
+
+  // GC support
+  //   Delete pointers to otherwise-unreachable objects.
+  static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f) {
+    int processed = 0;
+    int removed = 0;
+    unlink_or_oops_do(cl, f, &processed, &removed);
+  }
+  static void unlink(BoolObjectClosure* cl) {
+    int processed = 0;
+    int removed = 0;
+    unlink_or_oops_do(cl, NULL, &processed, &removed);
+  }
+  static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed);
+  static void unlink(BoolObjectClosure* cl, int* processed, int* removed) {
+    unlink_or_oops_do(cl, NULL, processed, removed);
+  }
+  // Serially invoke "f->do_oop" on the locations of all oops in the table.
+  static void oops_do(OopClosure* f);
+
+  // Possibly parallel versions of the above
+  static void possibly_parallel_unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed);
+  static void possibly_parallel_unlink(BoolObjectClosure* cl, int* processed, int* removed) {
+    possibly_parallel_unlink_or_oops_do(cl, NULL, processed, removed);
+  }
+  static void possibly_parallel_oops_do(OopClosure* f);
+
+  // Hashing algorithm, used as the hash value used by the
+  //     StringTable for bucket selection and comparison (stored in the
+  //     HashtableEntry structures).  This is used in the String.intern() method.
+  static unsigned int hash_string(const jchar* s, int len);
+
+  // Internal test.
+  static void test_alt_hash() PRODUCT_RETURN;
+
+  // Probing
+  static oop lookup(Symbol* symbol);
+  static oop lookup(jchar* chars, int length);
+
+  // Interning
+  static oop intern(Symbol* symbol, TRAPS);
+  static oop intern(oop string, TRAPS);
+  static oop intern(const char *utf8_string, TRAPS);
+
+  // Debugging
+  static void verify();
+  static void dump(outputStream* st);
+
+  enum VerifyMesgModes {
+    _verify_quietly    = 0,
+    _verify_with_mesgs = 1
+  };
+
+  enum VerifyRetTypes {
+    _verify_pass          = 0,
+    _verify_fail_continue = 1,
+    _verify_fail_done     = 2
+  };
+
+  static VerifyRetTypes compare_entries(int bkt1, int e_cnt1,
+                                        HashtableEntry<oop, mtSymbol>* e_ptr1,
+                                        int bkt2, int e_cnt2,
+                                        HashtableEntry<oop, mtSymbol>* e_ptr2);
+  static VerifyRetTypes verify_entry(int bkt, int e_cnt,
+                                     HashtableEntry<oop, mtSymbol>* e_ptr,
+                                     VerifyMesgModes mesg_mode);
+  static int verify_and_compare_entries();
+
+  // Sharing
+  static void copy_buckets(char** top, char*end) {
+    the_table()->Hashtable<oop, mtSymbol>::copy_buckets(top, end);
+  }
+  static void copy_table(char** top, char*end) {
+    the_table()->Hashtable<oop, mtSymbol>::copy_table(top, end);
+  }
+  static void reverse() {
+    the_table()->Hashtable<oop, mtSymbol>::reverse();
+  }
+
+  // Rehash the symbol table if it gets out of balance
+  static void rehash_table();
+  static bool needs_rehashing() { return _needs_rehashing; }
+
+  // Parallel chunked scanning
+  static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; }
+  static int parallel_claimed_index() { return _parallel_claimed_idx; }
+};
+#endif // SHARE_VM_CLASSFILE_STRINGTABLE_HPP
--- a/hotspot/src/share/vm/classfile/symbolTable.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp	Fri May 16 14:35:37 2014 -0700
@@ -35,14 +35,10 @@
 #include "oops/oop.inline2.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "utilities/hashtable.inline.hpp"
-#if INCLUDE_ALL_GCS
-#include "gc_implementation/g1/g1StringDedup.hpp"
-#endif
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
 // --------------------------------------------------------------------------
-
 // the number of buckets a thread claims
 const int ClaimChunkSize = 32;
 
@@ -589,493 +585,3 @@
   }
 }
 #endif // PRODUCT
-
-// --------------------------------------------------------------------------
-
-#ifdef ASSERT
-class StableMemoryChecker : public StackObj {
-  enum { _bufsize = wordSize*4 };
-
-  address _region;
-  jint    _size;
-  u1      _save_buf[_bufsize];
-
-  int sample(u1* save_buf) {
-    if (_size <= _bufsize) {
-      memcpy(save_buf, _region, _size);
-      return _size;
-    } else {
-      // copy head and tail
-      memcpy(&save_buf[0],          _region,                      _bufsize/2);
-      memcpy(&save_buf[_bufsize/2], _region + _size - _bufsize/2, _bufsize/2);
-      return (_bufsize/2)*2;
-    }
-  }
-
- public:
-  StableMemoryChecker(const void* region, jint size) {
-    _region = (address) region;
-    _size   = size;
-    sample(_save_buf);
-  }
-
-  bool verify() {
-    u1 check_buf[sizeof(_save_buf)];
-    int check_size = sample(check_buf);
-    return (0 == memcmp(_save_buf, check_buf, check_size));
-  }
-
-  void set_region(const void* region) { _region = (address) region; }
-};
-#endif
-
-
-// --------------------------------------------------------------------------
-StringTable* StringTable::_the_table = NULL;
-
-bool StringTable::_needs_rehashing = false;
-
-volatile int StringTable::_parallel_claimed_idx = 0;
-
-// Pick hashing algorithm
-unsigned int StringTable::hash_string(const jchar* s, int len) {
-  return use_alternate_hashcode() ? AltHashing::murmur3_32(seed(), s, len) :
-                                    java_lang_String::hash_code(s, len);
-}
-
-oop StringTable::lookup(int index, jchar* name,
-                        int len, unsigned int hash) {
-  int count = 0;
-  for (HashtableEntry<oop, mtSymbol>* l = bucket(index); l != NULL; l = l->next()) {
-    count++;
-    if (l->hash() == hash) {
-      if (java_lang_String::equals(l->literal(), name, len)) {
-        return l->literal();
-      }
-    }
-  }
-  // If the bucket size is too deep check if this hash code is insufficient.
-  if (count >= BasicHashtable<mtSymbol>::rehash_count && !needs_rehashing()) {
-    _needs_rehashing = check_rehash_table(count);
-  }
-  return NULL;
-}
-
-
-oop StringTable::basic_add(int index_arg, Handle string, jchar* name,
-                           int len, unsigned int hashValue_arg, TRAPS) {
-
-  assert(java_lang_String::equals(string(), name, len),
-         "string must be properly initialized");
-  // Cannot hit a safepoint in this function because the "this" pointer can move.
-  No_Safepoint_Verifier nsv;
-
-  // Check if the symbol table has been rehashed, if so, need to recalculate
-  // the hash value and index before second lookup.
-  unsigned int hashValue;
-  int index;
-  if (use_alternate_hashcode()) {
-    hashValue = hash_string(name, len);
-    index = hash_to_index(hashValue);
-  } else {
-    hashValue = hashValue_arg;
-    index = index_arg;
-  }
-
-  // Since look-up was done lock-free, we need to check if another
-  // thread beat us in the race to insert the symbol.
-
-  oop test = lookup(index, name, len, hashValue); // calls lookup(u1*, int)
-  if (test != NULL) {
-    // Entry already added
-    return test;
-  }
-
-  HashtableEntry<oop, mtSymbol>* entry = new_entry(hashValue, string());
-  add_entry(index, entry);
-  return string();
-}
-
-
-oop StringTable::lookup(Symbol* symbol) {
-  ResourceMark rm;
-  int length;
-  jchar* chars = symbol->as_unicode(length);
-  return lookup(chars, length);
-}
-
-
-oop StringTable::lookup(jchar* name, int len) {
-  unsigned int hash = hash_string(name, len);
-  int index = the_table()->hash_to_index(hash);
-  return the_table()->lookup(index, name, len, hash);
-}
-
-
-oop StringTable::intern(Handle string_or_null, jchar* name,
-                        int len, TRAPS) {
-  unsigned int hashValue = hash_string(name, len);
-  int index = the_table()->hash_to_index(hashValue);
-  oop found_string = the_table()->lookup(index, name, len, hashValue);
-
-  // Found
-  if (found_string != NULL) return found_string;
-
-  debug_only(StableMemoryChecker smc(name, len * sizeof(name[0])));
-  assert(!Universe::heap()->is_in_reserved(name),
-         "proposed name of symbol must be stable");
-
-  Handle string;
-  // try to reuse the string if possible
-  if (!string_or_null.is_null()) {
-    string = string_or_null;
-  } else {
-    string = java_lang_String::create_from_unicode(name, len, CHECK_NULL);
-  }
-
-#if INCLUDE_ALL_GCS
-  if (G1StringDedup::is_enabled()) {
-    // Deduplicate the string before it is interned. Note that we should never
-    // deduplicate a string after it has been interned. Doing so will counteract
-    // compiler optimizations done on e.g. interned string literals.
-    G1StringDedup::deduplicate(string());
-  }
-#endif
-
-  // Grab the StringTable_lock before getting the_table() because it could
-  // change at safepoint.
-  MutexLocker ml(StringTable_lock, THREAD);
-
-  // Otherwise, add to symbol to table
-  return the_table()->basic_add(index, string, name, len,
-                                hashValue, CHECK_NULL);
-}
-
-oop StringTable::intern(Symbol* symbol, TRAPS) {
-  if (symbol == NULL) return NULL;
-  ResourceMark rm(THREAD);
-  int length;
-  jchar* chars = symbol->as_unicode(length);
-  Handle string;
-  oop result = intern(string, chars, length, CHECK_NULL);
-  return result;
-}
-
-
-oop StringTable::intern(oop string, TRAPS)
-{
-  if (string == NULL) return NULL;
-  ResourceMark rm(THREAD);
-  int length;
-  Handle h_string (THREAD, string);
-  jchar* chars = java_lang_String::as_unicode_string(string, length, CHECK_NULL);
-  oop result = intern(h_string, chars, length, CHECK_NULL);
-  return result;
-}
-
-
-oop StringTable::intern(const char* utf8_string, TRAPS) {
-  if (utf8_string == NULL) return NULL;
-  ResourceMark rm(THREAD);
-  int length = UTF8::unicode_length(utf8_string);
-  jchar* chars = NEW_RESOURCE_ARRAY(jchar, length);
-  UTF8::convert_to_unicode(utf8_string, chars, length);
-  Handle string;
-  oop result = intern(string, chars, length, CHECK_NULL);
-  return result;
-}
-
-void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
-  buckets_unlink_or_oops_do(is_alive, f, 0, the_table()->table_size(), processed, removed);
-}
-
-void StringTable::possibly_parallel_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int* processed, int* removed) {
-  // Readers of the table are unlocked, so we should only be removing
-  // entries at a safepoint.
-  assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
-  const int limit = the_table()->table_size();
-
-  for (;;) {
-    // Grab next set of buckets to scan
-    int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
-    if (start_idx >= limit) {
-      // End of table
-      break;
-    }
-
-    int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
-    buckets_unlink_or_oops_do(is_alive, f, start_idx, end_idx, processed, removed);
-  }
-}
-
-void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) {
-  const int limit = the_table()->table_size();
-
-  assert(0 <= start_idx && start_idx <= limit,
-         err_msg("start_idx (%d) is out of bounds", start_idx));
-  assert(0 <= end_idx && end_idx <= limit,
-         err_msg("end_idx (%d) is out of bounds", end_idx));
-  assert(start_idx <= end_idx,
-         err_msg("Index ordering: start_idx=%d, end_idx=%d",
-                 start_idx, end_idx));
-
-  for (int i = start_idx; i < end_idx; i += 1) {
-    HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
-    while (entry != NULL) {
-      assert(!entry->is_shared(), "CDS not used for the StringTable");
-
-      f->do_oop((oop*)entry->literal_addr());
-
-      entry = entry->next();
-    }
-  }
-}
-
-void StringTable::buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed) {
-  const int limit = the_table()->table_size();
-
-  assert(0 <= start_idx && start_idx <= limit,
-         err_msg("start_idx (%d) is out of bounds", start_idx));
-  assert(0 <= end_idx && end_idx <= limit,
-         err_msg("end_idx (%d) is out of bounds", end_idx));
-  assert(start_idx <= end_idx,
-         err_msg("Index ordering: start_idx=%d, end_idx=%d",
-                 start_idx, end_idx));
-
-  for (int i = start_idx; i < end_idx; ++i) {
-    HashtableEntry<oop, mtSymbol>** p = the_table()->bucket_addr(i);
-    HashtableEntry<oop, mtSymbol>* entry = the_table()->bucket(i);
-    while (entry != NULL) {
-      assert(!entry->is_shared(), "CDS not used for the StringTable");
-
-      if (is_alive->do_object_b(entry->literal())) {
-        if (f != NULL) {
-          f->do_oop((oop*)entry->literal_addr());
-        }
-        p = entry->next_addr();
-      } else {
-        *p = entry->next();
-        the_table()->free_entry(entry);
-        (*removed)++;
-      }
-      (*processed)++;
-      entry = *p;
-    }
-  }
-}
-
-void StringTable::oops_do(OopClosure* f) {
-  buckets_oops_do(f, 0, the_table()->table_size());
-}
-
-void StringTable::possibly_parallel_oops_do(OopClosure* f) {
-  const int limit = the_table()->table_size();
-
-  for (;;) {
-    // Grab next set of buckets to scan
-    int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize;
-    if (start_idx >= limit) {
-      // End of table
-      break;
-    }
-
-    int end_idx = MIN2(limit, start_idx + ClaimChunkSize);
-    buckets_oops_do(f, start_idx, end_idx);
-  }
-}
-
-// This verification is part of Universe::verify() and needs to be quick.
-// See StringTable::verify_and_compare() below for exhaustive verification.
-void StringTable::verify() {
-  for (int i = 0; i < the_table()->table_size(); ++i) {
-    HashtableEntry<oop, mtSymbol>* p = the_table()->bucket(i);
-    for ( ; p != NULL; p = p->next()) {
-      oop s = p->literal();
-      guarantee(s != NULL, "interned string is NULL");
-      unsigned int h = java_lang_String::hash_string(s);
-      guarantee(p->hash() == h, "broken hash in string table entry");
-      guarantee(the_table()->hash_to_index(h) == i,
-                "wrong index in string table");
-    }
-  }
-}
-
-void StringTable::dump(outputStream* st) {
-  the_table()->dump_table(st, "StringTable");
-}
-
-StringTable::VerifyRetTypes StringTable::compare_entries(
-                                      int bkt1, int e_cnt1,
-                                      HashtableEntry<oop, mtSymbol>* e_ptr1,
-                                      int bkt2, int e_cnt2,
-                                      HashtableEntry<oop, mtSymbol>* e_ptr2) {
-  // These entries are sanity checked by verify_and_compare_entries()
-  // before this function is called.
-  oop str1 = e_ptr1->literal();
-  oop str2 = e_ptr2->literal();
-
-  if (str1 == str2) {
-    tty->print_cr("ERROR: identical oop values (0x" PTR_FORMAT ") "
-                  "in entry @ bucket[%d][%d] and entry @ bucket[%d][%d]",
-                  (void *)str1, bkt1, e_cnt1, bkt2, e_cnt2);
-    return _verify_fail_continue;
-  }
-
-  if (java_lang_String::equals(str1, str2)) {
-    tty->print_cr("ERROR: identical String values in entry @ "
-                  "bucket[%d][%d] and entry @ bucket[%d][%d]",
-                  bkt1, e_cnt1, bkt2, e_cnt2);
-    return _verify_fail_continue;
-  }
-
-  return _verify_pass;
-}
-
-StringTable::VerifyRetTypes StringTable::verify_entry(int bkt, int e_cnt,
-                                      HashtableEntry<oop, mtSymbol>* e_ptr,
-                                      StringTable::VerifyMesgModes mesg_mode) {
-
-  VerifyRetTypes ret = _verify_pass;  // be optimistic
-
-  oop str = e_ptr->literal();
-  if (str == NULL) {
-    if (mesg_mode == _verify_with_mesgs) {
-      tty->print_cr("ERROR: NULL oop value in entry @ bucket[%d][%d]", bkt,
-                    e_cnt);
-    }
-    // NULL oop means no more verifications are possible
-    return _verify_fail_done;
-  }
-
-  if (str->klass() != SystemDictionary::String_klass()) {
-    if (mesg_mode == _verify_with_mesgs) {
-      tty->print_cr("ERROR: oop is not a String in entry @ bucket[%d][%d]",
-                    bkt, e_cnt);
-    }
-    // not a String means no more verifications are possible
-    return _verify_fail_done;
-  }
-
-  unsigned int h = java_lang_String::hash_string(str);
-  if (e_ptr->hash() != h) {
-    if (mesg_mode == _verify_with_mesgs) {
-      tty->print_cr("ERROR: broken hash value in entry @ bucket[%d][%d], "
-                    "bkt_hash=%d, str_hash=%d", bkt, e_cnt, e_ptr->hash(), h);
-    }
-    ret = _verify_fail_continue;
-  }
-
-  if (the_table()->hash_to_index(h) != bkt) {
-    if (mesg_mode == _verify_with_mesgs) {
-      tty->print_cr("ERROR: wrong index value for entry @ bucket[%d][%d], "
-                    "str_hash=%d, hash_to_index=%d", bkt, e_cnt, h,
-                    the_table()->hash_to_index(h));
-    }
-    ret = _verify_fail_continue;
-  }
-
-  return ret;
-}
-
-// See StringTable::verify() above for the quick verification that is
-// part of Universe::verify(). This verification is exhaustive and
-// reports on every issue that is found. StringTable::verify() only
-// reports on the first issue that is found.
-//
-// StringTable::verify_entry() checks:
-// - oop value != NULL (same as verify())
-// - oop value is a String
-// - hash(String) == hash in entry (same as verify())
-// - index for hash == index of entry (same as verify())
-//
-// StringTable::compare_entries() checks:
-// - oops are unique across all entries
-// - String values are unique across all entries
-//
-int StringTable::verify_and_compare_entries() {
-  assert(StringTable_lock->is_locked(), "sanity check");
-
-  int  fail_cnt = 0;
-
-  // first, verify all the entries individually:
-  for (int bkt = 0; bkt < the_table()->table_size(); bkt++) {
-    HashtableEntry<oop, mtSymbol>* e_ptr = the_table()->bucket(bkt);
-    for (int e_cnt = 0; e_ptr != NULL; e_ptr = e_ptr->next(), e_cnt++) {
-      VerifyRetTypes ret = verify_entry(bkt, e_cnt, e_ptr, _verify_with_mesgs);
-      if (ret != _verify_pass) {
-        fail_cnt++;
-      }
-    }
-  }
-
-  // Optimization: if the above check did not find any failures, then
-  // the comparison loop below does not need to call verify_entry()
-  // before calling compare_entries(). If there were failures, then we
-  // have to call verify_entry() to see if the entry can be passed to
-  // compare_entries() safely. When we call verify_entry() in the loop
-  // below, we do so quietly to void duplicate messages and we don't
-  // increment fail_cnt because the failures have already been counted.
-  bool need_entry_verify = (fail_cnt != 0);
-
-  // second, verify all entries relative to each other:
-  for (int bkt1 = 0; bkt1 < the_table()->table_size(); bkt1++) {
-    HashtableEntry<oop, mtSymbol>* e_ptr1 = the_table()->bucket(bkt1);
-    for (int e_cnt1 = 0; e_ptr1 != NULL; e_ptr1 = e_ptr1->next(), e_cnt1++) {
-      if (need_entry_verify) {
-        VerifyRetTypes ret = verify_entry(bkt1, e_cnt1, e_ptr1,
-                                          _verify_quietly);
-        if (ret == _verify_fail_done) {
-          // cannot use the current entry to compare against other entries
-          continue;
-        }
-      }
-
-      for (int bkt2 = bkt1; bkt2 < the_table()->table_size(); bkt2++) {
-        HashtableEntry<oop, mtSymbol>* e_ptr2 = the_table()->bucket(bkt2);
-        int e_cnt2;
-        for (e_cnt2 = 0; e_ptr2 != NULL; e_ptr2 = e_ptr2->next(), e_cnt2++) {
-          if (bkt1 == bkt2 && e_cnt2 <= e_cnt1) {
-            // skip the entries up to and including the one that
-            // we're comparing against
-            continue;
-          }
-
-          if (need_entry_verify) {
-            VerifyRetTypes ret = verify_entry(bkt2, e_cnt2, e_ptr2,
-                                              _verify_quietly);
-            if (ret == _verify_fail_done) {
-              // cannot compare against this entry
-              continue;
-            }
-          }
-
-          // compare two entries, report and count any failures:
-          if (compare_entries(bkt1, e_cnt1, e_ptr1, bkt2, e_cnt2, e_ptr2)
-              != _verify_pass) {
-            fail_cnt++;
-          }
-        }
-      }
-    }
-  }
-  return fail_cnt;
-}
-
-// Create a new table and using alternate hash code, populate the new table
-// with the existing strings.   Set flag to use the alternate hash code afterwards.
-void StringTable::rehash_table() {
-  assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
-  // This should never happen with -Xshare:dump but it might in testing mode.
-  if (DumpSharedSpaces) return;
-  StringTable* new_table = new StringTable();
-
-  // Rehash the table
-  the_table()->move_to(new_table);
-
-  // Delete the table and buckets (entries are reused in new table).
-  delete _the_table;
-  // Don't check if we need rehashing until the table gets unbalanced again.
-  // Then rehash with a new global seed.
-  _needs_rehashing = false;
-  _the_table = new_table;
-}
--- a/hotspot/src/share/vm/classfile/symbolTable.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/classfile/symbolTable.hpp	Fri May 16 14:35:37 2014 -0700
@@ -42,7 +42,6 @@
 class BoolObjectClosure;
 class outputStream;
 
-
 // Class to hold a newly created or referenced Symbol* temporarily in scope.
 // new_symbol() and lookup() will create a Symbol* if not already in the
 // symbol table and add to the symbol's reference count.
@@ -252,134 +251,4 @@
   static int parallel_claimed_index()        { return _parallel_claimed_idx; }
 };
 
-class StringTable : public Hashtable<oop, mtSymbol> {
-  friend class VMStructs;
-
-private:
-  // The string table
-  static StringTable* _the_table;
-
-  // Set if one bucket is out of balance due to hash algorithm deficiency
-  static bool _needs_rehashing;
-
-  // Claimed high water mark for parallel chunked scanning
-  static volatile int _parallel_claimed_idx;
-
-  static oop intern(Handle string_or_null, jchar* chars, int length, TRAPS);
-  oop basic_add(int index, Handle string_or_null, jchar* name, int len,
-                unsigned int hashValue, TRAPS);
-
-  oop lookup(int index, jchar* chars, int length, unsigned int hashValue);
-
-  // Apply the give oop closure to the entries to the buckets
-  // in the range [start_idx, end_idx).
-  static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
-  // Unlink or apply the give oop closure to the entries to the buckets
-  // in the range [start_idx, end_idx).
-  static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
-
-  StringTable() : Hashtable<oop, mtSymbol>((int)StringTableSize,
-                              sizeof (HashtableEntry<oop, mtSymbol>)) {}
-
-  StringTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
-    : Hashtable<oop, mtSymbol>((int)StringTableSize, sizeof (HashtableEntry<oop, mtSymbol>), t,
-                     number_of_entries) {}
-public:
-  // The string table
-  static StringTable* the_table() { return _the_table; }
-
-  // Size of one bucket in the string table.  Used when checking for rollover.
-  static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); }
-
-  static void create_table() {
-    assert(_the_table == NULL, "One string table allowed.");
-    _the_table = new StringTable();
-  }
-
-  // GC support
-  //   Delete pointers to otherwise-unreachable objects.
-  static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f) {
-    int processed = 0;
-    int removed = 0;
-    unlink_or_oops_do(cl, f, &processed, &removed);
-  }
-  static void unlink(BoolObjectClosure* cl) {
-    int processed = 0;
-    int removed = 0;
-    unlink_or_oops_do(cl, NULL, &processed, &removed);
-  }
-  static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed);
-  static void unlink(BoolObjectClosure* cl, int* processed, int* removed) {
-    unlink_or_oops_do(cl, NULL, processed, removed);
-  }
-  // Serially invoke "f->do_oop" on the locations of all oops in the table.
-  static void oops_do(OopClosure* f);
-
-  // Possibly parallel versions of the above
-  static void possibly_parallel_unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f, int* processed, int* removed);
-  static void possibly_parallel_unlink(BoolObjectClosure* cl, int* processed, int* removed) {
-    possibly_parallel_unlink_or_oops_do(cl, NULL, processed, removed);
-  }
-  static void possibly_parallel_oops_do(OopClosure* f);
-
-  // Hashing algorithm, used as the hash value used by the
-  //     StringTable for bucket selection and comparison (stored in the
-  //     HashtableEntry structures).  This is used in the String.intern() method.
-  static unsigned int hash_string(const jchar* s, int len);
-
-  // Internal test.
-  static void test_alt_hash() PRODUCT_RETURN;
-
-  // Probing
-  static oop lookup(Symbol* symbol);
-  static oop lookup(jchar* chars, int length);
-
-  // Interning
-  static oop intern(Symbol* symbol, TRAPS);
-  static oop intern(oop string, TRAPS);
-  static oop intern(const char *utf8_string, TRAPS);
-
-  // Debugging
-  static void verify();
-  static void dump(outputStream* st);
-
-  enum VerifyMesgModes {
-    _verify_quietly    = 0,
-    _verify_with_mesgs = 1
-  };
-
-  enum VerifyRetTypes {
-    _verify_pass          = 0,
-    _verify_fail_continue = 1,
-    _verify_fail_done     = 2
-  };
-
-  static VerifyRetTypes compare_entries(int bkt1, int e_cnt1,
-                                        HashtableEntry<oop, mtSymbol>* e_ptr1,
-                                        int bkt2, int e_cnt2,
-                                        HashtableEntry<oop, mtSymbol>* e_ptr2);
-  static VerifyRetTypes verify_entry(int bkt, int e_cnt,
-                                     HashtableEntry<oop, mtSymbol>* e_ptr,
-                                     VerifyMesgModes mesg_mode);
-  static int verify_and_compare_entries();
-
-  // Sharing
-  static void copy_buckets(char** top, char*end) {
-    the_table()->Hashtable<oop, mtSymbol>::copy_buckets(top, end);
-  }
-  static void copy_table(char** top, char*end) {
-    the_table()->Hashtable<oop, mtSymbol>::copy_table(top, end);
-  }
-  static void reverse() {
-    the_table()->Hashtable<oop, mtSymbol>::reverse();
-  }
-
-  // Rehash the symbol table if it gets out of balance
-  static void rehash_table();
-  static bool needs_rehashing() { return _needs_rehashing; }
-
-  // Parallel chunked scanning
-  static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; }
-  static int parallel_claimed_index() { return _parallel_claimed_idx; }
-};
 #endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Fri May 16 14:35:37 2014 -0700
@@ -29,6 +29,7 @@
 #include "classfile/loaderConstraints.hpp"
 #include "classfile/placeholders.hpp"
 #include "classfile/resolutionErrors.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "compiler/compileBroker.hpp"
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Fri May 16 14:35:37 2014 -0700
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/classLoaderData.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
 #include "gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp"
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Fri May 16 14:35:37 2014 -0700
@@ -28,6 +28,7 @@
 #endif
 
 #include "precompiled.hpp"
+#include "classfile/stringTable.hpp"
 #include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "gc_implementation/g1/bufferingOopClosure.hpp"
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp	Fri May 16 14:35:37 2014 -0700
@@ -1,3 +1,4 @@
+
 /*
  * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -23,7 +24,7 @@
  */
 
 #include "precompiled.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	Fri May 16 14:35:37 2014 -0700
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
 #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Fri May 16 14:35:37 2014 -0700
@@ -1,3 +1,4 @@
+
 /*
  * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -23,7 +24,7 @@
  */
 
 #include "precompiled.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "code/codeCache.hpp"
 #include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
 #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
--- a/hotspot/src/share/vm/libadt/dict.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/libadt/dict.cpp	Fri May 16 14:35:37 2014 -0700
@@ -24,31 +24,19 @@
 
 #include "precompiled.hpp"
 #include "libadt/dict.hpp"
-#include "memory/allocation.inline.hpp"
-#include "memory/resourceArea.hpp"
-#include "runtime/thread.hpp"
 
 // Dictionaries - An Abstract Data Type
 
 // %%%%% includes not needed with AVM framework - Ungar
 
-// #include "port.hpp"
-//IMPLEMENTATION
-// #include "dict.hpp"
-
 #include <assert.h>
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
-// The iostream is not needed and it gets confused for gcc by the
-// define of bool.
-//
-// #include <iostream.h>
-
 //------------------------------data-----------------------------------------
 // String hash tables
 #define MAXID 20
-static byte initflag = 0;       // True after 1st initialization
+static uint8_t initflag = 0;       // True after 1st initialization
 static const char shft[MAXID] = {1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6};
 static short xsum[MAXID];
 
@@ -283,7 +271,7 @@
 // CmpDict compares two dictionaries; they must have the same keys (their
 // keys must match using CmpKey) and they must have the same values (pointer
 // comparison).  If so 1 is returned, if not 0 is returned.
-int32 Dict::operator ==(const Dict &d2) const {
+int32_t Dict::operator ==(const Dict &d2) const {
   if( _cnt != d2._cnt ) return 0;
   if( _hash != d2._hash ) return 0;
   if( _cmp != d2._cmp ) return 0;
@@ -320,7 +308,7 @@
 // C text shows excellent spreading of values for any size hash table.
 int hashstr(const void *t) {
   register char c, k = 0;
-  register int32 sum = 0;
+  register int32_t sum = 0;
   register const char *s = (const char *)t;
 
   while( ((c = *s++) != '\0') && (k < MAXID-1) ) { // Get characters till null or MAXID-1
@@ -334,11 +322,7 @@
 // Slimey cheap hash function; no guaranteed performance.  Better than the
 // default for pointers, especially on MS-DOS machines.
 int hashptr(const void *key) {
-#ifdef __TURBOC__
-    return ((intptr_t)key >> 16);
-#else  // __TURBOC__
-    return ((intptr_t)key >> 2);
-#endif
+  return ((intptr_t)key >> 2);
 }
 
 // Slimey cheap hash function; no guaranteed performance.
@@ -347,12 +331,12 @@
 }
 
 //------------------------------Key Comparator Functions---------------------
-int32 cmpstr(const void *k1, const void *k2) {
+int32_t cmpstr(const void *k1, const void *k2) {
   return strcmp((const char *)k1,(const char *)k2);
 }
 
 // Cheap key comparator.
-int32 cmpkey(const void *key1, const void *key2) {
+int32_t cmpkey(const void *key1, const void *key2) {
   if (key1 == key2) return 0;
   intptr_t delta = (intptr_t)key1 - (intptr_t)key2;
   if (delta > 0) return 1;
--- a/hotspot/src/share/vm/libadt/dict.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/libadt/dict.hpp	Fri May 16 14:35:37 2014 -0700
@@ -25,11 +25,12 @@
 #ifndef SHARE_VM_LIBADT_DICT_HPP
 #define SHARE_VM_LIBADT_DICT_HPP
 
-#include "libadt/port.hpp"
+// Dictionaries - An Abstract Data Type
 
-// Dictionaries - An Abstract Data Type
-//INTERFACE
-class ostream;
+#include "memory/allocation.inline.hpp"
+#include "memory/resourceArea.hpp"
+#include "runtime/thread.hpp"
+
 class Dict;
 
 // These dictionaries define a key-value mapping.  They can be inserted to,
@@ -38,7 +39,7 @@
 // key comparison routine determines if two keys are equal or not.  A hash
 // function can be provided; if it's not provided the key itself is used
 // instead.  A nice string hash function is included.
-typedef int32 (*CmpKey)(const void *key1, const void *key2);
+typedef int32_t (*CmpKey)(const void *key1, const void *key2);
 typedef int  (*Hash)(const void *key);
 typedef void (*FuncDict)(const void *key, const void *val, Dict *d);
 
@@ -47,7 +48,7 @@
   class Arena *_arena;          // Where to draw storage from
   class bucket *_bin;           // Hash table is array of buckets
   uint _size;                   // Size (# of slots) in hash table
-  uint32 _cnt;                  // Number of key-value pairs in hash table
+  uint32_t _cnt;                // Number of key-value pairs in hash table
   const Hash _hash;             // Hashing function
   const CmpKey _cmp;            // Key comparison function
   void doubhash( void );        // Double hash table size
@@ -67,7 +68,7 @@
   void Clear();
 
   // Return # of key-value pairs in dict
-  uint32 Size(void) const { return _cnt; }
+  uint32_t Size(void) const { return _cnt; }
 
   // Insert inserts the given key-value pair into the dictionary.  The prior
   // value of the key is returned; NULL if the key was not previously defined.
@@ -81,7 +82,7 @@
   // == compares two dictionaries; they must have the same keys (their keys
   // must match using CmpKey) and they must have the same values (pointer
   // comparison).  If so 1 is returned, if not 0 is returned.
-  int32 operator ==(const Dict &d) const;   // Compare dictionaries for equal
+  int32_t operator ==(const Dict &d) const;   // Compare dictionaries for equal
 
   // Print out the dictionary contents as key-value pairs
   void print();
@@ -96,9 +97,9 @@
 int hashkey(const void *key);
 
 // Key comparators
-int32 cmpstr(const void *k1, const void *k2);
+int32_t cmpstr(const void *k1, const void *k2);
 // Slimey cheap key comparator.
-int32 cmpkey(const void *key1, const void *key2);
+int32_t cmpkey(const void *key1, const void *key2);
 
 //------------------------------Iteration--------------------------------------
 // The class of dictionary iterators.  Fails in the presences of modifications
--- a/hotspot/src/share/vm/libadt/port.cpp	Thu May 15 10:37:52 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, 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.
- *
- */
-
-#include "precompiled.hpp"
-#include "libadt/port.hpp"
-
-// Code for portable compiling
-
-#ifdef __GNUC__
-#pragma implementation
-#endif
-
-// %%%%% includes not needed with AVM framework - Ungar
-// #include "port.hpp"
-
-// This is only used if turboc is used and it causes problems with
-// gcc.
-#ifdef __TURBOC__
-#include <iostream.h>
-#endif
-
-#include <stdio.h>
-
-//------------------------------gcd--------------------------------------------
-// Greatest common divisor
-uint32 gcd( register uint32 x, register uint32 y )
-{
-  register uint32 tmp;
-  while( x ) {                  // While not zero
-    tmp = x;                    // Hold onto smaller x value
-    x = y % x;                  // Compute modulus; since y>=x, 0 <= mod < x
-    y = tmp;                    // y = old x
-  }
-  return y;
-}
-
-//-----------------------------------------------------------------------------
-// Find first 1, or return 32 if empty
-int ff1( uint32 mask )
-{
-  unsigned i, n = 0;
-
-  for( i=1, n=0; i; i<<=1, n++)
-    if( mask&i ) return n;
-  return 32;
-}
-
-//-----------------------------------------------------------------------------
-// Find highest 1, or return 32 if empty
-int fh1( uint32 mask )
-{
-  unsigned i, n = 0;
-
-  for( i=((uint32)1<<31), n=31; i; i>>=1, n--)
-    if( mask&i ) return n;
-  return 32;
-}
-
-//------------------------------rotate32---------------------------------------
-// Rotate 32bits.  Postive rotates left (bits move toward high-order bit),
-// negative rotates right.
-uint32 rotate32( register uint32 x, register int32 cnt )
-{
-  if( cnt >= 0 ) {              // Positive rotates left
-    cnt &= 31;                  // Mask off extra shift bits
-  } else {                      // Negative rotates right
-    cnt = (-cnt)&31;            // Flip sign; mask extra shift bits
-    cnt = 32-cnt;               // Rotate right by big left rotation
-  }
-  return (x << cnt) | (x >> (32-cnt));
-}
-
-/* Disabled - we have another log2 in the system.
-   This function doesn't work if used as substitute
-   for the existing log2. Keep around until we have
-   verified all uses of log2 do the correct thing!
-//------------------------------log2-------------------------------------------
-// Log base 2.  Might also be called 'count leading zeros'.  Log2(x) returns
-// an l such that (1L<<l) <= x < (2L<<l).  log2(x) returns 32.
-uint log2( uint32 x )
-{
-  register uint l = 32;         // Log bits
-  register int32 sx = x;        // Treat as signed number
-  while( sx >= 0 )              // While high bit is clear
-    sx <<= 1, l--;              // Shift bits left, count down log2
-  return l;
-}
-*/
-
-//------------------------------print------------------------------------------
-// Print a pointer without modifying the contents
-#ifdef __TURBOC__
-ostream &ostream::operator << (const void *ptr)
-{
-  return (*this) << "0x" << hex << (uint)ptr << dec;
-}
-#else
-/*ostream &operator << (ostream &os, const void *ptr)
-{
-  return os << "0x" << hex << (uint)ptr << dec;
-}*/
-#endif
--- a/hotspot/src/share/vm/libadt/port.hpp	Thu May 15 10:37:52 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.
- *
- */
-
-#ifndef SHARE_VM_LIBADT_PORT_HPP
-#define SHARE_VM_LIBADT_PORT_HPP
-
-#include "utilities/top.hpp"
-
-// Typedefs for portable compiling
-
-#if defined(__GNUC__)
-
-#define INTERFACE       #pragma interface
-#define IMPLEMENTATION  #pragma implementation
-//INTERFACE
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-// Access to the C++ class virtual function pointer
-// Put the class in the macro
-typedef void *VPTR;
-// G++ puts it at the end of the base class
-#define ACCESS_VPTR(class) VPTR&vptr(){return*(VPTR*)((char*)this+sizeof(class)-sizeof(void*));}
-
-#elif defined(__TURBOC__)
-
-#include <mem.h>
-#include <string.h>
-extern "C" int stricmp(const char *, const char *);
-inline void bcopy(const void *s, void *d, int l) { memmove(d,s,l); }
-inline void bzero(void *p, int l) { memset(p,0,l); }
-inline int bcmp(const void *s, const void *d, int l) { return memcmp(s,d,l); }
-inline int min( int a, int b) { return a < b ? a : b; }
-inline int max( int a, int b) { return a > b ? a : b; }
-//strcasecmp moved to globalDefinitions_visCPP.hpp
-//inline int strcasecmp(const char *s1, const char *s2) { return stricmp(s1,s2); }
-inline long abs( long x ) { return x < 0 ? -x : x; }
-// Access to the C++ class virtual function pointer
-// Put the class in the macro
-typedef void near *VPTR;
-// BorlandC puts it up front
-#define ACCESS_VPTR(class) VPTR&vptr(){return*(VPTR*)this;}
-
-#elif defined(__hpux)
-
-#define INTERFACE
-#define IMPLEMENTATION
-#define signed
-#include <strings.h>
-#include <stdlib.h>
-inline long min( long a, long b) { return a < b ? a : b; }
-inline long max( long a, long b) { return a > b ? a : b; }
-inline int min( int a, int b) { return a < b ? a : b; }
-inline int max( int a, int b) { return a > b ? a : b; }
-inline long abs( long x ) { return x < 0 ? -x : x; }
-
-#elif defined(__MOTO__)
-// Motorola's mcc
-#define INTERFACE
-#define IMPLEMENTATION
-#include <stdlib.h>
-#include <memory.h>
-inline int min( int a, int b) { return a < b ? a : b; }
-inline int max( int a, int b) { return a > b ? a : b; }
-
-#elif defined(_AIX)
-// IBM's xlC compiler
-#define INTERFACE
-#define IMPLEMENTATION
-#include <stdlib.h>
-#include <memory.h>
-
-#elif defined(_MSC_VER)
-// Microsoft Visual C++
-//#define INTERFACE
-#define IMPLEMENTATION
-#include <stdlib.h>
-#undef small
-//strcasecmp moved to globalDefinitions_visCPP.hpp
-//inline int strcasecmp(const char *s1, const char *s2) { return stricmp(s1,s2); }
-
-
-#elif defined(SPARC_WORKS)
-
-#define INTERFACE
-#define IMPLEMENTATION
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#elif defined(SOLARIS)
-
-#define INTERFACE
-#define IMPLEMENTATION
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-
-#elif defined(__TANDEM)
-
-// This case is for the Tandem Business Unit of Compaq Computer Corporation.
-// The Tandem case must precede the AT&T case,
-// because the Tandem c89 compiler also defines __cplusplus.
-
-#include "port_tandem.hpp"
-
-#elif defined(__cplusplus)
-// AT&Ts cfront
-#define INTERFACE
-#define IMPLEMENTATION
-#include <unistd.h>
-#define signed
-// #include <bstring.h>
-inline int min( int a, int b) { return a < b ? a : b; }
-inline int max( int a, int b) { return a > b ? a : b; }
-
-#else  // All other machines
-
-#define signed
-extern "C" void bcopy(void *b1, void *b2, int len);
-inline int min( int a, int b) { return a < b ? a : b; }
-inline int max( int a, int b) { return a > b ? a : b; }
-
-#endif
-
-//-----------------------------------------------------------------------------
-// Safer memory allocations
-#ifdef SAFE_MEMORY
-#define malloc(size)        safe_malloc(__FILE__,__LINE__,size)
-#define free(ptr)           safe_free(__FILE__,__LINE__,ptr)
-#define realloc(ptr,size)   safe_realloc(__FILE__,__LINE__,ptr,size)
-#define calloc(nitems,size) safe_calloc(__FILE__,__LINE__,nitems,size)
-#define strdup(ptr)         safe_strdup(__FILE__,__LINE__,ptr)
-extern void *safe_malloc (const char *file, unsigned line, unsigned size);
-extern void  safe_free   (const char *file, unsigned line, void *ptr);
-extern void *safe_calloc (const char *file, unsigned line, unsigned nitems, unsigned size);
-extern void *safe_realloc(const char *file, unsigned line, void *ptr, unsigned size);
-extern char *safe_strdup (const char *file, unsigned line, const char *src);
-inline void *operator new( size_t size ) throw() { return malloc(size); }
-inline void operator delete( void *ptr )         { free(ptr); }
-#endif
-
-//-----------------------------------------------------------------------------
-// And now, the bit-size-specified integer sizes
-typedef signed char int8;
-typedef unsigned char uint8;
-typedef unsigned char byte;
-
-// All uses of *int16 changed to 32-bit to speed up compiler on Intel
-//typedef signed short int16;   // Exactly 16bits signed
-//typedef unsigned short uint16;        // Exactly 16bits unsigned
-//const unsigned int min_uint16 = 0x0000;    // smallest uint16
-//const unsigned int max_uint16 = 0xFFFF;    // largest  uint16
-
-typedef unsigned int uint;      // When you need a fast >=16bit unsigned value
-/*typedef int int; */           // When you need a fast >=16bit value
-const unsigned int max_uint = (uint)-1;
-typedef int32_t int32;   // Exactly 32bits signed
-typedef uint32_t uint32; // Exactly 32bits unsigned
-
-// Bit-sized floating point and long thingies
-#ifndef __TANDEM
-// Do not define these for Tandem, because they conflict with typedefs in softieee.h.
-typedef float float32;          // 32-bit float
-typedef double float64;         // 64-bit float
-#endif // __TANDEM
-
-typedef jlong int64;            // Java long for my 64-bit type
-typedef julong uint64;          // Java long for my 64-bit type
-
-//-----------------------------------------------------------------------------
-// Nice constants
-uint32 gcd( uint32 x, uint32 y );
-int ff1( uint32 mask );
-int fh1( uint32 mask );
-uint32 rotate32( uint32 x, int32 cnt );
-
-
-//-----------------------------------------------------------------------------
-extern uint32 heap_totalmem;      // Current total memory allocation
-extern uint32 heap_highwater;     // Highwater mark to date for memory usage
-
-#endif // SHARE_VM_LIBADT_PORT_HPP
--- a/hotspot/src/share/vm/libadt/set.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/libadt/set.cpp	Fri May 16 14:35:37 2014 -0700
@@ -28,20 +28,11 @@
 
 // Sets - An Abstract Data Type
 
-// %%%%% includes not needed with AVM framework - Ungar
-// #include "port.hpp"
-//IMPLEMENTATION
-// #include "set.hpp"
-
 #include <stdio.h>
 #include <assert.h>
 #include <string.h>
 #include <stdlib.h>
 
-// Not needed and it causes terouble for gcc.
-//
-// #include <iostream.h>
-
 //-------------------------Virtual Functions-----------------------------------
 // These functions MUST be implemented by the inheriting class.
 class SparseSet;
--- a/hotspot/src/share/vm/libadt/set.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/libadt/set.hpp	Fri May 16 14:35:37 2014 -0700
@@ -25,13 +25,10 @@
 #ifndef SHARE_VM_LIBADT_SET_HPP
 #define SHARE_VM_LIBADT_SET_HPP
 
-#include "libadt/port.hpp"
 #include "memory/allocation.hpp"
 
 // Sets - An Abstract Data Type
 
-//INTERFACE
-
 class SparseSet;
 class VectorSet;
 class ListSet;
--- a/hotspot/src/share/vm/libadt/vectset.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/libadt/vectset.cpp	Fri May 16 14:35:37 2014 -0700
@@ -28,15 +28,10 @@
 
 // Vector Sets - An Abstract Data Type
 
-// %%%%% includes not needed with AVM framework - Ungar
-// #include "port.hpp"
-//IMPLEMENTATION
-// #include "vectset.hpp"
-
 // BitsInByte is a lookup table which tells the number of bits that
 // are in the looked-up number.  It is very useful in VectorSet_Size.
 
-uint8 bitsInByte[256] = {
+uint8_t bitsInByte[256] = {
   0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
   1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
   1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
@@ -59,7 +54,7 @@
 // Create a new, empty Set.
 VectorSet::VectorSet(Arena *arena) : Set(arena) {
   size = 2;                     // Small initial size
-  data = (uint32 *)_set_arena->Amalloc(size*sizeof(uint32));
+  data = (uint32_t *)_set_arena->Amalloc(size*sizeof(uint32_t));
   data[0] = 0;                  // No elements
   data[1] = 0;
 }
@@ -85,8 +80,8 @@
 void VectorSet::slamin(const VectorSet& s)
 {
   size = s.size;                // Use new size
-  data = (uint32*)s._set_arena->Amalloc(size*sizeof(uint32)); // Make array of required size
-  memcpy( data, s.data, size*sizeof(uint32) ); // Fill the array
+  data = (uint32_t*)s._set_arena->Amalloc(size*sizeof(uint32_t)); // Make array of required size
+  memcpy( data, s.data, size*sizeof(uint32_t) ); // Fill the array
 }
 
 //------------------------------grow-------------------------------------------
@@ -96,8 +91,8 @@
   newsize = (newsize+31) >> 5;  // Convert to longwords
   uint x = size;
   while( x < newsize ) x <<= 1;
-  data = (uint32 *)_set_arena->Arealloc(data, size*sizeof(uint32), x*sizeof(uint32));
-  memset((char *)(data + size), 0, (x - size)*sizeof(uint32));
+  data = (uint32_t *)_set_arena->Arealloc(data, size*sizeof(uint32_t), x*sizeof(uint32_t));
+  memset((char *)(data + size), 0, (x - size)*sizeof(uint32_t));
   size = x;
 }
 
@@ -106,7 +101,7 @@
 Set &VectorSet::operator <<= (uint elem)
 {
   register uint word = elem >> 5;            // Get the longword offset
-  register uint32 mask = 1L << (elem & 31);  // Get bit mask
+  register uint32_t mask = 1L << (elem & 31);  // Get bit mask
 
   if( word >= size )            // Need to grow set?
     grow(elem+1);               // Then grow it
@@ -121,7 +116,7 @@
   register uint word = elem >> 5; // Get the longword offset
   if( word >= size )              // Beyond the last?
     return *this;                 // Then it's clear & return clear
-  register uint32 mask = 1L << (elem & 31);     // Get bit mask
+  register uint32_t mask = 1L << (elem & 31);     // Get bit mask
   data[word] &= ~mask;            // Clear bit
   return *this;
 }
@@ -132,8 +127,8 @@
 {
   // NOTE: The intersection is never any larger than the smallest set.
   if( s.size < size ) size = s.size; // Get smaller size
-  register uint32 *u1 = data;   // Pointer to the destination data
-  register uint32 *u2 = s.data; // Pointer to the source data
+  register uint32_t *u1 = data;   // Pointer to the destination data
+  register uint32_t *u2 = s.data; // Pointer to the source data
   for( uint i=0; i<size; i++)   // For data in set
     *u1++ &= *u2++;             // Copy and AND longwords
   return *this;                 // Return set
@@ -152,14 +147,14 @@
 {
   // This many words must be unioned
   register uint cnt = ((size<s.size)?size:s.size);
-  register uint32 *u1 = data;   // Pointer to the destination data
-  register uint32 *u2 = s.data; // Pointer to the source data
+  register uint32_t *u1 = data;   // Pointer to the destination data
+  register uint32_t *u2 = s.data; // Pointer to the source data
   for( uint i=0; i<cnt; i++)    // Copy and OR the two sets
     *u1++ |= *u2++;
   if( size < s.size ) {         // Is set 2 larger than set 1?
     // Extend result by larger set
-    grow(s.size*sizeof(uint32)*8);
-    memcpy(&data[cnt], u2, (s.size - cnt)*sizeof(uint32));
+    grow(s.size*sizeof(uint32_t)*8);
+    memcpy(&data[cnt], u2, (s.size - cnt)*sizeof(uint32_t));
   }
   return *this;                 // Return result set
 }
@@ -177,8 +172,8 @@
 {
   // This many words must be unioned
   register uint cnt = ((size<s.size)?size:s.size);
-  register uint32 *u1 = data;   // Pointer to the destination data
-  register uint32 *u2 = s.data; // Pointer to the source data
+  register uint32_t *u1 = data;   // Pointer to the destination data
+  register uint32_t *u2 = s.data; // Pointer to the source data
   for( uint i=0; i<cnt; i++ )   // For data in set
     *u1++ &= ~(*u2++);          // A <-- A & ~B  with longwords
   return *this;                 // Return new set
@@ -199,17 +194,17 @@
 //        1X --  B is a subset of A
 int VectorSet::compare (const VectorSet &s) const
 {
-  register uint32 *u1 = data;   // Pointer to the destination data
-  register uint32 *u2 = s.data; // Pointer to the source data
-  register uint32 AnotB = 0, BnotA = 0;
+  register uint32_t *u1 = data;   // Pointer to the destination data
+  register uint32_t *u2 = s.data; // Pointer to the source data
+  register uint32_t AnotB = 0, BnotA = 0;
   // This many words must be unioned
   register uint cnt = ((size<s.size)?size:s.size);
 
   // Get bits for both sets
   uint i;                       // Exit value of loop
   for( i=0; i<cnt; i++ ) {      // For data in BOTH sets
-    register uint32 A = *u1++;  // Data from one guy
-    register uint32 B = *u2++;  // Data from other guy
+    register uint32_t A = *u1++;  // Data from one guy
+    register uint32_t B = *u2++;  // Data from other guy
     AnotB |= (A & ~B);          // Compute bits in A not B
     BnotA |= (B & ~A);          // Compute bits in B not A
   }
@@ -250,8 +245,8 @@
 
   // NOTE: The intersection is never any larger than the smallest set.
   register uint small_size = ((size<s.size)?size:s.size);
-  register uint32 *u1 = data;        // Pointer to the destination data
-  register uint32 *u2 = s.data;      // Pointer to the source data
+  register uint32_t *u1 = data;        // Pointer to the destination data
+  register uint32_t *u2 = s.data;      // Pointer to the source data
   for( uint i=0; i<small_size; i++)  // For data in set
     if( *u1++ & *u2++ )              // If any elements in common
       return 0;                      // Then not disjoint
@@ -293,7 +288,7 @@
   register uint word = elem >> 5; // Get the longword offset
   if( word >= size )              // Beyond the last?
     return 0;                     // Then it's clear
-  register uint32 mask = 1L << (elem & 31);  // Get bit mask
+  register uint32_t mask = 1L << (elem & 31);  // Get bit mask
   return ((data[word] & mask))!=0;           // Return the sense of the bit
 }
 
@@ -305,7 +300,7 @@
   for( i=0; i<size; i++ )
     if( data[i] )
       break;
-  uint32 word = data[i];
+  uint32_t word = data[i];
   int j;                        // Exit value of loop
   for( j= -1; word; j++, word>>=1 );
   return (i<<5)+j;
@@ -316,11 +311,11 @@
 void VectorSet::Clear(void)
 {
   if( size > 100 ) {            // Reclaim storage only if huge
-    FREE_RESOURCE_ARRAY(uint32,data,size);
+    FREE_RESOURCE_ARRAY(uint32_t,data,size);
     size = 2;                   // Small initial size
-    data = NEW_RESOURCE_ARRAY(uint32,size);
+    data = NEW_RESOURCE_ARRAY(uint32_t,size);
   }
-  memset( data, 0, size*sizeof(uint32) );
+  memset( data, 0, size*sizeof(uint32_t) );
 }
 
 //------------------------------Size-------------------------------------------
@@ -328,8 +323,8 @@
 uint VectorSet::Size(void) const
 {
   uint sum = 0;                 // Cumulative size so far.
-  uint8 *currByte = (uint8*)data;
-  for( uint32 i = 0; i < (size<<2); i++) // While have bytes to process
+  uint8_t* currByte = (uint8_t*) data;
+  for( uint32_t i = 0; i < (size<<2); i++) // While have bytes to process
     sum += bitsInByte[*currByte++];      // Add bits in current byte to size.
   return sum;
 }
@@ -343,7 +338,7 @@
 //------------------------------hash-------------------------------------------
 int VectorSet::hash() const
 {
-  uint32 _xor = 0;
+  uint32_t _xor = 0;
   uint lim = ((size<4)?size:4);
   for( uint i = 0; i < lim; i++ )
     _xor ^= data[i];
--- a/hotspot/src/share/vm/libadt/vectset.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/libadt/vectset.hpp	Fri May 16 14:35:37 2014 -0700
@@ -47,7 +47,7 @@
 friend class VectorSetI;        // Friendly iterator class
 protected:
   uint size;                    // Size of data IN LONGWORDS (32bits)
-  uint32 *data;                 // The data, bit packed
+  uint32_t* data;               // The data, bit packed
 
   void slamin( const VectorSet& s );     // Initialize one set with another
   int compare(const VectorSet &s) const; // Compare set contents
@@ -99,7 +99,7 @@
   void Sort(void);                  // Sort before iterating
   int hash() const;                 // Hash function
   void Reset(void) {                // Reset a set
-    memset( data, 0, size*sizeof(uint32) );
+    memset( data, 0, size*sizeof(uint32_t) );
   }
 
   /* Removed for MCC BUG
@@ -108,7 +108,7 @@
 
   // Expose internals for speed-critical fast iterators
   uint word_size() const { return size; }
-  uint32 *EXPOSE() const { return data; }
+  uint32_t* EXPOSE() const { return data; }
 
   // Fast inlined "test and set".  Replaces the idiom:
   //     if( visited[idx] ) return;
@@ -120,8 +120,8 @@
     uint word = elem >> 5;           // Get the longword offset
     if( word >= size )               // Beyond the last?
       return test_set_grow(elem);    // Then grow; set; return 0;
-    uint32 mask = 1L << (elem & 31); // Get bit mask
-    uint32 datum = data[word] & mask;// Get bit
+    uint32_t mask = 1L << (elem & 31); // Get bit mask
+    uint32_t datum = data[word] & mask;// Get bit
     data[word] |= mask;              // Set bit
     return datum;                    // Return bit
   }
@@ -134,7 +134,7 @@
   int test( uint elem ) const {
     uint word = elem >> 5;      // Get the longword offset
     if( word >= size ) return 0; // Beyond the last?
-    uint32 mask = 1L << (elem & 31); // Get bit mask
+    uint32_t mask = 1L << (elem & 31); // Get bit mask
     return data[word] & mask;   // Get bit
   }
 
@@ -144,7 +144,7 @@
     if( word >= size ) {        // Beyond the last?
       test_set_grow(elem);      // Then grow and set
     } else {
-      uint32 mask = 1L << (elem & 31); // Get bit mask
+      uint32_t mask = 1L << (elem & 31); // Get bit mask
       data[word] |= mask;       // Set bit
     }
   }
@@ -164,7 +164,7 @@
   friend class VectorSet;
   const VectorSet *s;
   uint i, j;
-  uint32 mask;
+  uint32_t mask;
   uint next(void);
 
 public:
--- a/hotspot/src/share/vm/memory/allocation.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/memory/allocation.cpp	Fri May 16 14:35:37 2014 -0700
@@ -686,40 +686,57 @@
 // a memory leak.  Use CHeapObj as the base class of such objects to make it explicit
 // that they're allocated on the C heap.
 // Commented out in product version to avoid conflicts with third-party C++ native code.
-// On certain platforms, such as Mac OS X (Darwin), in debug version, new is being called
-// from jdk source and causing data corruption. Such as
-//  Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair
-// define ALLOW_OPERATOR_NEW_USAGE for platform on which global operator new allowed.
 //
-#ifndef ALLOW_OPERATOR_NEW_USAGE
-void* operator new(size_t size) throw() {
-  assert(false, "Should not call global operator new");
+// In C++98/03 the throwing new operators are defined with the following signature:
+//
+// void* operator new(std::size_tsize) throw(std::bad_alloc);
+// void* operator new[](std::size_tsize) throw(std::bad_alloc);
+//
+// while all the other (non-throwing) new and delete operators are defined with an empty
+// throw clause (i.e. "operator delete(void* p) throw()") which means that they do not
+// throw any exceptions (see section 18.4 of the C++ standard).
+//
+// In the new C++11/14 standard, the signature of the throwing new operators was changed
+// by completely omitting the throw clause (which effectively means they could throw any
+// exception) while all the other new/delete operators where changed to have a 'nothrow'
+// clause instead of an empty throw clause.
+//
+// Unfortunately, the support for exception specifications among C++ compilers is still
+// very fragile. While some more strict compilers like AIX xlC or HP aCC reject to
+// override the default throwing new operator with a user operator with an empty throw()
+// clause, the MS Visual C++ compiler warns for every non-empty throw clause like
+// throw(std::bad_alloc) that it will ignore the exception specification. The following
+// operator definitions have been checked to correctly work with all currently supported
+// compilers and they should be upwards compatible with C++11/14. Therefore
+// PLEASE BE CAREFUL if you change the signature of the following operators!
+
+void* operator new(size_t size) /* throw(std::bad_alloc) */ {
+  fatal("Should not call global operator new");
   return 0;
 }
 
-void* operator new [](size_t size) throw() {
-  assert(false, "Should not call global operator new[]");
+void* operator new [](size_t size) /* throw(std::bad_alloc) */ {
+  fatal("Should not call global operator new[]");
   return 0;
 }
 
 void* operator new(size_t size, const std::nothrow_t&  nothrow_constant) throw() {
-  assert(false, "Should not call global operator new");
+  fatal("Should not call global operator new");
   return 0;
 }
 
 void* operator new [](size_t size, std::nothrow_t&  nothrow_constant) throw() {
-  assert(false, "Should not call global operator new[]");
+  fatal("Should not call global operator new[]");
   return 0;
 }
 
-void operator delete(void* p) {
-  assert(false, "Should not call global delete");
+void operator delete(void* p) throw() {
+  fatal("Should not call global delete");
 }
 
-void operator delete [](void* p) {
-  assert(false, "Should not call global delete []");
+void operator delete [](void* p) throw() {
+  fatal("Should not call global delete []");
 }
-#endif // ALLOW_OPERATOR_NEW_USAGE
 
 void AllocatedObj::print() const       { print_on(tty); }
 void AllocatedObj::print_value() const { print_value_on(tty); }
--- a/hotspot/src/share/vm/memory/genMarkSweep.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp	Fri May 16 14:35:37 2014 -0700
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/javaClasses.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "code/codeCache.hpp"
--- a/hotspot/src/share/vm/memory/sharedHeap.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/memory/sharedHeap.cpp	Fri May 16 14:35:37 2014 -0700
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
 #include "gc_interface/collectedHeap.inline.hpp"
--- a/hotspot/src/share/vm/memory/universe.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/memory/universe.cpp	Fri May 16 14:35:37 2014 -0700
@@ -26,7 +26,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/classLoaderData.hpp"
 #include "classfile/javaClasses.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "code/codeCache.hpp"
--- a/hotspot/src/share/vm/oops/constantPool.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/oops/constantPool.cpp	Fri May 16 14:35:37 2014 -0700
@@ -26,7 +26,7 @@
 #include "classfile/classLoaderData.hpp"
 #include "classfile/javaClasses.hpp"
 #include "classfile/metadataOnStackMark.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "interpreter/linkResolver.hpp"
--- a/hotspot/src/share/vm/opto/block.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/block.cpp	Fri May 16 14:35:37 2014 -0700
@@ -1268,7 +1268,6 @@
 }
 
 void UnionFind::reset( uint max ) {
-  assert( max <= max_uint, "Must fit within uint" );
   // Force the Union-Find mapping to be at least this large
   extend(max,0);
   // Initialize to be the ID mapping.
--- a/hotspot/src/share/vm/opto/chaitin.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/chaitin.hpp	Fri May 16 14:35:37 2014 -0700
@@ -26,7 +26,6 @@
 #define SHARE_VM_OPTO_CHAITIN_HPP
 
 #include "code/vmreg.hpp"
-#include "libadt/port.hpp"
 #include "memory/resourceArea.hpp"
 #include "opto/connode.hpp"
 #include "opto/live.hpp"
@@ -142,7 +141,7 @@
 
   // Number of registers this live range uses when it colors
 private:
-  uint8 _num_regs;              // 2 for Longs and Doubles, 1 for all else
+  uint8_t _num_regs;            // 2 for Longs and Doubles, 1 for all else
                                 // except _num_regs is kill count for fat_proj
 public:
   int num_regs() const { return _num_regs; }
@@ -151,7 +150,7 @@
 private:
   // Number of physical registers this live range uses when it colors
   // Architecture and register-set dependent
-  uint8 _reg_pressure;
+  uint8_t _reg_pressure;
 public:
   void set_reg_pressure(int i)  { _reg_pressure = i; }
   int      reg_pressure() const { return _reg_pressure; }
--- a/hotspot/src/share/vm/opto/compile.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/compile.hpp	Fri May 16 14:35:37 2014 -0700
@@ -32,7 +32,6 @@
 #include "compiler/compilerOracle.hpp"
 #include "compiler/compileBroker.hpp"
 #include "libadt/dict.hpp"
-#include "libadt/port.hpp"
 #include "libadt/vectset.hpp"
 #include "memory/resourceArea.hpp"
 #include "opto/idealGraphPrinter.hpp"
--- a/hotspot/src/share/vm/opto/divnode.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/divnode.cpp	Fri May 16 14:35:37 2014 -0700
@@ -514,7 +514,7 @@
   int widen = MAX2(i1->_widen, i2->_widen);
 
   if( i2->is_con() && i2->get_con() != 0 ) {
-    int32 d = i2->get_con(); // Divisor
+    int32_t d = i2->get_con(); // Divisor
     jint lo, hi;
     if( d >= 0 ) {
       lo = i1->_lo/d;
@@ -536,7 +536,7 @@
 
   // If the dividend is a constant
   if( i1->is_con() ) {
-    int32 d = i1->get_con();
+    int32_t d = i1->get_con();
     if( d < 0 ) {
       if( d == min_jint ) {
         //  (-min_jint) == min_jint == (min_jint / -1)
--- a/hotspot/src/share/vm/opto/domgraph.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/domgraph.cpp	Fri May 16 14:35:37 2014 -0700
@@ -397,8 +397,9 @@
     ntarjan[i]._control = NULL;
 
   // Store the DFS order for the main loop
+  const uint fill_value = max_juint;
   uint *dfsorder = NEW_RESOURCE_ARRAY(uint,C->unique()+1);
-  memset(dfsorder, max_uint, (C->unique()+1) * sizeof(uint));
+  memset(dfsorder, fill_value, (C->unique()+1) * sizeof(uint));
 
   // Tarjan's algorithm, almost verbatim:
   // Step 1:
@@ -419,7 +420,7 @@
       if( whead->in(j) == NULL || !whead->in(j)->is_CFG() )
         continue;                            // Only process control nodes
       uint b = dfsorder[whead->in(j)->_idx];
-      if(b == max_uint) continue;
+      if(b == fill_value) continue;
       NTarjan *vx = &ntarjan[b];
       NTarjan *u = vx->EVAL();
       if( u->_semi < w->_semi )
--- a/hotspot/src/share/vm/opto/indexSet.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/indexSet.cpp	Fri May 16 14:35:37 2014 -0700
@@ -51,7 +51,7 @@
 #endif
 
 // What is the first set bit in a 5 bit integer?
-const byte IndexSetIterator::_first_bit[32] = {
+const uint8_t IndexSetIterator::_first_bit[32] = {
   0, 0, 1, 0,
   2, 0, 1, 0,
   3, 0, 1, 0,
@@ -63,7 +63,7 @@
 };
 
 // What is the second set bit in a 5 bit integer?
-const byte IndexSetIterator::_second_bit[32] = {
+const uint8_t IndexSetIterator::_second_bit[32] = {
   5, 5, 5, 1,
   5, 2, 2, 1,
   5, 3, 3, 1,
@@ -298,7 +298,7 @@
       set_block(i, &_empty_block);
     } else {
       BitBlock *new_block = alloc_block();
-      memcpy(new_block->words(), block->words(), sizeof(uint32) * words_per_block);
+      memcpy(new_block->words(), block->words(), sizeof(uint32_t) * words_per_block);
       set_block(i, new_block);
     }
   }
--- a/hotspot/src/share/vm/opto/indexSet.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/indexSet.hpp	Fri May 16 14:35:37 2014 -0700
@@ -106,12 +106,12 @@
     // is used by IndexSet to mainting this free list.
 
     union {
-      uint32 _words[words_per_block];
+      uint32_t _words[words_per_block];
       BitBlock *_next;
     } _data;
 
     // accessors
-    uint32 *words() { return _data._words; }
+    uint32_t* words() { return _data._words; }
     void set_next(BitBlock *next) { _data._next = next; }
     BitBlock *next() { return _data._next; }
 
@@ -120,22 +120,22 @@
     // not assume that the block index has been masked out.
 
     void clear() {
-      memset(words(), 0, sizeof(uint32) * words_per_block);
+      memset(words(), 0, sizeof(uint32_t) * words_per_block);
     }
 
     bool member(uint element) {
       uint word_index = IndexSet::get_word_index(element);
       uint bit_index = IndexSet::get_bit_index(element);
 
-      return ((words()[word_index] & (uint32)(0x1 << bit_index)) != 0);
+      return ((words()[word_index] & (uint32_t)(0x1 << bit_index)) != 0);
     }
 
     bool insert(uint element) {
       uint word_index = IndexSet::get_word_index(element);
       uint bit_index = IndexSet::get_bit_index(element);
 
-      uint32 bit = (0x1 << bit_index);
-      uint32 before = words()[word_index];
+      uint32_t bit = (0x1 << bit_index);
+      uint32_t before = words()[word_index];
       words()[word_index] = before | bit;
       return ((before & bit) != 0);
     }
@@ -144,8 +144,8 @@
       uint word_index = IndexSet::get_word_index(element);
       uint bit_index = IndexSet::get_bit_index(element);
 
-      uint32 bit = (0x1 << bit_index);
-      uint32 before = words()[word_index];
+      uint32_t bit = (0x1 << bit_index);
+      uint32_t before = words()[word_index];
       words()[word_index] = before & ~bit;
       return ((before & bit) != 0);
     }
@@ -404,14 +404,14 @@
          table_size  = (1 << window_size) };
 
   // For an integer of length window_size, what is the first set bit?
-  static const byte _first_bit[table_size];
+  static const uint8_t _first_bit[table_size];
 
   // For an integer of length window_size, what is the second set bit?
-  static const byte _second_bit[table_size];
+  static const uint8_t _second_bit[table_size];
 
  private:
   // The current word we are inspecting
-  uint32                _current;
+  uint32_t              _current;
 
   // What element number are we currently on?
   uint                  _value;
@@ -420,7 +420,7 @@
   uint                  _next_word;
 
   // A pointer to the contents of the current block
-  uint32               *_words;
+  uint32_t             *_words;
 
   // The index of the next block we will inspect
   uint                  _next_block;
--- a/hotspot/src/share/vm/opto/live.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/live.hpp	Fri May 16 14:35:37 2014 -0700
@@ -25,7 +25,6 @@
 #ifndef SHARE_VM_OPTO_LIVE_HPP
 #define SHARE_VM_OPTO_LIVE_HPP
 
-#include "libadt/port.hpp"
 #include "libadt/vectset.hpp"
 #include "opto/block.hpp"
 #include "opto/indexSet.hpp"
--- a/hotspot/src/share/vm/opto/loopnode.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/loopnode.hpp	Fri May 16 14:35:37 2014 -0700
@@ -339,11 +339,11 @@
 
   Node_List _body;              // Loop body for inner loops
 
-  uint8 _nest;                  // Nesting depth
-  uint8 _irreducible:1,         // True if irreducible
-        _has_call:1,            // True if has call safepoint
-        _has_sfpt:1,            // True if has non-call safepoint
-        _rce_candidate:1;       // True if candidate for range check elimination
+  uint8_t _nest;                // Nesting depth
+  uint8_t _irreducible:1,       // True if irreducible
+          _has_call:1,          // True if has call safepoint
+          _has_sfpt:1,          // True if has non-call safepoint
+          _rce_candidate:1;     // True if candidate for range check elimination
 
   Node_List* _safepts;          // List of safepoints in this loop
   Node_List* _required_safept;  // A inner loop cannot delete these safepts;
--- a/hotspot/src/share/vm/opto/mulnode.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/mulnode.cpp	Fri May 16 14:35:37 2014 -0700
@@ -235,23 +235,23 @@
   const TypeInt *r1 = t1->is_int();
 
   // Fetch endpoints of all ranges
-  int32 lo0 = r0->_lo;
+  int32_t lo0 = r0->_lo;
   double a = (double)lo0;
-  int32 hi0 = r0->_hi;
+  int32_t hi0 = r0->_hi;
   double b = (double)hi0;
-  int32 lo1 = r1->_lo;
+  int32_t lo1 = r1->_lo;
   double c = (double)lo1;
-  int32 hi1 = r1->_hi;
+  int32_t hi1 = r1->_hi;
   double d = (double)hi1;
 
   // Compute all endpoints & check for overflow
-  int32 A = lo0*lo1;
+  int32_t A = lo0*lo1;
   if( (double)A != a*c ) return TypeInt::INT; // Overflow?
-  int32 B = lo0*hi1;
+  int32_t B = lo0*hi1;
   if( (double)B != a*d ) return TypeInt::INT; // Overflow?
-  int32 C = hi0*lo1;
+  int32_t C = hi0*lo1;
   if( (double)C != b*c ) return TypeInt::INT; // Overflow?
-  int32 D = hi0*hi1;
+  int32_t D = hi0*hi1;
   if( (double)D != b*d ) return TypeInt::INT; // Overflow?
 
   if( A < B ) { lo0 = A; hi0 = B; } // Sort range endpoints
@@ -1228,12 +1228,12 @@
   //
   //   const TypeInstPtr *o = t1->is_instptr();
   //   if( t1->singleton() )
-  //     return TypeInt::make( ((uint32)o->const_oop() + o->_offset) >> shift );
+  //     return TypeInt::make( ((uint32_t)o->const_oop() + o->_offset) >> shift );
   // }
   // else if( t1->base() == Type::KlassPtr ) {
   //   const TypeKlassPtr *o = t1->is_klassptr();
   //   if( t1->singleton() )
-  //     return TypeInt::make( ((uint32)o->const_oop() + o->_offset) >> shift );
+  //     return TypeInt::make( ((uint32_t)o->const_oop() + o->_offset) >> shift );
   // }
 
   return TypeInt::INT;
--- a/hotspot/src/share/vm/opto/node.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/node.hpp	Fri May 16 14:35:37 2014 -0700
@@ -25,7 +25,6 @@
 #ifndef SHARE_VM_OPTO_NODE_HPP
 #define SHARE_VM_OPTO_NODE_HPP
 
-#include "libadt/port.hpp"
 #include "libadt/vectset.hpp"
 #include "opto/compile.hpp"
 #include "opto/type.hpp"
--- a/hotspot/src/share/vm/opto/output.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/output.cpp	Fri May 16 14:35:37 2014 -0700
@@ -366,8 +366,8 @@
   // third inserts nops where needed.
 
   // Step one, perform a pessimistic sizing pass.
-  uint last_call_adr = max_uint;
-  uint last_avoid_back_to_back_adr = max_uint;
+  uint last_call_adr = max_juint;
+  uint last_avoid_back_to_back_adr = max_juint;
   uint nop_size = (new (this) MachNopNode())->size(_regalloc);
   for (uint i = 0; i < nblocks; i++) { // For all blocks
     Block* block = _cfg->get_block(i);
@@ -479,7 +479,7 @@
 
   // Step two, replace eligible long jumps.
   bool progress = true;
-  uint last_may_be_short_branch_adr = max_uint;
+  uint last_may_be_short_branch_adr = max_juint;
   while (has_short_branch_candidate && progress) {
     progress = false;
     has_short_branch_candidate = false;
--- a/hotspot/src/share/vm/opto/parse2.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/parse2.cpp	Fri May 16 14:35:37 2014 -0700
@@ -405,9 +405,9 @@
 
   bool needs_guard = false;
   int default_dest;
-  int64 total_outlier_size = 0;
-  int64 hi_size = ((int64)hi->hi()) - ((int64)hi->lo()) + 1;
-  int64 lo_size = ((int64)lo->hi()) - ((int64)lo->lo()) + 1;
+  int64_t total_outlier_size = 0;
+  int64_t hi_size = ((int64_t)hi->hi()) - ((int64_t)hi->lo()) + 1;
+  int64_t lo_size = ((int64_t)lo->hi()) - ((int64_t)lo->lo()) + 1;
 
   if (lo->dest() == hi->dest()) {
     total_outlier_size = hi_size + lo_size;
@@ -429,7 +429,7 @@
   }
 
   // Find the total number of cases and ranges
-  int64 num_cases = ((int64)hi->hi()) - ((int64)lo->lo()) + 1;
+  int64_t num_cases = ((int64_t)hi->hi()) - ((int64_t)lo->lo()) + 1;
   int num_range = hi - lo + 1;
 
   // Don't create table if: too large, too small, or too sparse.
@@ -473,7 +473,7 @@
   // These are the switch destinations hanging off the jumpnode
   int i = 0;
   for (SwitchRange* r = lo; r <= hi; r++) {
-    for (int64 j = r->lo(); j <= r->hi(); j++, i++) {
+    for (int64_t j = r->lo(); j <= r->hi(); j++, i++) {
       Node* input = _gvn.transform(new (C) JumpProjNode(jtn, i, r->dest(), (int)(j - lowval)));
       {
         PreserveJVMState pjvms(this);
--- a/hotspot/src/share/vm/opto/phase.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/phase.hpp	Fri May 16 14:35:37 2014 -0700
@@ -25,7 +25,6 @@
 #ifndef SHARE_VM_OPTO_PHASE_HPP
 #define SHARE_VM_OPTO_PHASE_HPP
 
-#include "libadt/port.hpp"
 #include "runtime/timer.hpp"
 
 class Compile;
--- a/hotspot/src/share/vm/opto/regmask.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/regmask.cpp	Fri May 16 14:35:37 2014 -0700
@@ -51,7 +51,7 @@
 
 //-------------Non-zero bit search methods used by RegMask---------------------
 // Find lowest 1, or return 32 if empty
-int find_lowest_bit( uint32 mask ) {
+int find_lowest_bit( uint32_t mask ) {
   int n = 0;
   if( (mask & 0xffff) == 0 ) {
     mask >>= 16;
@@ -80,7 +80,7 @@
 }
 
 // Find highest 1, or return 32 if empty
-int find_hihghest_bit( uint32 mask ) {
+int find_hihghest_bit( uint32_t mask ) {
   int n = 0;
   if( mask > 0xffff ) {
     mask >>= 16;
@@ -395,7 +395,7 @@
 //------------------------------Size-------------------------------------------
 // Compute size of register mask in bits
 uint RegMask::Size() const {
-  extern uint8 bitsInByte[256];
+  extern uint8_t bitsInByte[256];
   uint sum = 0;
   for( int i = 0; i < RM_SIZE; i++ )
     sum +=
--- a/hotspot/src/share/vm/opto/regmask.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/regmask.hpp	Fri May 16 14:35:37 2014 -0700
@@ -26,7 +26,6 @@
 #define SHARE_VM_OPTO_REGMASK_HPP
 
 #include "code/vmreg.hpp"
-#include "libadt/port.hpp"
 #include "opto/optoreg.hpp"
 #ifdef TARGET_ARCH_MODEL_x86_32
 # include "adfiles/adGlobals_x86_32.hpp"
@@ -68,9 +67,9 @@
 
 //-------------Non-zero bit search methods used by RegMask---------------------
 // Find lowest 1, or return 32 if empty
-int find_lowest_bit( uint32 mask );
+int find_lowest_bit( uint32_t mask );
 // Find highest 1, or return 32 if empty
-int find_hihghest_bit( uint32 mask );
+int find_hihghest_bit( uint32_t mask );
 
 //------------------------------RegMask----------------------------------------
 // The ADL file describes how to print the machine-specific registers, as well
--- a/hotspot/src/share/vm/opto/runtime.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/runtime.cpp	Fri May 16 14:35:37 2014 -0700
@@ -960,7 +960,7 @@
   } else {
     // Receiver did not match any saved receiver and there is no empty row for it.
     // Increment total counter to indicate polymorphic case.
-    intptr_t* count_p = (intptr_t*)(((byte*)(data)) + in_bytes(CounterData::count_offset()));
+    intptr_t* count_p = (intptr_t*)(((uint8_t*)(data)) + in_bytes(CounterData::count_offset()));
     *count_p += DataLayout::counter_increment;
   }
 JRT_END
--- a/hotspot/src/share/vm/opto/subnode.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/subnode.cpp	Fri May 16 14:35:37 2014 -0700
@@ -242,8 +242,8 @@
 const Type *SubINode::sub( const Type *t1, const Type *t2 ) const {
   const TypeInt *r0 = t1->is_int(); // Handy access
   const TypeInt *r1 = t2->is_int();
-  int32 lo = r0->_lo - r1->_hi;
-  int32 hi = r0->_hi - r1->_lo;
+  int32_t lo = r0->_lo - r1->_hi;
+  int32_t hi = r0->_hi - r1->_lo;
 
   // We next check for 32-bit overflow.
   // If that happens, we just assume all integers are possible.
--- a/hotspot/src/share/vm/opto/type.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/opto/type.hpp	Fri May 16 14:35:37 2014 -0700
@@ -25,7 +25,6 @@
 #ifndef SHARE_VM_OPTO_TYPE_HPP
 #define SHARE_VM_OPTO_TYPE_HPP
 
-#include "libadt/port.hpp"
 #include "opto/adlcVMDeps.hpp"
 #include "runtime/handles.hpp"
 
--- a/hotspot/src/share/vm/precompiled/precompiled.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/precompiled/precompiled.hpp	Fri May 16 14:35:37 2014 -0700
@@ -247,7 +247,6 @@
 # include "utilities/yieldingWorkgroup.hpp"
 #ifdef COMPILER2
 # include "libadt/dict.hpp"
-# include "libadt/port.hpp"
 # include "libadt/set.hpp"
 # include "libadt/vectset.hpp"
 # include "opto/addnode.hpp"
--- a/hotspot/src/share/vm/prims/jvm.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Fri May 16 14:35:37 2014 -0700
@@ -26,7 +26,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/javaAssertions.hpp"
 #include "classfile/javaClasses.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "gc_interface/collectedHeap.inline.hpp"
--- a/hotspot/src/share/vm/prims/methodHandles.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp	Fri May 16 14:35:37 2014 -0700
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "compiler/compileBroker.hpp"
 #include "interpreter/interpreter.hpp"
 #include "interpreter/oopMapCache.hpp"
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Fri May 16 14:35:37 2014 -0700
@@ -27,7 +27,7 @@
 #include "memory/universe.hpp"
 #include "oops/oop.inline.hpp"
 
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/classLoaderData.hpp"
 
 #include "prims/whitebox.hpp"
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Fri May 16 14:35:37 2014 -0700
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/javaAssertions.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/symbolTable.hpp"
 #include "compiler/compilerOracle.hpp"
 #include "memory/allocation.inline.hpp"
--- a/hotspot/src/share/vm/runtime/globals.hpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Fri May 16 14:35:37 2014 -0700
@@ -524,13 +524,6 @@
   product_pd(bool, UseMembar,                                               \
           "(Unstable) Issues membars on thread state transitions")          \
                                                                             \
-  /* Temp PPC Flag to allow disabling the use of lwsync on ppc platforms    \
-   * that don't support it.  This will be replaced by processor detection   \
-   * logic.                                                                 \
-   */                                                                       \
-  product(bool, UsePPCLWSYNC, true,                                         \
-          "Use lwsync instruction if true, else use slower sync")           \
-                                                                            \
   develop(bool, CleanChunkPoolAsync, falseInEmbedded,                       \
           "Clean the chunk pool asynchronously")                            \
                                                                             \
--- a/hotspot/src/share/vm/runtime/init.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/runtime/init.cpp	Fri May 16 14:35:37 2014 -0700
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "code/icBuffer.hpp"
 #include "gc_interface/collectedHeap.hpp"
 #include "interpreter/bytecodes.hpp"
--- a/hotspot/src/share/vm/runtime/java.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/runtime/java.cpp	Fri May 16 14:35:37 2014 -0700
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/classLoader.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
 #include "compiler/compileBroker.hpp"
--- a/hotspot/src/share/vm/runtime/reflection.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/runtime/reflection.cpp	Fri May 16 14:35:37 2014 -0700
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/javaClasses.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/verifier.hpp"
 #include "classfile/vmSymbols.hpp"
--- a/hotspot/src/share/vm/runtime/safepoint.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp	Fri May 16 14:35:37 2014 -0700
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "classfile/symbolTable.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Fri May 16 14:35:37 2014 -0700
@@ -27,6 +27,7 @@
 #include "classfile/javaClasses.hpp"
 #include "classfile/loaderConstraints.hpp"
 #include "classfile/placeholders.hpp"
+#include "classfile/stringTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "ci/ciField.hpp"
 #include "ci/ciInstance.hpp"
--- a/hotspot/src/share/vm/utilities/hashtable.cpp	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/src/share/vm/utilities/hashtable.cpp	Fri May 16 14:35:37 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/altHashing.hpp"
 #include "classfile/javaClasses.hpp"
+#include "classfile/stringTable.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
 #include "memory/resourceArea.hpp"
--- a/hotspot/test/Makefile	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/test/Makefile	Fri May 16 14:35:37 2014 -0700
@@ -147,6 +147,11 @@
 all: jtreg_tests
 	@$(ECHO) "Testing completed successfully"
 
+# Support "hotspot_" prefixed test make targets too
+# The hotspot_% targets are for example invoked by the top level Makefile
+hotspot_%:
+	$(MAKE) $*
+
 # Prep for output
 prep: clean
 	@$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
--- a/hotspot/test/TEST.groups	Thu May 15 10:37:52 2014 -0700
+++ b/hotspot/test/TEST.groups	Fri May 16 14:35:37 2014 -0700
@@ -66,7 +66,6 @@
   gc/metaspace/TestMetaspacePerfCounters.java \
   gc/metaspace/TestPerfCountersAndMemoryPools.java \
   runtime/6819213/TestBootNativeLibraryPath.java \
-  runtime/6925573/SortMethodsTest.java \
   runtime/7158988/FieldMonitor.java \
   runtime/7194254/Test7194254.java \
   runtime/Metaspace/FragmentMetaspace.java \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/duplAttributes/DuplAttributes.jcod	Fri May 16 14:35:37 2014 -0700
@@ -0,0 +1,1310 @@
+/*
+ * 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.
+ */
+
+
+/*
+ * This file contains ten different sub-tests.  Each sub-test consists of a
+ * class with a different case of an invalid duplicate attribute.  The main
+ * test runs each of these tests individually.  If any of them fail then the
+ * whole test fails.
+ */
+
+
+
+/*
+ * This test contains a class with invalid duplicate AnnotationDefault attributes.
+ */
+class AnnotationDefaultDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #11; // #1
+    class #12; // #2
+    class #13; // #3
+    Utf8 "<init>"; // #4
+    Utf8 "()V"; // #5
+    Utf8 "Code"; // #6
+    Utf8 "Signature"; // #7
+    Utf8 "<T:Ljava/lang/Object;>Ljava/lang/Object;"; // #8
+    Utf8 "AnnotationDefault"; // #9
+    Utf8 "LAnnotationDefaultI;"; // #10
+    NameAndType #4 #5; // #11
+    Utf8 "AnnotationDefaultDup"; // #12
+    Utf8 "java/lang/Object"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #14 #15; // #16
+    class #19; // #17
+    Method #17 #16; // #18
+    Utf8 "AnnotationDefaultDupChecker"; // #19
+  } // Constant Pool
+
+  0x0021; // access
+  #2;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #4; // name_cpx
+      #5; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+        ;
+
+        Attr(#9) { // AnnotationDefault
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end AnnotationDefault
+    // wrong:
+        ;
+        Attr(#9) { // AnnotationDefault
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end AnnotationDefault
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80012AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+    Attr(#7) { // Signature
+      #8;
+    } // end Signature
+    ;
+    Attr(#9) { // AnnotationDefault
+      [] { // type annotations
+        { // type annotation
+          0x00;  // target_type
+          0x00;  // type_parameter_index
+          []b { //  type_path
+          }
+
+          #10; // type_index
+          [] { // element_value_pairs
+          } // element_value_pairs
+        } // type annotation
+      } // type annotations
+    } // end AnnotationDefault
+  } // Attributes
+
+} // end class
+
+
+
+/*
+ * This test contains a class with invalid duplicate RuntimeInvisibleAnnotations
+ * attributes.
+ */
+class ClassInvisAnnotsDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #11; // #1
+    class #12; // #2
+    class #13; // #3
+    Utf8 "<init>"; // #4
+    Utf8 "()V"; // #5
+    Utf8 "Code"; // #6
+    Utf8 "Signature"; // #7
+    Utf8 "<T:Ljava/lang/Object;>Ljava/lang/Object;"; // #8
+    Utf8 "RuntimeInvisibleAnnotations"; // #9
+    Utf8 "LClassInvisAnnotsI;"; // #10
+    NameAndType #4 #5; // #11
+    Utf8 "ClassInvisAnnotsDup"; // #12
+    Utf8 "java/lang/Object"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #14 #15; // #16
+    class #19; // #17
+    Method #17 #16; // #18
+    Utf8 "ClassInvisAnnotsDupChecker"; // #19
+  } // Constant Pool
+
+  0x0021; // access
+  #2;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #4; // name_cpx
+      #5; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80012AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+    Attr(#7) { // Signature
+      #8;
+    } // end Signature
+    ;
+    Attr(#9) { // RuntimeInvisibleAnnotations
+      [] { // type annotations
+        { // type annotation
+          0x00;  // target_type
+          0x00;  // type_parameter_index
+          []b { //  type_path
+          }
+
+          #10; // type_index
+          [] { // element_value_pairs
+          } // element_value_pairs
+        } // type annotation
+      } // type annotations
+    } // end RuntimeInvisibleAnnotations
+// wrong:
+    ;
+    Attr(#9) { // RuntimeInvisibleAnnotations
+      [] { // type annotations
+        { // type annotation
+          0x00;  // target_type
+          0x00;  // type_parameter_index
+          []b { //  type_path
+          }
+
+          #10; // type_index
+          [] { // element_value_pairs
+          } // element_value_pairs
+        } // type annotation
+      } // type annotations
+    } // end RuntimeInvisibleAnnotations
+// end wrong
+  } // Attributes
+
+} // end class
+
+
+
+/*
+ * This test contains a class with invalid duplicate RuntimeVisibleAnnotations
+ * attributes.
+ */
+class ClassVisAnnotsDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #11; // #1
+    class #12; // #2
+    class #13; // #3
+    Utf8 "<init>"; // #4
+    Utf8 "()V"; // #5
+    Utf8 "Code"; // #6
+    Utf8 "Signature"; // #7
+    Utf8 "<T:Ljava/lang/Object;>Ljava/lang/Object;"; // #8
+    Utf8 "RuntimeVisibleAnnotations"; // #9
+    Utf8 "LClassVisAnnotsI;"; // #10
+    NameAndType #4 #5; // #11
+    Utf8 "ClassVisAnnotsDup"; // #12
+    Utf8 "java/lang/Object"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #14 #15; // #16
+    class #19; // #17
+    Method #17 #16; // #18
+    Utf8 "ClassVisAnnotsDupChecker"; // #19
+  } // Constant Pool
+
+  0x0021; // access
+  #2;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #4; // name_cpx
+      #5; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80012AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+    Attr(#7) { // Signature
+      #8;
+    } // end Signature
+    ;
+    Attr(#9) { // RuntimeVisibleAnnotations
+      [] { // type annotations
+        { // type annotation
+          0x00;  // target_type
+          0x00;  // type_parameter_index
+          []b { //  type_path
+          }
+
+          #10; // type_index
+          [] { // element_value_pairs
+          } // element_value_pairs
+        } // type annotation
+      } // type annotations
+    } // end RuntimeVisibleAnnotations
+// wrong:
+    ;
+    Attr(#9) { // RuntimeVisibleAnnotations
+      [] { // type annotations
+        { // type annotation
+          0x00;  // target_type
+          0x00;  // type_parameter_index
+          []b { //  type_path
+          }
+
+          #10; // type_index
+          [] { // element_value_pairs
+          } // element_value_pairs
+        } // type annotation
+      } // type annotations
+    } // end RuntimeVisibleAnnotations
+// end wrong
+  } // Attributes
+
+} // end class
+
+
+
+/*
+ * This test contains a field with invalid duplicate RuntimeInvisibleAnnotations
+ * attributes.
+ */
+class FieldInvisAnnotsDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #4 #16; // #1
+    Method #17 #18; // #2
+    class #19; // #3
+    class #20; // #4
+    Utf8 "fld"; // #5
+    Utf8 "Ljava/util/ArrayList;"; // #6
+    Utf8 "Signature"; // #7
+    Utf8 "Ljava/util/ArrayList<Ljava/lang/Object;>;"; // #8
+    Utf8 "RuntimeInvisibleAnnotations"; // #9
+    Utf8 "LFieldInvisAnnotsI;"; // #10
+    Utf8 "<init>"; // #11
+    Utf8 "()V"; // #12
+    Utf8 "Code"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #11 #12; // #16
+    class #21; // #17
+    NameAndType #14 #15; // #18
+    Utf8 "FieldInvisAnnotsDup"; // #19
+    Utf8 "java/lang/Object"; // #20
+    Utf8 "FieldInvisAnnotsDupChecker"; // #21
+  } // Constant Pool
+
+  0x0021; // access
+  #3;// this_cpx
+  #4;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+    { // Member
+      0x0001; // access
+      #5; // name_cpx
+      #6; // sig_cpx
+      [] { // Attributes
+        Attr(#7) { // Signature
+          #8;
+        } // end Signature
+        ;
+        Attr(#9) { // RuntimeInvisibleAnnotations
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end RuntimeInvisibleAnnotations
+    // wrong:
+        ;
+        Attr(#9) { // RuntimeInvisibleAnnotations
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end RuntimeInvisibleAnnotations
+    // end wrong
+      } // Attributes
+    } // Member
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #11; // name_cpx
+      #12; // sig_cpx
+      [] { // Attributes
+        Attr(#13) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#13) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80002AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+  } // Attributes
+} // end class
+
+
+
+/*
+ * This test contains a field with invalid duplicate RuntimeVisibleAnnotations
+ * attributes.
+ */
+class FieldVisAnnotsDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #4 #16; // #1
+    Method #17 #18; // #2
+    class #19; // #3
+    class #20; // #4
+    Utf8 "fld"; // #5
+    Utf8 "Ljava/util/ArrayList;"; // #6
+    Utf8 "Signature"; // #7
+    Utf8 "Ljava/util/ArrayList<Ljava/lang/Object;>;"; // #8
+    Utf8 "RuntimeVisibleAnnotations"; // #9
+    Utf8 "LFieldVisAnnotsI;"; // #10
+    Utf8 "<init>"; // #11
+    Utf8 "()V"; // #12
+    Utf8 "Code"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #11 #12; // #16
+    class #21; // #17
+    NameAndType #14 #15; // #18
+    Utf8 "FieldVisAnnotsDup"; // #19
+    Utf8 "java/lang/Object"; // #20
+    Utf8 "FieldVisAnnotsDupChecker"; // #21
+  } // Constant Pool
+
+  0x0021; // access
+  #3;// this_cpx
+  #4;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+    { // Member
+      0x0001; // access
+      #5; // name_cpx
+      #6; // sig_cpx
+      [] { // Attributes
+        Attr(#7) { // Signature
+          #8;
+        } // end Signature
+        ;
+        Attr(#9) { // RuntimeVisibleAnnotations
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end RuntimeVisibleAnnotations
+    // wrong:
+        ;
+        Attr(#9) { // RuntimeVisibleAnnotations
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end RuntimeVisibleAnnotations
+    // end wrong
+      } // Attributes
+    } // Member
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #11; // name_cpx
+      #12; // sig_cpx
+      [] { // Attributes
+        Attr(#13) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#13) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80002AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+  } // Attributes
+} // end class
+
+
+
+/*
+ * This test contains a method with invalid duplicate RuntimeInvisibleAnnotations
+ * attributes.
+ */
+class MethInvisAnnotsDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #11; // #1
+    class #12; // #2
+    class #13; // #3
+    Utf8 "<init>"; // #4
+    Utf8 "()V"; // #5
+    Utf8 "Code"; // #6
+    Utf8 "Signature"; // #7
+    Utf8 "<T:Ljava/lang/Object;>Ljava/lang/Object;"; // #8
+    Utf8 "RuntimeInvisibleAnnotations"; // #9
+    Utf8 "LMethInvisAnnotsI;"; // #10
+    NameAndType #4 #5; // #11
+    Utf8 "MethInvisAnnotsDup"; // #12
+    Utf8 "java/lang/Object"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #14 #15; // #16
+    class #19; // #17
+    Method #17 #16; // #18
+    Utf8 "MethInvisAnnotsDupChecker"; // #19
+  } // Constant Pool
+
+  0x0021; // access
+  #2;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #4; // name_cpx
+      #5; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+        ;
+
+        Attr(#9) { // RuntimeInvisibleAnnotations
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end RuntimeInvisibleAnnotations
+    // wrong:
+        ;
+        Attr(#9) { // RuntimeInvisibleAnnotations
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end RuntimeInvisibleAnnotations
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80012AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+    Attr(#7) { // Signature
+      #8;
+    } // end Signature
+    ;
+    Attr(#9) { // RuntimeInvisibleAnnotations
+      [] { // type annotations
+        { // type annotation
+          0x00;  // target_type
+          0x00;  // type_parameter_index
+          []b { //  type_path
+          }
+
+          #10; // type_index
+          [] { // element_value_pairs
+          } // element_value_pairs
+        } // type annotation
+      } // type annotations
+    } // end RuntimeInvisibleAnnotations
+  } // Attributes
+
+} // end class
+
+
+
+/*
+ * This test contains a method with invalid duplicate
+ * RuntimeInvisibleParameterAnnotations attributes.
+ */
+class MethInvisParamAnnotsDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #4 #16; // #1
+    Method #17 #18; // #2
+    class #19; // #3
+    class #20; // #4
+    Utf8 "<init>"; // #5
+    Utf8 "()V"; // #6
+    Utf8 "Code"; // #7
+    Utf8 "m"; // #8
+    Utf8 "()I"; // #9
+    Utf8 "Signature"; // #10
+    Utf8 "<T:Ljava/lang/Object;>()I"; // #11
+    Utf8 "RuntimeInvisibleParameterAnnotations"; // #12
+    Utf8 "LMethInvisParamAnnotsI;"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #5 #6; // #16
+    class #21; // #17
+    NameAndType #14 #15; // #18
+    Utf8 "MethInvisParamAnnotsDup"; // #19
+    Utf8 "java/lang/Object"; // #20
+    Utf8 "MethInvisParamAnnotsDupChecker"; // #21
+  } // Constant Pool
+
+  0x0021; // access
+  #3;// this_cpx
+  #4;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #5; // name_cpx
+      #6; // sig_cpx
+      [] { // Attributes
+        Attr(#7) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0001; // access
+      #8; // name_cpx
+      #9; // sig_cpx
+      [] { // Attributes
+        Attr(#7) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x03AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+        ;
+        Attr(#10) { // Signature
+          #11;
+        } // end Signature
+        ;
+        Attr(#12) { // RuntimeInvisibleParameterAnnotations
+          0x0001010000000D00;
+          0x00;
+        } // end RuntimeInvisibleParameterAnnotations
+// wrong:
+        ;
+        Attr(#12) { // RuntimeInvisibleParameterAnnotations
+          0x0001010000000D00;
+          0x00;
+        } // end RuntimeInvisibleParameterAnnotations
+// end wrong
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#7) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80002AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+  } // Attributes
+} // end class
+
+
+
+/*
+ * This test contains a method with invalid duplicate RuntimeVisibleAnnotations
+ * attributes.
+ */
+class MethVisAnnotsDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #11; // #1
+    class #12; // #2
+    class #13; // #3
+    Utf8 "<init>"; // #4
+    Utf8 "()V"; // #5
+    Utf8 "Code"; // #6
+    Utf8 "Signature"; // #7
+    Utf8 "<T:Ljava/lang/Object;>Ljava/lang/Object;"; // #8
+    Utf8 "RuntimeVisibleAnnotations"; // #9
+    Utf8 "LMethodVisAnnotsDupI;"; // #10
+    NameAndType #4 #5; // #11
+    Utf8 "MethVisAnnotsDup"; // #12
+    Utf8 "java/lang/Object"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #14 #15; // #16
+    class #19; // #17
+    Method #17 #16; // #18
+    Utf8 "MethVisAnnotsDupChecker"; // #19
+  } // Constant Pool
+
+  0x0021; // access
+  #2;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #4; // name_cpx
+      #5; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+        ;
+
+        Attr(#9) { // RuntimeVisibleAnnotations
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end RuntimeVisibleAnnotations
+    // wrong:
+        ;
+        Attr(#9) { // RuntimeVisibleAnnotations
+          [] { // type annotations
+            { // type annotation
+              0x00;  // target_type
+              0x00;  // type_parameter_index
+              []b { //  type_path
+              }
+
+              #10; // type_index
+              [] { // element_value_pairs
+              } // element_value_pairs
+            } // type annotation
+          } // type annotations
+        } // end RuntimeVisibleAnnotations
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80012AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+    Attr(#7) { // Signature
+      #8;
+    } // end Signature
+    ;
+    Attr(#9) { // RuntimeVisibleAnnotations
+      [] { // type annotations
+        { // type annotation
+          0x00;  // target_type
+          0x00;  // type_parameter_index
+          []b { //  type_path
+          }
+
+          #10; // type_index
+          [] { // element_value_pairs
+          } // element_value_pairs
+        } // type annotation
+      } // type annotations
+    } // end RuntimeVisibleAnnotations
+  } // Attributes
+
+} // end class
+
+
+
+/*
+ * This test contains a method with invalid duplicate
+ * RuntimeVisibleParameterAnnotations attributes.
+ */
+class MethVisParamAnnotsDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #4 #16; // #1
+    Method #17 #18; // #2
+    class #19; // #3
+    class #20; // #4
+    Utf8 "<init>"; // #5
+    Utf8 "()V"; // #6
+    Utf8 "Code"; // #7
+    Utf8 "m"; // #8
+    Utf8 "()I"; // #9
+    Utf8 "Signature"; // #10
+    Utf8 "<T:Ljava/lang/Object;>()I"; // #11
+    Utf8 "RuntimeVisibleParameterAnnotations"; // #12
+    Utf8 "LMethVisParamAnnotsI;"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #5 #6; // #16
+    class #21; // #17
+    NameAndType #14 #15; // #18
+    Utf8 "MethVisParamAnnotsDup"; // #19
+    Utf8 "java/lang/Object"; // #20
+    Utf8 "MethVisParamAnnotsDupChecker"; // #21
+  } // Constant Pool
+
+  0x0021; // access
+  #3;// this_cpx
+  #4;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #5; // name_cpx
+      #6; // sig_cpx
+      [] { // Attributes
+        Attr(#7) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0001; // access
+      #8; // name_cpx
+      #9; // sig_cpx
+      [] { // Attributes
+        Attr(#7) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x03AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+        ;
+        Attr(#10) { // Signature
+          #11;
+        } // end Signature
+        ;
+        Attr(#12) { // RuntimeVisibleParameterAnnotations
+          0x0001010000000D00;
+          0x00;
+        } // end RuntimeVisibleParameterAnnotations
+// wrong:
+        ;
+        Attr(#12) { // RuntimeVisibleParameterAnnotations
+          0x0001010000000D00;
+          0x00;
+        } // end RuntimeVisibleParameterAnnotations
+// end wrong
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#7) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80002AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+  } // Attributes
+} // end class
+
+
+
+/*
+ * This test contains a method with invalid duplicate SourceDebugExtension
+ * attributes.
+ */
+class SrcDbgExtDup {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #11; // #1
+    class #12; // #2
+    class #13; // #3
+    Utf8 "<init>"; // #4
+    Utf8 "()V"; // #5
+    Utf8 "Code"; // #6
+    Utf8 "Signature"; // #7
+    Utf8 "<T:Ljava/lang/Object;>Ljava/lang/Object;"; // #8
+    Utf8 "SourceDebugExtension"; // #9
+    Utf8 "LSrcDbgExtDupI;"; // #10
+    NameAndType #4 #5; // #11
+    Utf8 "SrcDbgExtDup"; // #12
+    Utf8 "java/lang/Object"; // #13
+    Utf8 "run"; // #14
+    Utf8 "([Ljava/lang/String;Ljava/io/PrintStream;)I"; // #15
+    NameAndType #14 #15; // #16
+    class #19; // #17
+    Method #17 #16; // #18
+    Utf8 "SrcDbgExt_dupChecker"; // #19
+  } // Constant Pool
+
+  0x0021; // access
+  #2;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #4; // name_cpx
+      #5; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #14; // name_cpx
+      #15; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          2; // max_stack
+          2; // max_locals
+          Bytes[]{
+            0x2A2BB80012AC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+    Attr(#7) { // Signature
+      #8;
+    } // end Signature
+    ;
+    Attr(#9) { // SourceDebugExtension
+      [] { // debug_extensions
+        { // type debug_extension
+          []b { //  type_path
+          }
+        } // type debug_extension
+      } // type debug_extensions
+    } // end SourceDebugExtension
+// wrong:
+    ;
+    Attr(#9) { // SourceDebugExtension
+      [] { // debug_extensions
+        { // type debug_extension
+          []b { //  type_path
+          }
+        } // type debug_extension
+      } // type debug_extensions
+    } // end SourceDebugExtension
+// end wrong
+  } // Attributes
+
+} // end class
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/duplAttributes/DuplAttributesTest.java	Fri May 16 14:35:37 2014 -0700
@@ -0,0 +1,63 @@
+/*
+ * 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 8040292
+ * @library /testlibrary
+ * @summary Throw exceptions when duplicate attributes are detected.
+ * @run main DuplAttributesTest
+ */
+
+import java.io.File;
+import com.oracle.java.testlibrary.*;
+
+public class DuplAttributesTest {
+
+    static final String testsrc = System.getProperty("test.src");
+
+    public static void runTest(String test, String result) throws Throwable {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+            "-cp", testsrc + File.separator + "test.jar", test);
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldContain("java.lang.ClassFormatError: Multiple " + result);
+    }
+
+    public static void main(String args[]) throws Throwable {
+        System.out.println("Regression test for bug 8040292");
+
+        runTest("ClassInvisAnnotsDup", "RuntimeInvisibleAnnotations");
+        runTest("ClassVisAnnotsDup", "RuntimeVisibleAnnotations");
+        runTest("SrcDbgExtDup", "SourceDebugExtension");
+
+        runTest("FieldInvisAnnotsDup", "RuntimeInvisibleAnnotations");
+        runTest("FieldVisAnnotsDup", "RuntimeVisibleAnnotations");
+
+        runTest("AnnotationDefaultDup", "AnnotationDefault");
+        runTest("MethInvisAnnotsDup", "RuntimeInvisibleAnnotations");
+        runTest("MethVisAnnotsDup", "RuntimeVisibleAnnotations");
+        runTest("MethInvisParamAnnotsDup", "RuntimeInvisibleParameterAnnotations");
+        runTest("MethVisParamAnnotsDup", "RuntimeVisibleParameterAnnotations");
+    }
+}
+
Binary file hotspot/test/runtime/duplAttributes/test.jar has changed
--- a/jaxp/.hgtags	Thu May 15 10:37:52 2014 -0700
+++ b/jaxp/.hgtags	Fri May 16 14:35:37 2014 -0700
@@ -255,3 +255,4 @@
 4ce98701efe3b28f6ce3ab23385445731e968af7 jdk9-b10
 6b4280dceb00642f54d5bc1c2cb7d34c99a04992 jdk9-b11
 e88cecf5a21b760ff7d7761c2db6bb8c82bc9f0c jdk9-b12
+5eaf717f6e36037a6d3744ffeee0e4c88e64a0d2 jdk9-b13
--- a/jaxws/.hgtags	Thu May 15 10:37:52 2014 -0700
+++ b/jaxws/.hgtags	Fri May 16 14:35:37 2014 -0700
@@ -258,3 +258,4 @@
 9af43f4d215f6f19b1767f6ac66da931b8ee9535 jdk9-b10
 1f953ba7db2b535e19f0354abfee6d67605e0684 jdk9-b11
 779f8b21c75f83e3918dac8499e4d0ecb3a54ed7 jdk9-b12
+3d42204854c9f703e3ccdc8891248e73057713ab jdk9-b13
--- a/jdk/.hgtags	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/.hgtags	Fri May 16 14:35:37 2014 -0700
@@ -255,3 +255,4 @@
 ab06ba2894313a47e4969ca37792ff119c49e711 jdk9-b10
 47feccd164b7187a0147693a922ee47c6629643c jdk9-b11
 83d9bc20973de232cae45b139fdff8a4549c130f jdk9-b12
+c7c8002d02721e02131d104549ebeb8b379fb8d2 jdk9-b13
--- a/jdk/make/CopyFiles.gmk	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/make/CopyFiles.gmk	Fri May 16 14:35:37 2014 -0700
@@ -367,8 +367,24 @@
 POLICY_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy
 POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
 
-$(POLICY_DST): $(POLICY_SRC)
-	$(call install-file)
+POLICY_SRC_LIST :=
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  POLICY_SRC_LIST += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/lib/security/java.policy
+endif
+ifndef OPENJDK
+  ifneq (, $(filter $(OPENJDK_TARGET_OS), windows solaris))
+    POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS)/lib/security/java.policy
+  endif
+endif
+
+POLICY_SRC_LIST += $(POLICY_SRC)
+
+$(POLICY_DST): $(POLICY_SRC_LIST)
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
+	$(MV) $@.tmp $@
 
 COPY_FILES += $(POLICY_DST)
 
--- a/jdk/make/data/tzdata/VERSION	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/make/data/tzdata/VERSION	Fri May 16 14:35:37 2014 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2014b
+tzdata2014c
--- a/jdk/make/data/tzdata/africa	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/make/data/tzdata/africa	Fri May 16 14:35:37 2014 -0700
@@ -358,11 +358,54 @@
 # http://www.worldtimezone.com/dst_news/dst_news_egypt02.html
 # </a>
 
+# From Ahmad El-Dardiry (2014-05-07):
+# Egypt is to change back to Daylight system on May 15
+# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx
+
+# From Gunther Vermier (2015-05-13):
+# our Egypt office confirms that the change will be at 15 May "midnight" (24:00)
+
+# From Paul Eggert (2014-05-13):
+# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says
+# the change is because of blackouts in Cairo, even though Ahram Online (cited
+# above) says DST had no affect on electricity consumption.  The AP story says
+# DST will not be observed during Ramadan.  There is no information about when
+# DST will end.  See:
+# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833
+#
+# For now, guess that later transitions will use 2010's rules, and that
+# Egypt will agree with Morocco (see below) about the date Ramadan starts and
+# ends, though (unlike Morocco) it will switch at 00:00 standard time.  In
+# Egypt the spring-forward transitions are removed for 2020-2022, when the
+# guessed spring-forward date falls during the estimated Ramadan, and all
+# transitions removed for 2023-2038, where the estimated Ramadan falls entirely
+# outside the guessed daylight-saving time.  Ramadan intrudes on the guessed
+# DST starting in 2039, but that's beyond our somewhat-arbitrary cutoff.
+
 Rule	Egypt	2008	only	-	Aug	lastThu	23:00s	0	-
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
 Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2014	only	-	May	15	24:00	1:00	S
+Rule	Egypt	2014	only	-	Jun	29	 0:00s	0	-
+Rule	Egypt	2014	only	-	Jul	29	 0:00s	1:00	S
+Rule	Egypt	2014	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2015	2019	-	Apr	lastFri	 0:00s	1:00	S
+Rule	Egypt	2015	only	-	Jun	18	 0:00s	0	-
+Rule	Egypt	2015	only	-	Jul	18	 0:00s	1:00	S
+Rule	Egypt	2016	only	-	Jun	 7	 0:00s	0	-
+Rule	Egypt	2016	only	-	Jul	 7	 0:00s	1:00	S
+Rule	Egypt	2017	only	-	May	27	 0:00s	0	-
+Rule	Egypt	2017	only	-	Jun	26	 0:00s	1:00	S
+Rule	Egypt	2018	only	-	May	16	 0:00s	0	-
+Rule	Egypt	2018	only	-	Jun	15	 0:00s	1:00	S
+Rule	Egypt	2019	only	-	May	 6	 0:00s	0	-
+Rule	Egypt	2019	only	-	Jun	 5	 0:00s	1:00	S
+Rule	Egypt	2020	only	-	May	24	 0:00s	1:00	S
+Rule	Egypt	2021	only	-	May	13	 0:00s	1:00	S
+Rule	Egypt	2022	only	-	May	 3	 0:00s	1:00	S
+Rule	Egypt	2023	max	-	Apr	lastFri	 0:00s	1:00	S
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:09 -	LMT	1900 Oct
--- a/jdk/make/data/tzdata/asia	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/make/data/tzdata/asia	Fri May 16 14:35:37 2014 -0700
@@ -1370,22 +1370,6 @@
 # "Jordan will switch to winter time on Friday, October 27".
 #
 
-# From Phil Pizzey (2009-04-02):
-# ...I think I may have spotted an error in the timezone data for
-# Jordan.
-# The current (2009d) asia file shows Jordan going to daylight
-# saving
-# time on the last Thursday in March.
-#
-# Rule  Jordan      2000  max	-  Mar   lastThu     0:00s 1:00  S
-#
-# However timeanddate.com, which I usually find reliable, shows Jordan
-# going to daylight saving time on the last Friday in March since 2002.
-# Please see
-# <a href="http://www.timeanddate.com/worldclock/timezone.html?n=11">
-# http://www.timeanddate.com/worldclock/timezone.html?n=11
-# </a>
-
 # From Steffen Thorsen (2009-04-02):
 # This single one might be good enough, (2009-03-24, Arabic):
 # <a href="http://petra.gov.jo/Artical.aspx?Lng=2&Section=8&Artical=95279">
--- a/jdk/make/data/tzdata/europe	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/make/data/tzdata/europe	Fri May 16 14:35:37 2014 -0700
@@ -2989,6 +2989,10 @@
 # From Alexander Krivenyshev (2014-03-17):
 # time change at 2:00 (2am) on March 30, 2014
 # http://vz.ru/news/2014/3/17/677464.html
+# From Paul Eggert (2014-03-30):
+# Simferopol and Sevastopol reportedly changed their central town clocks
+# late the previous day, but this appears to have been ceremonial
+# and the discrepancies are small enough to not worry about.
 			2:00	EU	EE%sT	2014 Mar 30 2:00
 			4:00	-	MSK
 
--- a/jdk/make/gensrc/GensrcMisc.gmk	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/make/gensrc/GensrcMisc.gmk	Fri May 16 14:35:37 2014 -0700
@@ -62,25 +62,6 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS_API), posix)
-  UPSUFFIX := $(OPENJDK_TARGET_OS)
-  ifeq ($(OPENJDK_TARGET_OS), macosx)
-    UPSUFFIX := bsd
-  endif
-  # UNIXProcess.java is different for solaris and linux. We need to copy
-  # the correct UNIXProcess.java over to $(JDK_OUTPUTDIR)/gensrc/java/lang/.
-
-  $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java: \
-      $(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
-	$(ECHO) $(LOG_INFO) Copying UNIXProcess.java.$(OPENJDK_TARGET_OS) to java/lang/UNIXProcess.java
-	$(call install-file)
-	$(CHMOD) u+rw $@
-
-  GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/java/lang/UNIXProcess.java
-endif
-
-##########################################################################################
-
 GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java
 
 GENSRC_SOR_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/ch
--- a/jdk/make/profile-rtjar-includes.txt	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/make/profile-rtjar-includes.txt	Fri May 16 14:35:37 2014 -0700
@@ -100,9 +100,7 @@
 
 PROFILE_2_RTJAR_EXCLUDE_TYPES :=
 
-PROFILE_2_INCLUDE_METAINF_SERVICES := \
-    META-INF/services/sun.util.spi.XmlPropertiesProvider
-
+PROFILE_2_INCLUDE_METAINF_SERVICES :=
 
 PROFILE_3_RTJAR_INCLUDE_PACKAGES := \
     com/sun/jmx \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/com/sun/tools/attach/AttachOperationFailedException.java	Fri May 16 14:35:37 2014 -0700
@@ -0,0 +1,54 @@
+/*
+ * 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.attach;
+
+import java.io.IOException;
+
+/**
+ * Exception type to signal that an attach operation failed in the target VM.
+ *
+ * <p> This exception can be thrown by the various operations of
+ * {@link com.sun.tools.attach.VirtualMachine} when the operation
+ * fails in the target VM. If there is a communication error,
+ * a regular IOException will be thrown.
+ *
+ * @since 1.9
+ */
+@jdk.Exported
+public class AttachOperationFailedException extends IOException {
+
+    private static final long serialVersionUID = 2140308168167478043L;
+
+    /**
+     * Constructs an <code>AttachOperationFailedException</code> with
+     * the specified detail message.
+     *
+     * @param   s   the detail message.
+     */
+    public AttachOperationFailedException(String message) {
+        super(message);
+    }
+}
--- a/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java	Fri May 16 14:35:37 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
@@ -564,8 +564,15 @@
      *
      * @return  The system properties
      *
+     * @throws  AttachOperationFailedException
+     *          If the target virtual machine is unable to complete the
+     *          attach operation. A more specific error message will be
+     *          given by {@link AttachOperationFailedException#getMessage()}.
+     *
      * @throws  IOException
-     *          If an I/O error occurs
+     *          If an I/O error occurs, a communication error for example,
+     *          that cannot be identified as an error to indicate that the
+     *          operation failed in the target VM.
      *
      * @see     java.lang.System#getProperties
      * @see     #loadAgentLibrary
@@ -591,8 +598,15 @@
      *
      * @return       The agent properties
      *
+     * @throws       AttachOperationFailedException
+     *               If the target virtual machine is unable to complete the
+     *               attach operation. A more specific error message will be
+     *               given by {@link AttachOperationFailedException#getMessage()}.
+     *
      * @throws       IOException
-     *               If an I/O error occurs
+     *               If an I/O error occurs, a communication error for example,
+     *               that cannot be identified as an error to indicate that the
+     *               operation failed in the target VM.
      */
     public abstract Properties getAgentProperties() throws IOException;
 
--- a/jdk/src/share/classes/java/lang/Character.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/Character.java	Fri May 16 14:35:37 2014 -0700
@@ -4498,7 +4498,6 @@
          * Character case is ignored for all of the valid script names.
          * The en_US locale's case mapping rules are used to provide
          * case-insensitive string comparisons for script name validation.
-         * <p>
          *
          * @param scriptName A {@code UnicodeScript} name.
          * @return The {@code UnicodeScript} constant identified
@@ -5503,7 +5502,7 @@
      * '&#92;u00D0' '&#92;u00D1' '&#92;u00D2' '&#92;u00D3' '&#92;u00D4' '&#92;u00D5' '&#92;u00D6' '&#92;u00D8'
      * '&#92;u00D9' '&#92;u00DA' '&#92;u00DB' '&#92;u00DC' '&#92;u00DD' '&#92;u00DE'
      * </pre></blockquote>
-     * <p> Many other Unicode characters are uppercase too.<p>
+     * <p> Many other Unicode characters are uppercase too.
      *
      * @param   codePoint the character (Unicode code point) to be tested.
      * @return  {@code true} if the character is uppercase;
@@ -5581,7 +5580,7 @@
      * <li>{@code LATIN CAPITAL LETTER N WITH SMALL LETTER J}
      * <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z}
      * </ul>
-     * <p> Many other Unicode characters are titlecase too.<p>
+     * <p> Many other Unicode characters are titlecase too.
      *
      * @param   codePoint the character (Unicode code point) to be tested.
      * @return  {@code true} if the character is titlecase;
@@ -6777,7 +6776,6 @@
      * <li> It is {@code '\u005Cu001E'}, U+001E RECORD SEPARATOR.
      * <li> It is {@code '\u005Cu001F'}, U+001F UNIT SEPARATOR.
      * </ul>
-     * <p>
      *
      * @param   codePoint the character (Unicode code point) to be tested.
      * @return  {@code true} if the character is a Java whitespace
@@ -7121,7 +7119,6 @@
     /**
      * Converts the character (Unicode code point) argument to uppercase using
      * information from the UnicodeData file.
-     * <p>
      *
      * @param   codePoint   the character (Unicode code point) to be converted.
      * @return  either the uppercase equivalent of the character, if
--- a/jdk/src/share/classes/java/lang/ConditionalSpecialCasing.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/ConditionalSpecialCasing.java	Fri May 16 14:35:37 2014 -0700
@@ -62,6 +62,7 @@
         //# Conditional mappings
         //# ================================================================================
         new Entry(0x03A3, new char[]{0x03C2}, new char[]{0x03A3}, null, FINAL_CASED), // # GREEK CAPITAL LETTER SIGMA
+        new Entry(0x0130, new char[]{0x0069, 0x0307}, new char[]{0x0130}, null, 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
 
         //# ================================================================================
         //# Locale-sensitive mappings
@@ -77,8 +78,8 @@
 
         //# ================================================================================
         //# Turkish and Azeri
-//      new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "tr", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
-//      new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "az", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
+        new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "tr", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
+        new Entry(0x0130, new char[]{0x0069}, new char[]{0x0130}, "az", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE
         new Entry(0x0307, new char[]{}, new char[]{0x0307}, "tr", AFTER_I), // # COMBINING DOT ABOVE
         new Entry(0x0307, new char[]{}, new char[]{0x0307}, "az", AFTER_I), // # COMBINING DOT ABOVE
         new Entry(0x0049, new char[]{0x0131}, new char[]{0x0049}, "tr", NOT_BEFORE_DOT), // # LATIN CAPITAL LETTER I
@@ -147,21 +148,25 @@
 
     private static char[] lookUpTable(String src, int index, Locale locale, boolean bLowerCasing) {
         HashSet<Entry> set = entryTable.get(new Integer(src.codePointAt(index)));
+        char[] ret = null;
 
         if (set != null) {
             Iterator<Entry> iter = set.iterator();
             String currentLang = locale.getLanguage();
             while (iter.hasNext()) {
                 Entry entry = iter.next();
-                String conditionLang= entry.getLanguage();
+                String conditionLang = entry.getLanguage();
                 if (((conditionLang == null) || (conditionLang.equals(currentLang))) &&
                         isConditionMet(src, index, locale, entry.getCondition())) {
-                    return (bLowerCasing ? entry.getLowerCase() : entry.getUpperCase());
+                    ret = bLowerCasing ? entry.getLowerCase() : entry.getUpperCase();
+                    if (conditionLang != null) {
+                        break;
+                    }
                 }
             }
         }
 
-        return null;
+        return ret;
     }
 
     private static boolean isConditionMet(String src, int index, Locale locale, int condition) {
--- a/jdk/src/share/classes/java/lang/Math.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/Math.java	Fri May 16 14:35:37 2014 -0700
@@ -1048,7 +1048,6 @@
      *       whereas {@code (-4 / 3) == -1}.
      *   </li>
      * </ul>
-     * <p>
      *
      * @param x the dividend
      * @param y the divisor
--- a/jdk/src/share/classes/java/lang/Runtime.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/Runtime.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,7 @@
      * blocks indefinitely.
      *
      * <p> The <tt>{@link System#exit(int) System.exit}</tt> method is the
-     * conventional and convenient means of invoking this method. <p>
+     * conventional and convenient means of invoking this method.
      *
      * @param  status
      *         Termination status.  By convention, a nonzero status code
@@ -180,7 +180,7 @@
      * method goes awry by, for example, corrupting internal data structures or
      * attempting to access nonexistent memory.  If the virtual machine aborts
      * then no guarantee can be made about whether or not any shutdown hooks
-     * will be run. <p>
+     * will be run.
      *
      * @param   hook
      *          An initialized but unstarted <tt>{@link Thread}</tt> object
@@ -248,7 +248,7 @@
      * hooks to be started and does not run uninvoked finalizers if
      * finalization-on-exit has been enabled.  If the shutdown sequence has
      * already been initiated then this method does not wait for any running
-     * shutdown hooks or finalizers to finish their work. <p>
+     * shutdown hooks or finalizers to finish their work.
      *
      * @param  status
      *         Termination status.  By convention, a nonzero status code
--- a/jdk/src/share/classes/java/lang/SecurityManager.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/SecurityManager.java	Fri May 16 14:35:37 2014 -0700
@@ -1242,7 +1242,6 @@
      * <code>super.checkPropertiesAccess</code>
      * at the point the overridden method would normally throw an
      * exception.
-     * <p>
      *
      * @exception  SecurityException  if the calling thread does not have
      *             permission to access or modify the system properties.
@@ -1320,7 +1319,6 @@
      * <code>super.checkPrintJobAccess</code>
      * at the point the overridden method would normally throw an
      * exception.
-     * <p>
      *
      * @exception  SecurityException  if the calling thread does not have
      *             permission to initiate a print job request.
@@ -1566,7 +1564,6 @@
      * <code>super.checkSetFactory</code>
      * at the point the overridden method would normally throw an
      * exception.
-     * <p>
      *
      * @exception  SecurityException  if the calling thread does not have
      *             permission to specify a socket factory or a stream
--- a/jdk/src/share/classes/java/lang/String.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/String.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2583,6 +2583,9 @@
             if (cp == '\u03A3') {                       // GREEK CAPITAL LETTER SIGMA
                 return toLowerCaseEx(result, i, locale, false);
             }
+            if (cp == '\u0130') {                       // LATIN CAPITAL LETTER I WITH DOT ABOVE
+                return toLowerCaseEx(result, i, locale, true);
+            }
             cp = Character.toLowerCase(cp);
             if (!Character.isBmpCodePoint(cp)) {
                 return toLowerCaseEx(result, i, locale, false);
@@ -2650,7 +2653,7 @@
      * LATIN SMALL LETTER DOTLESS I character.
      * To obtain correct results for locale insensitive strings, use
      * {@code toLowerCase(Locale.ROOT)}.
-     * <p>
+     *
      * @return  the {@code String}, converted to lowercase.
      * @see     java.lang.String#toLowerCase(Locale)
      */
@@ -2812,7 +2815,7 @@
      * LATIN CAPITAL LETTER I WITH DOT ABOVE character.
      * To obtain correct results for locale insensitive strings, use
      * {@code toUpperCase(Locale.ROOT)}.
-     * <p>
+     *
      * @return  the {@code String}, converted to uppercase.
      * @see     java.lang.String#toUpperCase(Locale)
      */
--- a/jdk/src/share/classes/java/lang/System.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/System.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -133,7 +133,6 @@
      * <p>First, if there is a security manager, its <code>checkPermission</code>
      * method is called with a <code>RuntimePermission("setIO")</code> permission
      *  to see if it's ok to reassign the "standard" input stream.
-     * <p>
      *
      * @param in the new standard input stream.
      *
@@ -762,7 +761,6 @@
      * permission. This may result in a SecurityException being thrown.
      * If no exception is thrown, the specified property is set to the given
      * value.
-     * <p>
      *
      * @param      key   the name of the system property.
      * @param      value the value of the system property.
@@ -801,7 +799,6 @@
      * is called with a <code>PropertyPermission(key, "write")</code>
      * permission. This may result in a SecurityException being thrown.
      * If no exception is thrown, the specified property is removed.
-     * <p>
      *
      * @param      key   the name of the system property to be removed.
      * @return     the previous string value of the system property,
--- a/jdk/src/share/classes/java/lang/instrument/package.html	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/instrument/package.html	Fri May 16 14:35:37 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
@@ -140,7 +140,7 @@
 
   <li><p>The system class loader (
       {@link java.lang.ClassLoader#getSystemClassLoader ClassLoader.getSystemClassLoader}) must
-      support a mechanism to add an agent JAR file to the system class path. <p></li>
+      support a mechanism to add an agent JAR file to the system class path.</li>
 </ol>  
 
 <P>
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandles.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandles.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -50,7 +50,7 @@
  * <li>Combinator methods, which combine or transform pre-existing method handles into new ones.
  * <li>Other factory methods to create method handles that emulate other common JVM operations or control flow patterns.
  * </ul>
- * <p>
+ *
  * @author John Rose, JSR 292 EG
  * @since 1.7
  */
--- a/jdk/src/share/classes/java/lang/management/MemoryNotificationInfo.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/management/MemoryNotificationInfo.java	Fri May 16 14:35:37 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
@@ -89,7 +89,7 @@
  *       Subsequent crossing of the usage threshold value does not cause
  *       further notification until the memory usage has returned
  *       to become less than the usage threshold value.
- *       <p></li>
+ *       </li>
  *   <li>A {@link #MEMORY_COLLECTION_THRESHOLD_EXCEEDED
  *       collection usage threshold exceeded notification}.
  *       <br>This notification will be emitted when
--- a/jdk/src/share/classes/java/lang/management/ThreadInfo.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/management/ThreadInfo.java	Fri May 16 14:35:37 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
@@ -429,12 +429,12 @@
      *     <br>The thread is in the {@link java.lang.Thread.State#BLOCKED BLOCKED}
      *     state waiting to enter the <tt>synchronized</tt> statement
      *     or method.
-     *     <p></li>
+     *     </li>
      * <li>an object monitor to be notified by another thread.
      *     <br>The thread is in the {@link java.lang.Thread.State#WAITING WAITING}
      *     or {@link java.lang.Thread.State#TIMED_WAITING TIMED_WAITING} state
      *     due to a call to the {@link Object#wait Object.wait} method.
-     *     <p></li>
+     *     </li>
      * <li>a synchronization object responsible for the thread parking.
      *     <br>The thread is in the {@link java.lang.Thread.State#WAITING WAITING}
      *     or {@link java.lang.Thread.State#TIMED_WAITING TIMED_WAITING} state
--- a/jdk/src/share/classes/java/lang/management/package.html	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/lang/management/package.html	Fri May 16 14:35:37 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
@@ -31,7 +31,6 @@
 Java virtual machine and other components in the Java runtime.
 It allows both local and remote
 monitoring and management of the running Java virtual machine.
-<p>
 
 <h4><a name="MXBean">Platform MXBean</a></h4>
 <p>
@@ -41,7 +40,6 @@
 Each platform MXBean is a {@link java.lang.management.PlatformManagedObject}
 with a unique
 {@linkplain java.lang.management.PlatformManagedObject#getObjectName name}.
-<p>
 <h4>ManagementFactory</h4>
 
 <p>The {@link java.lang.management.ManagementFactory} class is the management
@@ -80,7 +78,6 @@
 Java virtual machine and the runtime in the following ways:
 <p>
 <b>1. Direct access to an MXBean interface</b>
-<p>
 <ul>
 <li>Get an MXBean instance locally in the running Java virtual machine:
 <pre>
@@ -100,7 +97,6 @@
    // Get the standard attribute "VmVendor"
    String vendor = mxbean.getVmVendor();
 </pre>
-<p>
 </li>
 <li>Construct an MXBean proxy instance that forwards the
     method calls to a given MBeanServer:
@@ -132,7 +128,7 @@
 </li>
 </ul>
 <p>
-<b>2. Indirect access to an MXBean interface via MBeanServer</b><p>
+<b>2. Indirect access to an MXBean interface via MBeanServer</b>
 <ul>
 <li>Go through the
     {@link java.lang.management.ManagementFactory#getPlatformMBeanServer
@@ -143,7 +139,7 @@
     <em>JMX open types</em> which include basic data types,
     {@link javax.management.openmbean.CompositeData CompositeData},
     and {@link javax.management.openmbean.TabularData TabularData}
-    defined in {@link javax.management.openmbean.OpenType OpenType}.<p>
+    defined in {@link javax.management.openmbean.OpenType OpenType}.
 <pre>
    MBeanServerConnection mbs;
 
--- a/jdk/src/share/classes/java/math/BigInteger.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/math/BigInteger.java	Fri May 16 14:35:37 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
@@ -3597,7 +3597,7 @@
      * Converts the specified BigInteger to a string and appends to
      * {@code sb}.  This implements the recursive Schoenhage algorithm
      * for base conversions.
-     * <p/>
+     * <p>
      * See Knuth, Donald,  _The Art of Computer Programming_, Vol. 2,
      * Answers to Exercises (4.4) Question 14.
      *
@@ -3646,7 +3646,7 @@
     /**
      * Returns the value radix^(2^exponent) from the cache.
      * If this value doesn't already exist in the cache, it is added.
-     * <p/>
+     * <p>
      * This could be changed to a more complicated caching method using
      * {@code Future}.
      */
--- a/jdk/src/share/classes/java/util/Properties.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/util/Properties.java	Fri May 16 14:35:37 2014 -0700
@@ -37,7 +37,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
-import sun.util.spi.XmlPropertiesProvider;
+import jdk.internal.util.xml.PropertiesDefaultHandler;
 
 /**
  * The {@code Properties} class represents a persistent set of
@@ -877,7 +877,9 @@
     public synchronized void loadFromXML(InputStream in)
         throws IOException, InvalidPropertiesFormatException
     {
-        XmlSupport.load(this, Objects.requireNonNull(in));
+        Objects.requireNonNull(in);
+        PropertiesDefaultHandler handler = new PropertiesDefaultHandler();
+        handler.load(this, in);
         in.close();
     }
 
@@ -949,8 +951,10 @@
     public void storeToXML(OutputStream os, String comment, String encoding)
         throws IOException
     {
-        XmlSupport.save(this, Objects.requireNonNull(os), comment,
-                        Objects.requireNonNull(encoding));
+        Objects.requireNonNull(os);
+        Objects.requireNonNull(encoding);
+        PropertiesDefaultHandler handler = new PropertiesDefaultHandler();
+        handler.store(this, os, comment, encoding);
     }
 
     /**
@@ -1128,83 +1132,4 @@
     private static final char[] hexDigit = {
         '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
     };
-
-    /**
-     * Supporting class for loading/storing properties in XML format.
-     *
-     * <p> The {@code load} and {@code store} methods defined here delegate to a
-     * system-wide {@code XmlPropertiesProvider}. On first invocation of either
-     * method then the system-wide provider is located as follows: </p>
-     *
-     * <ol>
-     *   <li> If the system property {@code sun.util.spi.XmlPropertiesProvider}
-     *   is defined then it is taken to be the full-qualified name of a concrete
-     *   provider class. The class is loaded with the system class loader as the
-     *   initiating loader. If it cannot be loaded or instantiated using a zero
-     *   argument constructor then an unspecified error is thrown. </li>
-     *
-     *   <li> If the system property is not defined then the service-provider
-     *   loading facility defined by the {@link ServiceLoader} class is used to
-     *   locate a provider with the system class loader as the initiating
-     *   loader and {@code sun.util.spi.XmlPropertiesProvider} as the service
-     *   type. If this process fails then an unspecified error is thrown. If
-     *   there is more than one service provider installed then it is
-     *   not specified as to which provider will be used. </li>
-     *
-     *   <li> If the provider is not found by the above means then a system
-     *   default provider will be instantiated and used. </li>
-     * </ol>
-     */
-    private static class XmlSupport {
-
-        private static XmlPropertiesProvider loadProviderFromProperty(ClassLoader cl) {
-            String cn = System.getProperty("sun.util.spi.XmlPropertiesProvider");
-            if (cn == null)
-                return null;
-            try {
-                Class<?> c = Class.forName(cn, true, cl);
-                return (XmlPropertiesProvider)c.newInstance();
-            } catch (ClassNotFoundException |
-                     IllegalAccessException |
-                     InstantiationException x) {
-                throw new ServiceConfigurationError(null, x);
-            }
-        }
-
-        private static XmlPropertiesProvider loadProviderAsService(ClassLoader cl) {
-            Iterator<XmlPropertiesProvider> iterator =
-                 ServiceLoader.load(XmlPropertiesProvider.class, cl).iterator();
-            return iterator.hasNext() ? iterator.next() : null;
-        }
-
-        private static XmlPropertiesProvider loadProvider() {
-            return AccessController.doPrivileged(
-                new PrivilegedAction<XmlPropertiesProvider>() {
-                    public XmlPropertiesProvider run() {
-                        ClassLoader cl = ClassLoader.getSystemClassLoader();
-                        XmlPropertiesProvider provider = loadProviderFromProperty(cl);
-                        if (provider != null)
-                            return provider;
-                        provider = loadProviderAsService(cl);
-                        if (provider != null)
-                            return provider;
-                        return new jdk.internal.util.xml.BasicXmlPropertiesProvider();
-                }});
-        }
-
-        private static final XmlPropertiesProvider PROVIDER = loadProvider();
-
-        static void load(Properties props, InputStream in)
-            throws IOException, InvalidPropertiesFormatException
-        {
-            PROVIDER.load(props, in);
-        }
-
-        static void save(Properties props, OutputStream os, String comment,
-                         String encoding)
-            throws IOException
-        {
-            PROVIDER.store(props, os, comment, encoding);
-        }
-    }
 }
--- a/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Fri May 16 14:35:37 2014 -0700
@@ -1532,10 +1532,12 @@
      *
      * @param corePoolSize the new core size
      * @throws IllegalArgumentException if {@code corePoolSize < 0}
+     *         or {@code corePoolSize} is greater than the {@linkplain
+     *         #getMaximumPoolSize() maximum pool size}
      * @see #getCorePoolSize
      */
     public void setCorePoolSize(int corePoolSize) {
-        if (corePoolSize < 0)
+        if (corePoolSize < 0 || maximumPoolSize < corePoolSize)
             throw new IllegalArgumentException();
         int delta = corePoolSize - this.corePoolSize;
         this.corePoolSize = corePoolSize;
--- a/jdk/src/share/classes/javax/management/MBeanPermission.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/MBeanPermission.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -156,7 +156,7 @@
  * </ul>
  *
  * <p>In a comma-separated list of actions, spaces are allowed before
- * and after each action.</p>
+ * and after each action.
  *
  * @since 1.5
  */
@@ -1129,7 +1129,7 @@
      * Checks two MBeanPermission objects for equality. Checks
      * that <i>obj</i> is an MBeanPermission, 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 an MBeanPermission, and has the
      * same name and actions as this MBeanPermission object.
--- a/jdk/src/share/classes/javax/management/MBeanServerPermission.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/MBeanServerPermission.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -285,7 +285,7 @@
      * Checks two MBeanServerPermission objects for equality. Checks that
      * <i>obj</i> is an MBeanServerPermission, and represents the same
      * list of allowable actions as this object.
-     * <P>
+     *
      * @param obj the object we are testing for equality with this object.
      * @return true if the objects are equal.
      */
--- a/jdk/src/share/classes/javax/management/modelmbean/ModelMBeanNotificationBroadcaster.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/modelmbean/ModelMBeanNotificationBroadcaster.java	Fri May 16 14:35:37 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
@@ -124,7 +124,7 @@
         /**
          * Sends an attributeChangeNotification which contains the old value and new value for the
          * attribute to the registered AttributeChangeNotification listeners on the ModelMBean.
-         * <P>
+         *
          * @param oldValue The original value for the Attribute
          * @param newValue The current value for the Attribute
          * <PRE>
--- a/jdk/src/share/classes/javax/management/openmbean/CompositeType.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/CompositeType.java	Fri May 16 14:35:37 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
@@ -81,29 +81,29 @@
      * The Java class name of composite data values this composite type represents
      * (ie the class name returned by the {@link OpenType#getClassName() getClassName} method)
      * is set to the string value returned by <code>CompositeData.class.getName()</code>.
-     * <p>
+     *
      * @param  typeName  The name given to the composite type this instance represents; cannot be a null or empty string.
-     * <br>&nbsp;
+     *
      * @param  description  The human readable description of the composite type this instance represents;
      *                      cannot be a null or empty string.
-     * <br>&nbsp;
+     *
      * @param  itemNames  The names of the items contained in the
      *                    composite data values described by this <code>CompositeType</code> instance;
      *                    cannot be null and should contain at least one element; no element can be a null or empty string.
      *                    Note that the order in which the item names are given is not important to differentiate a
      *                    <code>CompositeType</code> instance from another;
      *                    the item names are internally stored sorted in ascending alphanumeric order.
-     * <br>&nbsp;
+     *
      * @param  itemDescriptions  The descriptions, in the same order as <var>itemNames</var>, of the items contained in the
      *                           composite data values described by this <code>CompositeType</code> instance;
      *                           should be of the same size as <var>itemNames</var>;
      *                           no element can be null or an empty string.
-     * <br>&nbsp;
+     *
      * @param  itemTypes  The open type instances, in the same order as <var>itemNames</var>, describing the items contained
      *                    in the composite data values described by this <code>CompositeType</code> instance;
      *                    should be of the same size as <var>itemNames</var>;
      *                    no element can be null.
-     * <br>&nbsp;
+     *
      * @throws IllegalArgumentException  If <var>typeName</var> or <var>description</var> is a null or empty string,
      *                                   or <var>itemNames</var> or <var>itemDescriptions</var> or <var>itemTypes</var> is null,
      *                                   or any element of <var>itemNames</var> or <var>itemDescriptions</var>
@@ -111,7 +111,7 @@
      *                                   or any element of <var>itemTypes</var> is null,
      *                                   or <var>itemNames</var> or <var>itemDescriptions</var> or <var>itemTypes</var>
      *                                   are not of the same size.
-     * <br>&nbsp;
+     *
      * @throws OpenDataException  If <var>itemNames</var> contains duplicate item names
      *                            (case sensitive, but leading and trailing whitespaces removed).
      */
@@ -356,7 +356,7 @@
      * <li>their type names are equal</li>
      * <li>their items' names and types are equal</li>
      * </ul>
-     * <br>&nbsp;
+     *
      * @param  obj  the object to be compared for equality with this <code>CompositeType</code> instance;
      *              if <var>obj</var> is <code>null</code>, <code>equals</code> returns <code>false</code>.
      *
--- a/jdk/src/share/classes/javax/management/openmbean/OpenMBeanAttributeInfo.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/OpenMBeanAttributeInfo.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2007, 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
@@ -113,7 +113,6 @@
      * for any two <code>OpenMBeanAttributeInfo</code> instances <code>t1</code> and <code>t2</code>,
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
-     * <p>
      *
      * @return  the hash code value for this <code>OpenMBeanAttributeInfo</code> instance
      */
--- a/jdk/src/share/classes/javax/management/openmbean/OpenMBeanConstructorInfo.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/OpenMBeanConstructorInfo.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2007, 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
@@ -118,7 +118,6 @@
      * for any two <code>OpenMBeanConstructorInfo</code> instances <code>t1</code> and <code>t2</code>,
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
-     * <p>
      *
      * @return  the hash code value for this <code>OpenMBeanConstructorInfo</code> instance
      */
--- a/jdk/src/share/classes/javax/management/openmbean/OpenMBeanInfo.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/OpenMBeanInfo.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2007, 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
@@ -168,7 +168,6 @@
      * for any two <code>OpenMBeanInfo</code> instances <code>t1</code> and <code>t2</code>,
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
-     * <p>
      *
      * @return  the hash code value for this <code>OpenMBeanInfo</code> instance
      */
--- a/jdk/src/share/classes/javax/management/openmbean/OpenMBeanOperationInfo.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/OpenMBeanOperationInfo.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2007, 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
@@ -161,7 +161,7 @@
      * for any two <code>OpenMBeanOperationInfo</code> instances <code>t1</code> and <code>t2</code>,
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
-     * <p>
+     *
      *
      * @return  the hash code value for this <code>OpenMBeanOperationInfo</code> instance
      */
--- a/jdk/src/share/classes/javax/management/openmbean/OpenMBeanParameterInfo.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/OpenMBeanParameterInfo.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2007, 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
@@ -192,7 +192,6 @@
      * for any two <code>OpenMBeanParameterInfo</code> instances <code>t1</code> and <code>t2</code>,
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
-     * <p>
      *
      * @return  the hash code value for this <code>OpenMBeanParameterInfo</code> instance
      */
--- a/jdk/src/share/classes/javax/management/openmbean/TabularType.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/TabularType.java	Fri May 16 14:35:37 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
@@ -75,7 +75,7 @@
      * The Java class name of tabular data values this tabular type represents
      * (ie the class name returned by the {@link OpenType#getClassName() getClassName} method)
      * is set to the string value returned by <code>TabularData.class.getName()</code>.
-     * <p>
+     *
      * @param  typeName  The name given to the tabular type this instance represents; cannot be a null or empty string.
      * <br>&nbsp;
      * @param  description  The human readable description of the tabular type this instance represents;
--- a/jdk/src/share/classes/javax/management/remote/JMXConnectorFactory.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/remote/JMXConnectorFactory.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -134,7 +134,7 @@
  * <code>MalformedURLException</code> if there is none.  An
  * implementation may choose to find providers by other means.  For
  * example, it may support the <a
- * href="{@docRoot}/../technotes/guides/jar/jar.html#Service Provider">
+ * href="{@docRoot}/../technotes/guides/jar/jar.html#Service%20Provider">
  * JAR conventions for service providers</a>, where the service
  * interface is <code>JMXConnectorProvider</code>.</p>
  *
--- a/jdk/src/share/classes/javax/management/remote/JMXConnectorServerFactory.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/remote/JMXConnectorServerFactory.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, 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
@@ -125,7 +125,7 @@
  * <code>MalformedURLException</code> if there is none.  An
  * implementation may choose to find providers by other means.  For
  * example, it may support the <a
- * href="{@docRoot}/../technotes/guides/jar/jar.html#Service Provider">
+ * href="{@docRoot}/../technotes/guides/jar/jar.html#Service%20Provider">
  * JAR conventions for service providers</a>, where the service
  * interface is <code>JMXConnectorServerProvider</code>.</p>
  *
--- a/jdk/src/share/classes/javax/management/remote/JMXPrincipal.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/remote/JMXPrincipal.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -59,7 +59,7 @@
     private String name;
 
     /**
-     * <p>Creates a JMXPrincipal for a given identity.</p>
+     * Creates a JMXPrincipal for a given identity.
      *
      * @param name the JMX Remote API name for this identity.
      *
@@ -74,8 +74,6 @@
     /**
      * Returns the name of this principal.
      *
-     * <p>
-     *
      * @return the name of this <code>JMXPrincipal</code>.
      */
     public String getName() {
@@ -85,8 +83,6 @@
     /**
      * Returns a string representation of this <code>JMXPrincipal</code>.
      *
-     * <p>
-     *
      * @return a string representation of this <code>JMXPrincipal</code>.
      */
     public String toString() {
@@ -99,8 +95,6 @@
      * <code>JMXPrincipal</code> and the two JMXPrincipals
      * have the same name.
      *
-     * <p>
-     *
      * @param o Object to be compared for equality with this
      * <code>JMXPrincipal</code>.
      *
@@ -124,8 +118,6 @@
     /**
      * Returns a hash code for this <code>JMXPrincipal</code>.
      *
-     * <p>
-     *
      * @return a hash code for this <code>JMXPrincipal</code>.
      */
     public int hashCode() {
--- a/jdk/src/share/classes/javax/management/remote/package.html	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/remote/package.html	Fri May 16 14:35:37 2014 -0700
@@ -2,7 +2,7 @@
 <head>
     <title>JMX<sup><font size="-2">TM</font></sup> Remote API.</title>
 <!--
-Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2002, 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
@@ -60,7 +60,7 @@
        <li>User-defined connector protocols are also possible using the 
 	{@link javax.management.remote.JMXConnectorFactory
 	JMXConnectorFactory} and, optionally, the Generic Connector
-	(not part of this bundle, see note below).</p>
+	(not part of this bundle, see note below).
       </ul>
 
       <p><u>Note</u>: the optional packages implementing
--- a/jdk/src/share/classes/javax/management/remote/rmi/package.html	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/management/remote/rmi/package.html	Fri May 16 14:35:37 2014 -0700
@@ -2,7 +2,7 @@
 <head>
     <title>RMI connector</title>
 <!--
-Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2002, 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
@@ -240,12 +240,12 @@
       that the RMI registry only allows registration from the local
       host.  So, in this case, <code>myhost</code> must be the name
       (or a name) of the host that the connector server is running
-      on.</p>
+      on.
 
     <p>In this <code>JMXServiceURL</code>, the first <code>rmi:</code>
       specifies the RMI
       connector, while the second <code>rmi:</code> specifies the RMI
-      registry.</p>
+      registry.
 
     <p>As another example, if the <code>JMXServiceURL</code> is:
 
@@ -262,7 +262,7 @@
       </pre>
 
       which means entry <code>cn=this,ou=that</code> in the LDAP
-      directory running on port 9999 of host <code>dirhost</code>.</p>
+      directory running on port 9999 of host <code>dirhost</code>.
 
     <p>If the <code>JMXServiceURL</code> is:
 
@@ -280,7 +280,7 @@
 
       For this case to work, the JNDI API must have been configured
       appropriately to supply the information about what directory to
-      use.</p>
+      use.
 
     <p>In these examples, the host name <code>ignoredhost</code> is
       not used by the connector server or its clients.  It can be
--- a/jdk/src/share/classes/javax/script/ScriptEngineFactory.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/javax/script/ScriptEngineFactory.java	Fri May 16 14:35:37 2014 -0700
@@ -160,7 +160,6 @@
      *      return ret;
      * }
      * } </pre>
-     * <p>
      *
      * @param obj The name representing the object whose method is to be invoked. The
      * name is the one used to create bindings using the <code>put</code> method of
--- a/jdk/src/share/classes/jdk/internal/util/xml/BasicXmlPropertiesProvider.java	Thu May 15 10:37:52 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.internal.util.xml;
-
-import java.util.Properties;
-import java.util.InvalidPropertiesFormatException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-import sun.util.spi.XmlPropertiesProvider;
-
-/**
- * A {@code XmlPropertiesProvider} implementation that uses the UKit XML parser.
- */
-
-public class BasicXmlPropertiesProvider extends XmlPropertiesProvider {
-
-    public BasicXmlPropertiesProvider() { }
-
-    @Override
-    public void load(Properties props, InputStream in)
-        throws IOException, InvalidPropertiesFormatException
-    {
-        PropertiesDefaultHandler handler = new PropertiesDefaultHandler();
-        handler.load(props, in);
-    }
-
-    @Override
-    public void store(Properties props, OutputStream os, String comment,
-                      String encoding)
-        throws IOException
-    {
-        PropertiesDefaultHandler handler = new PropertiesDefaultHandler();
-        handler.store(props, os, comment, encoding);
-    }
-}
--- a/jdk/src/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/jdk/internal/util/xml/PropertiesDefaultHandler.java	Fri May 16 14:35:37 2014 -0700
@@ -123,7 +123,7 @@
 
             writer.writeEndElement();
             writer.writeEndDocument();
-            writer.close();
+            writer.flush();
         } catch (XMLStreamException e) {
             if (e.getCause() instanceof UnsupportedEncodingException) {
                 throw (UnsupportedEncodingException) e.getCause();
--- a/jdk/src/share/classes/jdk/nio/zipfs/ZipFileSystem.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/jdk/nio/zipfs/ZipFileSystem.java	Fri May 16 14:35:37 2014 -0700
@@ -41,6 +41,8 @@
 import java.nio.file.spi.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import java.util.*;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -110,7 +112,9 @@
         }
         // sm and existence check
         zfpath.getFileSystem().provider().checkAccess(zfpath, AccessMode.READ);
-        if (!Files.isWritable(zfpath))
+        boolean writeable = AccessController.doPrivileged(
+            (PrivilegedAction<Boolean>) () ->  Files.isWritable(zfpath));
+        if (!writeable)
             this.readOnly = true;
         this.zc = ZipCoder.get(nameEncoding);
         this.defaultdir = new ZipPath(this, getBytes(defaultDir));
@@ -262,9 +266,13 @@
         }
         beginWrite();                   // lock and sync
         try {
-            sync();
-            ch.close();                 // close the ch just in case no update
-        } finally {                     // and sync dose not close the ch
+            AccessController.doPrivileged((PrivilegedExceptionAction<Void>) () -> {
+                sync(); return null;
+            });
+            ch.close();                          // close the ch just in case no update
+        } catch (PrivilegedActionException e) {  // and sync dose not close the ch
+            throw (IOException)e.getException();
+        } finally {
             endWrite();
         }
 
@@ -281,8 +289,10 @@
         synchronized (tmppaths) {
             for (Path p: tmppaths) {
                 try {
-                    Files.deleteIfExists(p);
-                } catch (IOException x) {
+                    AccessController.doPrivileged(
+                        (PrivilegedExceptionAction<Boolean>)() -> Files.deleteIfExists(p));
+                } catch (PrivilegedActionException e) {
+                    IOException x = (IOException)e.getException();
                     if (ioe == null)
                         ioe = x;
                     else
--- a/jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Fri May 16 14:35:37 2014 -0700
@@ -34,8 +34,11 @@
 import java.util.Random;
 
 import sun.net.www.HeaderParser;
+import sun.net.NetProperties;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedAction;
+import java.security.AccessController;
 import static sun.net.www.protocol.http.HttpURLConnection.HTTP_CONNECT;
 
 /**
@@ -51,6 +54,23 @@
 
     private String authMethod;
 
+    private final static String compatPropName = "http.auth.digest." +
+        "quoteParameters";
+
+    // true if http.auth.digest.quoteParameters Net property is true
+    private static final boolean delimCompatFlag;
+
+    static {
+        Boolean b = AccessController.doPrivileged(
+            new PrivilegedAction<Boolean>() {
+                public Boolean run() {
+                    return NetProperties.getBoolean(compatPropName);
+                }
+            }
+        );
+        delimCompatFlag = (b == null) ? false : b.booleanValue();
+    }
+
     // Authentication parameters defined in RFC2617.
     // One instance of these may be shared among several DigestAuthentication
     // instances as a result of a single authorization (for multiple domains)
@@ -206,7 +226,7 @@
     }
 
     /**
-     * Reclaculates the request-digest and returns it.
+     * Recalculates the request-digest and returns it.
      *
      * <P> Used in the common case where the requestURI is simply the
      * abs_path.
@@ -225,7 +245,7 @@
     }
 
     /**
-     * Reclaculates the request-digest and returns it.
+     * Recalculates the request-digest and returns it.
      *
      * <P> Used when the requestURI is not the abs_path. The exact
      * requestURI can be passed as a String.
@@ -357,24 +377,34 @@
             ncfield = "\", nc=" + ncstring;
         }
 
+        String algoS, qopS;
+
+        if (delimCompatFlag) {
+            // Put quotes around these String value parameters
+            algoS = ", algorithm=\"" + algorithm + "\"";
+            qopS = ", qop=\"auth\"";
+        } else {
+            // Don't put quotes around them, per the RFC
+            algoS = ", algorithm=" + algorithm;
+            qopS = ", qop=auth";
+        }
+
         String value = authMethod
                         + " username=\"" + pw.getUserName()
                         + "\", realm=\"" + realm
                         + "\", nonce=\"" + nonce
                         + ncfield
                         + ", uri=\"" + uri
-                        + "\", response=\"" + response
-                        + "\", algorithm=" + algorithm;
+                        + "\", response=\"" + response + "\""
+                        + algoS;
         if (opaque != null) {
-            value = value + ", opaque=\"" + opaque;
-            value = value + "\"";
+            value += ", opaque=\"" + opaque + "\"";
         }
         if (cnonce != null) {
-            value = value + ", cnonce=\"" + cnonce;
-            value = value + "\"";
+            value += ", cnonce=\"" + cnonce + "\"";
         }
         if (qop) {
-            value = value + ", qop=auth";
+            value += qopS;
         }
         return value;
     }
--- a/jdk/src/share/classes/sun/nio/fs/PollingWatchService.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/sun/nio/fs/PollingWatchService.java	Fri May 16 14:35:37 2014 -0700
@@ -74,8 +74,6 @@
          throws IOException
     {
         // check events - CCE will be thrown if there are invalid elements
-        if (events.length == 0)
-            throw new IllegalArgumentException("No events to register");
         final Set<WatchEvent.Kind<?>> eventSet =
             new HashSet<WatchEvent.Kind<?>>(events.length);
         for (WatchEvent.Kind<?> event: events) {
@@ -90,8 +88,6 @@
 
             // OVERFLOW is ignored
             if (event == StandardWatchEventKinds.OVERFLOW) {
-                if (events.length == 1)
-                    throw new IllegalArgumentException("No events to register");
                 continue;
             }
 
@@ -100,6 +96,8 @@
                 throw new NullPointerException("An element in event set is 'null'");
             throw new UnsupportedOperationException(event.name());
         }
+        if (eventSet.isEmpty())
+            throw new IllegalArgumentException("No events to register");
 
         // A modifier may be used to specify the sensitivity level
         SensitivityWatchEventModifier sensivity = SensitivityWatchEventModifier.MEDIUM;
--- a/jdk/src/share/classes/sun/security/validator/PKIXValidator.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/sun/security/validator/PKIXValidator.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -60,9 +60,6 @@
         AccessController.doPrivileged
             (new GetBooleanAction("com.sun.net.ssl.checkRevocation"));
 
-    // enable use of the validator if possible
-    private final static boolean TRY_VALIDATOR = true;
-
     private final Set<X509Certificate> trustedCerts;
     private final PKIXBuilderParameters parameterTemplate;
     private int certPathLength = -1;
@@ -75,48 +72,28 @@
 
     PKIXValidator(String variant, Collection<X509Certificate> trustedCerts) {
         super(TYPE_PKIX, variant);
-        if (trustedCerts instanceof Set) {
-            this.trustedCerts = (Set<X509Certificate>)trustedCerts;
-        } else {
-            this.trustedCerts = new HashSet<X509Certificate>(trustedCerts);
-        }
-        Set<TrustAnchor> trustAnchors = new HashSet<TrustAnchor>();
+        this.trustedCerts = (trustedCerts instanceof Set) ?
+                            (Set<X509Certificate>)trustedCerts :
+                            new HashSet<X509Certificate>(trustedCerts);
+
+        Set<TrustAnchor> trustAnchors = new HashSet<>();
         for (X509Certificate cert : trustedCerts) {
             trustAnchors.add(new TrustAnchor(cert, null));
         }
+
         try {
             parameterTemplate = new PKIXBuilderParameters(trustAnchors, null);
+            factory = CertificateFactory.getInstance("X.509");
         } catch (InvalidAlgorithmParameterException e) {
             throw new RuntimeException("Unexpected error: " + e.toString(), e);
-        }
-        setDefaultParameters(variant);
-
-        // initCommon();
-        if (TRY_VALIDATOR) {
-            if (TRY_VALIDATOR == false) {
-                return;
-            }
-            trustedSubjects = new HashMap<X500Principal, List<PublicKey>>();
-            for (X509Certificate cert : trustedCerts) {
-                X500Principal dn = cert.getSubjectX500Principal();
-                List<PublicKey> keys;
-                if (trustedSubjects.containsKey(dn)) {
-                    keys = trustedSubjects.get(dn);
-                } else {
-                    keys = new ArrayList<PublicKey>();
-                    trustedSubjects.put(dn, keys);
-                }
-                keys.add(cert.getPublicKey());
-            }
-            try {
-                factory = CertificateFactory.getInstance("X.509");
             } catch (CertificateException e) {
                 throw new RuntimeException("Internal error", e);
             }
+
+        setDefaultParameters(variant);
             plugin = variant.equals(VAR_PLUGIN_CODE_SIGNING);
-        } else {
-            plugin = false;
-        }
+
+        trustedSubjects = setTrustedSubjects();
     }
 
     PKIXValidator(String variant, PKIXBuilderParameters params) {
@@ -130,32 +107,40 @@
         }
         parameterTemplate = params;
 
-        // initCommon();
-        if (TRY_VALIDATOR) {
-            if (TRY_VALIDATOR == false) {
-                return;
-            }
-            trustedSubjects = new HashMap<X500Principal, List<PublicKey>>();
-            for (X509Certificate cert : trustedCerts) {
-                X500Principal dn = cert.getSubjectX500Principal();
-                List<PublicKey> keys;
-                if (trustedSubjects.containsKey(dn)) {
-                    keys = trustedSubjects.get(dn);
-                } else {
-                    keys = new ArrayList<PublicKey>();
-                    trustedSubjects.put(dn, keys);
-                }
-                keys.add(cert.getPublicKey());
-            }
             try {
                 factory = CertificateFactory.getInstance("X.509");
             } catch (CertificateException e) {
                 throw new RuntimeException("Internal error", e);
             }
+
             plugin = variant.equals(VAR_PLUGIN_CODE_SIGNING);
+
+        trustedSubjects = setTrustedSubjects();
+    }
+
+    /**
+     * Populate the trustedSubjects Map using the DN and public keys from
+     * the list of trusted certificates
+     *
+     * @return Map containing each subject DN and one or more public keys
+     *    tied to those DNs.
+     */
+    private Map<X500Principal, List<PublicKey>> setTrustedSubjects() {
+        Map<X500Principal, List<PublicKey>> subjectMap = new HashMap<>();
+
+        for (X509Certificate cert : trustedCerts) {
+            X500Principal dn = cert.getSubjectX500Principal();
+            List<PublicKey> keys;
+            if (subjectMap.containsKey(dn)) {
+                keys = subjectMap.get(dn);
         } else {
-            plugin = false;
+                keys = new ArrayList<PublicKey>();
+                subjectMap.put(dn, keys);
         }
+            keys.add(cert.getPublicKey());
+        }
+
+        return subjectMap;
     }
 
     public Collection<X509Certificate> getTrustedCertificates() {
@@ -217,7 +202,6 @@
             pkixParameters.addCertPathChecker(algorithmChecker);
         }
 
-        if (TRY_VALIDATOR) {
             // check that chain is in correct order and check if chain contains
             // trust anchor
             X500Principal prevIssuer = null;
@@ -287,7 +271,6 @@
                     (ValidatorException.T_NO_TRUST_ANCHOR);
             }
             // otherwise, fall back to builder
-        }
 
         return doBuild(chain, otherCerts, pkixParameters);
     }
--- a/jdk/src/share/classes/sun/tools/attach/HotSpotVirtualMachine.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/attach/HotSpotVirtualMachine.java	Fri May 16 14:35:37 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
@@ -257,6 +257,20 @@
         return value;
     }
 
+    /*
+     * Utility method to read data into a String.
+     */
+    String readErrorMessage(InputStream sis) throws IOException {
+        byte b[] = new byte[1024];
+        int n;
+        StringBuffer message = new StringBuffer();
+        while ((n = sis.read(b)) != -1) {
+            message.append(new String(b, 0, n, "UTF-8"));
+        }
+        return message.toString();
+    }
+
+
     // -- attach timeout support
 
     private static long defaultAttachTimeout = 5000;
--- a/jdk/src/share/classes/sun/tools/jcmd/JCmd.java	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/classes/sun/tools/jcmd/JCmd.java	Fri May 16 14:35:37 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,10 +33,12 @@
 import java.util.Comparator;
 import java.net.URISyntaxException;
 
+import com.sun.tools.attach.AttachOperationFailedException;
 import com.sun.tools.attach.VirtualMachine;
 import com.sun.tools.attach.VirtualMachineDescriptor;
 import com.sun.tools.attach.AgentLoadException;
 import com.sun.tools.attach.AttachNotSupportedException;
+
 import sun.tools.attach.HotSpotVirtualMachine;
 import sun.tools.jstat.JStatLogger;
 import sun.jvmstat.monitor.Monitor;
@@ -119,6 +121,7 @@
             pids.add(arg.getPid() + "");
         }
 
+        boolean success = true;
         for (String pid : pids) {
             System.out.println(pid + ":");
             if (arg.isListCounters()) {
@@ -126,11 +129,16 @@
             } else {
                 try {
                     executeCommandForPid(pid, arg.getCommand());
+                } catch(AttachOperationFailedException ex) {
+                    System.err.println(ex.getMessage());
+                    success = false;
                 } catch(Exception ex) {
                     ex.printStackTrace();
+                    success = false;
                 }
             }
         }
+        System.exit(success ? 0 : 1);
     }
 
     private static void executeCommandForPid(String pid, String command)
@@ -150,13 +158,18 @@
                 // read to EOF and just print output
                 byte b[] = new byte[256];
                 int n;
+                boolean messagePrinted = false;
                 do {
                     n = in.read(b);
                     if (n > 0) {
                         String s = new String(b, 0, n, "UTF-8");
                         System.out.print(s);
+                        messagePrinted = true;
                     }
                 } while (n > 0);
+                if (!messagePrinted) {
+                    System.out.println("Command executed successfully");
+                }
             }
         }
         vm.detach();
--- a/jdk/src/share/classes/sun/util/spi/XmlPropertiesProvider.java	Thu May 15 10:37:52 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.util.spi;
-
-import java.util.Properties;
-import java.util.InvalidPropertiesFormatException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * Service-provider class for loading and storing {@link Properites} in XML
- * format.
- *
- * @see Properties#loadFromXML
- * @see Properties#storeToXML
- */
-
-public abstract class XmlPropertiesProvider {
-
-    /**
-     * Initializes a new instance of this class.
-     */
-    protected XmlPropertiesProvider() {
-        // do nothing for now
-    }
-
-    /**
-     * Loads all of the properties represented by the XML document on the
-     * specified input stream into a properties table.
-     *
-     * @param props the properties table to populate
-     * @param in the input stream from which to read the XML document
-     * @throws IOException if reading from the specified input stream fails
-     * @throws java.io.UnsupportedEncodingException if the document's encoding
-     *         declaration can be read and it specifies an encoding that is not
-     *         supported
-     * @throws InvalidPropertiesFormatException Data on input stream does not
-     *         constitute a valid XML document with the mandated document type.
-     *
-     * @see Properties#loadFromXML
-     */
-    public abstract void load(Properties props, InputStream in)
-        throws IOException, InvalidPropertiesFormatException;
-
-    /**
-     * Emits an XML document representing all of the properties in a given
-     * table.
-     *
-     * @param props the properies to store
-     * @param out the output stream on which to emit the XML document.
-     * @param comment  a description of the property list, can be @{code null}
-     * @param encoding the name of a supported character encoding
-     *
-     * @throws IOException if writing to the specified output stream fails
-     * @throws java.io.UnsupportedEncodingException if the encoding is not
-     *         supported by the implementation
-     * @throws NullPointerException if {@code out} is null.
-     * @throws ClassCastException  if this {@code Properties} object
-     *         contains any keys or values that are not
-     *         {@code Strings}.
-     *
-     * @see Properties#storeToXML
-     */
-    public abstract void store(Properties props, OutputStream out,
-                               String comment, String encoding)
-        throws IOException;
-}
--- a/jdk/src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider	Thu May 15 10:37:52 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-sun.util.xml.PlatformXmlPropertiesProvider
--- a/jdk/src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java	Thu May 15 10:37:52 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.util.xml;
-
-import java.io.*;
-import java.util.*;
-import java.nio.charset.*;
-import java.util.Map.Entry;
-import org.xml.sax.*;
-import org.w3c.dom.*;
-import javax.xml.parsers.*;
-import javax.xml.transform.*;
-import javax.xml.transform.dom.*;
-import javax.xml.transform.stream.*;
-
-import sun.util.spi.XmlPropertiesProvider;
-
-/**
- * A {@code XmlPropertiesProvider} implementation that uses the JAXP API
- * for parsing.
- *
- * @author  Michael McCloskey
- * @since   1.3
- */
-public class PlatformXmlPropertiesProvider extends XmlPropertiesProvider {
-
-    // XML loading and saving methods for Properties
-
-    // The required DTD URI for exported properties
-    private static final String PROPS_DTD_URI =
-    "http://java.sun.com/dtd/properties.dtd";
-
-    private static final String PROPS_DTD =
-    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
-    "<!-- DTD for properties -->"                +
-    "<!ELEMENT properties ( comment?, entry* ) >"+
-    "<!ATTLIST properties"                       +
-        " version CDATA #FIXED \"1.0\">"         +
-    "<!ELEMENT comment (#PCDATA) >"              +
-    "<!ELEMENT entry (#PCDATA) >"                +
-    "<!ATTLIST entry "                           +
-        " key CDATA #REQUIRED>";
-
-    /**
-     * Version number for the format of exported properties files.
-     */
-    private static final String EXTERNAL_XML_VERSION = "1.0";
-
-    @Override
-    public void load(Properties props, InputStream in)
-        throws IOException, InvalidPropertiesFormatException
-    {
-        Document doc = null;
-        try {
-            doc = getLoadingDoc(in);
-        } catch (SAXException saxe) {
-            throw new InvalidPropertiesFormatException(saxe);
-        }
-        Element propertiesElement = doc.getDocumentElement();
-        String xmlVersion = propertiesElement.getAttribute("version");
-        if (xmlVersion.compareTo(EXTERNAL_XML_VERSION) > 0)
-            throw new InvalidPropertiesFormatException(
-                "Exported Properties file format version " + xmlVersion +
-                " is not supported. This java installation can read" +
-                " versions " + EXTERNAL_XML_VERSION + " or older. You" +
-                " may need to install a newer version of JDK.");
-        importProperties(props, propertiesElement);
-    }
-
-    static Document getLoadingDoc(InputStream in)
-        throws SAXException, IOException
-    {
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        dbf.setIgnoringElementContentWhitespace(true);
-        dbf.setValidating(true);
-        dbf.setCoalescing(true);
-        dbf.setIgnoringComments(true);
-        try {
-            DocumentBuilder db = dbf.newDocumentBuilder();
-            db.setEntityResolver(new Resolver());
-            db.setErrorHandler(new EH());
-            InputSource is = new InputSource(in);
-            return db.parse(is);
-        } catch (ParserConfigurationException x) {
-            throw new Error(x);
-        }
-    }
-
-    static void importProperties(Properties props, Element propertiesElement) {
-        NodeList entries = propertiesElement.getChildNodes();
-        int numEntries = entries.getLength();
-        int start = numEntries > 0 &&
-            entries.item(0).getNodeName().equals("comment") ? 1 : 0;
-        for (int i=start; i<numEntries; i++) {
-            Element entry = (Element)entries.item(i);
-            if (entry.hasAttribute("key")) {
-                Node n = entry.getFirstChild();
-                String val = (n == null) ? "" : n.getNodeValue();
-                props.setProperty(entry.getAttribute("key"), val);
-            }
-        }
-    }
-
-    @Override
-    public void store(Properties props, OutputStream os, String comment,
-                      String encoding)
-        throws IOException
-    {
-        // fast-fail for unsupported charsets as UnsupportedEncodingException may
-        // not be thrown later (see JDK-8000621)
-        try {
-            Charset.forName(encoding);
-        } catch (IllegalCharsetNameException | UnsupportedCharsetException x) {
-            throw new UnsupportedEncodingException(encoding);
-        }
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        DocumentBuilder db = null;
-        try {
-            db = dbf.newDocumentBuilder();
-        } catch (ParserConfigurationException pce) {
-            assert(false);
-        }
-        Document doc = db.newDocument();
-        Element properties =  (Element)
-            doc.appendChild(doc.createElement("properties"));
-
-        if (comment != null) {
-            Element comments = (Element)properties.appendChild(
-                doc.createElement("comment"));
-            comments.appendChild(doc.createTextNode(comment));
-        }
-
-        synchronized (props) {
-            for (Entry<Object, Object> e : props.entrySet()) {
-                final Object k = e.getKey();
-                final Object v = e.getValue();
-                if (k instanceof String && v instanceof String) {
-                    Element entry = (Element)properties.appendChild(
-                        doc.createElement("entry"));
-                    entry.setAttribute("key", (String)k);
-                    entry.appendChild(doc.createTextNode((String)v));
-                }
-            }
-        }
-        emitDocument(doc, os, encoding);
-    }
-
-    static void emitDocument(Document doc, OutputStream os, String encoding)
-        throws IOException
-    {
-        TransformerFactory tf = TransformerFactory.newInstance();
-        Transformer t = null;
-        try {
-            t = tf.newTransformer();
-            t.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, PROPS_DTD_URI);
-            t.setOutputProperty(OutputKeys.INDENT, "yes");
-            t.setOutputProperty(OutputKeys.METHOD, "xml");
-            t.setOutputProperty(OutputKeys.ENCODING, encoding);
-        } catch (TransformerConfigurationException tce) {
-            assert(false);
-        }
-        DOMSource doms = new DOMSource(doc);
-        StreamResult sr = new StreamResult(os);
-        try {
-            t.transform(doms, sr);
-        } catch (TransformerException te) {
-            throw new IOException(te);
-        }
-    }
-
-    private static class Resolver implements EntityResolver {
-        public InputSource resolveEntity(String pid, String sid)
-            throws SAXException
-        {
-            if (sid.equals(PROPS_DTD_URI)) {
-                InputSource is;
-                is = new InputSource(new StringReader(PROPS_DTD));
-                is.setSystemId(PROPS_DTD_URI);
-                return is;
-            }
-            throw new SAXException("Invalid system identifier: " + sid);
-        }
-    }
-
-    private static class EH implements ErrorHandler {
-        public void error(SAXParseException x) throws SAXException {
-            throw x;
-        }
-        public void fatalError(SAXParseException x) throws SAXException {
-            throw x;
-        }
-        public void warning(SAXParseException x) throws SAXException {
-            throw x;
-        }
-    }
-
-}
--- a/jdk/src/share/lib/security/java.policy	Thu May 15 10:37:52 2014 -0700
+++ b/jdk/src/share/lib/security/java.policy	Fri May 16 14:35:37 2014 -0700
@@ -1,7 +1,39 @@
+// permissions required by each component
+grant codeBase "file:${java.home}/lib/ext/zipfs.jar" {
+        permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";
+        permission java.lang.RuntimePermission "fileSystemProvider";
+        permission java.util.PropertyPermission "*", "read";
+};
 
-// Standard extensions get all permissions by default
+grant codeBase "file:${java.home}/lib/ext/cldrdata.jar" {
+        permission java.lang.RuntimePermission "accessClassInPackage.sun.text.*";
+        permission java.lang.RuntimePermission "accessClassInPackage.sun.util.*";
+        permission java.util.PropertyPermission "*", "read";
+};
 
-grant codeBase "file:${{java.ext.dirs}}/*" {
+grant codeBase "file:${java.home}/lib/ext/localedata.jar" {
+        permission java.lang.RuntimePermission "accessClassInPackage.sun.text.*";
+        permission java.lang.RuntimePermission "accessClassInPackage.sun.util.*";
+        permission java.util.PropertyPermission "*", "read";
+};
+
+grant codeBase "file:${java.home}/lib/ext/dnsns.jar" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:${java.home}/lib/ext/nashorn.jar" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:${java.home}/lib/ext/sunec.jar" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:${java.home}/lib/ext/sunjce_provider.jar" {
+        permission java.security.AllPermission;
+};
+
+grant codeBase "file:${java.home}/lib/ext/sunpkcs11.jar" {
         permission java.security.AllPermission;
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/solaris/classes/java/lang/UNIXProcess.java	Fri May 16 14:35:37 2014 -0700
@@ -0,0 +1,827 @@
+/*
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 java.lang;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.Locale;
+import java.util.Set;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+import java.security.AccessController;
+import static java.security.AccessController.doPrivileged;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * java.lang.Process subclass in the UNIX environment.
+ *
+ * @author Mario Wolczko and Ross Knippel.
+ * @author Konstantin Kladko (ported to Linux and Bsd)
+ * @author Martin Buchholz
+ * @author Volker Simonis (ported to AIX)
+ */
+final class UNIXProcess extends Process {
+    private static final sun.misc.JavaIOFileDescriptorAccess fdAccess
+        = sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess();
+
+    private final int pid;
+    private int exitcode;
+    private boolean hasExited;
+
+    private /* final */ OutputStream stdin;
+    private /* final */ InputStream  stdout;
+    private /* final */ InputStream  stderr;
+
+    // only used on Solaris
+    private /* final */ DeferredCloseInputStream stdout_inner_stream;
+
+    private static enum LaunchMechanism {
+        // order IS important!
+        FORK,
+        POSIX_SPAWN,
+        VFORK
+    }
+
+    private static enum Platform {
+
+        LINUX(LaunchMechanism.VFORK, LaunchMechanism.FORK),
+
+        BSD(LaunchMechanism.POSIX_SPAWN, LaunchMechanism.FORK),
+
+        SOLARIS(LaunchMechanism.POSIX_SPAWN, LaunchMechanism.FORK),
+
+        AIX(LaunchMechanism.POSIX_SPAWN, LaunchMechanism.FORK);
+
+        final LaunchMechanism defaultLaunchMechanism;
+        final Set<LaunchMechanism> validLaunchMechanisms;
+
+        Platform(LaunchMechanism ... launchMechanisms) {
+            this.defaultLaunchMechanism = launchMechanisms[0];
+            this.validLaunchMechanisms =
+                EnumSet.copyOf(Arrays.asList(launchMechanisms));
+        }
+
+        private String helperPath(String javahome, String osArch) {
+            switch (this) {
+                case SOLARIS:
+                    if (osArch.equals("x86")) { osArch = "i386"; }
+                    else if (osArch.equals("x86_64")) { osArch = "amd64"; }
+                    // fall through...
+                case LINUX:
+                case AIX:
+                    return javahome + "/lib/" + osArch + "/jspawnhelper";
+
+                case BSD:
+                    return javahome + "/lib/jspawnhelper";
+
+                default:
+                    throw new AssertionError("Unsupported platform: " + this);
+            }
+        }
+
+        String helperPath() {
+            return AccessController.doPrivileged(
+                (PrivilegedAction<String>) () ->
+                    helperPath(System.getProperty("java.home"),
+                               System.getProperty("os.arch"))
+            );
+        }
+
+        LaunchMechanism launchMechanism() {
+            return AccessController.doPrivileged(
+                (PrivilegedAction<LaunchMechanism>) () -> {
+                    String s = System.getProperty(
+                        "jdk.lang.Process.launchMechanism");
+                    LaunchMechanism lm;
+                    if (s == null) {
+                        lm = defaultLaunchMechanism;
+                        s = lm.name().toLowerCase(Locale.ENGLISH);
+                    } else {
+                        try {
+                            lm = LaunchMechanism.valueOf(
+                                s.toUpperCase(Locale.ENGLISH));
+                        } catch (IllegalArgumentException e) {
+                            lm = null;
+                        }
+                    }
+                    if (lm == null || !validLaunchMechanisms.contains(lm)) {
+                        throw new Error(
+                            s + " is not a supported " +
+                            "process launch mechanism on this platform."
+                        );
+                    }
+                    return lm;
+                }
+            );
+        }
+
+        static Platform get() {
+            String osName = AccessController.doPrivileged(
+                (PrivilegedAction<String>) () -> System.getProperty("os.name")
+            );
+
+            if (osName.equals("Linux")) { return LINUX; }
+            if (osName.contains("OS X")) { return BSD; }
+            if (osName.equals("SunOS")) { return SOLARIS; }
+            if (osName.equals("AIX")) { return AIX; }
+
+            throw new Error(osName + " is not a supported OS platform.");
+        }
+    }
+
+    private static final Platform platform = Platform.get();
+    private static final LaunchMechanism launchMechanism = platform.launchMechanism();
+    private static final byte[] helperpath = toCString(platform.helperPath());
+
+    private static byte[] toCString(String s) {
+        if (s == null)
+            return null;
+        byte[] bytes = s.getBytes();
+        byte[] result = new byte[bytes.length + 1];
+        System.arraycopy(bytes, 0,
+                         result, 0,
+                         bytes.length);
+        result[result.length-1] = (byte)0;
+        return result;
+    }
+
+    /* this is for the reaping thread */
+    private native int waitForProcessExit(int pid);
+
+    /**
+     * Creates a process. Depending on the {@code mode} flag, this is done by
+     * one of the following mechanisms:
+     * <pre>
+     *   1 - fork(2) and exec(2)
+     *   2 - posix_spawn(3P)
+     *   3 - vfork(2) and exec(2)
+     *
+     *  (4 - clone(2) and exec(2) - obsolete and currently disabled in native code)
+     * </pre>
+     * @param fds an array of three file descriptors.
+     *        Indexes 0, 1, and 2 correspond to standard input,
+     *        standard output and standard error, respectively.  On
+     *        input, a value of -1 means to create a pipe to connect
+     *        child and parent processes.  On output, a value which
+     *        is not -1 is the parent pipe fd corresponding to the
+     *        pipe which has been created.  An element of this array
+     *        is -1 on input if and only if it is <em>not</em> -1 on
+     *        output.
+     * @return the pid of the subprocess
+     */
+    private native int forkAndExec(int mode, byte[] helperpath,
+                                   byte[] prog,
+                                   byte[] argBlock, int argc,
+                                   byte[] envBlock, int envc,
+                                   byte[] dir,
+                                   int[] fds,
+                                   boolean redirectErrorStream)
+        throws IOException;
+
+    /**
+     * The thread pool of "process reaper" daemon threads.
+     */
+    private static final Executor processReaperExecutor =
+        doPrivileged((PrivilegedAction<Executor>) () -> {
+
+            ThreadGroup tg = Thread.currentThread().getThreadGroup();
+            while (tg.getParent() != null) tg = tg.getParent();
+            ThreadGroup systemThreadGroup = tg;
+
+            ThreadFactory threadFactory = grimReaper -> {
+                // Our thread stack requirement is quite modest.
+                Thread t = new Thread(systemThreadGroup, grimReaper,
+                                      "process reaper", 32768);
+                t.setDaemon(true);
+                // A small attempt (probably futile) to avoid priority inversion
+                t.setPriority(Thread.MAX_PRIORITY);
+                return t;
+            };
+
+            return Executors.newCachedThreadPool(threadFactory);
+        });
+
+    UNIXProcess(final byte[] prog,
+                final byte[] argBlock, final int argc,
+                final byte[] envBlock, final int envc,
+                final byte[] dir,
+                final int[] fds,
+                final boolean redirectErrorStream)
+            throws IOException {
+
+        pid = forkAndExec(launchMechanism.ordinal() + 1,
+                          helperpath,
+                          prog,
+                          argBlock, argc,
+                          envBlock, envc,
+                          dir,
+                          fds,
+                          redirectErrorStream);
+
+        try {
+            doPrivileged((PrivilegedExceptionAction<Void>) () -> {
+                initStreams(fds);
+                return null;
+            });
+        } catch (PrivilegedActionException ex) {
+            throw (IOException) ex.getException();
+        }
+    }
+
+    static FileDescriptor newFileDescriptor(int fd) {
+        FileDescriptor fileDescriptor = new FileDescriptor();
+        fdAccess.set(fileDescriptor, fd);
+        return fileDescriptor;
+    }
+
+    void initStreams(int[] fds) throws IOException {
+        switch (platform) {
+            case LINUX:
+            case BSD:
+                stdin = (fds[0] == -1) ?
+                        ProcessBuilder.NullOutputStream.INSTANCE :
+                        new ProcessPipeOutputStream(fds[0]);
+
+                stdout = (fds[1] == -1) ?
+                         ProcessBuilder.NullInputStream.INSTANCE :
+                         new ProcessPipeInputStream(fds[1]);
+
+                stderr = (fds[2] == -1) ?
+                         ProcessBuilder.NullInputStream.INSTANCE :
+                         new ProcessPipeInputStream(fds[2]);
+
+                processReaperExecutor.execute(() -> {
+                    int exitcode = waitForProcessExit(pid);
+
+                    synchronized (this) {
+                        this.exitcode = exitcode;
+                        this.hasExited = true;
+                        this.notifyAll();
+                    }
+
+                    if (stdout instanceof ProcessPipeInputStream)
+                        ((ProcessPipeInputStream) stdout).processExited();
+
+                    if (stderr instanceof ProcessPipeInputStream)
+                        ((ProcessPipeInputStream) stderr).processExited();
+
+                    if (stdin instanceof ProcessPipeOutputStream)
+                        ((ProcessPipeOutputStream) stdin).processExited();
+                });
+                break;
+
+            case SOLARIS:
+                stdin = (fds[0] == -1) ?
+                        ProcessBuilder.NullOutputStream.INSTANCE :
+                        new BufferedOutputStream(
+                            new FileOutputStream(newFileDescriptor(fds[0])));
+
+                stdout = (fds[1] == -1) ?
+                         ProcessBuilder.NullInputStream.INSTANCE :
+                         new BufferedInputStream(
+                             stdout_inner_stream =
+                                 new DeferredCloseInputStream(
+                                     newFileDescriptor(fds[1])));
+
+                stderr = (fds[2] == -1) ?
+                         ProcessBuilder.NullInputStream.INSTANCE :
+                         new DeferredCloseInputStream(newFileDescriptor(fds[2]));
+
+                /*
+                 * For each subprocess forked a corresponding reaper task
+                 * is submitted.  That task is the only thread which waits
+                 * for the subprocess to terminate and it doesn't hold any
+                 * locks while doing so.  This design allows waitFor() and
+                 * exitStatus() to be safely executed in parallel (and they
+                 * need no native code).
+                 */
+                processReaperExecutor.execute(() -> {
+                    int exitcode = waitForProcessExit(pid);
+
+                    synchronized (this) {
+                        this.exitcode = exitcode;
+                        this.hasExited = true;
+                        this.notifyAll();
+                    }
+                });
+                break;
+
+            case AIX:
+                stdin = (fds[0] == -1) ?
+                        ProcessBuilder.NullOutputStream.INSTANCE :
+                        new ProcessPipeOutputStream(fds[0]);
+
+                stdout = (fds[1] == -1) ?
+                         ProcessBuilder.NullInputStream.INSTANCE :
+                         new DeferredCloseProcessPipeInputStream(fds[1]);
+
+                stderr = (fds[2] == -1) ?
+                         ProcessBuilder.NullInputStream.INSTANCE :
+                         new DeferredCloseProcessPipeInputStream(fds[2]);
+
+                processReaperExecutor.execute(() -> {
+                    int exitcode = waitForProcessExit(pid);
+
+                    synchronized (this) {
+                        this.exitcode = exitcode;
+                        this.hasExited = true;
+                        this.notifyAll();
+                    }
+
+                    if (stdout instanceof DeferredCloseProcessPipeInputStream)
+                        ((DeferredCloseProcessPipeInputStream) stdout).processExited();
+
+                    if (stderr instanceof DeferredCloseProcessPipeInputStream)
+                        ((DeferredCloseProcessPipeInputStream) stderr).processExited();
+
+                    if (stdin instanceof ProcessPipeOutputStream)
+                        ((ProcessPipeOutputStream) stdin).processExited();
+                });
+                break;
+
+            default: throw new AssertionError("Unsupported platform: " + platform);
+        }
+    }
+
+    public OutputStream getOutputStream() {
+        return stdin;
+    }
+
+    public InputStream getInputStream() {
+        return stdout;
+    }
+
+    public InputStream getErrorStream() {
+        return stderr;
+    }
+
+    public synchronized int waitFor() throws InterruptedException {
+        while (!hasExited) {
+            wait();
+        }
+        return exitcode;
+    }
+
+    @Override
+    public synchronized boolean waitFor(long timeout, TimeUnit unit)
+        throws InterruptedException
+    {
+        if (hasExited) return true;
+        if (timeout <= 0) return false;
+
+        long timeoutAsNanos = unit.toNanos(timeout);
+        long startTime = System.nanoTime();
+        long rem = timeoutAsNanos;
+
+        while (!hasExited && (rem > 0)) {
+            wait(Math.max(TimeUnit.NANOSECONDS.toMillis(rem), 1));
+            rem = timeoutAsNanos - (System.nanoTime() - startTime);
+        }
+        return hasExited;
+    }
+
+    public synchronized int exitValue() {
+        if (!hasExited) {
+            throw new IllegalThreadStateException("process hasn't exited");
+        }
+        return exitcode;
+    }
+
+    private static native void destroyProcess(int pid, boolean force);
+
+    private void destroy(boolean force) {
+        switch (platform) {
+            case LINUX:
+            case BSD:
+            case AIX:
+                // There is a risk that pid will be recycled, causing us to
+                // kill the wrong process!  So we only terminate processes
+                // that appear to still be running.  Even with this check,
+                // there is an unavoidable race condition here, but the window
+                // is very small, and OSes try hard to not recycle pids too
+                // soon, so this is quite safe.
+                synchronized (this) {
+                    if (!hasExited)
+                        destroyProcess(pid, force);
+                }
+                try { stdin.close();  } catch (IOException ignored) {}
+                try { stdout.close(); } catch (IOException ignored) {}
+                try { stderr.close(); } catch (IOException ignored) {}
+                break;
+
+            case SOLARIS:
+                // There is a risk that pid will be recycled, causing us to
+                // kill the wrong process!  So we only terminate processes
+                // that appear to still be running.  Even with this check,
+                // there is an unavoidable race condition here, but the window
+                // is very small, and OSes try hard to not recycle pids too
+                // soon, so this is quite safe.
+                synchronized (this) {
+                    if (!hasExited)
+                        destroyProcess(pid, force);
+                    try {
+                        stdin.close();
+                        if (stdout_inner_stream != null)
+                            stdout_inner_stream.closeDeferred(stdout);
+                        if (stderr instanceof DeferredCloseInputStream)
+                            ((DeferredCloseInputStream) stderr)
+                                .closeDeferred(stderr);
+                    } catch (IOException e) {
+                        // ignore
+                    }
+                }
+                break;
+
+            default: throw new AssertionError("Unsupported platform: " + platform);
+        }
+    }
+
+    public void destroy() {
+        destroy(false);
+    }
+
+    @Override
+    public Process destroyForcibly() {
+        destroy(true);
+        return this;
+    }
+
+    @Override
+    public synchronized boolean isAlive() {
+        return !hasExited;
+    }
+
+    private static native void init();
+
+    static {
+        init();
+    }
+
+    /**
+     * A buffered input stream for a subprocess pipe file descriptor
+     * that allows the underlying file descriptor to be reclaimed when
+     * the process exits, via the processExited hook.
+     *
+     * This is tricky because we do not want the user-level InputStream to be
+     * closed until the user invokes close(), and we need to continue to be
+     * able to read any buffered data lingering in the OS pipe buffer.
+     */
+    private static class ProcessPipeInputStream extends BufferedInputStream {
+        private final Object closeLock = new Object();
+
+        ProcessPipeInputStream(int fd) {
+            super(new FileInputStream(newFileDescriptor(fd)));
+        }
+        private static byte[] drainInputStream(InputStream in)
+                throws IOException {
+            int n = 0;
+            int j;
+            byte[] a = null;
+            while ((j = in.available()) > 0) {
+                a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j);
+                n += in.read(a, n, j);
+            }
+            return (a == null || n == a.length) ? a : Arrays.copyOf(a, n);
+        }
+
+        /** Called by the process reaper thread when the process exits. */
+        synchronized void processExited() {
+            synchronized (closeLock) {
+                try {
+                    InputStream in = this.in;
+                    // this stream is closed if and only if: in == null
+                    if (in != null) {
+                        byte[] stragglers = drainInputStream(in);
+                        in.close();
+                        this.in = (stragglers == null) ?
+                            ProcessBuilder.NullInputStream.INSTANCE :
+                            new ByteArrayInputStream(stragglers);
+                    }
+                } catch (IOException ignored) {}
+            }
+        }
+
+        @Override
+        public void close() throws IOException {
+            // BufferedInputStream#close() is not synchronized unlike most other
+            // methods. Synchronizing helps avoid race with processExited().
+            synchronized (closeLock) {
+                super.close();
+            }
+        }
+    }
+
+    /**
+     * A buffered output stream for a subprocess pipe file descriptor
+     * that allows the underlying file descriptor to be reclaimed when
+     * the process exits, via the processExited hook.
+     */
+    private static class ProcessPipeOutputStream extends BufferedOutputStream {
+        ProcessPipeOutputStream(int fd) {
+            super(new FileOutputStream(newFileDescriptor(fd)));
+        }
+
+        /** Called by the process reaper thread when the process exits. */
+        synchronized void processExited() {
+            OutputStream out = this.out;
+            if (out != null) {
+                try {
+                    out.close();
+                } catch (IOException ignored) {
+                    // We know of no reason to get an IOException, but if
+                    // we do, there's nothing else to do but carry on.
+                }
+                this.out = ProcessBuilder.NullOutputStream.INSTANCE;
+            }
+        }
+    }
+
+    // A FileInputStream that supports the deferment of the actual close
+    // operation until the last pending I/O operation on the stream has
+    // finished.  This is required on Solaris because we must close the stdin
+    // and stdout streams in the destroy method in order to reclaim the
+    // underlying file descriptors.  Doing so, however, causes any thread
+    // currently blocked in a read on one of those streams to receive an
+    // IOException("Bad file number"), which is incompatible with historical
+    // behavior.  By deferring the close we allow any pending reads to see -1
+    // (EOF) as they did before.
+    //
+    private static class DeferredCloseInputStream extends FileInputStream
+    {
+        DeferredCloseInputStream(FileDescriptor fd) {
+            super(fd);
+        }
+
+        private Object lock = new Object();     // For the following fields
+        private boolean closePending = false;
+        private int useCount = 0;
+        private InputStream streamToClose;
+
+        private void raise() {
+            synchronized (lock) {
+                useCount++;
+            }
+        }
+
+        private void lower() throws IOException {
+            synchronized (lock) {
+                useCount--;
+                if (useCount == 0 && closePending) {
+                    streamToClose.close();
+                }
+            }
+        }
+
+        // stc is the actual stream to be closed; it might be this object, or
+        // it might be an upstream object for which this object is downstream.
+        //
+        private void closeDeferred(InputStream stc) throws IOException {
+            synchronized (lock) {
+                if (useCount == 0) {
+                    stc.close();
+                } else {
+                    closePending = true;
+                    streamToClose = stc;
+                }
+            }
+        }
+
+        public void close() throws IOException {
+            synchronized (lock) {
+                useCount = 0;
+                closePending = false;
+            }
+            super.close();
+        }
+
+        public int read() throws IOException {
+            raise();
+            try {
+                return super.read();
+            } finally {
+                lower();
+            }
+        }
+
+        public int read(byte[] b) throws IOException {
+            raise();
+            try {
+                return super.read(b);
+            } finally {
+                lower();
+            }
+        }
+
+        public int read(byte[] b, int off, int len) throws IOException {
+            raise();
+            try {
+                return super.read(b, off, len);
+            } finally {
+                lower();
+            }
+        }
+
+        public long skip(long n) throws IOException {
+            raise();
+            try {
+                return super.skip(n);
+            } finally {
+                lower();
+            }
+        }
+
+        public int available() throws IOException {
+            raise();
+            try {
+                return super.available();
+            } finally {
+                lower();
+            }
+        }
+    }
+
+    /**
+     * A buffered input stream for a subprocess pipe file descriptor
+     * that allows the underlying file descriptor to be reclaimed when
+     * the process exits, via the processExited hook.
+     *
+     * This is tricky because we do not want the user-level InputStream to be
+     * closed until the user invokes close(), and we need to continue to be
+     * able to read any buffered data lingering in the OS pipe buffer.
+     *
+     * On AIX this is especially tricky, because the 'close()' system call
+     * will block if another thread is at the same time blocked in a file
+     * operation (e.g. 'read()') on the same file descriptor. We therefore
+     * combine 'ProcessPipeInputStream' approach used on Linux and Bsd
+     * with the DeferredCloseInputStream approach used on Solaris. This means
+     * that every potentially blocking operation on the file descriptor
+     * increments a counter before it is executed and decrements it once it
+     * finishes. The 'close()' operation will only be executed if there are
+     * no pending operations. Otherwise it is deferred after the last pending
+     * operation has finished.
+     *
+     */
+    private static class DeferredCloseProcessPipeInputStream
+        extends BufferedInputStream {
+
+        private final Object closeLock = new Object();
+        private int useCount = 0;
+        private boolean closePending = false;
+
+        DeferredCloseProcessPipeInputStream(int fd) {
+            super(new FileInputStream(newFileDescriptor(fd)));
+        }
+
+        private InputStream drainInputStream(InputStream in)
+                throws IOException {
+            int n = 0;
+            int j;
+            byte[] a = null;
+            synchronized (closeLock) {
+                if (buf == null) // asynchronous close()?
+                    return null; // discard
+                j = in.available();
+            }
+            while (j > 0) {
+                a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j);
+                synchronized (closeLock) {
+                    if (buf == null) // asynchronous close()?
+                        return null; // discard
+                    n += in.read(a, n, j);
+                    j = in.available();
+                }
+            }
+            return (a == null) ?
+                    ProcessBuilder.NullInputStream.INSTANCE :
+                    new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n));
+        }
+
+        /** Called by the process reaper thread when the process exits. */
+        synchronized void processExited() {
+            try {
+                InputStream in = this.in;
+                if (in != null) {
+                    InputStream stragglers = drainInputStream(in);
+                    in.close();
+                    this.in = stragglers;
+                }
+            } catch (IOException ignored) { }
+        }
+
+        private void raise() {
+            synchronized (closeLock) {
+                useCount++;
+            }
+        }
+
+        private void lower() throws IOException {
+            synchronized (closeLock) {
+                useCount--;
+                if (useCount == 0 && closePending) {
+                    closePending = false;
+                    super.close();
+                }
+            }
+        }
+
+        @Override
+        public int read() throws IOException {
+            raise();
+            try {
+                return super.read();
+            } finally {
+                lower();
+            }
+        }
+
+        @Override
+        public int read(byte[] b) throws IOException {
+            raise();
+            try {
+                return super.read(b);
+            } finally {
+                lower();
+            }
+        }
+
+        @Override
+        public int read(byte[] b, int off, int len) throws IOException {
+            raise();
+            try {
+                return super.read(b, off, len);
+            } finally {
+                lower();
+            }
+        }
+
+        @Override
+        public long skip(long n) throws IOException {
+            raise();
+            try {
+                return super.skip(n);
+            } finally {
+                lower();
+            }
+        }
+
+        @Override
+        public int available() throws IOException {
+            raise();
+            try {
+                return super.available();
+            } finally {
+                lower();
+            }
+        }
+
+        @Override
+        public void close() throws IOException {
+            // BufferedInputStream#close() is not synchronized unlike most other
+            // methods. Synchronizing helps avoid racing with drainInputStream().
+            synchronized (closeLock) {
+                if (useCount == 0) {
+                    super.close();
+                }
+                else {
+                    closePending = true;
+                }
+            }
+        }
+    }
+}
--- a/jdk/src/solaris/classes/java/lang/UNIXProcess.java.aix	Thu May 15 10:37:52 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,504 +0,0 @@
-/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 java.lang;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.FileDescriptor;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.security.AccessController;
-import static java.security.AccessController.doPrivileged;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-/**
- * java.lang.Process subclass in the UNIX environment.
- *
- * @author Mario Wolczko and Ross Knippel.
- * @author Konstantin Kladko (ported to Linux)
- * @author Martin Buchholz
- * @author Volker Simonis (ported to AIX)
- */
-final class UNIXProcess extends Process {
-    private static final sun.misc.JavaIOFileDescriptorAccess fdAccess
-        = sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess();
-
-    private final int pid;
-    private int exitcode;
-    private boolean hasExited;
-
-    private /* final */ OutputStream stdin;
-    private /* final */ InputStream  stdout;
-    private /* final */ InputStream  stderr;
-
-    private static enum LaunchMechanism {
-        FORK(1),
-        POSIX_SPAWN(2);
-
-        private int value;
-        LaunchMechanism(int x) {value = x;}
-    };
-
-    /* On AIX, the default is to spawn */
-    private static final LaunchMechanism launchMechanism;
-    private static byte[] helperpath;
-
-    private static byte[] toCString(String s) {
-        if (s == null)
-            return null;
-        byte[] bytes = s.getBytes();
-        byte[] result = new byte[bytes.length + 1];
-        System.arraycopy(bytes, 0,
-                         result, 0,
-                         bytes.length);
-        result[result.length-1] = (byte)0;
-        return result;
-    }
-
-    static {
-        launchMechanism = AccessController.doPrivileged(
-                new PrivilegedAction<LaunchMechanism>()
-        {
-            public LaunchMechanism run() {
-                String javahome = System.getProperty("java.home");
-                String osArch = System.getProperty("os.arch");
-
-                helperpath = toCString(javahome + "/lib/" + osArch + "/jspawnhelper");
-                String s = System.getProperty(
-                    "jdk.lang.Process.launchMechanism", "posix_spawn");
-
-                try {
-                    return LaunchMechanism.valueOf(s.toUpperCase());
-                } catch (IllegalArgumentException e) {
-                    throw new Error(s + " is not a supported " +
-                        "process launch mechanism on this platform.");
-                }
-            }
-        });
-    }
-
-    /* this is for the reaping thread */
-    private native int waitForProcessExit(int pid);
-
-    /**
-     * Create a process. Depending on the mode flag, this is done by
-     * one of the following mechanisms.
-     * - fork(2) and exec(2)
-     * - clone(2) and exec(2)
-     * - vfork(2) and exec(2)
-     *
-     * @param fds an array of three file descriptors.
-     *        Indexes 0, 1, and 2 correspond to standard input,
-     *        standard output and standard error, respectively.  On
-     *        input, a value of -1 means to create a pipe to connect
-     *        child and parent processes.  On output, a value which
-     *        is not -1 is the parent pipe fd corresponding to the
-     *        pipe which has been created.  An element of this array
-     *        is -1 on input if and only if it is <em>not</em> -1 on
-     *        output.
-     * @return the pid of the subprocess
-     */
-    private native int forkAndExec(int mode, byte[] helperpath,
-                                   byte[] prog,
-                                   byte[] argBlock, int argc,
-                                   byte[] envBlock, int envc,
-                                   byte[] dir,
-                                   int[] fds,
-                                   boolean redirectErrorStream)
-        throws IOException;
-
-    /**
-     * The thread factory used to create "process reaper" daemon threads.
-     */
-    private static class ProcessReaperThreadFactory implements ThreadFactory {
-        private final static ThreadGroup group = getRootThreadGroup();
-
-        private static ThreadGroup getRootThreadGroup() {
-            return doPrivileged(new PrivilegedAction<ThreadGroup> () {
-                public ThreadGroup run() {
-                    ThreadGroup root = Thread.currentThread().getThreadGroup();
-                    while (root.getParent() != null)
-                        root = root.getParent();
-                    return root;
-                }});
-        }
-
-        public Thread newThread(Runnable grimReaper) {
-            // Our thread stack requirement is quite modest.
-            Thread t = new Thread(group, grimReaper, "process reaper", 32768);
-            t.setDaemon(true);
-            // A small attempt (probably futile) to avoid priority inversion
-            t.setPriority(Thread.MAX_PRIORITY);
-            return t;
-        }
-    }
-
-    /**
-     * The thread pool of "process reaper" daemon threads.
-     */
-    private static final Executor processReaperExecutor =
-        doPrivileged(new PrivilegedAction<Executor>() {
-            public Executor run() {
-                return Executors.newCachedThreadPool
-                    (new ProcessReaperThreadFactory());
-            }});
-
-    UNIXProcess(final byte[] prog,
-                final byte[] argBlock, final int argc,
-                final byte[] envBlock, final int envc,
-                final byte[] dir,
-                final int[] fds,
-                final boolean redirectErrorStream)
-            throws IOException {
-
-        pid = forkAndExec(launchMechanism.value,
-                          helperpath,
-                          prog,
-                          argBlock, argc,
-                          envBlock, envc,
-                          dir,
-                          fds,
-                          redirectErrorStream);
-
-        try {
-            doPrivileged(new PrivilegedExceptionAction<Void>() {
-                public Void run() throws IOException {
-                    initStreams(fds);
-                    return null;
-                }});
-        } catch (PrivilegedActionException ex) {
-            throw (IOException) ex.getException();
-        }
-    }
-
-    static FileDescriptor newFileDescriptor(int fd) {
-        FileDescriptor fileDescriptor = new FileDescriptor();
-        fdAccess.set(fileDescriptor, fd);
-        return fileDescriptor;
-    }
-
-    void initStreams(int[] fds) throws IOException {
-        stdin = (fds[0] == -1) ?
-            ProcessBuilder.NullOutputStream.INSTANCE :
-            new ProcessPipeOutputStream(fds[0]);
-
-        stdout = (fds[1] == -1) ?
-            ProcessBuilder.NullInputStream.INSTANCE :
-            new ProcessPipeInputStream(fds[1]);
-
-        stderr = (fds[2] == -1) ?
-            ProcessBuilder.NullInputStream.INSTANCE :
-            new ProcessPipeInputStream(fds[2]);
-
-        processReaperExecutor.execute(new Runnable() {
-            public void run() {
-                int exitcode = waitForProcessExit(pid);
-                UNIXProcess.this.processExited(exitcode);
-            }});
-    }
-
-    void processExited(int exitcode) {
-        synchronized (this) {
-            this.exitcode = exitcode;
-            hasExited = true;
-            notifyAll();
-        }
-
-        if (stdout instanceof ProcessPipeInputStream)
-            ((ProcessPipeInputStream) stdout).processExited();
-
-        if (stderr instanceof ProcessPipeInputStream)
-            ((ProcessPipeInputStream) stderr).processExited();
-
-        if (stdin instanceof ProcessPipeOutputStream)
-            ((ProcessPipeOutputStream) stdin).processExited();
-    }
-
-    public OutputStream getOutputStream() {
-        return stdin;
-    }
-
-    public InputStream getInputStream() {
-        return stdout;
-    }
-
-    public InputStream getErrorStream() {
-        return stderr;
-    }
-
-    public synchronized int waitFor() throws InterruptedException {
-        while (!hasExited) {
-            wait();
-        }
-        return exitcode;
-    }
-
-    @Override
-    public synchronized boolean waitFor(long timeout, TimeUnit unit)
-        throws InterruptedException
-    {
-        if (hasExited) return true;
-        if (timeout <= 0) return false;
-
-        long timeoutAsNanos = unit.toNanos(timeout);
-        long startTime = System.nanoTime();
-        long rem = timeoutAsNanos;
-
-        while (!hasExited && (rem > 0)) {
-            wait(Math.max(TimeUnit.NANOSECONDS.toMillis(rem), 1));
-            rem = timeoutAsNanos - (System.nanoTime() - startTime);
-        }
-        return hasExited;
-    }
-
-    public synchronized int exitValue() {
-        if (!hasExited) {
-            throw new IllegalThreadStateException("process hasn't exited");
-        }
-        return exitcode;
-    }
-
-    private static native void destroyProcess(int pid, boolean force);
-    private void destroy(boolean force) {
-        // There is a risk that pid will be recycled, causing us to
-        // kill the wrong process!  So we only terminate processes
-        // that appear to still be running.  Even with this check,
-        // there is an unavoidable race condition here, but the window
-        // is very small, and OSes try hard to not recycle pids too
-        // soon, so this is quite safe.
-        synchronized (this) {
-            if (!hasExited)
-                destroyProcess(pid, force);
-        }
-        try { stdin.close();  } catch (IOException ignored) {}
-        try { stdout.close(); } catch (IOException ignored) {}
-        try { stderr.close(); } catch (IOException ignored) {}
-    }
-
-    public void destroy() {
-        destroy(false);
-    }
-
-    @Override
-    public Process destroyForcibly() {
-        destroy(true);
-        return this;
-    }
-
-    @Override
-    public synchronized boolean isAlive() {
-        return !hasExited;
-    }
-
-    private static native void init();
-
-    static {
-        init();
-    }
-
-    /**
-     * A buffered input stream for a subprocess pipe file descriptor
-     * that allows the underlying file descriptor to be reclaimed when
-     * the process exits, via the processExited hook.
-     *
-     * This is tricky because we do not want the user-level InputStream to be
-     * closed until the user invokes close(), and we need to continue to be
-     * able to read any buffered data lingering in the OS pipe buffer.
-     *
-     * On AIX this is especially tricky, because the 'close()' system call
-     * will block if another thread is at the same time blocked in a file
-     * operation (e.g. 'read()') on the same file descriptor. We therefore
-     * combine this 'ProcessPipeInputStream' with the DeferredCloseInputStream
-     * approach used on Solaris (see "UNIXProcess.java.solaris"). This means
-     * that every potentially blocking operation on the file descriptor
-     * increments a counter before it is executed and decrements it once it
-     * finishes. The 'close()' operation will only be executed if there are
-     * no pending operations. Otherwise it is deferred after the last pending
-     * operation has finished.
-     *
-     */
-    static class ProcessPipeInputStream extends BufferedInputStream {
-        private final Object closeLock = new Object();
-        private int useCount = 0;
-        private boolean closePending = false;
-
-        ProcessPipeInputStream(int fd) {
-            super(new FileInputStream(newFileDescriptor(fd)));
-        }
-
-        private InputStream drainInputStream(InputStream in)
-                throws IOException {
-            int n = 0;
-            int j;
-            byte[] a = null;
-            synchronized (closeLock) {
-                if (buf == null) // asynchronous close()?
-                    return null; // discard
-                j = in.available();
-            }
-            while (j > 0) {
-                a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j);
-                synchronized (closeLock) {
-                    if (buf == null) // asynchronous close()?
-                        return null; // discard
-                    n += in.read(a, n, j);
-                    j = in.available();
-                }
-            }
-            return (a == null) ?
-                    ProcessBuilder.NullInputStream.INSTANCE :
-                    new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n));
-        }
-
-        /** Called by the process reaper thread when the process exits. */
-        synchronized void processExited() {
-            try {
-                InputStream in = this.in;
-                if (in != null) {
-                    InputStream stragglers = drainInputStream(in);
-                    in.close();
-                    this.in = stragglers;
-                }
-            } catch (IOException ignored) { }
-        }
-
-        private void raise() {
-            synchronized (closeLock) {
-                useCount++;
-            }
-        }
-
-        private void lower() throws IOException {
-            synchronized (closeLock) {
-                useCount--;
-                if (useCount == 0 && closePending) {
-                    closePending = false;
-                    super.close();
-                }
-            }
-        }
-
-        @Override
-        public int read() throws IOException {
-            raise();
-            try {
-                return super.read();
-            } finally {
-                lower();
-            }
-        }
-
-        @Override
-        public int read(byte[] b) throws IOException {
-            raise();
-            try {
-                return super.read(b);
-            } finally {
-                lower();
-            }
-        }
-
-        @Override
-        public int read(byte[] b, int off, int len) throws IOException {
-            raise();
-            try {
-                return super.read(b, off, len);
-            } finally {
-                lower();
-            }
-        }
-
-        @Override
-        public long skip(long n) throws IOException {
-            raise();
-            try {
-                return super.skip(n);
-            } finally {
-                lower();
-            }
-        }
-
-        @Override
-        public int available() throws IOException {
-            raise();
-            try {
-                return super.available();
-            } finally {
-                lower();
-            }
-        }
-
-        @Override
-        public void close() throws IOException {
-            // BufferedInputStream#close() is not synchronized unlike most other methods.
-            // Synchronizing helps avoid racing with drainInputStream().
-            synchronized (closeLock) {
-                if (useCount == 0) {
-                    super.close();
-                }
-                else {
-                    closePending = true;
-                }
-            }
-        }
-    }
-
-    /**
-     * A buffered output stream for a subprocess pipe file descriptor
-     * that allows the underlying file descriptor to be reclaimed when
-     * the process exits, via the processExited hook.
-     */
-    static class ProcessPipeOutputStream extends BufferedOutputStream {