Merge
authorprr
Mon, 08 Jun 2015 11:31:09 -0700
changeset 31174 f3e2593f91cc
parent 31173 995727750ee6 (current diff)
parent 31062 a6b5f444cb68 (diff)
child 31175 65b2763f4209
child 31430 66b012d00bd3
Merge
langtools/test/tools/javac/7153958/pkg/ClassToBeStaticallyImported.java
--- a/.hgtags	Mon Jun 08 16:47:23 2015 +0100
+++ b/.hgtags	Mon Jun 08 11:31:09 2015 -0700
@@ -309,3 +309,4 @@
 8ffdeabc7c2b9a8280bf46cae026ac46b4d31c26 jdk9-b64
 4915246064b2f89d5f00c96e758686b7fdad36a6 jdk9-b65
 ff3fc75f3214ad7e03595be1b0d0f38d887b6f0e jdk9-b66
+56166ce66037952fa21e9f680b31bf8eb47312c0 jdk9-b67
--- a/.hgtags-top-repo	Mon Jun 08 16:47:23 2015 +0100
+++ b/.hgtags-top-repo	Mon Jun 08 11:31:09 2015 -0700
@@ -309,3 +309,4 @@
 82cf9aab9a83e41c8194ba01af9666afdb856cbe jdk9-b64
 7c31f9d7b932f7924f1258d52885b1c7c3e078c2 jdk9-b65
 dc6e8336f51bb6b67b7245766179eab5ca7720b4 jdk9-b66
+f546760134eb861fcfecd4ce611b0040b0d25a6a jdk9-b67
--- a/common/autoconf/flags.m4	Mon Jun 08 16:47:23 2015 +0100
+++ b/common/autoconf/flags.m4	Mon Jun 08 11:31:09 2015 -0700
@@ -338,14 +338,16 @@
       # no adjustment
       ;;
     slowdebug )
-      # Add runtime stack smashing and undefined behavior checks
-      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
-      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
+      # Add runtime stack smashing and undefined behavior checks.
+      # Not all versions of gcc support -fstack-protector
+      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
+      FLAGS_COMPILER_CHECK_ARGUMENTS([$STACK_PROTECTOR_CFLAG], [], [STACK_PROTECTOR_CFLAG=""])
+
+      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       ;;
     esac
   fi
-  AC_SUBST(CFLAGS_DEBUG_OPTIONS)
-  AC_SUBST(CXXFLAGS_DEBUG_OPTIONS)
 
   # Optimization levels
   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
--- a/common/autoconf/generated-configure.sh	Mon Jun 08 16:47:23 2015 +0100
+++ b/common/autoconf/generated-configure.sh	Mon Jun 08 11:31:09 2015 -0700
@@ -718,8 +718,6 @@
 C_O_FLAG_NORM
 C_O_FLAG_HI
 C_O_FLAG_HIGHEST
-CXXFLAGS_DEBUG_OPTIONS
-CFLAGS_DEBUG_OPTIONS
 CXXFLAGS_DEBUG_SYMBOLS
 CFLAGS_DEBUG_SYMBOLS
 CXX_FLAG_DEPS
@@ -4366,7 +4364,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1432629750
+DATE_WHEN_GENERATED=1433337614
 
 ###############################################################################
 #
@@ -41837,15 +41835,81 @@
       # no adjustment
       ;;
     slowdebug )
-      # Add runtime stack smashing and undefined behavior checks
-      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
-      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
+      # Add runtime stack smashing and undefined behavior checks.
+      # Not all versions of gcc support -fstack-protector
+      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
+$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
+  supports=yes
+
+  saved_cflags="$CFLAGS"
+  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  supports=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  CFLAGS="$saved_cflags"
+
+  saved_cxxflags="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  supports=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  CXXFLAGS="$saved_cxxflags"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+$as_echo "$supports" >&6; }
+  if test "x$supports" = "xyes" ; then
+    :
+  else
+    STACK_PROTECTOR_CFLAG=""
+  fi
+
+
+      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
+      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
       ;;
     esac
   fi
 
-
-
   # Optimization levels
   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
--- a/corba/.hgtags	Mon Jun 08 16:47:23 2015 +0100
+++ b/corba/.hgtags	Mon Jun 08 11:31:09 2015 -0700
@@ -309,3 +309,4 @@
 0a5e5a7c3539e8bde73d9fe55750e49a49cb8dac jdk9-b64
 afc1e295c4bf83f9a5dd539c29914edd4a754a3f jdk9-b65
 44ee68f7dbacab24a45115fd6a8ccdc7eb6e8f0b jdk9-b66
+4418697e56f1f43597f55c7cb6573549c6117868 jdk9-b67
--- a/hotspot/.hgtags	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/.hgtags	Mon Jun 08 11:31:09 2015 -0700
@@ -469,3 +469,4 @@
 bf92b8db249cdfa5651ef954b6c0743a7e0ea4cd jdk9-b64
 e7ae94c4f35e940ea423fc1dd260435df34a77c0 jdk9-b65
 197e94e0dacddd16816f101d24fc0442ab518326 jdk9-b66
+d47dfabd16d48eb96a451edd1b61194a39ee0eb5 jdk9-b67
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad	Mon Jun 08 11:31:09 2015 -0700
@@ -161,70 +161,165 @@
 // the platform ABI treats v8-v15 as callee save). float registers
 // v16-v31 are SOC as per the platform spec
 
-  reg_def V0   ( SOC, SOC, Op_RegF,  0, v0->as_VMReg()         );
-  reg_def V0_H ( SOC, SOC, Op_RegF,  0, v0->as_VMReg()->next() );
-  reg_def V1   ( SOC, SOC, Op_RegF,  1, v1->as_VMReg()         );
-  reg_def V1_H ( SOC, SOC, Op_RegF,  1, v1->as_VMReg()->next() );
-  reg_def V2   ( SOC, SOC, Op_RegF,  2, v2->as_VMReg()         );
-  reg_def V2_H ( SOC, SOC, Op_RegF,  2, v2->as_VMReg()->next() );
-  reg_def V3   ( SOC, SOC, Op_RegF,  3, v3->as_VMReg()         );
-  reg_def V3_H ( SOC, SOC, Op_RegF,  3, v3->as_VMReg()->next() );
-  reg_def V4   ( SOC, SOC, Op_RegF,  4, v4->as_VMReg()         );
-  reg_def V4_H ( SOC, SOC, Op_RegF,  4, v4->as_VMReg()->next() );
-  reg_def V5   ( SOC, SOC, Op_RegF,  5, v5->as_VMReg()         );
-  reg_def V5_H ( SOC, SOC, Op_RegF,  5, v5->as_VMReg()->next() );
-  reg_def V6   ( SOC, SOC, Op_RegF,  6, v6->as_VMReg()         );
-  reg_def V6_H ( SOC, SOC, Op_RegF,  6, v6->as_VMReg()->next() );
-  reg_def V7   ( SOC, SOC, Op_RegF,  7, v7->as_VMReg()         );
-  reg_def V7_H ( SOC, SOC, Op_RegF,  7, v7->as_VMReg()->next() );
-  reg_def V8   ( SOC, SOE, Op_RegF,  8, v8->as_VMReg()         );
-  reg_def V8_H ( SOC, SOE, Op_RegF,  8, v8->as_VMReg()->next() );
-  reg_def V9   ( SOC, SOE, Op_RegF,  9, v9->as_VMReg()         );
-  reg_def V9_H ( SOC, SOE, Op_RegF,  9, v9->as_VMReg()->next() );
-  reg_def V10  ( SOC, SOE, Op_RegF, 10, v10->as_VMReg()        );
-  reg_def V10_H( SOC, SOE, Op_RegF, 10, v10->as_VMReg()->next());
-  reg_def V11  ( SOC, SOE, Op_RegF, 11, v11->as_VMReg()        );
-  reg_def V11_H( SOC, SOE, Op_RegF, 11, v11->as_VMReg()->next());
-  reg_def V12  ( SOC, SOE, Op_RegF, 12, v12->as_VMReg()        );
-  reg_def V12_H( SOC, SOE, Op_RegF, 12, v12->as_VMReg()->next());
-  reg_def V13  ( SOC, SOE, Op_RegF, 13, v13->as_VMReg()        );
-  reg_def V13_H( SOC, SOE, Op_RegF, 13, v13->as_VMReg()->next());
-  reg_def V14  ( SOC, SOE, Op_RegF, 14, v14->as_VMReg()        );
-  reg_def V14_H( SOC, SOE, Op_RegF, 14, v14->as_VMReg()->next());
-  reg_def V15  ( SOC, SOE, Op_RegF, 15, v15->as_VMReg()        );
-  reg_def V15_H( SOC, SOE, Op_RegF, 15, v15->as_VMReg()->next());
-  reg_def V16  ( SOC, SOC, Op_RegF, 16, v16->as_VMReg()        );
-  reg_def V16_H( SOC, SOC, Op_RegF, 16, v16->as_VMReg()->next());
-  reg_def V17  ( SOC, SOC, Op_RegF, 17, v17->as_VMReg()        );
-  reg_def V17_H( SOC, SOC, Op_RegF, 17, v17->as_VMReg()->next());
-  reg_def V18  ( SOC, SOC, Op_RegF, 18, v18->as_VMReg()        );
-  reg_def V18_H( SOC, SOC, Op_RegF, 18, v18->as_VMReg()->next());
-  reg_def V19  ( SOC, SOC, Op_RegF, 19, v19->as_VMReg()        );
-  reg_def V19_H( SOC, SOC, Op_RegF, 19, v19->as_VMReg()->next());
-  reg_def V20  ( SOC, SOC, Op_RegF, 20, v20->as_VMReg()        );
-  reg_def V20_H( SOC, SOC, Op_RegF, 20, v20->as_VMReg()->next());
-  reg_def V21  ( SOC, SOC, Op_RegF, 21, v21->as_VMReg()        );
-  reg_def V21_H( SOC, SOC, Op_RegF, 21, v21->as_VMReg()->next());
-  reg_def V22  ( SOC, SOC, Op_RegF, 22, v22->as_VMReg()        );
-  reg_def V22_H( SOC, SOC, Op_RegF, 22, v22->as_VMReg()->next());
-  reg_def V23  ( SOC, SOC, Op_RegF, 23, v23->as_VMReg()        );
-  reg_def V23_H( SOC, SOC, Op_RegF, 23, v23->as_VMReg()->next());
-  reg_def V24  ( SOC, SOC, Op_RegF, 24, v24->as_VMReg()        );
-  reg_def V24_H( SOC, SOC, Op_RegF, 24, v24->as_VMReg()->next());
-  reg_def V25  ( SOC, SOC, Op_RegF, 25, v25->as_VMReg()        );
-  reg_def V25_H( SOC, SOC, Op_RegF, 25, v25->as_VMReg()->next());
-  reg_def V26  ( SOC, SOC, Op_RegF, 26, v26->as_VMReg()        );
-  reg_def V26_H( SOC, SOC, Op_RegF, 26, v26->as_VMReg()->next());
-  reg_def V27  ( SOC, SOC, Op_RegF, 27, v27->as_VMReg()        );
-  reg_def V27_H( SOC, SOC, Op_RegF, 27, v27->as_VMReg()->next());
-  reg_def V28  ( SOC, SOC, Op_RegF, 28, v28->as_VMReg()        );
-  reg_def V28_H( SOC, SOC, Op_RegF, 28, v28->as_VMReg()->next());
-  reg_def V29  ( SOC, SOC, Op_RegF, 29, v29->as_VMReg()        );
-  reg_def V29_H( SOC, SOC, Op_RegF, 29, v29->as_VMReg()->next());
-  reg_def V30  ( SOC, SOC, Op_RegF, 30, v30->as_VMReg()        );
-  reg_def V30_H( SOC, SOC, Op_RegF, 30, v30->as_VMReg()->next());
-  reg_def V31  ( SOC, SOC, Op_RegF, 31, v31->as_VMReg()        );
-  reg_def V31_H( SOC, SOC, Op_RegF, 31, v31->as_VMReg()->next());
+  reg_def V0   ( SOC, SOC, Op_RegF,  0, v0->as_VMReg()          );
+  reg_def V0_H ( SOC, SOC, Op_RegF,  0, v0->as_VMReg()->next()  );
+  reg_def V0_J ( SOC, SOC, Op_RegF,  0, v0->as_VMReg()->next(2) );
+  reg_def V0_K ( SOC, SOC, Op_RegF,  0, v0->as_VMReg()->next(3) );
+
+  reg_def V1   ( SOC, SOC, Op_RegF,  1, v1->as_VMReg()          );
+  reg_def V1_H ( SOC, SOC, Op_RegF,  1, v1->as_VMReg()->next()  );
+  reg_def V1_J ( SOC, SOC, Op_RegF,  1, v1->as_VMReg()->next(2) );
+  reg_def V1_K ( SOC, SOC, Op_RegF,  1, v1->as_VMReg()->next(3) );
+
+  reg_def V2   ( SOC, SOC, Op_RegF,  2, v2->as_VMReg()          );
+  reg_def V2_H ( SOC, SOC, Op_RegF,  2, v2->as_VMReg()->next()  );
+  reg_def V2_J ( SOC, SOC, Op_RegF,  2, v2->as_VMReg()->next(2) );
+  reg_def V2_K ( SOC, SOC, Op_RegF,  2, v2->as_VMReg()->next(3) );
+
+  reg_def V3   ( SOC, SOC, Op_RegF,  3, v3->as_VMReg()          );
+  reg_def V3_H ( SOC, SOC, Op_RegF,  3, v3->as_VMReg()->next()  );
+  reg_def V3_J ( SOC, SOC, Op_RegF,  3, v3->as_VMReg()->next(2) );
+  reg_def V3_K ( SOC, SOC, Op_RegF,  3, v3->as_VMReg()->next(3) );
+
+  reg_def V4   ( SOC, SOC, Op_RegF,  4, v4->as_VMReg()          );
+  reg_def V4_H ( SOC, SOC, Op_RegF,  4, v4->as_VMReg()->next()  );
+  reg_def V4_J ( SOC, SOC, Op_RegF,  4, v4->as_VMReg()->next(2) );
+  reg_def V4_K ( SOC, SOC, Op_RegF,  4, v4->as_VMReg()->next(3) );
+
+  reg_def V5   ( SOC, SOC, Op_RegF,  5, v5->as_VMReg()          );
+  reg_def V5_H ( SOC, SOC, Op_RegF,  5, v5->as_VMReg()->next()  );
+  reg_def V5_J ( SOC, SOC, Op_RegF,  5, v5->as_VMReg()->next(2) );
+  reg_def V5_K ( SOC, SOC, Op_RegF,  5, v5->as_VMReg()->next(3) );
+
+  reg_def V6   ( SOC, SOC, Op_RegF,  6, v6->as_VMReg()          );
+  reg_def V6_H ( SOC, SOC, Op_RegF,  6, v6->as_VMReg()->next()  );
+  reg_def V6_J ( SOC, SOC, Op_RegF,  6, v6->as_VMReg()->next(2) );
+  reg_def V6_K ( SOC, SOC, Op_RegF,  6, v6->as_VMReg()->next(3) );
+
+  reg_def V7   ( SOC, SOC, Op_RegF,  7, v7->as_VMReg()          );
+  reg_def V7_H ( SOC, SOC, Op_RegF,  7, v7->as_VMReg()->next()  );
+  reg_def V7_J ( SOC, SOC, Op_RegF,  7, v7->as_VMReg()->next(2) );
+  reg_def V7_K ( SOC, SOC, Op_RegF,  7, v7->as_VMReg()->next(3) );
+
+  reg_def V8   ( SOC, SOC, Op_RegF,  8, v8->as_VMReg()          );
+  reg_def V8_H ( SOC, SOC, Op_RegF,  8, v8->as_VMReg()->next()  );
+  reg_def V8_J ( SOC, SOC, Op_RegF,  8, v8->as_VMReg()->next(2) );
+  reg_def V8_K ( SOC, SOC, Op_RegF,  8, v8->as_VMReg()->next(3) );
+
+  reg_def V9   ( SOC, SOC, Op_RegF,  9, v9->as_VMReg()          );
+  reg_def V9_H ( SOC, SOC, Op_RegF,  9, v9->as_VMReg()->next()  );
+  reg_def V9_J ( SOC, SOC, Op_RegF,  9, v9->as_VMReg()->next(2) );
+  reg_def V9_K ( SOC, SOC, Op_RegF,  9, v9->as_VMReg()->next(3) );
+
+  reg_def V10  ( SOC, SOC, Op_RegF, 10, v10->as_VMReg()         );
+  reg_def V10_H( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next() );
+  reg_def V10_J( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next(2));
+  reg_def V10_K( SOC, SOC, Op_RegF, 10, v10->as_VMReg()->next(3));
+
+  reg_def V11  ( SOC, SOC, Op_RegF, 11, v11->as_VMReg()         );
+  reg_def V11_H( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next() );
+  reg_def V11_J( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next(2));
+  reg_def V11_K( SOC, SOC, Op_RegF, 11, v11->as_VMReg()->next(3));
+
+  reg_def V12  ( SOC, SOC, Op_RegF, 12, v12->as_VMReg()         );
+  reg_def V12_H( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next() );
+  reg_def V12_J( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next(2));
+  reg_def V12_K( SOC, SOC, Op_RegF, 12, v12->as_VMReg()->next(3));
+
+  reg_def V13  ( SOC, SOC, Op_RegF, 13, v13->as_VMReg()         );
+  reg_def V13_H( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next() );
+  reg_def V13_J( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next(2));
+  reg_def V13_K( SOC, SOC, Op_RegF, 13, v13->as_VMReg()->next(3));
+
+  reg_def V14  ( SOC, SOC, Op_RegF, 14, v14->as_VMReg()         );
+  reg_def V14_H( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next() );
+  reg_def V14_J( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next(2));
+  reg_def V14_K( SOC, SOC, Op_RegF, 14, v14->as_VMReg()->next(3));
+
+  reg_def V15  ( SOC, SOC, Op_RegF, 15, v15->as_VMReg()         );
+  reg_def V15_H( SOC, SOC, Op_RegF, 15, v15->as_VMReg()->next() );
+  reg_def V15_J( SOC, SOC, Op_RegF, 15, v15->as_VMReg()->next(2));
+  reg_def V15_K( SOC, SOC, Op_RegF, 15, v15->as_VMReg()->next(3));
+
+  reg_def V16  ( SOC, SOC, Op_RegF, 16, v16->as_VMReg()         );
+  reg_def V16_H( SOC, SOC, Op_RegF, 16, v16->as_VMReg()->next() );
+  reg_def V16_J( SOC, SOC, Op_RegF, 16, v16->as_VMReg()->next(2));
+  reg_def V16_K( SOC, SOC, Op_RegF, 16, v16->as_VMReg()->next(3));
+
+  reg_def V17  ( SOC, SOC, Op_RegF, 17, v17->as_VMReg()         );
+  reg_def V17_H( SOC, SOC, Op_RegF, 17, v17->as_VMReg()->next() );
+  reg_def V17_J( SOC, SOC, Op_RegF, 17, v17->as_VMReg()->next(2));
+  reg_def V17_K( SOC, SOC, Op_RegF, 17, v17->as_VMReg()->next(3));
+
+  reg_def V18  ( SOC, SOC, Op_RegF, 18, v18->as_VMReg()         );
+  reg_def V18_H( SOC, SOC, Op_RegF, 18, v18->as_VMReg()->next() );
+  reg_def V18_J( SOC, SOC, Op_RegF, 18, v18->as_VMReg()->next(2));
+  reg_def V18_K( SOC, SOC, Op_RegF, 18, v18->as_VMReg()->next(3));
+
+  reg_def V19  ( SOC, SOC, Op_RegF, 19, v19->as_VMReg()         );
+  reg_def V19_H( SOC, SOC, Op_RegF, 19, v19->as_VMReg()->next() );
+  reg_def V19_J( SOC, SOC, Op_RegF, 19, v19->as_VMReg()->next(2));
+  reg_def V19_K( SOC, SOC, Op_RegF, 19, v19->as_VMReg()->next(3));
+
+  reg_def V20  ( SOC, SOC, Op_RegF, 20, v20->as_VMReg()         );
+  reg_def V20_H( SOC, SOC, Op_RegF, 20, v20->as_VMReg()->next() );
+  reg_def V20_J( SOC, SOC, Op_RegF, 20, v20->as_VMReg()->next(2));
+  reg_def V20_K( SOC, SOC, Op_RegF, 20, v20->as_VMReg()->next(3));
+
+  reg_def V21  ( SOC, SOC, Op_RegF, 21, v21->as_VMReg()         );
+  reg_def V21_H( SOC, SOC, Op_RegF, 21, v21->as_VMReg()->next() );
+  reg_def V21_J( SOC, SOC, Op_RegF, 21, v21->as_VMReg()->next(2));
+  reg_def V21_K( SOC, SOC, Op_RegF, 21, v21->as_VMReg()->next(3));
+
+  reg_def V22  ( SOC, SOC, Op_RegF, 22, v22->as_VMReg()         );
+  reg_def V22_H( SOC, SOC, Op_RegF, 22, v22->as_VMReg()->next() );
+  reg_def V22_J( SOC, SOC, Op_RegF, 22, v22->as_VMReg()->next(2));
+  reg_def V22_K( SOC, SOC, Op_RegF, 22, v22->as_VMReg()->next(3));
+
+  reg_def V23  ( SOC, SOC, Op_RegF, 23, v23->as_VMReg()         );
+  reg_def V23_H( SOC, SOC, Op_RegF, 23, v23->as_VMReg()->next() );
+  reg_def V23_J( SOC, SOC, Op_RegF, 23, v23->as_VMReg()->next(2));
+  reg_def V23_K( SOC, SOC, Op_RegF, 23, v23->as_VMReg()->next(3));
+
+  reg_def V24  ( SOC, SOC, Op_RegF, 24, v24->as_VMReg()         );
+  reg_def V24_H( SOC, SOC, Op_RegF, 24, v24->as_VMReg()->next() );
+  reg_def V24_J( SOC, SOC, Op_RegF, 24, v24->as_VMReg()->next(2));
+  reg_def V24_K( SOC, SOC, Op_RegF, 24, v24->as_VMReg()->next(3));
+
+  reg_def V25  ( SOC, SOC, Op_RegF, 25, v25->as_VMReg()         );
+  reg_def V25_H( SOC, SOC, Op_RegF, 25, v25->as_VMReg()->next() );
+  reg_def V25_J( SOC, SOC, Op_RegF, 25, v25->as_VMReg()->next(2));
+  reg_def V25_K( SOC, SOC, Op_RegF, 25, v25->as_VMReg()->next(3));
+
+  reg_def V26  ( SOC, SOC, Op_RegF, 26, v26->as_VMReg()         );
+  reg_def V26_H( SOC, SOC, Op_RegF, 26, v26->as_VMReg()->next() );
+  reg_def V26_J( SOC, SOC, Op_RegF, 26, v26->as_VMReg()->next(2));
+  reg_def V26_K( SOC, SOC, Op_RegF, 26, v26->as_VMReg()->next(3));
+
+  reg_def V27  ( SOC, SOC, Op_RegF, 27, v27->as_VMReg()         );
+  reg_def V27_H( SOC, SOC, Op_RegF, 27, v27->as_VMReg()->next() );
+  reg_def V27_J( SOC, SOC, Op_RegF, 27, v27->as_VMReg()->next(2));
+  reg_def V27_K( SOC, SOC, Op_RegF, 27, v27->as_VMReg()->next(3));
+
+  reg_def V28  ( SOC, SOC, Op_RegF, 28, v28->as_VMReg()         );
+  reg_def V28_H( SOC, SOC, Op_RegF, 28, v28->as_VMReg()->next() );
+  reg_def V28_J( SOC, SOC, Op_RegF, 28, v28->as_VMReg()->next(2));
+  reg_def V28_K( SOC, SOC, Op_RegF, 28, v28->as_VMReg()->next(3));
+
+  reg_def V29  ( SOC, SOC, Op_RegF, 29, v29->as_VMReg()         );
+  reg_def V29_H( SOC, SOC, Op_RegF, 29, v29->as_VMReg()->next() );
+  reg_def V29_J( SOC, SOC, Op_RegF, 29, v29->as_VMReg()->next(2));
+  reg_def V29_K( SOC, SOC, Op_RegF, 29, v29->as_VMReg()->next(3));
+
+  reg_def V30  ( SOC, SOC, Op_RegF, 30, v30->as_VMReg()         );
+  reg_def V30_H( SOC, SOC, Op_RegF, 30, v30->as_VMReg()->next() );
+  reg_def V30_J( SOC, SOC, Op_RegF, 30, v30->as_VMReg()->next(2));
+  reg_def V30_K( SOC, SOC, Op_RegF, 30, v30->as_VMReg()->next(3));
+
+  reg_def V31  ( SOC, SOC, Op_RegF, 31, v31->as_VMReg()         );
+  reg_def V31_H( SOC, SOC, Op_RegF, 31, v31->as_VMReg()->next() );
+  reg_def V31_J( SOC, SOC, Op_RegF, 31, v31->as_VMReg()->next(2));
+  reg_def V31_K( SOC, SOC, Op_RegF, 31, v31->as_VMReg()->next(3));
 
 // ----------------------------
 // Special Registers
@@ -291,42 +386,42 @@
 alloc_class chunk1(
 
     // no save
-    V16, V16_H,
-    V17, V17_H,
-    V18, V18_H,
-    V19, V19_H,
-    V20, V20_H,
-    V21, V21_H,
-    V22, V22_H,
-    V23, V23_H,
-    V24, V24_H,
-    V25, V25_H,
-    V26, V26_H,
-    V27, V27_H,
-    V28, V28_H,
-    V29, V29_H,
-    V30, V30_H,
-    V31, V31_H,
+    V16, V16_H, V16_J, V16_K,
+    V17, V17_H, V17_J, V17_K,
+    V18, V18_H, V18_J, V18_K,
+    V19, V19_H, V19_J, V19_K,
+    V20, V20_H, V20_J, V20_K,
+    V21, V21_H, V21_J, V21_K,
+    V22, V22_H, V22_J, V22_K,
+    V23, V23_H, V23_J, V23_K,
+    V24, V24_H, V24_J, V24_K,
+    V25, V25_H, V25_J, V25_K,
+    V26, V26_H, V26_J, V26_K,
+    V27, V27_H, V27_J, V27_K,
+    V28, V28_H, V28_J, V28_K,
+    V29, V29_H, V29_J, V29_K,
+    V30, V30_H, V30_J, V30_K,
+    V31, V31_H, V31_J, V31_K,
 
     // arg registers
-    V0, V0_H,
-    V1, V1_H,
-    V2, V2_H,
-    V3, V3_H,
-    V4, V4_H,
-    V5, V5_H,
-    V6, V6_H,
-    V7, V7_H,
+    V0, V0_H, V0_J, V0_K,
+    V1, V1_H, V1_J, V1_K,
+    V2, V2_H, V2_J, V2_K,
+    V3, V3_H, V3_J, V3_K,
+    V4, V4_H, V4_J, V4_K,
+    V5, V5_H, V5_J, V5_K,
+    V6, V6_H, V6_J, V6_K,
+    V7, V7_H, V7_J, V7_K,
 
     // non-volatiles
-    V8, V8_H,
-    V9, V9_H,
-    V10, V10_H,
-    V11, V11_H,
-    V12, V12_H,
-    V13, V13_H,
-    V14, V14_H,
-    V15, V15_H,
+    V8, V8_H, V8_J, V8_K,
+    V9, V9_H, V9_J, V9_K,
+    V10, V10_H, V10_J, V10_K,
+    V11, V11_H, V11_J, V11_K,
+    V12, V12_H, V12_J, V12_K,
+    V13, V13_H, V13_J, V13_K,
+    V14, V14_H, V14_J, V14_K,
+    V15, V15_H, V15_J, V15_K,
 );
 
 alloc_class chunk2(RFLAGS);
@@ -770,6 +865,42 @@
     V31, V31_H
 );
 
+// Class for all 128bit vector registers
+reg_class vectorx_reg(
+    V0, V0_H, V0_J, V0_K,
+    V1, V1_H, V1_J, V1_K,
+    V2, V2_H, V2_J, V2_K,
+    V3, V3_H, V3_J, V3_K,
+    V4, V4_H, V4_J, V4_K,
+    V5, V5_H, V5_J, V5_K,
+    V6, V6_H, V6_J, V6_K,
+    V7, V7_H, V7_J, V7_K,
+    V8, V8_H, V8_J, V8_K,
+    V9, V9_H, V9_J, V9_K,
+    V10, V10_H, V10_J, V10_K,
+    V11, V11_H, V11_J, V11_K,
+    V12, V12_H, V12_J, V12_K,
+    V13, V13_H, V13_J, V13_K,
+    V14, V14_H, V14_J, V14_K,
+    V15, V15_H, V15_J, V15_K,
+    V16, V16_H, V16_J, V16_K,
+    V17, V17_H, V17_J, V17_K,
+    V18, V18_H, V18_J, V18_K,
+    V19, V19_H, V19_J, V19_K,
+    V20, V20_H, V20_J, V20_K,
+    V21, V21_H, V21_J, V21_K,
+    V22, V22_H, V22_J, V22_K,
+    V23, V23_H, V23_J, V23_K,
+    V24, V24_H, V24_J, V24_K,
+    V25, V25_H, V25_J, V25_K,
+    V26, V26_H, V26_J, V26_K,
+    V27, V27_H, V27_J, V27_K,
+    V28, V28_H, V28_J, V28_K,
+    V29, V29_H, V29_J, V29_K,
+    V30, V30_H, V30_J, V30_K,
+    V31, V31_H, V31_J, V31_K
+);
+
 // Class for 128 bit register v0
 reg_class v0_reg(
     V0, V0_H
@@ -1964,7 +2095,7 @@
   }
 
   // we have 32 float register * 2 halves
-  if (reg < 60 + 64) {
+  if (reg < 60 + 128) {
     return rc_float;
   }
 
@@ -2000,6 +2131,78 @@
     return 0;            // Self copy, no move.
   }
 
+  if (bottom_type()->isa_vect() != NULL) {
+    uint len = 4;
+    if (cbuf) {
+      MacroAssembler _masm(cbuf);
+      uint ireg = ideal_reg();
+      assert((src_lo_rc != rc_int && dst_lo_rc != rc_int), "sanity");
+      assert(ireg == Op_VecX, "sanity");
+      if (src_lo_rc == rc_stack && dst_lo_rc == rc_stack) {
+        // stack->stack
+        int src_offset = ra_->reg2offset(src_lo);
+        int dst_offset = ra_->reg2offset(dst_lo);
+        assert((src_offset & 7) && (dst_offset & 7), "unaligned stack offset");
+        len = 8;
+        if (src_offset < 512) {
+          __ ldp(rscratch1, rscratch2, Address(sp, src_offset));
+        } else {
+          __ ldr(rscratch1, Address(sp, src_offset));
+          __ ldr(rscratch2, Address(sp, src_offset+4));
+          len += 4;
+        }
+        if (dst_offset < 512) {
+          __ stp(rscratch1, rscratch2, Address(sp, dst_offset));
+        } else {
+          __ str(rscratch1, Address(sp, dst_offset));
+          __ str(rscratch2, Address(sp, dst_offset+4));
+          len += 4;
+        }
+      } else if (src_lo_rc == rc_float && dst_lo_rc == rc_float) {
+        __ orr(as_FloatRegister(Matcher::_regEncode[dst_lo]), __ T16B,
+               as_FloatRegister(Matcher::_regEncode[src_lo]),
+               as_FloatRegister(Matcher::_regEncode[src_lo]));
+      } else if (src_lo_rc == rc_float && dst_lo_rc == rc_stack) {
+        __ str(as_FloatRegister(Matcher::_regEncode[src_lo]), __ Q,
+               Address(sp, ra_->reg2offset(dst_lo)));
+      } else if (src_lo_rc == rc_stack && dst_lo_rc == rc_float) {
+        __ ldr(as_FloatRegister(Matcher::_regEncode[dst_lo]), __ Q,
+               Address(sp, ra_->reg2offset(src_lo)));
+      } else {
+        ShouldNotReachHere();
+      }
+    } else if (st) {
+      if (src_lo_rc == rc_stack && dst_lo_rc == rc_stack) {
+        // stack->stack
+        int src_offset = ra_->reg2offset(src_lo);
+        int dst_offset = ra_->reg2offset(dst_lo);
+        if (src_offset < 512) {
+          st->print("ldp  rscratch1, rscratch2, [sp, #%d]", src_offset);
+        } else {
+          st->print("ldr  rscratch1, [sp, #%d]", src_offset);
+          st->print("\nldr  rscratch2, [sp, #%d]", src_offset+4);
+        }
+        if (dst_offset < 512) {
+          st->print("\nstp  rscratch1, rscratch2, [sp, #%d]", dst_offset);
+        } else {
+          st->print("\nstr  rscratch1, [sp, #%d]", dst_offset);
+          st->print("\nstr  rscratch2, [sp, #%d]", dst_offset+4);
+        }
+        st->print("\t# vector spill, stack to stack");
+      } else if (src_lo_rc == rc_float && dst_lo_rc == rc_float) {
+        st->print("mov  %s, %s\t# vector spill, reg to reg",
+                   Matcher::regName[dst_lo], Matcher::regName[src_lo]);
+      } else if (src_lo_rc == rc_float && dst_lo_rc == rc_stack) {
+        st->print("str  %s, [sp, #%d]\t# vector spill, reg to stack",
+                   Matcher::regName[src_lo], ra_->reg2offset(dst_lo));
+      } else if (src_lo_rc == rc_stack && dst_lo_rc == rc_float) {
+        st->print("ldr  %s, [sp, #%d]\t# vector spill, stack to reg",
+                   Matcher::regName[dst_lo], ra_->reg2offset(src_lo));
+      }
+    }
+    return len;
+  }
+
   switch (src_lo_rc) {
   case rc_int:
     if (dst_lo_rc == rc_int) {  // gpr --> gpr copy
@@ -2422,8 +2625,12 @@
 
 // Vector width in bytes.
 const int Matcher::vector_width_in_bytes(BasicType bt) {
-  // TODO fixme
-  return 0;
+  int size = MIN2(16,(int)MaxVectorSize);
+  // Minimum 2 values in vector
+  if (size < 2*type2aelembytes(bt)) size = 0;
+  // But never < 4
+  if (size < 4) size = 0;
+  return size;
 }
 
 // Limits on vector size (number of elements) loaded into vector.
@@ -2431,22 +2638,19 @@
   return vector_width_in_bytes(bt)/type2aelembytes(bt);
 }
 const int Matcher::min_vector_size(const BasicType bt) {
-  int max_size = max_vector_size(bt);
-  // Min size which can be loaded into vector is 4 bytes.
-  int size = (type2aelembytes(bt) == 1) ? 4 : 2;
-  return MIN2(size,max_size);
+  //return (type2aelembytes(bt) == 1) ? 4 : 2;
+  // For the moment, only support 1 vector size, 128 bits
+  return max_vector_size(bt);
 }
 
 // Vector ideal reg.
 const int Matcher::vector_ideal_reg(int len) {
-  // TODO fixme
-  return Op_RegD;
+  return Op_VecX;
 }
 
 // Only lowest bits of xmm reg are used for vector shift count.
 const int Matcher::vector_shift_count_ideal_reg(int size) {
-  // TODO fixme
-  return Op_RegL;
+  return Op_VecX;
 }
 
 // AES support not yet implemented
@@ -2657,6 +2861,8 @@
 
 typedef void (MacroAssembler::* mem_insn)(Register Rt, const Address &adr);
 typedef void (MacroAssembler::* mem_float_insn)(FloatRegister Rt, const Address &adr);
+typedef void (MacroAssembler::* mem_vector_insn)(FloatRegister Rt,
+                                  MacroAssembler::SIMD_RegVariant T, const Address &adr);
 
   // Used for all non-volatile memory accesses.  The use of
   // $mem->opcode() to discover whether this pattern uses sign-extended
@@ -2724,6 +2930,18 @@
     }
   }
 
+  static void loadStore(MacroAssembler masm, mem_vector_insn insn,
+                         FloatRegister reg, MacroAssembler::SIMD_RegVariant T,
+                         int opcode, Register base, int index, int size, int disp)
+  {
+    if (index == -1) {
+      (masm.*insn)(reg, T, Address(base, disp));
+    } else {
+      assert(disp == 0, "unsupported address mode");
+      (masm.*insn)(reg, T, Address(base, as_Register(index), Address::lsl(size)));
+    }
+  }
+
 %}
 
 
@@ -2855,6 +3073,24 @@
                as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
   %}
 
+  enc_class aarch64_enc_ldrvS(vecX dst, memory mem) %{
+    FloatRegister dst_reg = as_FloatRegister($dst$$reg);
+    loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldr, dst_reg, MacroAssembler::S,
+       $mem->opcode(), as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+  %}
+
+  enc_class aarch64_enc_ldrvD(vecX dst, memory mem) %{
+    FloatRegister dst_reg = as_FloatRegister($dst$$reg);
+    loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldr, dst_reg, MacroAssembler::D,
+       $mem->opcode(), as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+  %}
+
+  enc_class aarch64_enc_ldrvQ(vecX dst, memory mem) %{
+    FloatRegister dst_reg = as_FloatRegister($dst$$reg);
+    loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldr, dst_reg, MacroAssembler::Q,
+       $mem->opcode(), as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+  %}
+
   enc_class aarch64_enc_strb(iRegI src, memory mem) %{
     Register src_reg = as_Register($src$$reg);
     loadStore(MacroAssembler(&cbuf), &MacroAssembler::strb, src_reg, $mem->opcode(),
@@ -2923,6 +3159,24 @@
                as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
   %}
 
+  enc_class aarch64_enc_strvS(vecX src, memory mem) %{
+    FloatRegister src_reg = as_FloatRegister($src$$reg);
+    loadStore(MacroAssembler(&cbuf), &MacroAssembler::str, src_reg, MacroAssembler::S,
+       $mem->opcode(), as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+  %}
+
+  enc_class aarch64_enc_strvD(vecX src, memory mem) %{
+    FloatRegister src_reg = as_FloatRegister($src$$reg);
+    loadStore(MacroAssembler(&cbuf), &MacroAssembler::str, src_reg, MacroAssembler::D,
+       $mem->opcode(), as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+  %}
+
+  enc_class aarch64_enc_strvQ(vecX src, memory mem) %{
+    FloatRegister src_reg = as_FloatRegister($src$$reg);
+    loadStore(MacroAssembler(&cbuf), &MacroAssembler::str, src_reg, MacroAssembler::Q,
+       $mem->opcode(), as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+  %}
+
   // END Non-volatile memory access
 
   // volatile loads and stores
@@ -4933,6 +5187,16 @@
   interface(REG_INTER);
 %}
 
+operand vecX()
+%{
+  constraint(ALLOC_IN_RC(vectorx_reg));
+  match(VecX);
+
+  op_cost(0);
+  format %{ %}
+  interface(REG_INTER);
+%}
+
 operand vRegD_V0()
 %{
   constraint(ALLOC_IN_RC(v0_reg));
@@ -5505,6 +5769,7 @@
   interface(REG_INTER)
 %}
 
+opclass vmem(indirect, indIndex, indOffI, indOffL);
 
 //----------OPERAND CLASSES----------------------------------------------------
 // Operand Classes are groups of operands that are used as to simplify
@@ -12926,7 +13191,919 @@
   ins_pipe(pipe_class_empty);
 %}
 
-
+// ====================VECTOR INSTRUCTIONS=====================================
+
+// Load vector (32 bits)
+instruct loadV4(vecX dst, vmem mem)
+%{
+  predicate(n->as_LoadVector()->memory_size() == 4);
+  match(Set dst (LoadVector mem));
+  ins_cost(4 * INSN_COST);
+  format %{ "ldrs   $dst,$mem\t# vector (32 bits)" %}
+  ins_encode( aarch64_enc_ldrvS(dst, mem) );
+  ins_pipe(pipe_class_memory);
+%}
+
+// Load vector (64 bits)
+instruct loadV8(vecX dst, vmem mem)
+%{
+  predicate(n->as_LoadVector()->memory_size() == 8);
+  match(Set dst (LoadVector mem));
+  ins_cost(4 * INSN_COST);
+  format %{ "ldrd   $dst,$mem\t# vector (64 bits)" %}
+  ins_encode( aarch64_enc_ldrvD(dst, mem) );
+  ins_pipe(pipe_class_memory);
+%}
+
+// Load Vector (128 bits)
+instruct loadV16(vecX dst, vmem mem)
+%{
+  predicate(n->as_LoadVector()->memory_size() == 16);
+  match(Set dst (LoadVector mem));
+  ins_cost(4 * INSN_COST);
+  format %{ "ldrq   $dst,$mem\t# vector (128 bits)" %}
+  ins_encode( aarch64_enc_ldrvQ(dst, mem) );
+  ins_pipe(pipe_class_memory);
+%}
+
+// Store Vector (32 bits)
+instruct storeV4(vecX src, vmem mem)
+%{
+  predicate(n->as_StoreVector()->memory_size() == 4);
+  match(Set mem (StoreVector mem src));
+  ins_cost(4 * INSN_COST);
+  format %{ "strs   $mem,$src\t# vector (32 bits)" %}
+  ins_encode( aarch64_enc_strvS(src, mem) );
+  ins_pipe(pipe_class_memory);
+%}
+
+// Store Vector (64 bits)
+instruct storeV8(vecX src, vmem mem)
+%{
+  predicate(n->as_StoreVector()->memory_size() == 8);
+  match(Set mem (StoreVector mem src));
+  ins_cost(4 * INSN_COST);
+  format %{ "strd   $mem,$src\t# vector (64 bits)" %}
+  ins_encode( aarch64_enc_strvD(src, mem) );
+  ins_pipe(pipe_class_memory);
+%}
+
+// Store Vector (128 bits)
+instruct storeV16(vecX src, vmem mem)
+%{
+  predicate(n->as_StoreVector()->memory_size() == 16);
+  match(Set mem (StoreVector mem src));
+  ins_cost(4 * INSN_COST);
+  format %{ "strq   $mem,$src\t# vector (128 bits)" %}
+  ins_encode( aarch64_enc_strvQ(src, mem) );
+  ins_pipe(pipe_class_memory);
+%}
+
+instruct replicate16B(vecX dst, iRegIorL2I src)
+%{
+  match(Set dst (ReplicateB src));
+  ins_cost(INSN_COST);
+  format %{ "dup  $dst, $src\t# vector (16B)" %}
+  ins_encode %{
+    __ dup(as_FloatRegister($dst$$reg), __ T16B, as_Register($src$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate16B_imm(vecX dst, immI con)
+%{
+  match(Set dst (ReplicateB con));
+  ins_cost(INSN_COST);
+  format %{ "movi  $dst, $con\t# vector(16B)" %}
+  ins_encode %{
+    __ mov(as_FloatRegister($dst$$reg), __ T16B, $con$$constant);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate8S(vecX dst, iRegIorL2I src)
+%{
+  match(Set dst (ReplicateS src));
+  ins_cost(INSN_COST);
+  format %{ "dup  $dst, $src\t# vector (8S)" %}
+  ins_encode %{
+    __ dup(as_FloatRegister($dst$$reg), __ T8H, as_Register($src$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate8S_imm(vecX dst, immI con)
+%{
+  match(Set dst (ReplicateS con));
+  ins_cost(INSN_COST);
+  format %{ "movi  $dst, $con\t# vector(8H)" %}
+  ins_encode %{
+    __ mov(as_FloatRegister($dst$$reg), __ T8H, $con$$constant);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate4I(vecX dst, iRegIorL2I src)
+%{
+  match(Set dst (ReplicateI src));
+  ins_cost(INSN_COST);
+  format %{ "dup  $dst, $src\t# vector (4I)" %}
+  ins_encode %{
+    __ dup(as_FloatRegister($dst$$reg), __ T4S, as_Register($src$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate4I_imm(vecX dst, immI con)
+%{
+  match(Set dst (ReplicateI con));
+  ins_cost(INSN_COST);
+  format %{ "movi  $dst, $con\t# vector(4I)" %}
+  ins_encode %{
+    __ mov(as_FloatRegister($dst$$reg), __ T4S, $con$$constant);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate2L(vecX dst, iRegL src)
+%{
+  match(Set dst (ReplicateL src));
+  ins_cost(INSN_COST);
+  format %{ "dup  $dst, $src\t# vector (2L)" %}
+  ins_encode %{
+    __ dup(as_FloatRegister($dst$$reg), __ T2D, as_Register($src$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate2L_zero(vecX dst, immI0 zero)
+%{
+  match(Set dst (ReplicateI zero));
+  ins_cost(INSN_COST);
+  format %{ "movi  $dst, $zero\t# vector(4I)" %}
+  ins_encode %{
+    __ eor(as_FloatRegister($dst$$reg), __ T16B,
+           as_FloatRegister($dst$$reg),
+           as_FloatRegister($dst$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate4F(vecX dst, vRegF src)
+%{
+  match(Set dst (ReplicateF src));
+  ins_cost(INSN_COST);
+  format %{ "dup  $dst, $src\t# vector (4F)" %}
+  ins_encode %{
+    __ dup(as_FloatRegister($dst$$reg), __ T4S,
+           as_FloatRegister($src$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct replicate2D(vecX dst, vRegD src)
+%{
+  match(Set dst (ReplicateD src));
+  ins_cost(INSN_COST);
+  format %{ "dup  $dst, $src\t# vector (2D)" %}
+  ins_encode %{
+    __ dup(as_FloatRegister($dst$$reg), __ T2D,
+           as_FloatRegister($src$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// ====================REDUCTION ARITHMETIC====================================
+
+instruct reduce_add4I(iRegINoSp dst, iRegIorL2I src1, vecX src2, vecX tmp, iRegI tmp2)
+%{
+  match(Set dst (AddReductionVI src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP tmp, TEMP tmp2);
+  format %{ "addv  $tmp, T4S, $src2\n\t"
+            "umov  $tmp2, $tmp, S, 0\n\t"
+            "addw  $dst, $tmp2, $src1\t add reduction4i"
+  %}
+  ins_encode %{
+    __ addv(as_FloatRegister($tmp$$reg), __ T4S,
+            as_FloatRegister($src2$$reg));
+    __ umov($tmp2$$Register, as_FloatRegister($tmp$$reg), __ S, 0);
+    __ addw($dst$$Register, $tmp2$$Register, $src1$$Register);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_mul4I(iRegINoSp dst, iRegIorL2I src1, vecX src2, vecX tmp, iRegI tmp2)
+%{
+  match(Set dst (MulReductionVI src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP tmp, TEMP tmp2, TEMP dst);
+  format %{ "ins   $tmp, $src2, 0, 1\n\t"
+            "mul   $tmp, $tmp, $src2\n\t"
+            "umov  $tmp2, $tmp, S, 0\n\t"
+            "mul   $dst, $tmp2, $src1\n\t"
+            "umov  $tmp2, $tmp, S, 1\n\t"
+            "mul   $dst, $tmp2, $dst\t mul reduction4i\n\t"
+  %}
+  ins_encode %{
+    __ ins(as_FloatRegister($tmp$$reg), __ D,
+           as_FloatRegister($src2$$reg), 0, 1);
+    __ mulv(as_FloatRegister($tmp$$reg), __ T2S,
+           as_FloatRegister($tmp$$reg), as_FloatRegister($src2$$reg));
+    __ umov($tmp2$$Register, as_FloatRegister($tmp$$reg), __ S, 0);
+    __ mul($dst$$Register, $tmp2$$Register, $src1$$Register);
+    __ umov($tmp2$$Register, as_FloatRegister($tmp$$reg), __ S, 1);
+    __ mul($dst$$Register, $tmp2$$Register, $dst$$Register);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_add4F(vRegF dst, vRegF src1, vecX src2, vecX tmp)
+%{
+  match(Set dst (AddReductionVF src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP tmp, TEMP dst);
+  format %{ "fadds $dst, $src1, $src2\n\t"
+            "ins   $tmp, S, $src2, 0, 1\n\t"
+            "fadds $dst, $dst, $tmp\n\t"
+            "ins   $tmp, S, $src2, 0, 2\n\t"
+            "fadds $dst, $dst, $tmp\n\t"
+            "ins   $tmp, S, $src2, 0, 3\n\t"
+            "fadds $dst, $dst, $tmp\t add reduction4f"
+  %}
+  ins_encode %{
+    __ fadds(as_FloatRegister($dst$$reg),
+             as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ S,
+           as_FloatRegister($src2$$reg), 0, 1);
+    __ fadds(as_FloatRegister($dst$$reg),
+             as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ S,
+           as_FloatRegister($src2$$reg), 0, 2);
+    __ fadds(as_FloatRegister($dst$$reg),
+             as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ S,
+           as_FloatRegister($src2$$reg), 0, 3);
+    __ fadds(as_FloatRegister($dst$$reg),
+             as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_mul4F(vRegF dst, vRegF src1, vecX src2, vecX tmp)
+%{
+  match(Set dst (MulReductionVF src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP tmp, TEMP dst);
+  format %{ "fmuls $dst, $src1, $src2\n\t"
+            "ins   $tmp, S, $src2, 0, 1\n\t"
+            "fmuls $dst, $dst, $tmp\n\t"
+            "ins   $tmp, S, $src2, 0, 2\n\t"
+            "fmuls $dst, $dst, $tmp\n\t"
+            "ins   $tmp, S, $src2, 0, 3\n\t"
+            "fmuls $dst, $dst, $tmp\t add reduction4f"
+  %}
+  ins_encode %{
+    __ fmuls(as_FloatRegister($dst$$reg),
+             as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ S,
+           as_FloatRegister($src2$$reg), 0, 1);
+    __ fmuls(as_FloatRegister($dst$$reg),
+             as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ S,
+           as_FloatRegister($src2$$reg), 0, 2);
+    __ fmuls(as_FloatRegister($dst$$reg),
+             as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ S,
+           as_FloatRegister($src2$$reg), 0, 3);
+    __ fmuls(as_FloatRegister($dst$$reg),
+             as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_add2D(vRegD dst, vRegD src1, vecX src2, vecX tmp)
+%{
+  match(Set dst (AddReductionVD src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP tmp, TEMP dst);
+  format %{ "faddd $dst, $src1, $src2\n\t"
+            "ins   $tmp, D, $src2, 0, 1\n\t"
+            "faddd $dst, $dst, $tmp\t add reduction2d"
+  %}
+  ins_encode %{
+    __ faddd(as_FloatRegister($dst$$reg),
+             as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ D,
+           as_FloatRegister($src2$$reg), 0, 1);
+    __ faddd(as_FloatRegister($dst$$reg),
+             as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_mul2D(vRegD dst, vRegD src1, vecX src2, vecX tmp)
+%{
+  match(Set dst (MulReductionVD src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP tmp, TEMP dst);
+  format %{ "fmuld $dst, $src1, $src2\n\t"
+            "ins   $tmp, D, $src2, 0, 1\n\t"
+            "fmuld $dst, $dst, $tmp\t add reduction2d"
+  %}
+  ins_encode %{
+    __ fmuld(as_FloatRegister($dst$$reg),
+             as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ D,
+           as_FloatRegister($src2$$reg), 0, 1);
+    __ fmuld(as_FloatRegister($dst$$reg),
+             as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// ====================VECTOR ARITHMETIC=======================================
+
+// --------------------------------- ADD --------------------------------------
+
+instruct vadd16B(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (AddVB src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "addv  $dst,$src1,$src2\t# vector (16B)" %}
+  ins_encode %{
+    __ addv(as_FloatRegister($dst$$reg), __ T16B,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vadd8S(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (AddVS src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "addv  $dst,$src1,$src2\t# vector (8H)" %}
+  ins_encode %{
+    __ addv(as_FloatRegister($dst$$reg), __ T8H,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vadd4I(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (AddVI src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "addv  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ addv(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vadd2L(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (AddVL src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "addv  $dst,$src1,$src2\t# vector (2L)" %}
+  ins_encode %{
+    __ addv(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vadd4F(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (AddVF src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fadd  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ fadd(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vadd2D(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (AddVD src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fadd  $dst,$src1,$src2\t# vector (2D)" %}
+  ins_encode %{
+    __ fadd(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// --------------------------------- SUB --------------------------------------
+
+instruct vsub16B(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (SubVB src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "subv  $dst,$src1,$src2\t# vector (16B)" %}
+  ins_encode %{
+    __ subv(as_FloatRegister($dst$$reg), __ T16B,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsub8S(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (SubVS src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "subv  $dst,$src1,$src2\t# vector (8H)" %}
+  ins_encode %{
+    __ subv(as_FloatRegister($dst$$reg), __ T8H,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsub4I(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (SubVI src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "subv  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ subv(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsub2L(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (SubVL src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "subv  $dst,$src1,$src2\t# vector (2L)" %}
+  ins_encode %{
+    __ subv(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsub4F(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (SubVF src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fsub  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ fsub(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsub2D(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (SubVD src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fsub  $dst,$src1,$src2\t# vector (2D)" %}
+  ins_encode %{
+    __ fsub(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// --------------------------------- MUL --------------------------------------
+
+instruct vmul8S(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (MulVS src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "mulv  $dst,$src1,$src2\t# vector (8H)" %}
+  ins_encode %{
+    __ mulv(as_FloatRegister($dst$$reg), __ T8H,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vmul4I(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (MulVI src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "mulv  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ mulv(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vmul4F(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (MulVF src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fmul  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ fmul(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vmul2D(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (MulVD src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fmul  $dst,$src1,$src2\t# vector (2D)" %}
+  ins_encode %{
+    __ fmul(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// --------------------------------- DIV --------------------------------------
+
+instruct vdiv4F(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (DivVF src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fdiv  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ fdiv(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vdiv2D(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (DivVD src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fdiv  $dst,$src1,$src2\t# vector (2D)" %}
+  ins_encode %{
+    __ fdiv(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// --------------------------------- AND --------------------------------------
+
+instruct vand16B(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (AndV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "and  $dst,$src1,$src2\t# vector (16B)" %}
+  ins_encode %{
+    __ andr(as_FloatRegister($dst$$reg), __ T16B,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// --------------------------------- OR ---------------------------------------
+
+instruct vor16B(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (OrV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "orr  $dst,$src1,$src2\t# vector (16B)" %}
+  ins_encode %{
+    __ orr(as_FloatRegister($dst$$reg), __ T16B,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// --------------------------------- XOR --------------------------------------
+
+instruct vxor16B(vecX dst, vecX src1, vecX src2)
+%{
+  match(Set dst (XorV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "xor  $dst,$src1,$src2\t# vector (16B)" %}
+  ins_encode %{
+    __ eor(as_FloatRegister($dst$$reg), __ T16B,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// ------------------------------ Shift ---------------------------------------
+
+instruct vshiftcntL(vecX dst, iRegIorL2I cnt) %{
+  match(Set dst (LShiftCntV cnt));
+  format %{ "dup  $dst, $cnt\t# shift count (vecX)" %}
+  ins_encode %{
+    __ dup(as_FloatRegister($dst$$reg), __ T16B, as_Register($cnt$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+// Right shifts on aarch64 SIMD are implemented as left shift by -ve amount
+instruct vshiftcntR(vecX dst, iRegIorL2I cnt) %{
+  match(Set dst (RShiftCntV cnt));
+  format %{ "dup  $dst, $cnt\t# shift count (vecX)\n\tneg  $dst, $dst\t T16B" %}
+  ins_encode %{
+    __ dup(as_FloatRegister($dst$$reg), __ T16B, as_Register($cnt$$reg));
+    __ negr(as_FloatRegister($dst$$reg), __ T16B, as_FloatRegister($dst$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsll16B(vecX dst, vecX src, vecX shift) %{
+  match(Set dst (LShiftVB src shift));
+  match(Set dst (RShiftVB src shift));
+  ins_cost(INSN_COST);
+  format %{ "sshl  $dst,$src,$shift\t# vector (16B)" %}
+  ins_encode %{
+    __ sshl(as_FloatRegister($dst$$reg), __ T16B,
+            as_FloatRegister($src$$reg),
+            as_FloatRegister($shift$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsrl16B(vecX dst, vecX src, vecX shift) %{
+  match(Set dst (URShiftVB src shift));
+  ins_cost(INSN_COST);
+  format %{ "ushl  $dst,$src,$shift\t# vector (16B)" %}
+  ins_encode %{
+    __ ushl(as_FloatRegister($dst$$reg), __ T16B,
+            as_FloatRegister($src$$reg),
+            as_FloatRegister($shift$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsll16B_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (LShiftVB src shift));
+  ins_cost(INSN_COST);
+  format %{ "shl    $dst, $src, $shift\t# vector (16B)" %}
+  ins_encode %{
+    int sh = (int)$shift$$constant & 31;
+    if (sh >= 8) {
+      __ eor(as_FloatRegister($dst$$reg), __ T16B,
+             as_FloatRegister($src$$reg),
+             as_FloatRegister($src$$reg));
+    } else {
+      __ shl(as_FloatRegister($dst$$reg), __ T16B,
+             as_FloatRegister($src$$reg), sh);
+    }
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsra16B_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (RShiftVB src shift));
+  ins_cost(INSN_COST);
+  format %{ "sshr    $dst, $src, $shift\t# vector (16B)" %}
+  ins_encode %{
+    int sh = (int)$shift$$constant & 31;
+    if (sh >= 8) sh = 7;
+    sh = -sh & 7;
+    __ sshr(as_FloatRegister($dst$$reg), __ T16B,
+           as_FloatRegister($src$$reg), sh);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsrl16B_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (URShiftVB src shift));
+  ins_cost(INSN_COST);
+  format %{ "ushr    $dst, $src, $shift\t# vector (16B)" %}
+  ins_encode %{
+    int sh = (int)$shift$$constant & 31;
+    if (sh >= 8) {
+      __ eor(as_FloatRegister($dst$$reg), __ T16B,
+             as_FloatRegister($src$$reg),
+             as_FloatRegister($src$$reg));
+    } else {
+      __ ushr(as_FloatRegister($dst$$reg), __ T16B,
+             as_FloatRegister($src$$reg), -sh & 7);
+    }
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsll8S(vecX dst, vecX src, vecX shift) %{
+  match(Set dst (LShiftVS src shift));
+  match(Set dst (RShiftVS src shift));
+  ins_cost(INSN_COST);
+  format %{ "sshl  $dst,$src,$shift\t# vector (8H)" %}
+  ins_encode %{
+    __ sshl(as_FloatRegister($dst$$reg), __ T8H,
+            as_FloatRegister($src$$reg),
+            as_FloatRegister($shift$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsrl8S(vecX dst, vecX src, vecX shift) %{
+  match(Set dst (URShiftVS src shift));
+  ins_cost(INSN_COST);
+  format %{ "ushl  $dst,$src,$shift\t# vector (8H)" %}
+  ins_encode %{
+    __ ushl(as_FloatRegister($dst$$reg), __ T8H,
+            as_FloatRegister($src$$reg),
+            as_FloatRegister($shift$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsll8S_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (LShiftVS src shift));
+  ins_cost(INSN_COST);
+  format %{ "shl    $dst, $src, $shift\t# vector (8H)" %}
+  ins_encode %{
+    int sh = (int)$shift$$constant & 31;
+    if (sh >= 16) {
+      __ eor(as_FloatRegister($dst$$reg), __ T16B,
+             as_FloatRegister($src$$reg),
+             as_FloatRegister($src$$reg));
+    } else {
+      __ shl(as_FloatRegister($dst$$reg), __ T8H,
+             as_FloatRegister($src$$reg), sh);
+    }
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsra8S_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (RShiftVS src shift));
+  ins_cost(INSN_COST);
+  format %{ "sshr    $dst, $src, $shift\t# vector (8H)" %}
+  ins_encode %{
+    int sh = (int)$shift$$constant & 31;
+    if (sh >= 16) sh = 15;
+    sh = -sh & 15;
+    __ sshr(as_FloatRegister($dst$$reg), __ T8H,
+           as_FloatRegister($src$$reg), sh);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsrl8S_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (URShiftVS src shift));
+  ins_cost(INSN_COST);
+  format %{ "ushr    $dst, $src, $shift\t# vector (8H)" %}
+  ins_encode %{
+    int sh = (int)$shift$$constant & 31;
+    if (sh >= 16) {
+      __ eor(as_FloatRegister($dst$$reg), __ T16B,
+             as_FloatRegister($src$$reg),
+             as_FloatRegister($src$$reg));
+    } else {
+      __ ushr(as_FloatRegister($dst$$reg), __ T8H,
+             as_FloatRegister($src$$reg), -sh & 15);
+    }
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsll4I(vecX dst, vecX src, vecX shift) %{
+  match(Set dst (LShiftVI src shift));
+  match(Set dst (RShiftVI src shift));
+  ins_cost(INSN_COST);
+  format %{ "sshl  $dst,$src,$shift\t# vector (4S)" %}
+  ins_encode %{
+    __ sshl(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src$$reg),
+            as_FloatRegister($shift$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsrl4I(vecX dst, vecX src, vecX shift) %{
+  match(Set dst (URShiftVI src shift));
+  ins_cost(INSN_COST);
+  format %{ "ushl  $dst,$src,$shift\t# vector (4S)" %}
+  ins_encode %{
+    __ ushl(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src$$reg),
+            as_FloatRegister($shift$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsll4I_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (LShiftVI src shift));
+  ins_cost(INSN_COST);
+  format %{ "shl    $dst, $src, $shift\t# vector (4S)" %}
+  ins_encode %{
+    __ shl(as_FloatRegister($dst$$reg), __ T4S,
+           as_FloatRegister($src$$reg),
+           (int)$shift$$constant & 31);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsra4I_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (RShiftVI src shift));
+  ins_cost(INSN_COST);
+  format %{ "sshr    $dst, $src, $shift\t# vector (4S)" %}
+  ins_encode %{
+    __ sshr(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src$$reg),
+            -(int)$shift$$constant & 31);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsrl4I_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (URShiftVI src shift));
+  ins_cost(INSN_COST);
+  format %{ "ushr    $dst, $src, $shift\t# vector (4S)" %}
+  ins_encode %{
+    __ ushr(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src$$reg),
+            -(int)$shift$$constant & 31);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsll2L(vecX dst, vecX src, vecX shift) %{
+  match(Set dst (LShiftVL src shift));
+  match(Set dst (RShiftVL src shift));
+  ins_cost(INSN_COST);
+  format %{ "sshl  $dst,$src,$shift\t# vector (2D)" %}
+  ins_encode %{
+    __ sshl(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src$$reg),
+            as_FloatRegister($shift$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsrl2L(vecX dst, vecX src, vecX shift) %{
+  match(Set dst (URShiftVL src shift));
+  ins_cost(INSN_COST);
+  format %{ "ushl  $dst,$src,$shift\t# vector (2D)" %}
+  ins_encode %{
+    __ ushl(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src$$reg),
+            as_FloatRegister($shift$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsll2L_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (LShiftVL src shift));
+  ins_cost(INSN_COST);
+  format %{ "shl    $dst, $src, $shift\t# vector (2D)" %}
+  ins_encode %{
+    __ shl(as_FloatRegister($dst$$reg), __ T2D,
+           as_FloatRegister($src$$reg),
+           (int)$shift$$constant & 63);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsra2L_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (RShiftVL src shift));
+  ins_cost(INSN_COST);
+  format %{ "sshr    $dst, $src, $shift\t# vector (2D)" %}
+  ins_encode %{
+    __ sshr(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src$$reg),
+            -(int)$shift$$constant & 63);
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct vsrl2L_imm(vecX dst, vecX src, immI shift) %{
+  match(Set dst (URShiftVL src shift));
+  ins_cost(INSN_COST);
+  format %{ "ushr    $dst, $src, $shift\t# vector (2D)" %}
+  ins_encode %{
+    __ ushr(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src$$reg),
+            -(int)$shift$$constant & 63);
+  %}
+  ins_pipe(pipe_class_default);
+%}
 
 //----------PEEPHOLE RULES-----------------------------------------------------
 // These must follow all instruction definitions as they use the names
--- a/hotspot/src/cpu/aarch64/vm/assembler_aarch64.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/assembler_aarch64.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -466,6 +466,11 @@
     case base_plus_offset:
       {
         unsigned size = i->get(31, 30);
+        if (i->get(26, 26) && i->get(23, 23)) {
+          // SIMD Q Type - Size = 128 bits
+          assert(size == 0, "bad size");
+          size = 0b100;
+        }
         unsigned mask = (1 << size) - 1;
         if (_offset < 0 || _offset & mask)
           {
@@ -1888,9 +1893,18 @@
   };
 
   enum SIMD_RegVariant {
-       S32, D64, Q128
+       B, H, S, D, Q
   };
 
+#define INSN(NAME, op)                                            \
+  void NAME(FloatRegister Rt, SIMD_RegVariant T, const Address &adr) {   \
+    ld_st2((Register)Rt, adr, (int)T & 3, op + ((T==Q) ? 0b10:0b00), 1); \
+  }                                                                      \
+
+  INSN(ldr, 1);
+  INSN(str, 0);
+
+#undef INSN
 
  private:
 
@@ -1997,27 +2011,87 @@
     rf(Vm, 16), f(0b000111, 15, 10), rf(Vn, 5), rf(Vd, 0);                              \
   }
 
-  INSN(eor, 0b101110001);
-  INSN(orr, 0b001110101);
+  INSN(eor,  0b101110001);
+  INSN(orr,  0b001110101);
   INSN(andr, 0b001110001);
-  INSN(bic, 0b001110011);
-  INSN(bif, 0b101110111);
-  INSN(bit, 0b101110101);
-  INSN(bsl, 0b101110011);
-  INSN(orn, 0b001110111);
+  INSN(bic,  0b001110011);
+  INSN(bif,  0b101110111);
+  INSN(bit,  0b101110101);
+  INSN(bsl,  0b101110011);
+  INSN(orn,  0b001110111);
+
+#undef INSN
+
+#define INSN(NAME, opc, opc2)                                                                 \
+  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm) { \
+    starti;                                                                             \
+    f(0, 31), f((int)T & 1, 30), f(opc, 29), f(0b01110, 28, 24);                        \
+    f((int)T >> 1, 23, 22), f(1, 21), rf(Vm, 16), f(opc2, 15, 10);                      \
+    rf(Vn, 5), rf(Vd, 0);                                                               \
+  }
+
+  INSN(addv, 0, 0b100001);
+  INSN(subv, 1, 0b100001);
+  INSN(mulv, 0, 0b100111);
+  INSN(sshl, 0, 0b010001);
+  INSN(ushl, 1, 0b010001);
 
 #undef INSN
 
-#define INSN(NAME, opc)                                                                 \
-  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm) { \
+#define INSN(NAME, opc, opc2) \
+  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn) {                   \
     starti;                                                                             \
     f(0, 31), f((int)T & 1, 30), f(opc, 29), f(0b01110, 28, 24);                        \
-    f((int)T >> 1, 23, 22), f(1, 21), rf(Vm, 16), f(0b100001, 15, 10);                  \
+    f((int)T >> 1, 23, 22), f(opc2, 21, 10);                                            \
     rf(Vn, 5), rf(Vd, 0);                                                               \
   }
 
-  INSN(addv, 0);
-  INSN(subv, 1);
+  INSN(absr,  0, 0b100000101110);
+  INSN(negr,  1, 0b100000101110);
+  INSN(notr,  1, 0b100000010110);
+  INSN(addv,  0, 0b110001101110);
+
+#undef INSN
+
+#define INSN(NAME, op0, cmode0) \
+  void NAME(FloatRegister Vd, SIMD_Arrangement T, unsigned imm8, unsigned lsl = 0) {   \
+    unsigned cmode = cmode0;                                                           \
+    unsigned op = op0;                                                                 \
+    starti;                                                                            \
+    assert(lsl == 0 ||                                                                 \
+           ((T == T4H || T == T8H) && lsl == 8) ||                                     \
+           ((T == T2S || T == T4S) && ((lsl >> 3) < 4)), "invalid shift");             \
+    cmode |= lsl >> 2;                                                                 \
+    if (T == T4H || T == T8H) cmode |= 0b1000;                                         \
+    if (!(T == T4H || T == T8H || T == T2S || T == T4S)) {                             \
+      assert(op == 0 && cmode0 == 0, "must be MOVI");                                  \
+      cmode = 0b1110;                                                                  \
+      if (T == T1D || T == T2D) op = 1;                                                \
+    }                                                                                  \
+    f(0, 31), f((int)T & 1, 30), f(op, 29), f(0b0111100000, 28, 19);                   \
+    f(imm8 >> 5, 18, 16), f(cmode, 15, 12), f(0x01, 11, 10), f(imm8 & 0b11111, 9, 5);  \
+    rf(Vd, 0);                                                                         \
+  }
+
+  INSN(movi, 0, 0);
+  INSN(orri, 0, 1);
+  INSN(mvni, 1, 0);
+  INSN(bici, 1, 1);
+
+#undef INSN
+
+#define INSN(NAME, op1, op2, op3) \
+  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm) { \
+    starti;                                                                             \
+    assert(T == T2S || T == T4S || T == T2D, "invalid arrangement");                    \
+    f(0, 31), f((int)T & 1, 30), f(op1, 29), f(0b01110, 28, 24), f(op2, 23);            \
+    f(T==T2D ? 1:0, 22); f(1, 21), rf(Vm, 16), f(op3, 15, 10), rf(Vn, 5), rf(Vd, 0);    \
+  }
+
+  INSN(fadd, 0, 0, 0b110101);
+  INSN(fdiv, 1, 0, 0b111111);
+  INSN(fmul, 1, 0, 0b110111);
+  INSN(fsub, 0, 1, 0b110101);
 
 #undef INSN
 
@@ -2064,19 +2138,40 @@
 
 #undef INSN
 
-  void shl(FloatRegister Vd, FloatRegister Vn, SIMD_Arrangement T, int shift){
+  void ins(FloatRegister Vd, SIMD_RegVariant T, FloatRegister Vn, int didx, int sidx) {
+    starti;
+    assert(T != Q, "invalid register variant");
+    f(0b01101110000, 31, 21), f(((didx<<1)|1)<<(int)T, 20, 16), f(0, 15);
+    f(sidx<<(int)T, 14, 11), f(1, 10), rf(Vn, 5), rf(Vd, 0);
+  }
+
+  void umov(Register Rd, FloatRegister Vn, SIMD_RegVariant T, int idx) {
     starti;
-    /* The encodings for the immh:immb fields (bits 22:16) are
-     *   0001 xxx       8B/16B, shift = xxx
-     *   001x xxx       4H/8H,  shift = xxxx
-     *   01xx xxx       2S/4S,  shift = xxxxx
-     *   1xxx xxx       1D/2D,  shift = xxxxxx (1D is RESERVED)
-     */
-    assert((1 << ((T>>1)+3)) > shift, "Invalid Shift value");
-    f(0, 31), f(T & 1, 30), f(0b0011110, 29, 23), f((1 << ((T>>1)+3))|shift, 22, 16);
-    f(0b010101, 15, 10), rf(Vn, 5), rf(Vd, 0);
+    f(0, 31), f(T==D ? 1:0, 30), f(0b001110000, 29, 21);
+    f(((idx<<1)|1)<<(int)T, 20, 16), f(0b001111, 15, 10);
+    rf(Vn, 5), rf(Rd, 0);
   }
 
+#define INSN(NAME, opc, opc2) \
+  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, int shift){         \
+    starti;                                                                             \
+    /* The encodings for the immh:immb fields (bits 22:16) are                          \
+     *   0001 xxx       8B/16B, shift = xxx                                             \
+     *   001x xxx       4H/8H,  shift = xxxx                                            \
+     *   01xx xxx       2S/4S,  shift = xxxxx                                           \
+     *   1xxx xxx       1D/2D,  shift = xxxxxx (1D is RESERVED)                         \
+     */                                                                                 \
+    assert((1 << ((T>>1)+3)) > shift, "Invalid Shift value");                           \
+    f(0, 31), f(T & 1, 30), f(opc, 29), f(0b011110, 28, 23),                            \
+    f((1 << ((T>>1)+3))|shift, 22, 16); f(opc2, 15, 10), rf(Vn, 5), rf(Vd, 0);          \
+  }
+
+  INSN(shl,  0, 0b010101);
+  INSN(sshr, 0, 0b000001);
+  INSN(ushr, 1, 0b000001);
+
+#undef INSN
+
   void ushll(FloatRegister Vd, SIMD_Arrangement Ta, FloatRegister Vn, SIMD_Arrangement Tb, int shift) {
     starti;
     /* The encodings for the immh:immb fields (bits 22:16) are
@@ -2149,6 +2244,23 @@
     rf(Vn, 5), rf(Vd, 0);
   }
 
+  void dup(FloatRegister Vd, SIMD_Arrangement T, Register Xs)
+  {
+    starti;
+    assert(T != T1D, "reserved encoding");
+    f(0,31), f((int)T & 1, 30), f(0b001110000, 29, 21);
+    f((1 << (T >> 1)), 20, 16), f(0b000011, 15, 10), rf(Xs, 5), rf(Vd, 0);
+  }
+
+  void dup(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, int index = 0)
+  {
+    starti;
+    assert(T != T1D, "reserved encoding");
+    f(0, 31), f((int)T & 1, 30), f(0b001110000, 29, 21);
+    f(((1 << (T >> 1)) | (index << ((T >> 1) + 1))), 20, 16);
+    f(0b000001, 15, 10), rf(Vn, 5), rf(Vd, 0);
+  }
+
   // CRC32 instructions
 #define INSN(NAME, sf, sz)                                                \
   void NAME(Register Rd, Register Rn, Register Rm) {                      \
--- a/hotspot/src/cpu/aarch64/vm/globals_aarch64.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/globals_aarch64.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -64,7 +64,7 @@
 define_pd_global(intx, PreInflateSpin,           10);
 
 define_pd_global(bool, RewriteBytecodes,     true);
-define_pd_global(bool, RewriteFrequentPairs, false);
+define_pd_global(bool, RewriteFrequentPairs, true);
 
 define_pd_global(bool, UseMembar,            true);
 
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -2802,8 +2802,8 @@
       uzp2(v21, v20, v16, T2D);
       eor(v20, T16B, v17, v21);
 
-      shl(v16, v28, T2D, 1);
-      shl(v17, v20, T2D, 1);
+      shl(v16, T2D, v28, 1);
+      shl(v17, T2D, v20, 1);
 
       eor(v0, T16B, v0, v16);
       eor(v1, T16B, v1, v17);
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -37,6 +37,7 @@
   friend class LIR_Assembler;
 
   using Assembler::mov;
+  using Assembler::movi;
 
  protected:
 
@@ -464,6 +465,45 @@
 
   void movptr(Register r, uintptr_t imm64);
 
+  // Macro to mov replicated immediate to vector register.
+  // Where imm32 == hex abcdefgh, Vd will get the following values
+  // for different arrangements in T
+  //   T8B:  Vd = ghghghghghghghgh
+  //   T16B: Vd = ghghghghghghghghghghghghghghghgh
+  //   T4H:  Vd = efghefghefghefgh
+  //   T8H:  Vd = efghefghefghefghefghefghefghefgh
+  //   T2S:  Vd = abcdefghabcdefgh
+  //   T4S:  Vd = abcdefghabcdefghabcdefghabcdefgh
+  //   T1D/T2D: invalid
+  void mov(FloatRegister Vd, SIMD_Arrangement T, u_int32_t imm32) {
+    assert(T != T1D && T != T2D, "invalid arrangement");
+    u_int32_t nimm32 = ~imm32;
+    if (T == T8B || T == T16B) { imm32 &= 0xff; nimm32 &= 0xff; }
+    if (T == T4H || T == T8H) { imm32 &= 0xffff; nimm32 &= 0xffff; }
+    u_int32_t x = imm32;
+    int movi_cnt = 0;
+    int movn_cnt = 0;
+    while (x) { if (x & 0xff) movi_cnt++; x >>= 8; }
+    x = nimm32;
+    while (x) { if (x & 0xff) movn_cnt++; x >>= 8; }
+    if (movn_cnt < movi_cnt) imm32 = nimm32;
+    unsigned lsl = 0;
+    while (imm32 && (imm32 & 0xff) == 0) { lsl += 8; imm32 >>= 8; }
+    if (movn_cnt < movi_cnt)
+      mvni(Vd, T, imm32 & 0xff, lsl);
+    else
+      movi(Vd, T, imm32 & 0xff, lsl);
+    imm32 >>= 8; lsl += 8;
+    while (imm32) {
+      while ((imm32 & 0xff) == 0) { lsl += 8; imm32 >>= 8; }
+      if (movn_cnt < movi_cnt)
+        bici(Vd, T, imm32 & 0xff, lsl);
+      else
+        orri(Vd, T, imm32 & 0xff, lsl);
+      lsl += 8; imm32 >>= 8;
+    }
+  }
+
   // macro instructions for accessing and updating floating point
   // status register
   //
--- a/hotspot/src/cpu/aarch64/vm/register_aarch64.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/register_aarch64.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -186,7 +186,7 @@
   // it's optoregs.
 
     number_of_registers = (2 * RegisterImpl::number_of_registers +
-                           2 * FloatRegisterImpl::number_of_registers +
+                           4 * FloatRegisterImpl::number_of_registers +
                            1) // flags
   };
 
--- a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -513,23 +513,61 @@
 void TemplateTable::iload_internal(RewriteControl rc) {
   transition(vtos, itos);
   if (RewriteFrequentPairs && rc == may_rewrite) {
-    // TODO : check x86 code for what to do here
-    __ call_Unimplemented();
-  } else {
-    locals_index(r1);
-    __ ldr(r0, iaddress(r1));
+    Label rewrite, done;
+    Register bc = r4;
+
+    // get next bytecode
+    __ load_unsigned_byte(r1, at_bcp(Bytecodes::length_for(Bytecodes::_iload)));
+
+    // if _iload, wait to rewrite to iload2.  We only want to rewrite the
+    // last two iloads in a pair.  Comparing against fast_iload means that
+    // the next bytecode is neither an iload or a caload, and therefore
+    // an iload pair.
+    __ cmpw(r1, Bytecodes::_iload);
+    __ br(Assembler::EQ, done);
+
+    // if _fast_iload rewrite to _fast_iload2
+    __ cmpw(r1, Bytecodes::_fast_iload);
+    __ movw(bc, Bytecodes::_fast_iload2);
+    __ br(Assembler::EQ, rewrite);
+
+    // if _caload rewrite to _fast_icaload
+    __ cmpw(r1, Bytecodes::_caload);
+    __ movw(bc, Bytecodes::_fast_icaload);
+    __ br(Assembler::EQ, rewrite);
+
+    // else rewrite to _fast_iload
+    __ movw(bc, Bytecodes::_fast_iload);
+
+    // rewrite
+    // bc: new bytecode
+    __ bind(rewrite);
+    patch_bytecode(Bytecodes::_iload, bc, r1, false);
+    __ bind(done);
+
   }
 
+  // do iload, get the local value into tos
+  locals_index(r1);
+  __ ldr(r0, iaddress(r1));
+
 }
 
 void TemplateTable::fast_iload2()
 {
-  __ call_Unimplemented();
+  transition(vtos, itos);
+  locals_index(r1);
+  __ ldr(r0, iaddress(r1));
+  __ push(itos);
+  locals_index(r1, 3);
+  __ ldr(r0, iaddress(r1));
 }
 
 void TemplateTable::fast_iload()
 {
-  __ call_Unimplemented();
+  transition(vtos, itos);
+  locals_index(r1);
+  __ ldr(r0, iaddress(r1));
 }
 
 void TemplateTable::lload()
@@ -721,7 +759,18 @@
 // iload followed by caload frequent pair
 void TemplateTable::fast_icaload()
 {
-  __ call_Unimplemented();
+  transition(vtos, itos);
+  // load index out of locals
+  locals_index(r2);
+  __ ldr(r1, iaddress(r2));
+
+  __ pop_ptr(r0);
+
+  // r0: array
+  // r1: index
+  index_check(r0, r1); // leaves index in r1, kills rscratch1
+  __ lea(r1,  Address(r0, r1, Address::uxtw(1)));
+  __ load_unsigned_short(r0, Address(r1,  arrayOopDesc::base_offset_in_bytes(T_CHAR)));
 }
 
 void TemplateTable::saload()
@@ -797,7 +846,47 @@
   // These bytecodes with a small amount of code are most profitable
   // to rewrite
   if (RewriteFrequentPairs && rc == may_rewrite) {
-    __ call_Unimplemented();
+    Label rewrite, done;
+    const Register bc = r4;
+
+    // get next bytecode
+    __ load_unsigned_byte(r1, at_bcp(Bytecodes::length_for(Bytecodes::_aload_0)));
+
+    // do actual aload_0
+    aload(0);
+
+    // if _getfield then wait with rewrite
+    __ cmpw(r1, Bytecodes::Bytecodes::_getfield);
+    __ br(Assembler::EQ, done);
+
+    // if _igetfield then reqrite to _fast_iaccess_0
+    assert(Bytecodes::java_code(Bytecodes::_fast_iaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
+    __ cmpw(r1, Bytecodes::_fast_igetfield);
+    __ movw(bc, Bytecodes::_fast_iaccess_0);
+    __ br(Assembler::EQ, rewrite);
+
+    // if _agetfield then reqrite to _fast_aaccess_0
+    assert(Bytecodes::java_code(Bytecodes::_fast_aaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
+    __ cmpw(r1, Bytecodes::_fast_agetfield);
+    __ movw(bc, Bytecodes::_fast_aaccess_0);
+    __ br(Assembler::EQ, rewrite);
+
+    // if _fgetfield then reqrite to _fast_faccess_0
+    assert(Bytecodes::java_code(Bytecodes::_fast_faccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
+    __ cmpw(r1, Bytecodes::_fast_fgetfield);
+    __ movw(bc, Bytecodes::_fast_faccess_0);
+    __ br(Assembler::EQ, rewrite);
+
+    // else rewrite to _fast_aload0
+    assert(Bytecodes::java_code(Bytecodes::_fast_aload_0) == Bytecodes::_aload_0, "fix bytecode definition");
+    __ movw(bc, Bytecodes::Bytecodes::_fast_aload_0);
+
+    // rewrite
+    // bc: new bytecode
+    __ bind(rewrite);
+    patch_bytecode(Bytecodes::_aload_0, bc, r1, false);
+
+    __ bind(done);
   } else {
     aload(0);
   }
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -3768,7 +3768,7 @@
   return NULL;
 }
 
-#define EXIT_TIMEOUT     PRODUCT_ONLY(1000) NOT_PRODUCT(4000) /* 1 sec in product, 4 sec in debug */
+#define EXIT_TIMEOUT 300000 /* 5 minutes */
 
 static BOOL CALLBACK init_crit_sect_call(PINIT_ONCE, PVOID pcrit_sect, PVOID*) {
   InitializeCriticalSection((CRITICAL_SECTION*)pcrit_sect);
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -1469,7 +1469,9 @@
   } else {
     guarantee(in_bytes(PtrQueue::byte_width_of_active()) == 1,
               "Assumption");
-    flag_type = T_BYTE;
+    // Use unsigned type T_BOOLEAN here rather than signed T_BYTE since some platforms, eg. ARM,
+    // need to use unsigned instructions to use the large offset to load the satb_mark_queue.
+    flag_type = T_BOOLEAN;
   }
   LIR_Opr thrd = getThreadPointer();
   LIR_Address* mark_active_flag_addr =
--- a/hotspot/src/share/vm/gc/cms/cmsOopClosures.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/cmsOopClosures.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -26,6 +26,7 @@
 #define SHARE_VM_GC_CMS_CMSOOPCLOSURES_HPP
 
 #include "gc/shared/genOopClosures.hpp"
+#include "gc/shared/taskqueue.hpp"
 #include "memory/iterator.hpp"
 
 /////////////////////////////////////////////////////////////////
--- a/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -641,6 +641,7 @@
 class FreeListSpace_DCTOC : public Filtering_DCTOC {
   CompactibleFreeListSpace* _cfls;
   CMSCollector* _collector;
+  bool _parallel;
 protected:
   // Override.
 #define walk_mem_region_with_cl_DECL(ClosureType)                       \
@@ -661,9 +662,10 @@
                       CMSCollector* collector,
                       ExtendedOopClosure* cl,
                       CardTableModRefBS::PrecisionStyle precision,
-                      HeapWord* boundary) :
+                      HeapWord* boundary,
+                      bool parallel) :
     Filtering_DCTOC(sp, cl, precision, boundary),
-    _cfls(sp), _collector(collector) {}
+    _cfls(sp), _collector(collector), _parallel(parallel) {}
 };
 
 // We de-virtualize the block-related calls below, since we know that our
@@ -674,10 +676,7 @@
                                                  HeapWord* bottom,              \
                                                  HeapWord* top,                 \
                                                  ClosureType* cl) {             \
-   bool is_par = GenCollectedHeap::heap()->n_par_threads() > 0;                 \
-   if (is_par) {                                                                \
-     assert(GenCollectedHeap::heap()->n_par_threads() ==                        \
-            GenCollectedHeap::heap()->workers()->active_workers(), "Mismatch"); \
+   if (_parallel) {                                                             \
      walk_mem_region_with_cl_par(mr, bottom, top, cl);                          \
    } else {                                                                     \
      walk_mem_region_with_cl_nopar(mr, bottom, top, cl);                        \
@@ -747,8 +746,9 @@
 DirtyCardToOopClosure*
 CompactibleFreeListSpace::new_dcto_cl(ExtendedOopClosure* cl,
                                       CardTableModRefBS::PrecisionStyle precision,
-                                      HeapWord* boundary) {
-  return new FreeListSpace_DCTOC(this, _collector, cl, precision, boundary);
+                                      HeapWord* boundary,
+                                      bool parallel) {
+  return new FreeListSpace_DCTOC(this, _collector, cl, precision, boundary, parallel);
 }
 
 
@@ -1897,11 +1897,9 @@
   assert(chunk->is_free() && ffc->is_free(), "Error");
   _bt.split_block((HeapWord*)chunk, chunk->size(), new_size);
   if (rem_sz < SmallForDictionary) {
-    bool is_par = (GenCollectedHeap::heap()->n_par_threads() > 0);
+    // The freeList lock is held, but multiple GC task threads might be executing in parallel.
+    bool is_par = Thread::current()->is_GC_task_thread();
     if (is_par) _indexedFreeListParLocks[rem_sz]->lock();
-    assert(!is_par ||
-           (GenCollectedHeap::heap()->n_par_threads() ==
-            GenCollectedHeap::heap()->workers()->active_workers()), "Mismatch");
     returnChunkToFreeList(ffc);
     split(size, rem_sz);
     if (is_par) _indexedFreeListParLocks[rem_sz]->unlock();
@@ -1972,8 +1970,6 @@
 
 bool CompactibleFreeListSpace::no_allocs_since_save_marks() {
   assert(_promoInfo.tracking(), "No preceding save_marks?");
-  assert(GenCollectedHeap::heap()->n_par_threads() == 0,
-         "Shouldn't be called if using parallel gc.");
   return _promoInfo.noPromotions();
 }
 
@@ -1981,8 +1977,6 @@
                                                                             \
 void CompactibleFreeListSpace::                                             \
 oop_since_save_marks_iterate##nv_suffix(OopClosureType* blk) {              \
-  assert(GenCollectedHeap::heap()->n_par_threads() == 0,                    \
-         "Shouldn't be called (yet) during parallel part of gc.");          \
   _promoInfo.promoted_oops_iterate##nv_suffix(blk);                         \
   /*                                                                        \
    * This also restores any displaced headers and removes the elements from \
--- a/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -438,7 +438,8 @@
   // Override: provides a DCTO_CL specific to this kind of space.
   DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
                                      CardTableModRefBS::PrecisionStyle precision,
-                                     HeapWord* boundary);
+                                     HeapWord* boundary,
+                                     bool parallel);
 
   void blk_iterate(BlkClosure* cl);
   void blk_iterate_careful(BlkClosureCareful* cl);
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -2428,14 +2428,18 @@
   MarkRefsIntoClosure notOlder(_span, verification_mark_bm());
   gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
 
-  gch->gen_process_roots(_cmsGen->level(),
-                         true,   // younger gens are roots
-                         true,   // activate StrongRootsScope
-                         GenCollectedHeap::ScanningOption(roots_scanning_options()),
-                         should_unload_classes(),
-                         &notOlder,
-                         NULL,
-                         NULL);  // SSS: Provide correct closure
+  {
+    StrongRootsScope srs(1);
+
+    gch->gen_process_roots(&srs,
+                           _cmsGen->level(),
+                           true,   // younger gens are roots
+                           GenCollectedHeap::ScanningOption(roots_scanning_options()),
+                           should_unload_classes(),
+                           &notOlder,
+                           NULL,
+                           NULL);
+  }
 
   // Now mark from the roots
   MarkFromRootsClosure markFromRootsClosure(this, _span,
@@ -2496,14 +2500,18 @@
 
   gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
 
-  gch->gen_process_roots(_cmsGen->level(),
-                         true,   // younger gens are roots
-                         true,   // activate StrongRootsScope
-                         GenCollectedHeap::ScanningOption(roots_scanning_options()),
-                         should_unload_classes(),
-                         &notOlder,
-                         NULL,
-                         &cld_closure);
+  {
+    StrongRootsScope srs(1);
+
+    gch->gen_process_roots(&srs,
+                           _cmsGen->level(),
+                           true,   // younger gens are roots
+                           GenCollectedHeap::ScanningOption(roots_scanning_options()),
+                           should_unload_classes(),
+                           &notOlder,
+                           NULL,
+                           &cld_closure);
+  }
 
   // Now mark from the roots
   MarkFromRootsVerifyClosure markFromRootsClosure(this, _span,
@@ -2913,10 +2921,11 @@
 
 // Parallel initial mark task
 class CMSParInitialMarkTask: public CMSParMarkTask {
+  StrongRootsScope* _strong_roots_scope;
  public:
-  CMSParInitialMarkTask(CMSCollector* collector, uint n_workers) :
-      CMSParMarkTask("Scan roots and young gen for initial mark in parallel",
-                     collector, n_workers) {}
+  CMSParInitialMarkTask(CMSCollector* collector, StrongRootsScope* strong_roots_scope, uint n_workers) :
+      CMSParMarkTask("Scan roots and young gen for initial mark in parallel", collector, n_workers),
+      _strong_roots_scope(strong_roots_scope) {}
   void work(uint worker_id);
 };
 
@@ -3004,24 +3013,26 @@
       FlexibleWorkGang* workers = gch->workers();
       assert(workers != NULL, "Need parallel worker threads.");
       uint n_workers = workers->active_workers();
-      CMSParInitialMarkTask tsk(this, n_workers);
-      gch->set_par_threads(n_workers);
+
+      StrongRootsScope srs(n_workers);
+
+      CMSParInitialMarkTask tsk(this, &srs, n_workers);
       initialize_sequential_subtasks_for_young_gen_rescan(n_workers);
       if (n_workers > 1) {
-        StrongRootsScope srs;
         workers->run_task(&tsk);
       } else {
-        StrongRootsScope srs;
         tsk.work(0);
       }
-      gch->set_par_threads(0);
     } else {
       // The serial version.
       CLDToOopClosure cld_closure(&notOlder, true);
       gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
-      gch->gen_process_roots(_cmsGen->level(),
+
+      StrongRootsScope srs(1);
+
+      gch->gen_process_roots(&srs,
+                             _cmsGen->level(),
                              true,   // younger gens are roots
-                             true,   // activate StrongRootsScope
                              GenCollectedHeap::ScanningOption(roots_scanning_options()),
                              should_unload_classes(),
                              &notOlder,
@@ -4452,9 +4463,9 @@
 
   CLDToOopClosure cld_closure(&par_mri_cl, true);
 
-  gch->gen_process_roots(_collector->_cmsGen->level(),
+  gch->gen_process_roots(_strong_roots_scope,
+                         _collector->_cmsGen->level(),
                          false,     // yg was scanned above
-                         false,     // this is parallel code
                          GenCollectedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
                          _collector->should_unload_classes(),
                          &par_mri_cl,
@@ -4478,6 +4489,7 @@
   // The per-thread work queues, available here for stealing.
   OopTaskQueueSet*       _task_queues;
   ParallelTaskTerminator _term;
+  StrongRootsScope*      _strong_roots_scope;
 
  public:
   // A value of 0 passed to n_workers will cause the number of
@@ -4485,12 +4497,14 @@
   CMSParRemarkTask(CMSCollector* collector,
                    CompactibleFreeListSpace* cms_space,
                    uint n_workers, FlexibleWorkGang* workers,
-                   OopTaskQueueSet* task_queues):
+                   OopTaskQueueSet* task_queues,
+                   StrongRootsScope* strong_roots_scope):
     CMSParMarkTask("Rescan roots and grey objects in parallel",
                    collector, n_workers),
     _cms_space(cms_space),
     _task_queues(task_queues),
-    _term(n_workers, task_queues) { }
+    _term(n_workers, task_queues),
+    _strong_roots_scope(strong_roots_scope) { }
 
   OopTaskQueueSet* task_queues() { return _task_queues; }
 
@@ -4588,9 +4602,9 @@
   // ---------- remaining roots --------------
   _timer.reset();
   _timer.start();
-  gch->gen_process_roots(_collector->_cmsGen->level(),
+  gch->gen_process_roots(_strong_roots_scope,
+                         _collector->_cmsGen->level(),
                          false,     // yg was scanned above
-                         false,     // this is parallel code
                          GenCollectedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
                          _collector->should_unload_classes(),
                          &par_mrias_cl,
@@ -5058,22 +5072,15 @@
   FlexibleWorkGang* workers = gch->workers();
   assert(workers != NULL, "Need parallel worker threads.");
   // Choose to use the number of GC workers most recently set
-  // into "active_workers".  If active_workers is not set, set it
-  // to ParallelGCThreads.
+  // into "active_workers".
   uint n_workers = workers->active_workers();
-  if (n_workers == 0) {
-    assert(n_workers > 0, "Should have been set during scavenge");
-    n_workers = ParallelGCThreads;
-    workers->set_active_workers(n_workers);
-  }
+
   CompactibleFreeListSpace* cms_space  = _cmsGen->cmsSpace();
 
-  CMSParRemarkTask tsk(this,
-    cms_space,
-    n_workers, workers, task_queues());
-
-  // Set up for parallel process_roots work.
-  gch->set_par_threads(n_workers);
+  StrongRootsScope srs(n_workers);
+
+  CMSParRemarkTask tsk(this, cms_space, n_workers, workers, task_queues(), &srs);
+
   // We won't be iterating over the cards in the card table updating
   // the younger_gen cards, so we shouldn't call the following else
   // the verification code as well as subsequent younger_refs_iterate
@@ -5105,15 +5112,12 @@
     // necessarily be so, since it's possible that we are doing
     // ST marking.
     ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), true);
-    StrongRootsScope srs;
     workers->run_task(&tsk);
   } else {
     ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), false);
-    StrongRootsScope srs;
     tsk.work(0);
   }
 
-  gch->set_par_threads(0);  // 0 ==> non-parallel.
   // restore, single-threaded for now, any preserved marks
   // as a result of work_q overflow
   restore_preserved_marks_if_any();
@@ -5177,11 +5181,11 @@
     verify_work_stacks_empty();
 
     gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
-    StrongRootsScope srs;
-
-    gch->gen_process_roots(_cmsGen->level(),
+    StrongRootsScope srs(1);
+
+    gch->gen_process_roots(&srs,
+                           _cmsGen->level(),
                            true,  // younger gens as roots
-                           false, // use the local StrongRootsScope
                            GenCollectedHeap::ScanningOption(roots_scanning_options()),
                            should_unload_classes(),
                            &mrias_cl,
@@ -5254,18 +5258,14 @@
                       CMSBitMap*       mark_bit_map,
                       AbstractWorkGang* workers,
                       OopTaskQueueSet* task_queues):
-    // XXX Should superclass AGTWOQ also know about AWG since it knows
-    // about the task_queues used by the AWG? Then it could initialize
-    // the terminator() object. See 6984287. The set_for_termination()
-    // below is a temporary band-aid for the regression in 6984287.
     AbstractGangTaskWOopQueues("Process referents by policy in parallel",
-      task_queues),
+      task_queues,
+      workers->active_workers()),
     _task(task),
     _collector(collector), _span(span), _mark_bit_map(mark_bit_map)
   {
     assert(_collector->_span.equals(_span) && !_span.is_empty(),
            "Inconsistency in _span");
-    set_for_termination(workers->active_workers());
   }
 
   OopTaskQueueSet* task_queues() { return queues(); }
--- a/hotspot/src/share/vm/gc/cms/parCardTableModRefBS.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/parCardTableModRefBS.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -39,16 +39,11 @@
 void CardTableModRefBS::non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr,
                                                              OopsInGenClosure* cl,
                                                              CardTableRS* ct,
-                                                             int n_threads) {
-  assert(n_threads > 0, "Error: expected n_threads > 0");
-  assert((n_threads == 1 && ParallelGCThreads == 0) ||
-         n_threads <= (int)ParallelGCThreads,
-         "# worker threads != # requested!");
-  assert(!Thread::current()->is_VM_thread() || (n_threads == 1), "There is only 1 VM thread");
-  assert(UseDynamicNumberOfGCThreads ||
-         !FLAG_IS_DEFAULT(ParallelGCThreads) ||
-         n_threads == (int)ParallelGCThreads,
-         "# worker threads != # requested!");
+                                                             uint n_threads) {
+  assert(n_threads > 0, "expected n_threads > 0");
+  assert(n_threads <= ParallelGCThreads,
+         err_msg("n_threads: %u > ParallelGCThreads: " UINTX_FORMAT, n_threads, ParallelGCThreads));
+
   // Make sure the LNC array is valid for the space.
   jbyte**   lowest_non_clean;
   uintptr_t lowest_non_clean_base_chunk_index;
@@ -66,7 +61,8 @@
 
   uint stride = 0;
   while (!pst->is_task_claimed(/* reference */ stride)) {
-    process_stride(sp, mr, stride, n_strides, cl, ct,
+    process_stride(sp, mr, stride, n_strides,
+                   cl, ct,
                    lowest_non_clean,
                    lowest_non_clean_base_chunk_index,
                    lowest_non_clean_chunk_size);
@@ -132,9 +128,13 @@
     assert(chunk_mr.word_size() > 0, "[chunk_card_start > used_end)");
     assert(used.contains(chunk_mr), "chunk_mr should be subset of used");
 
+    // This function is used by the parallel card table iteration.
+    const bool parallel = true;
+
     DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(),
-                                                     cl->gen_boundary());
-    ClearNoncleanCardWrapper clear_cl(dcto_cl, ct);
+                                                     cl->gen_boundary(),
+                                                     parallel);
+    ClearNoncleanCardWrapper clear_cl(dcto_cl, ct, parallel);
 
 
     // Process the chunk.
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -567,23 +567,15 @@
 }
 
 ParNewGenTask::ParNewGenTask(ParNewGeneration* gen, Generation* old_gen,
-                             HeapWord* young_old_boundary, ParScanThreadStateSet* state_set) :
+                             HeapWord* young_old_boundary, ParScanThreadStateSet* state_set,
+                             StrongRootsScope* strong_roots_scope) :
     AbstractGangTask("ParNewGeneration collection"),
     _gen(gen), _old_gen(old_gen),
     _young_old_boundary(young_old_boundary),
-    _state_set(state_set)
+    _state_set(state_set),
+    _strong_roots_scope(strong_roots_scope)
   {}
 
-// Reset the terminator for the given number of
-// active threads.
-void ParNewGenTask::set_for_termination(uint active_workers) {
-  _state_set->reset(active_workers, _gen->promotion_failed());
-  // Should the heap be passed in?  There's only 1 for now so
-  // grab it instead.
-  GenCollectedHeap* gch = GenCollectedHeap::heap();
-  gch->set_n_termination(active_workers);
-}
-
 void ParNewGenTask::work(uint worker_id) {
   GenCollectedHeap* gch = GenCollectedHeap::heap();
   // Since this is being done in a separate thread, need new resource
@@ -603,10 +595,10 @@
                                            false);
 
   par_scan_state.start_strong_roots();
-  gch->gen_process_roots(_gen->level(),
+  gch->gen_process_roots(_strong_roots_scope,
+                         _gen->level(),
                          true,  // Process younger gens, if any,
                                 // as strong roots.
-                         false, // no scope; this is parallel code
                          GenCollectedHeap::SO_ScavengeCodeCache,
                          GenCollectedHeap::StrongAndWeakRoots,
                          &par_scan_state.to_space_root_closure(),
@@ -759,9 +751,6 @@
 
 private:
   virtual void work(uint worker_id);
-  virtual void set_for_termination(uint active_workers) {
-    _state_set.terminator()->reset_for_reuse(active_workers);
-  }
 private:
   ParNewGeneration&      _gen;
   ProcessTask&           _task;
@@ -838,7 +827,6 @@
 {
   _state_set.flush();
   GenCollectedHeap* gch = GenCollectedHeap::heap();
-  gch->set_par_threads(0);  // 0 ==> non-parallel.
   gch->save_marks();
 }
 
@@ -939,33 +927,35 @@
   to()->clear(SpaceDecorator::Mangle);
 
   gch->save_marks();
-  assert(workers != NULL, "Need parallel worker threads.");
-  uint n_workers = active_workers;
 
   // Set the correct parallelism (number of queues) in the reference processor
-  ref_processor()->set_active_mt_degree(n_workers);
+  ref_processor()->set_active_mt_degree(active_workers);
 
   // Always set the terminator for the active number of workers
   // because only those workers go through the termination protocol.
-  ParallelTaskTerminator _term(n_workers, task_queues());
-  ParScanThreadStateSet thread_state_set(workers->active_workers(),
+  ParallelTaskTerminator _term(active_workers, task_queues());
+  ParScanThreadStateSet thread_state_set(active_workers,
                                          *to(), *this, *_old_gen, *task_queues(),
                                          _overflow_stacks, desired_plab_sz(), _term);
 
-  ParNewGenTask tsk(this, _old_gen, reserved().end(), &thread_state_set);
-  gch->set_par_threads(n_workers);
-  gch->rem_set()->prepare_for_younger_refs_iterate(true);
-  // It turns out that even when we're using 1 thread, doing the work in a
-  // separate thread causes wide variance in run times.  We can't help this
-  // in the multi-threaded case, but we special-case n=1 here to get
-  // repeatable measurements of the 1-thread overhead of the parallel code.
-  if (n_workers > 1) {
-    StrongRootsScope srs;
-    workers->run_task(&tsk);
-  } else {
-    StrongRootsScope srs;
-    tsk.work(0);
+  thread_state_set.reset(active_workers, promotion_failed());
+
+  {
+    StrongRootsScope srs(active_workers);
+
+    ParNewGenTask tsk(this, _old_gen, reserved().end(), &thread_state_set, &srs);
+    gch->rem_set()->prepare_for_younger_refs_iterate(true);
+    // It turns out that even when we're using 1 thread, doing the work in a
+    // separate thread causes wide variance in run times.  We can't help this
+    // in the multi-threaded case, but we special-case n=1 here to get
+    // repeatable measurements of the 1-thread overhead of the parallel code.
+    if (active_workers > 1) {
+      workers->run_task(&tsk);
+    } else {
+      tsk.work(0);
+    }
   }
+
   thread_state_set.reset(0 /* Bad value in debug if not reset */,
                          promotion_failed());
 
@@ -995,7 +985,6 @@
                                               _gc_timer, _gc_tracer.gc_id());
   } else {
     thread_state_set.flush();
-    gch->set_par_threads(0);  // 0 ==> non-parallel.
     gch->save_marks();
     stats = rp->process_discovered_references(&is_alive, &keep_alive,
                                               &evacuate_followers, NULL,
@@ -1033,7 +1022,7 @@
   to()->set_concurrent_iteration_safe_limit(to()->top());
 
   if (ResizePLAB) {
-    plab_stats()->adjust_desired_plab_sz(n_workers);
+    plab_stats()->adjust_desired_plab_sz(active_workers);
   }
 
   if (PrintGC && !PrintGCDetails) {
@@ -1477,9 +1466,9 @@
     _ref_processor =
       new ReferenceProcessor(_reserved,                  // span
                              ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
-                             (int) ParallelGCThreads,    // mt processing degree
+                             (uint) ParallelGCThreads,   // mt processing degree
                              refs_discovery_is_mt(),     // mt discovery
-                             (int) ParallelGCThreads,    // mt discovery degree
+                             (uint) ParallelGCThreads,   // mt discovery degree
                              refs_discovery_is_atomic(), // atomic_discovery
                              NULL);                      // is_alive_non_header
   }
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -39,6 +39,7 @@
 class ParRootScanWithoutBarrierClosure;
 class ParRootScanWithBarrierTwoGensClosure;
 class ParEvacuateFollowersClosure;
+class StrongRootsScope;
 
 // It would be better if these types could be kept local to the .cpp file,
 // but they must be here to allow ParScanClosure::do_oop_work to be defined
@@ -237,20 +238,18 @@
   Generation*                  _old_gen;
   HeapWord*                    _young_old_boundary;
   class ParScanThreadStateSet* _state_set;
+  StrongRootsScope*            _strong_roots_scope;
 
 public:
   ParNewGenTask(ParNewGeneration*      gen,
                 Generation*            old_gen,
                 HeapWord*              young_old_boundary,
-                ParScanThreadStateSet* state_set);
+                ParScanThreadStateSet* state_set,
+                StrongRootsScope*      strong_roots_scope);
 
   HeapWord* young_old_boundary() { return _young_old_boundary; }
 
   void work(uint worker_id);
-
-  // Reset the terminator in ParScanThreadStateSet for
-  // "active_workers" threads.
-  virtual void set_for_termination(uint active_workers);
 };
 
 class KeepAliveClosure: public DefNewGeneration::KeepAliveClosure {
--- a/hotspot/src/share/vm/gc/cms/parOopClosures.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/parOopClosures.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -26,6 +26,7 @@
 #define SHARE_VM_GC_CMS_PAROOPCLOSURES_HPP
 
 #include "gc/shared/genOopClosures.hpp"
+#include "gc/shared/taskqueue.hpp"
 #include "memory/padded.hpp"
 
 // Closures for ParNewGeneration
--- a/hotspot/src/share/vm/gc/cms/yieldingWorkgroup.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/cms/yieldingWorkgroup.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -147,6 +147,13 @@
   bool completed() const { return _status == COMPLETED; }
   bool aborted()   const { return _status == ABORTED; }
   bool active()    const { return _status == ACTIVE; }
+
+  // This method configures the task for proper termination.
+  // Some tasks do not have any requirements on termination
+  // and may inherit this method that does nothing.  Some
+  // tasks do some coordination on termination and override
+  // this method to implement that coordination.
+  virtual void set_for_termination(uint active_workers) {}
 };
 // Class YieldingWorkGang: A subclass of WorkGang.
 // In particular, a YieldingWorkGang is made up of
--- a/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -158,20 +158,10 @@
   hr->calc_gc_efficiency();
 }
 
-void CollectionSetChooser::prepare_for_par_region_addition(uint n_regions,
+void CollectionSetChooser::prepare_for_par_region_addition(uint n_threads,
+                                                           uint n_regions,
                                                            uint chunk_size) {
   _first_par_unreserved_idx = 0;
-  uint n_threads = (uint) ParallelGCThreads;
-  if (UseDynamicNumberOfGCThreads) {
-    assert(G1CollectedHeap::heap()->workers()->active_workers() > 0,
-      "Should have been set earlier");
-    // This is defensive code. As the assertion above says, the number
-    // of active threads should be > 0, but in case there is some path
-    // or some improperly initialized variable with leads to no
-    // active threads, protect against that in a product build.
-    n_threads = MAX2(G1CollectedHeap::heap()->workers()->active_workers(),
-                     1U);
-  }
   uint max_waste = n_threads * chunk_size;
   // it should be aligned with respect to chunk_size
   uint aligned_n_regions = (n_regions + chunk_size - 1) / chunk_size * chunk_size;
--- a/hotspot/src/share/vm/gc/g1/collectionSetChooser.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/collectionSetChooser.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -121,7 +121,7 @@
 
   // Must be called before calls to claim_array_chunk().
   // n_regions is the number of regions, chunk_size the chunk size.
-  void prepare_for_par_region_addition(uint n_regions, uint chunk_size);
+  void prepare_for_par_region_addition(uint n_threads, uint n_regions, uint chunk_size);
   // Returns the first index in a contiguous chunk of chunk_size indexes
   // that the calling thread has reserved.  These must be set by the
   // calling thread using set_region() (to NULL if necessary).
--- a/hotspot/src/share/vm/gc/g1/concurrentG1Refine.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/concurrentG1Refine.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -35,7 +35,7 @@
 {
   // Ergonomically select initial concurrent refinement parameters
   if (FLAG_IS_DEFAULT(G1ConcRefinementGreenZone)) {
-    FLAG_SET_DEFAULT(G1ConcRefinementGreenZone, MAX2<int>(ParallelGCThreads, 1));
+    FLAG_SET_DEFAULT(G1ConcRefinementGreenZone, (intx)ParallelGCThreads);
   }
   set_green_zone(G1ConcRefinementGreenZone);
 
--- a/hotspot/src/share/vm/gc/g1/concurrentMark.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/concurrentMark.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -518,7 +518,7 @@
   _markStack(this),
   // _finger set in set_non_marking_state
 
-  _max_worker_id(MAX2((uint)ParallelGCThreads, 1U)),
+  _max_worker_id((uint)ParallelGCThreads),
   // _active_tasks set in set_non_marking_state
   // _tasks set inside the constructor
   _task_queues(new CMTaskQueueSet((int) _max_worker_id)),
@@ -1218,15 +1218,13 @@
     "Maximum number of marking threads exceeded");
 
   uint active_workers = MAX2(1U, parallel_marking_threads());
+  assert(active_workers > 0, "Should have been set");
 
   // Parallel task terminator is set in "set_concurrency_and_phase()"
   set_concurrency_and_phase(active_workers, true /* concurrent */);
 
   CMConcurrentMarkingTask markingTask(this, cmThread());
   _parallel_workers->set_active_workers(active_workers);
-  // Don't set _n_par_threads because it affects MT in process_roots()
-  // and the decisions on that MT processing is made elsewhere.
-  assert(_parallel_workers->active_workers() > 0, "Should have been set");
   _parallel_workers->run_task(&markingTask);
   print_stats();
 }
@@ -1761,28 +1759,20 @@
   }
 };
 
-class G1ParNoteEndTask;
-
 class G1NoteEndOfConcMarkClosure : public HeapRegionClosure {
   G1CollectedHeap* _g1;
-  size_t _max_live_bytes;
-  uint _regions_claimed;
   size_t _freed_bytes;
   FreeRegionList* _local_cleanup_list;
   HeapRegionSetCount _old_regions_removed;
   HeapRegionSetCount _humongous_regions_removed;
   HRRSCleanupTask* _hrrs_cleanup_task;
-  double _claimed_region_time;
-  double _max_region_time;
 
 public:
   G1NoteEndOfConcMarkClosure(G1CollectedHeap* g1,
                              FreeRegionList* local_cleanup_list,
                              HRRSCleanupTask* hrrs_cleanup_task) :
     _g1(g1),
-    _max_live_bytes(0), _regions_claimed(0),
     _freed_bytes(0),
-    _claimed_region_time(0.0), _max_region_time(0.0),
     _local_cleanup_list(local_cleanup_list),
     _old_regions_removed(),
     _humongous_regions_removed(),
@@ -1799,10 +1789,7 @@
     // We use a claim value of zero here because all regions
     // were claimed with value 1 in the FinalCount task.
     _g1->reset_gc_time_stamps(hr);
-    double start = os::elapsedTime();
-    _regions_claimed++;
     hr->note_end_of_marking();
-    _max_live_bytes += hr->max_live_bytes();
 
     if (hr->used() > 0 && hr->max_live_bytes() == 0 && !hr->is_young()) {
       _freed_bytes += hr->used();
@@ -1819,18 +1806,8 @@
       hr->rem_set()->do_cleanup_work(_hrrs_cleanup_task);
     }
 
-    double region_time = (os::elapsedTime() - start);
-    _claimed_region_time += region_time;
-    if (region_time > _max_region_time) {
-      _max_region_time = region_time;
-    }
     return false;
   }
-
-  size_t max_live_bytes() { return _max_live_bytes; }
-  uint regions_claimed() { return _regions_claimed; }
-  double claimed_region_time_sec() { return _claimed_region_time; }
-  double max_region_time_sec() { return _max_region_time; }
 };
 
 class G1ParNoteEndTask: public AbstractGangTask {
@@ -1838,14 +1815,12 @@
 
 protected:
   G1CollectedHeap* _g1h;
-  size_t _max_live_bytes;
-  size_t _freed_bytes;
   FreeRegionList* _cleanup_list;
   HeapRegionClaimer _hrclaimer;
 
 public:
   G1ParNoteEndTask(G1CollectedHeap* g1h, FreeRegionList* cleanup_list, uint n_workers) :
-      AbstractGangTask("G1 note end"), _g1h(g1h), _max_live_bytes(0), _freed_bytes(0), _cleanup_list(cleanup_list), _hrclaimer(n_workers) {
+      AbstractGangTask("G1 note end"), _g1h(g1h), _cleanup_list(cleanup_list), _hrclaimer(n_workers) {
   }
 
   void work(uint worker_id) {
@@ -1861,8 +1836,6 @@
     {
       MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
       _g1h->decrement_summary_bytes(g1_note_end.freed_bytes());
-      _max_live_bytes += g1_note_end.max_live_bytes();
-      _freed_bytes += g1_note_end.freed_bytes();
 
       // If we iterate over the global cleanup list at the end of
       // cleanup to do this printing we will not guarantee to only
@@ -1887,8 +1860,6 @@
       HeapRegionRemSet::finish_cleanup_task(&hrrs_cleanup_task);
     }
   }
-  size_t max_live_bytes() { return _max_live_bytes; }
-  size_t freed_bytes() { return _freed_bytes; }
 };
 
 class G1ParScrubRemSetTask: public AbstractGangTask {
@@ -1938,18 +1909,10 @@
 
   HeapRegionRemSet::reset_for_cleanup_tasks();
 
-  uint n_workers;
-
   // Do counting once more with the world stopped for good measure.
   G1ParFinalCountTask g1_par_count_task(g1h, &_region_bm, &_card_bm);
 
-  g1h->set_par_threads();
-  n_workers = g1h->n_par_threads();
-  assert(g1h->n_par_threads() == n_workers,
-         "Should not have been reset");
   g1h->workers()->run_task(&g1_par_count_task);
-  // Done with the parallel phase so reset to 0.
-  g1h->set_par_threads(0);
 
   if (VerifyDuringGC) {
     // Verify that the counting data accumulated during marking matches
@@ -1965,10 +1928,7 @@
                                                  &expected_region_bm,
                                                  &expected_card_bm);
 
-    g1h->set_par_threads((int)n_workers);
     g1h->workers()->run_task(&g1_par_verify_task);
-    // Done with the parallel phase so reset to 0.
-    g1h->set_par_threads(0);
 
     guarantee(g1_par_verify_task.failures() == 0, "Unexpected accounting failures");
   }
@@ -1990,11 +1950,11 @@
 
   g1h->reset_gc_time_stamp();
 
+  uint n_workers = _g1h->workers()->active_workers();
+
   // Note end of marking in all heap regions.
   G1ParNoteEndTask g1_par_note_end_task(g1h, &_cleanup_list, n_workers);
-  g1h->set_par_threads((int)n_workers);
   g1h->workers()->run_task(&g1_par_note_end_task);
-  g1h->set_par_threads(0);
   g1h->check_gc_time_stamps();
 
   if (!cleanup_list_is_empty()) {
@@ -2009,9 +1969,7 @@
   if (G1ScrubRemSets) {
     double rs_scrub_start = os::elapsedTime();
     G1ParScrubRemSetTask g1_par_scrub_rs_task(g1h, &_region_bm, &_card_bm, n_workers);
-    g1h->set_par_threads((int)n_workers);
     g1h->workers()->run_task(&g1_par_scrub_rs_task);
-    g1h->set_par_threads(0);
 
     double rs_scrub_end = os::elapsedTime();
     double this_rs_scrub_time = (rs_scrub_end - rs_scrub_start);
@@ -2020,7 +1978,7 @@
 
   // this will also free any regions totally full of garbage objects,
   // and sort the regions.
-  g1h->g1_policy()->record_concurrent_mark_cleanup_end((int)n_workers);
+  g1h->g1_policy()->record_concurrent_mark_cleanup_end();
 
   // Statistics.
   double end = os::elapsedTime();
@@ -2312,9 +2270,7 @@
   // and overflow handling in CMTask::do_marking_step() knows
   // how many workers to wait for.
   _cm->set_concurrency(_active_workers);
-  _g1h->set_par_threads(_active_workers);
   _workers->run_task(&proc_task_proxy);
-  _g1h->set_par_threads(0);
 }
 
 class G1CMRefEnqueueTaskProxy: public AbstractGangTask {
@@ -2344,9 +2300,7 @@
   // and overflow handling in CMTask::do_marking_step() knows
   // how many workers to wait for.
   _cm->set_concurrency(_active_workers);
-  _g1h->set_par_threads(_active_workers);
   _workers->run_task(&enq_task_proxy);
-  _g1h->set_par_threads(0);
 }
 
 void ConcurrentMark::weakRefsWorkParallelPart(BoolObjectClosure* is_alive, bool purged_classes) {
@@ -2608,27 +2562,23 @@
 
   g1h->ensure_parsability(false);
 
-  StrongRootsScope srs;
   // this is remark, so we'll use up all active threads
   uint active_workers = g1h->workers()->active_workers();
-  if (active_workers == 0) {
-    assert(active_workers > 0, "Should have been set earlier");
-    active_workers = (uint) ParallelGCThreads;
-    g1h->workers()->set_active_workers(active_workers);
-  }
   set_concurrency_and_phase(active_workers, false /* concurrent */);
   // Leave _parallel_marking_threads at it's
   // value originally calculated in the ConcurrentMark
   // constructor and pass values of the active workers
   // through the gang in the task.
 
-  CMRemarkTask remarkTask(this, active_workers);
-  // We will start all available threads, even if we decide that the
-  // active_workers will be fewer. The extra ones will just bail out
-  // immediately.
-  g1h->set_par_threads(active_workers);
-  g1h->workers()->run_task(&remarkTask);
-  g1h->set_par_threads(0);
+  {
+    StrongRootsScope srs(active_workers);
+
+    CMRemarkTask remarkTask(this, active_workers);
+    // We will start all available threads, even if we decide that the
+    // active_workers will be fewer. The extra ones will just bail out
+    // immediately.
+    g1h->workers()->run_task(&remarkTask);
+  }
 
   SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set();
   guarantee(has_overflown() ||
@@ -3001,9 +2951,7 @@
   G1AggregateCountDataTask g1_par_agg_task(_g1h, this, &_card_bm,
                                            _max_worker_id, n_workers);
 
-  _g1h->set_par_threads(n_workers);
   _g1h->workers()->run_task(&g1_par_agg_task);
-  _g1h->set_par_threads(0);
 }
 
 // Clear the per-worker arrays used to store the per-region counting data
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -1326,27 +1326,10 @@
         AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
                                                 workers()->active_workers(),
                                                 Threads::number_of_non_daemon_threads());
-      assert(UseDynamicNumberOfGCThreads ||
-             n_workers == workers()->total_workers(),
-             "If not dynamic should be using all the  workers");
       workers()->set_active_workers(n_workers);
-      // Set parallel threads in the heap (_n_par_threads) only
-      // before a parallel phase and always reset it to 0 after
-      // the phase so that the number of parallel threads does
-      // no get carried forward to a serial phase where there
-      // may be code that is "possibly_parallel".
-      set_par_threads(n_workers);
 
       ParRebuildRSTask rebuild_rs_task(this);
-      assert(UseDynamicNumberOfGCThreads ||
-             workers()->active_workers() == workers()->total_workers(),
-             "Unless dynamic should use total workers");
-      // Use the most recent number of  active workers
-      assert(workers()->active_workers() > 0,
-             "Active workers not properly set");
-      set_par_threads(workers()->active_workers());
       workers()->run_task(&rebuild_rs_task);
-      set_par_threads(0);
 
       // Rebuild the strong code root lists for each region
       rebuild_strong_code_roots();
@@ -1769,7 +1752,7 @@
   _allocator = G1Allocator::create_allocator(this);
   _humongous_object_threshold_in_words = HeapRegion::GrainWords / 2;
 
-  int n_queues = MAX2((int)ParallelGCThreads, 1);
+  int n_queues = (int)ParallelGCThreads;
   _task_queues = new RefToScanQueueSet(n_queues);
 
   uint n_rem_sets = HeapRegionRemSet::num_par_rem_sets();
@@ -2081,11 +2064,11 @@
     new ReferenceProcessor(mr,    // span
                            ParallelRefProcEnabled && (ParallelGCThreads > 1),
                                 // mt processing
-                           (int) ParallelGCThreads,
+                           (uint) ParallelGCThreads,
                                 // degree of mt processing
                            (ParallelGCThreads > 1) || (ConcGCThreads > 1),
                                 // mt discovery
-                           (int) MAX2(ParallelGCThreads, ConcGCThreads),
+                           (uint) MAX2(ParallelGCThreads, ConcGCThreads),
                                 // degree of mt discovery
                            false,
                                 // Reference discovery is not atomic
@@ -2098,11 +2081,11 @@
     new ReferenceProcessor(mr,    // span
                            ParallelRefProcEnabled && (ParallelGCThreads > 1),
                                 // mt processing
-                           MAX2((int)ParallelGCThreads, 1),
+                           (uint) ParallelGCThreads,
                                 // degree of mt processing
                            (ParallelGCThreads > 1),
                                 // mt discovery
-                           MAX2((int)ParallelGCThreads, 1),
+                           (uint) ParallelGCThreads,
                                 // degree of mt discovery
                            true,
                                 // Reference discovery is atomic
@@ -2502,8 +2485,7 @@
   assert(_worker_cset_start_region != NULL, "sanity");
   assert(_worker_cset_start_region_time_stamp != NULL, "sanity");
 
-  int n_queues = MAX2((int)ParallelGCThreads, 1);
-  for (int i = 0; i < n_queues; i++) {
+  for (uint i = 0; i < ParallelGCThreads; i++) {
     _worker_cset_start_region[i] = NULL;
     _worker_cset_start_region_time_stamp[i] = 0;
   }
@@ -2541,9 +2523,6 @@
   result = g1_policy()->collection_set();
   uint cs_size = g1_policy()->cset_region_length();
   uint active_workers = workers()->active_workers();
-  assert(UseDynamicNumberOfGCThreads ||
-           active_workers == workers()->total_workers(),
-           "Unless dynamic should use total workers");
 
   uint end_ind   = (cs_size * worker_i) / active_workers;
   uint start_ind = 0;
@@ -3021,7 +3000,7 @@
     G1VerifyCodeRootBlobClosure blobsCl(&codeRootsCl);
 
     {
-      G1RootProcessor root_processor(this);
+      G1RootProcessor root_processor(this, 1);
       root_processor.process_all_roots(&rootsCl,
                                        &cldCl,
                                        &blobsCl);
@@ -3042,13 +3021,7 @@
     if (GCParallelVerificationEnabled && ParallelGCThreads > 1) {
 
       G1ParVerifyTask task(this, vo);
-      assert(UseDynamicNumberOfGCThreads ||
-        workers()->active_workers() == workers()->total_workers(),
-        "If not dynamic should be using all the workers");
-      uint n_workers = workers()->active_workers();
-      set_par_threads(n_workers);
       workers()->run_task(&task);
-      set_par_threads(0);
       if (task.failures()) {
         failures = true;
       }
@@ -3572,6 +3545,10 @@
 };
 #endif // ASSERT
 
+uint G1CollectedHeap::num_task_queues() const {
+  return _task_queues->size();
+}
+
 #if TASKQUEUE_STATS
 void G1CollectedHeap::print_taskqueue_stats_hdr(outputStream* const st) {
   st->print_raw_cr("GC Task Stats");
@@ -3583,7 +3560,7 @@
   print_taskqueue_stats_hdr(st);
 
   TaskQueueStats totals;
-  const uint n = workers()->total_workers();
+  const uint n = num_task_queues();
   for (uint i = 0; i < n; ++i) {
     st->print("%3u ", i); task_queue(i)->stats.print(st); st->cr();
     totals += task_queue(i)->stats;
@@ -3594,7 +3571,7 @@
 }
 
 void G1CollectedHeap::reset_taskqueue_stats() {
-  const uint n = workers()->total_workers();
+  const uint n = num_task_queues();
   for (uint i = 0; i < n; ++i) {
     task_queue(i)->stats.reset();
   }
@@ -3696,9 +3673,6 @@
     uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
                                                                   workers()->active_workers(),
                                                                   Threads::number_of_non_daemon_threads());
-    assert(UseDynamicNumberOfGCThreads ||
-           active_workers == workers()->total_workers(),
-           "If not dynamic should be using all the  workers");
     workers()->set_active_workers(active_workers);
 
     double pause_start_sec = os::elapsedTime();
@@ -3873,8 +3847,7 @@
 
         if (evacuation_failed()) {
           _allocator->set_used(recalculate_used());
-          uint n_queues = MAX2((int)ParallelGCThreads, 1);
-          for (uint i = 0; i < n_queues; i++) {
+          for (uint i = 0; i < ParallelGCThreads; i++) {
             if (_evacuation_failed_info_array[i].has_failed()) {
               _gc_tracer_stw->report_evacuation_failed(_evacuation_failed_info_array[i]);
             }
@@ -4041,10 +4014,8 @@
 void G1CollectedHeap::remove_self_forwarding_pointers() {
   double remove_self_forwards_start = os::elapsedTime();
 
-  set_par_threads();
   G1ParRemoveSelfForwardPtrsTask rsfp_task(this);
   workers()->run_task(&rsfp_task);
-  set_par_threads(0);
 
   // Now restore saved marks, if any.
   assert(_objs_with_preserved_marks.size() ==
@@ -4308,12 +4279,13 @@
   Mutex* stats_lock() { return &_stats_lock; }
 
 public:
-  G1ParTask(G1CollectedHeap* g1h, RefToScanQueueSet *task_queues, G1RootProcessor* root_processor)
+  G1ParTask(G1CollectedHeap* g1h, RefToScanQueueSet *task_queues, G1RootProcessor* root_processor, uint n_workers)
     : AbstractGangTask("G1 collection"),
       _g1h(g1h),
       _queues(task_queues),
       _root_processor(root_processor),
-      _terminator(0, _queues),
+      _terminator(n_workers, _queues),
+      _n_workers(n_workers),
       _stats_lock(Mutex::leaf, "parallel G1 stats lock", true)
   {}
 
@@ -4325,12 +4297,6 @@
 
   ParallelTaskTerminator* terminator() { return &_terminator; }
 
-  virtual void set_for_termination(uint active_workers) {
-    _root_processor->set_num_workers(active_workers);
-    terminator()->reset_for_reuse(active_workers);
-    _n_workers = active_workers;
-  }
-
   // Helps out with CLD processing.
   //
   // During InitialMark we need to:
@@ -4811,19 +4777,14 @@
 
   G1ParallelCleaningTask g1_unlink_task(is_alive, process_strings, process_symbols,
                                         n_workers, class_unloading_occurred);
-  set_par_threads(n_workers);
   workers()->run_task(&g1_unlink_task);
-  set_par_threads(0);
 }
 
 void G1CollectedHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive,
                                                      bool process_strings, bool process_symbols) {
   {
-    uint n_workers = workers()->active_workers();
     G1StringSymbolTableUnlinkTask g1_unlink_task(is_alive, process_strings, process_symbols);
-    set_par_threads(n_workers);
     workers()->run_task(&g1_unlink_task);
-    set_par_threads(0);
   }
 
   if (G1StringDedup::is_enabled()) {
@@ -4851,13 +4812,9 @@
 void G1CollectedHeap::redirty_logged_cards() {
   double redirty_logged_cards_start = os::elapsedTime();
 
-  uint n_workers = workers()->active_workers();
-
   G1RedirtyLoggedCardsTask redirty_task(&dirty_card_queue_set());
   dirty_card_queue_set().reset_for_par_iteration();
-  set_par_threads(n_workers);
   workers()->run_task(&redirty_task);
-  set_par_threads(0);
 
   DirtyCardQueueSet& dcq = JavaThread::dirty_card_queue_set();
   dcq.merge_bufferlists(&dirty_card_queue_set());
@@ -5093,9 +5050,7 @@
   ParallelTaskTerminator terminator(_active_workers, _queues);
   G1STWRefProcTaskProxy proc_task_proxy(proc_task, _g1h, _queues, &terminator);
 
-  _g1h->set_par_threads(_active_workers);
   _workers->run_task(&proc_task_proxy);
-  _g1h->set_par_threads(0);
 }
 
 // Gang task for parallel reference enqueueing.
@@ -5124,9 +5079,7 @@
 
   G1STWRefEnqueueTaskProxy enq_task_proxy(enq_task);
 
-  _g1h->set_par_threads(_active_workers);
   _workers->run_task(&enq_task_proxy);
-  _g1h->set_par_threads(0);
 }
 
 // End of weak reference support closures
@@ -5219,7 +5172,7 @@
 };
 
 // Weak Reference processing during an evacuation pause (part 1).
-void G1CollectedHeap::process_discovered_references(uint no_of_gc_workers) {
+void G1CollectedHeap::process_discovered_references() {
   double ref_proc_start = os::elapsedTime();
 
   ReferenceProcessor* rp = _ref_processor_stw;
@@ -5246,17 +5199,14 @@
   // referents points to another object which is also referenced by an
   // object discovered by the STW ref processor.
 
-  assert(no_of_gc_workers == workers()->active_workers(), "Need to reset active GC workers");
-
-  set_par_threads(no_of_gc_workers);
+  uint no_of_gc_workers = workers()->active_workers();
+
   G1ParPreserveCMReferentsTask keep_cm_referents(this,
                                                  no_of_gc_workers,
                                                  _task_queues);
 
   workers()->run_task(&keep_cm_referents);
 
-  set_par_threads(0);
-
   // Closure to test whether a referent is alive.
   G1STWIsAliveClosure is_alive(this);
 
@@ -5330,7 +5280,7 @@
 }
 
 // Weak Reference processing during an evacuation pause (part 2).
-void G1CollectedHeap::enqueue_discovered_references(uint no_of_gc_workers) {
+void G1CollectedHeap::enqueue_discovered_references() {
   double ref_enq_start = os::elapsedTime();
 
   ReferenceProcessor* rp = _ref_processor_stw;
@@ -5344,12 +5294,12 @@
   } else {
     // Parallel reference enqueueing
 
-    assert(no_of_gc_workers == workers()->active_workers(),
-           "Need to reset active workers");
-    assert(rp->num_q() == no_of_gc_workers, "sanity");
-    assert(no_of_gc_workers <= rp->max_num_q(), "sanity");
-
-    G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, no_of_gc_workers);
+    uint n_workers = workers()->active_workers();
+
+    assert(rp->num_q() == n_workers, "sanity");
+    assert(n_workers <= rp->max_num_q(), "sanity");
+
+    G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, n_workers);
     rp->enqueue_discovered_references(&par_task_executor);
   }
 
@@ -5380,11 +5330,6 @@
   hot_card_cache->set_use_cache(false);
 
   const uint n_workers = workers()->active_workers();
-  assert(UseDynamicNumberOfGCThreads ||
-         n_workers == workers()->total_workers(),
-         "If not dynamic should be using all the  workers");
-  set_par_threads(n_workers);
-
 
   init_for_evac_failure(NULL);
 
@@ -5393,19 +5338,16 @@
   double end_par_time_sec;
 
   {
-    G1RootProcessor root_processor(this);
-    G1ParTask g1_par_task(this, _task_queues, &root_processor);
+    G1RootProcessor root_processor(this, n_workers);
+    G1ParTask g1_par_task(this, _task_queues, &root_processor, n_workers);
     // InitialMark needs claim bits to keep track of the marked-through CLDs.
     if (g1_policy()->during_initial_mark_pause()) {
       ClassLoaderDataGraph::clear_claimed_marks();
     }
 
-     // The individual threads will set their evac-failure closures.
-     if (PrintTerminationStats) G1ParScanThreadState::print_termination_stats_hdr();
-     // These tasks use ShareHeap::_process_strong_tasks
-     assert(UseDynamicNumberOfGCThreads ||
-            workers()->active_workers() == workers()->total_workers(),
-            "If not dynamic should be using all the  workers");
+    // The individual threads will set their evac-failure closures.
+    if (PrintTerminationStats) G1ParScanThreadState::print_termination_stats_hdr();
+
     workers()->run_task(&g1_par_task);
     end_par_time_sec = os::elapsedTime();
 
@@ -5425,14 +5367,12 @@
         (os::elapsedTime() - end_par_time_sec) * 1000.0;
   phase_times->record_code_root_fixup_time(code_root_fixup_time_ms);
 
-  set_par_threads(0);
-
   // Process any discovered reference objects - we have
   // to do this _before_ we retire the GC alloc regions
   // as we may have to copy some 'reachable' referent
   // objects (and their reachable sub-graphs) that were
   // not copied during the pause.
-  process_discovered_references(n_workers);
+  process_discovered_references();
 
   if (G1StringDedup::is_enabled()) {
     double fixup_start = os::elapsedTime();
@@ -5474,7 +5414,7 @@
   // will log these updates (and dirty their associated
   // cards). We need these updates logged to update any
   // RSets.
-  enqueue_discovered_references(n_workers);
+  enqueue_discovered_references();
 
   redirty_logged_cards();
   COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
@@ -5779,9 +5719,7 @@
     // Iterate over the dirty cards region list.
     G1ParCleanupCTTask cleanup_task(ct_bs, this);
 
-    set_par_threads();
     workers()->run_task(&cleanup_task);
-    set_par_threads(0);
 #ifndef PRODUCT
     if (G1VerifyCTCleanup || VerifyAfterGC) {
       G1VerifyCardTableCleanup cleanup_verifier(this, ct_bs);
@@ -6314,21 +6252,6 @@
   g1mm()->update_eden_size();
 }
 
-void G1CollectedHeap::set_par_threads() {
-  // Don't change the number of workers.  Use the value previously set
-  // in the workgroup.
-  uint n_workers = workers()->active_workers();
-  assert(UseDynamicNumberOfGCThreads ||
-           n_workers == workers()->total_workers(),
-      "Otherwise should be using the total number of workers");
-  if (n_workers == 0) {
-    assert(false, "Should have been set in prior evacuation pause.");
-    n_workers = ParallelGCThreads;
-    workers()->set_active_workers(n_workers);
-  }
-  set_par_threads(n_workers);
-}
-
 // Methods for the GC alloc regions
 
 HeapRegion* G1CollectedHeap::new_gc_alloc_region(size_t word_size,
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -606,11 +606,11 @@
 
   // Process any reference objects discovered during
   // an incremental evacuation pause.
-  void process_discovered_references(uint no_of_gc_workers);
+  void process_discovered_references();
 
   // Enqueue any remaining discovered references
   // after processing.
-  void enqueue_discovered_references(uint no_of_gc_workers);
+  void enqueue_discovered_references();
 
 public:
   FlexibleWorkGang* workers() const { return _workers; }
@@ -981,6 +981,8 @@
 
   RefToScanQueue *task_queue(uint i) const;
 
+  uint num_task_queues() const;
+
   // A set of cards where updates happened during the GC
   DirtyCardQueueSet& dirty_card_queue_set() { return _dirty_card_queue_set; }
 
@@ -1012,11 +1014,6 @@
   // Initialize weak reference processing.
   void ref_processing_init();
 
-  // Explicitly import set_par_threads into this scope
-  using CollectedHeap::set_par_threads;
-  // Set _n_par_threads according to a policy TBD.
-  void set_par_threads();
-
   virtual Name kind() const {
     return CollectedHeap::G1CollectedHeap;
   }
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -1587,14 +1587,17 @@
 }
 
 void
-G1CollectorPolicy::record_concurrent_mark_cleanup_end(uint n_workers) {
+G1CollectorPolicy::record_concurrent_mark_cleanup_end() {
   _collectionSetChooser->clear();
 
+  FlexibleWorkGang* workers = _g1->workers();
+  uint n_workers = workers->active_workers();
+
   uint n_regions = _g1->num_regions();
   uint chunk_size = calculate_parallel_work_chunk_size(n_workers, n_regions);
-  _collectionSetChooser->prepare_for_par_region_addition(n_regions, chunk_size);
+  _collectionSetChooser->prepare_for_par_region_addition(n_workers, n_regions, chunk_size);
   ParKnownGarbageTask par_known_garbage_task(_collectionSetChooser, chunk_size, n_workers);
-  _g1->workers()->run_task(&par_known_garbage_task);
+  workers->run_task(&par_known_garbage_task);
 
   _collectionSetChooser->sort_regions();
 
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -692,7 +692,7 @@
 
   // Record start, end, and completion of cleanup.
   void record_concurrent_mark_cleanup_start();
-  void record_concurrent_mark_cleanup_end(uint n_workers);
+  void record_concurrent_mark_cleanup_end();
   void record_concurrent_mark_cleanup_completed();
 
   // Records the information about the heap size for reporting in
--- a/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -127,7 +127,7 @@
 
   MarkingCodeBlobClosure follow_code_closure(&GenMarkSweep::follow_root_closure, !CodeBlobToOopClosure::FixRelocations);
   {
-    G1RootProcessor root_processor(g1h);
+    G1RootProcessor root_processor(g1h, 1);
     root_processor.process_strong_roots(&GenMarkSweep::follow_root_closure,
                                         &GenMarkSweep::follow_cld_closure,
                                         &follow_code_closure);
@@ -237,7 +237,7 @@
 
   CodeBlobToOopClosure adjust_code_closure(&GenMarkSweep::adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
   {
-    G1RootProcessor root_processor(g1h);
+    G1RootProcessor root_processor(g1h, 1);
     root_processor.process_all_roots(&GenMarkSweep::adjust_pointer_closure,
                                      &GenMarkSweep::adjust_cld_closure,
                                      &adjust_code_closure);
--- a/hotspot/src/share/vm/gc/g1/g1OopClosures.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1OopClosures.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -50,8 +50,8 @@
   _par_scan_state = par_scan_state;
   _worker_id = par_scan_state->queue_num();
 
-  assert(_worker_id < MAX2((uint)ParallelGCThreads, 1u),
-         err_msg("The given worker id %u must be less than the number of threads %u", _worker_id, MAX2((uint)ParallelGCThreads, 1u)));
+  assert(_worker_id < ParallelGCThreads,
+         err_msg("The given worker id %u must be less than the number of threads " UINTX_FORMAT, _worker_id, ParallelGCThreads));
 }
 
 // Generate G1 specialized oop_oop_iterate functions.
--- a/hotspot/src/share/vm/gc/g1/g1RootProcessor.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1RootProcessor.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -90,11 +90,10 @@
 
 
 void G1RootProcessor::worker_has_discovered_all_strong_classes() {
-  uint n_workers = _g1h->n_par_threads();
   assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
 
   uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
-  if (new_value == n_workers) {
+  if (new_value == n_workers()) {
     // This thread is last. Notify the others.
     MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
     _lock.notify_all();
@@ -102,21 +101,20 @@
 }
 
 void G1RootProcessor::wait_until_all_strong_classes_discovered() {
-  uint n_workers = _g1h->n_par_threads();
   assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
 
-  if ((uint)_n_workers_discovered_strong_classes != n_workers) {
+  if ((uint)_n_workers_discovered_strong_classes != n_workers()) {
     MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
-    while ((uint)_n_workers_discovered_strong_classes != n_workers) {
+    while ((uint)_n_workers_discovered_strong_classes != n_workers()) {
       _lock.wait(Mutex::_no_safepoint_check_flag, 0, false);
     }
   }
 }
 
-G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h) :
+G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h, uint n_workers) :
     _g1h(g1h),
     _process_strong_tasks(new SubTasksDone(G1RP_PS_NumElements)),
-    _srs(),
+    _srs(n_workers),
     _lock(Mutex::leaf, "G1 Root Scanning barrier lock", false, Monitor::_safepoint_check_never),
     _n_workers_discovered_strong_classes(0) {}
 
@@ -206,7 +204,7 @@
     }
   }
 
-  _process_strong_tasks->all_tasks_completed();
+  _process_strong_tasks->all_tasks_completed(n_workers());
 }
 
 void G1RootProcessor::process_strong_roots(OopClosure* oops,
@@ -216,7 +214,7 @@
   process_java_roots(oops, clds, clds, NULL, blobs, NULL, 0);
   process_vm_roots(oops, NULL, NULL, 0);
 
-  _process_strong_tasks->all_tasks_completed();
+  _process_strong_tasks->all_tasks_completed(n_workers());
 }
 
 void G1RootProcessor::process_all_roots(OopClosure* oops,
@@ -230,7 +228,7 @@
     CodeCache::blobs_do(blobs);
   }
 
-  _process_strong_tasks->all_tasks_completed();
+  _process_strong_tasks->all_tasks_completed(n_workers());
 }
 
 void G1RootProcessor::process_java_roots(OopClosure* strong_roots,
@@ -253,7 +251,7 @@
 
   {
     G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ThreadRoots, worker_i);
-    bool is_par = _g1h->n_par_threads() > 0;
+    bool is_par = n_workers() > 1;
     Threads::possibly_parallel_oops_do(is_par, strong_roots, thread_stack_clds, strong_code);
   }
 }
@@ -329,6 +327,6 @@
   _g1h->g1_rem_set()->oops_into_collection_set_do(scan_rs, &scavenge_cs_nmethods, worker_i);
 }
 
-void G1RootProcessor::set_num_workers(uint active_workers) {
-  _process_strong_tasks->set_n_threads(active_workers);
+uint G1RootProcessor::n_workers() const {
+  return _srs.n_threads();
 }
--- a/hotspot/src/share/vm/gc/g1/g1RootProcessor.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1RootProcessor.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -85,7 +85,7 @@
                         uint worker_i);
 
 public:
-  G1RootProcessor(G1CollectedHeap* g1h);
+  G1RootProcessor(G1CollectedHeap* g1h, uint n_workers);
 
   // Apply closures to the strongly and weakly reachable roots in the system
   // in a single pass.
@@ -114,8 +114,8 @@
                             OopClosure* scan_non_heap_weak_roots,
                             uint worker_i);
 
-  // Inform the root processor about the number of worker threads
-  void set_num_workers(uint active_workers);
+  // Number of worker threads used by the root processor.
+  uint n_workers() const;
 };
 
 #endif // SHARE_VM_GC_G1_G1ROOTPROCESSOR_HPP
--- a/hotspot/src/share/vm/gc/g1/g1StringDedup.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedup.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -153,9 +153,7 @@
 
   G1StringDedupUnlinkOrOopsDoTask task(is_alive, keep_alive, allow_resize_and_rehash, phase_times);
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
-  g1h->set_par_threads();
   g1h->workers()->run_task(&task);
-  g1h->set_par_threads(0);
 }
 
 void G1StringDedup::threads_do(ThreadClosure* tc) {
--- a/hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -42,7 +42,7 @@
   _cancel(false),
   _empty(true),
   _dropped(0) {
-  _nqueues = MAX2(ParallelGCThreads, (size_t)1);
+  _nqueues = ParallelGCThreads;
   _queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
   for (size_t i = 0; i < _nqueues; i++) {
     new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
--- a/hotspot/src/share/vm/gc/g1/g1StringDedupTable.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedupTable.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -112,7 +112,7 @@
 };
 
 G1StringDedupEntryCache::G1StringDedupEntryCache() {
-  _nlists = MAX2(ParallelGCThreads, (size_t)1);
+  _nlists = ParallelGCThreads;
   _lists = PaddedArray<G1StringDedupEntryFreeList, mtGC>::create_unfreeable((uint)_nlists);
 }
 
--- a/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -832,9 +832,9 @@
   _ref_processor =
     new ReferenceProcessor(mr,            // span
                            ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
-                           (int) ParallelGCThreads, // mt processing degree
+                           (uint) ParallelGCThreads, // mt processing degree
                            true,          // mt discovery
-                           (int) ParallelGCThreads, // mt discovery degree
+                           (uint) ParallelGCThreads, // mt discovery degree
                            true,          // atomic_discovery
                            &_is_alive_closure); // non-header is alive closure
   _counters = new CollectorCounters("PSParallelCompact", 1);
@@ -2029,7 +2029,6 @@
     // Set the number of GC threads to be used in this collection
     gc_task_manager()->set_active_gang();
     gc_task_manager()->task_idle_workers();
-    heap->set_par_threads(gc_task_manager()->active_workers());
 
     TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
     GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer.gc_id());
--- a/hotspot/src/share/vm/gc/parallel/psScavenge.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/parallel/psScavenge.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -382,7 +382,6 @@
     // Get the active number of workers here and use that value
     // throughout the methods.
     uint active_workers = gc_task_manager()->active_workers();
-    heap->set_par_threads(active_workers);
 
     PSPromotionManager::pre_scavenge();
 
@@ -846,9 +845,9 @@
   _ref_processor =
     new ReferenceProcessor(mr,                         // span
                            ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
-                           (int) ParallelGCThreads,    // mt processing degree
+                           (uint) ParallelGCThreads,   // mt processing degree
                            true,                       // mt discovery
-                           (int) ParallelGCThreads,    // mt discovery degree
+                           (uint) ParallelGCThreads,   // mt discovery degree
                            true,                       // atomic_discovery
                            NULL);                      // header provides liveness info
 
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -38,6 +38,7 @@
 #include "gc/shared/referencePolicy.hpp"
 #include "gc/shared/space.inline.hpp"
 #include "gc/shared/spaceDecorator.hpp"
+#include "gc/shared/strongRootsScope.hpp"
 #include "memory/iterator.hpp"
 #include "oops/instanceRefKlass.hpp"
 #include "oops/oop.inline.hpp"
@@ -454,7 +455,7 @@
   }
 }
 
-void DefNewGeneration::younger_refs_iterate(OopsInGenClosure* cl) {
+void DefNewGeneration::younger_refs_iterate(OopsInGenClosure* cl, uint n_threads) {
   assert(false, "NYI -- are you sure you want to call this?");
 }
 
@@ -625,15 +626,22 @@
   assert(gch->no_allocs_since_save_marks(0),
          "save marks have not been newly set.");
 
-  gch->gen_process_roots(_level,
-                         true,  // Process younger gens, if any,
-                                // as strong roots.
-                         true,  // activate StrongRootsScope
-                         GenCollectedHeap::SO_ScavengeCodeCache,
-                         GenCollectedHeap::StrongAndWeakRoots,
-                         &fsc_with_no_gc_barrier,
-                         &fsc_with_gc_barrier,
-                         &cld_scan_closure);
+  {
+    // DefNew needs to run with n_threads == 0, to make sure the serial
+    // version of the card table scanning code is used.
+    // See: CardTableModRefBS::non_clean_card_iterate_possibly_parallel.
+    StrongRootsScope srs(0);
+
+    gch->gen_process_roots(&srs,
+                           _level,
+                           true,  // Process younger gens, if any,
+                                  // as strong roots.
+                           GenCollectedHeap::SO_ScavengeCodeCache,
+                           GenCollectedHeap::StrongAndWeakRoots,
+                           &fsc_with_no_gc_barrier,
+                           &fsc_with_gc_barrier,
+                           &cld_scan_closure);
+  }
 
   // "evacuate followers".
   evacuate_followers.do_void();
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -255,7 +255,7 @@
   // Iteration
   void object_iterate(ObjectClosure* blk);
 
-  void younger_refs_iterate(OopsInGenClosure* cl);
+  void younger_refs_iterate(OopsInGenClosure* cl, uint n_threads);
 
   void space_iterate(SpaceClosure* blk, bool usedOnly = false);
 
--- a/hotspot/src/share/vm/gc/serial/genMarkSweep.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/serial/genMarkSweep.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -40,6 +40,7 @@
 #include "gc/shared/modRefBarrierSet.hpp"
 #include "gc/shared/referencePolicy.hpp"
 #include "gc/shared/space.hpp"
+#include "gc/shared/strongRootsScope.hpp"
 #include "oops/instanceRefKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiExport.hpp"
@@ -200,14 +201,18 @@
   // Need new claim bits before marking starts.
   ClassLoaderDataGraph::clear_claimed_marks();
 
-  gch->gen_process_roots(level,
-                         false, // Younger gens are not roots.
-                         true,  // activate StrongRootsScope
-                         GenCollectedHeap::SO_None,
-                         GenCollectedHeap::StrongRootsOnly,
-                         &follow_root_closure,
-                         &follow_root_closure,
-                         &follow_cld_closure);
+  {
+    StrongRootsScope srs(1);
+
+    gch->gen_process_roots(&srs,
+                           level,
+                           false, // Younger gens are not roots.
+                           GenCollectedHeap::SO_None,
+                           GenCollectedHeap::StrongRootsOnly,
+                           &follow_root_closure,
+                           &follow_root_closure,
+                           &follow_cld_closure);
+  }
 
   // Process reference objects found during marking
   {
@@ -284,14 +289,18 @@
   assert(level == 1, "We don't use mark-sweep on young generations.");
   adjust_pointer_closure.set_orig_generation(gch->old_gen());
 
-  gch->gen_process_roots(level,
-                         false, // Younger gens are not roots.
-                         true,  // activate StrongRootsScope
-                         GenCollectedHeap::SO_AllCodeCache,
-                         GenCollectedHeap::StrongAndWeakRoots,
-                         &adjust_pointer_closure,
-                         &adjust_pointer_closure,
-                         &adjust_cld_closure);
+  {
+    StrongRootsScope srs(1);
+
+    gch->gen_process_roots(&srs,
+                           level,
+                           false, // Younger gens are not roots.
+                           GenCollectedHeap::SO_AllCodeCache,
+                           GenCollectedHeap::StrongAndWeakRoots,
+                           &adjust_pointer_closure,
+                           &adjust_pointer_closure,
+                           &adjust_cld_closure);
+  }
 
   gch->gen_process_weak_roots(&adjust_pointer_closure);
 
--- a/hotspot/src/share/vm/gc/shared/adaptiveSizePolicy.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/adaptiveSizePolicy.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -161,7 +161,7 @@
       }
       _debug_perturbation = !_debug_perturbation;
     }
-    assert((new_active_workers <= (uintx) ParallelGCThreads) &&
+    assert((new_active_workers <= ParallelGCThreads) &&
            (new_active_workers >= min_workers),
       "Jiggled active workers too much");
   }
--- a/hotspot/src/share/vm/gc/shared/cardGeneration.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/cardGeneration.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -353,8 +353,8 @@
   blk->do_space(space());
 }
 
-void CardGeneration::younger_refs_iterate(OopsInGenClosure* blk) {
+void CardGeneration::younger_refs_iterate(OopsInGenClosure* blk, uint n_threads) {
   blk->set_generation(this);
-  younger_refs_in_space_iterate(space(), blk);
+  younger_refs_in_space_iterate(space(), blk, n_threads);
   blk->reset_generation();
 }
--- a/hotspot/src/share/vm/gc/shared/cardGeneration.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/cardGeneration.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -89,7 +89,7 @@
 
   void space_iterate(SpaceClosure* blk, bool usedOnly = false);
 
-  void younger_refs_iterate(OopsInGenClosure* blk);
+  void younger_refs_iterate(OopsInGenClosure* blk, uint n_threads);
 
   bool is_in(const void* p) const;
 
--- a/hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -440,31 +440,11 @@
 void CardTableModRefBS::non_clean_card_iterate_possibly_parallel(Space* sp,
                                                                  MemRegion mr,
                                                                  OopsInGenClosure* cl,
-                                                                 CardTableRS* ct) {
+                                                                 CardTableRS* ct,
+                                                                 uint n_threads) {
   if (!mr.is_empty()) {
-    // Caller (process_roots()) claims that all GC threads
-    // execute this call.  With UseDynamicNumberOfGCThreads now all
-    // active GC threads execute this call.  The number of active GC
-    // threads needs to be passed to par_non_clean_card_iterate_work()
-    // to get proper partitioning and termination.
-    //
-    // This is an example of where n_par_threads() is used instead
-    // of workers()->active_workers().  n_par_threads can be set to 0 to
-    // turn off parallelism.  For example when this code is called as
-    // part of verification during root processing then n_par_threads()
-    // may have been set to 0. active_workers is not overloaded with
-    // the meaning that it is a switch to disable parallelism and so keeps
-    // the meaning of the number of active gc workers. If parallelism has
-    // not been shut off by setting n_par_threads to 0, then n_par_threads
-    // should be equal to active_workers.  When a different mechanism for
-    // shutting off parallelism is used, then active_workers can be used in
-    // place of n_par_threads.
-    int n_threads =  GenCollectedHeap::heap()->n_par_threads();
-    bool is_par = n_threads > 0;
-    if (is_par) {
+    if (n_threads > 0) {
 #if INCLUDE_ALL_GCS
-      assert(GenCollectedHeap::heap()->n_par_threads() ==
-             GenCollectedHeap::heap()->workers()->active_workers(), "Mismatch");
       non_clean_card_iterate_parallel_work(sp, mr, cl, ct, n_threads);
 #else  // INCLUDE_ALL_GCS
       fatal("Parallel gc not supported here.");
@@ -472,8 +452,11 @@
     } else {
       // clear_cl finds contiguous dirty ranges of cards to process and clear.
 
-      DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(), cl->gen_boundary());
-      ClearNoncleanCardWrapper clear_cl(dcto_cl, ct);
+      // This is the single-threaded version used by DefNew.
+      const bool parallel = false;
+
+      DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(), cl->gen_boundary(), parallel);
+      ClearNoncleanCardWrapper clear_cl(dcto_cl, ct, parallel);
 
       clear_cl.do_MemRegion(mr);
     }
--- a/hotspot/src/share/vm/gc/shared/cardTableModRefBS.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/cardTableModRefBS.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -178,14 +178,15 @@
   // region mr in the given space and apply cl to any dirty sub-regions
   // of mr. Clears the dirty cards as they are processed.
   void non_clean_card_iterate_possibly_parallel(Space* sp, MemRegion mr,
-                                                OopsInGenClosure* cl, CardTableRS* ct);
+                                                OopsInGenClosure* cl, CardTableRS* ct,
+                                                uint n_threads);
 
  private:
   // Work method used to implement non_clean_card_iterate_possibly_parallel()
   // above in the parallel case.
   void non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr,
                                             OopsInGenClosure* cl, CardTableRS* ct,
-                                            int n_threads);
+                                            uint n_threads);
 
  protected:
   // Dirty the bytes corresponding to "mr" (not all of which must be
--- a/hotspot/src/share/vm/gc/shared/cardTableRS.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/cardTableRS.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -102,9 +102,10 @@
 }
 
 void CardTableRS::younger_refs_iterate(Generation* g,
-                                       OopsInGenClosure* blk) {
+                                       OopsInGenClosure* blk,
+                                       uint n_threads) {
   _last_cur_val_in_gen[g->level()+1] = cur_youngergen_card_val();
-  g->younger_refs_iterate(blk);
+  g->younger_refs_iterate(blk, n_threads);
 }
 
 inline bool ClearNoncleanCardWrapper::clear_card(jbyte* entry) {
@@ -164,15 +165,8 @@
 }
 
 ClearNoncleanCardWrapper::ClearNoncleanCardWrapper(
-  DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct) :
-    _dirty_card_closure(dirty_card_closure), _ct(ct) {
-    // Cannot yet substitute active_workers for n_par_threads
-    // in the case where parallelism is being turned off by
-    // setting n_par_threads to 0.
-    _is_par = (GenCollectedHeap::heap()->n_par_threads() > 0);
-    assert(!_is_par ||
-           (GenCollectedHeap::heap()->n_par_threads() ==
-            GenCollectedHeap::heap()->workers()->active_workers()), "Mismatch");
+  DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct, bool is_par) :
+    _dirty_card_closure(dirty_card_closure), _ct(ct), _is_par(is_par) {
 }
 
 bool ClearNoncleanCardWrapper::is_word_aligned(jbyte* entry) {
@@ -272,7 +266,8 @@
 }
 
 void CardTableRS::younger_refs_in_space_iterate(Space* sp,
-                                                OopsInGenClosure* cl) {
+                                                OopsInGenClosure* cl,
+                                                uint n_threads) {
   const MemRegion urasm = sp->used_region_at_save_marks();
 #ifdef ASSERT
   // Convert the assertion check to a warning if we are running
@@ -301,7 +296,7 @@
     ShouldNotReachHere();
   }
 #endif
-  _ct_bs->non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this);
+  _ct_bs->non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this, n_threads);
 }
 
 void CardTableRS::clear_into_younger(Generation* old_gen) {
--- a/hotspot/src/share/vm/gc/shared/cardTableRS.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/cardTableRS.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -56,7 +56,7 @@
 
   CardTableModRefBSForCTRS* _ct_bs;
 
-  virtual void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
+  virtual void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl, uint n_threads);
 
   void verify_space(Space* s, HeapWord* gen_start);
 
@@ -116,7 +116,7 @@
   // Card table entries are cleared before application; "blk" is
   // responsible for dirtying if the oop is still older-to-younger after
   // closure application.
-  void younger_refs_iterate(Generation* g, OopsInGenClosure* blk);
+  void younger_refs_iterate(Generation* g, OopsInGenClosure* blk, uint n_threads);
 
   void inline_write_ref_field_gc(void* field, oop new_val) {
     jbyte* byte = _ct_bs->byte_for(field);
@@ -183,7 +183,7 @@
   bool is_word_aligned(jbyte* entry);
 
 public:
-  ClearNoncleanCardWrapper(DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct);
+  ClearNoncleanCardWrapper(DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct, bool is_par);
   void do_MemRegion(MemRegion mr);
 };
 
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -160,8 +160,7 @@
 // Memory state functions.
 
 
-CollectedHeap::CollectedHeap() : _n_par_threads(0)
-{
+CollectedHeap::CollectedHeap() {
   const size_t max_len = size_t(arrayOopDesc::max_array_length(T_INT));
   const size_t elements_per_word = HeapWordSize / sizeof(jint);
   _filler_array_max_size = align_object_size(filler_array_hdr_size() +
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -101,7 +101,6 @@
  protected:
   BarrierSet* _barrier_set;
   bool _is_gc_active;
-  uint _n_par_threads;
 
   unsigned int _total_collections;          // ... started
   unsigned int _total_full_collections;     // ... started
@@ -291,12 +290,6 @@
   }
   GCCause::Cause gc_cause() { return _gc_cause; }
 
-  // Number of threads currently working on GC tasks.
-  uint n_par_threads() { return _n_par_threads; }
-
-  // May be overridden to set additional parallelism.
-  virtual void set_par_threads(uint t) { _n_par_threads = t; };
-
   // General obj/array allocation facilities.
   inline static oop obj_allocate(KlassHandle klass, int size, TRAPS);
   inline static oop array_allocate(KlassHandle klass, int size, int length, TRAPS);
--- a/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -561,16 +561,6 @@
   return collector_policy()->satisfy_failed_allocation(size, is_tlab);
 }
 
-void GenCollectedHeap::set_par_threads(uint t) {
-  assert(t == 0 || !UseSerialGC, "Cannot have parallel threads");
-  CollectedHeap::set_par_threads(t);
-  set_n_termination(t);
-}
-
-void GenCollectedHeap::set_n_termination(uint t) {
-  _process_strong_tasks->set_n_threads(t);
-}
-
 #ifdef ASSERT
 class AssertNonScavengableClosure: public OopClosure {
 public:
@@ -582,15 +572,13 @@
 static AssertNonScavengableClosure assert_is_non_scavengable_closure;
 #endif
 
-void GenCollectedHeap::process_roots(bool activate_scope,
+void GenCollectedHeap::process_roots(StrongRootsScope* scope,
                                      ScanningOption so,
                                      OopClosure* strong_roots,
                                      OopClosure* weak_roots,
                                      CLDClosure* strong_cld_closure,
                                      CLDClosure* weak_cld_closure,
                                      CodeBlobClosure* code_roots) {
-  StrongRootsScope srs(activate_scope);
-
   // General roots.
   assert(Threads::thread_claim_parity() != 0, "must have called prologue code");
   assert(code_roots != NULL, "code root closure should always be set");
@@ -609,7 +597,7 @@
   // Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway
   CodeBlobClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots;
 
-  bool is_par = n_par_threads() > 0;
+  bool is_par = scope->n_threads() > 1;
   Threads::possibly_parallel_oops_do(is_par, strong_roots, roots_from_clds_p, roots_from_code_p);
 
   if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) {
@@ -669,9 +657,9 @@
 
 }
 
-void GenCollectedHeap::gen_process_roots(int level,
+void GenCollectedHeap::gen_process_roots(StrongRootsScope* scope,
+                                         int level,
                                          bool younger_gens_as_roots,
-                                         bool activate_scope,
                                          ScanningOption so,
                                          bool only_strong_roots,
                                          OopsInGenClosure* not_older_gens,
@@ -689,7 +677,7 @@
   OopsInGenClosure* weak_roots = only_strong_roots ? NULL : not_older_gens;
   CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
 
-  process_roots(activate_scope, so,
+  process_roots(scope, so,
                 not_older_gens, weak_roots,
                 cld_closure, weak_cld_closure,
                 &mark_code_closure);
@@ -707,11 +695,11 @@
   // older-gen scanning.
   if (level == 0) {
     older_gens->set_generation(_old_gen);
-    rem_set()->younger_refs_iterate(_old_gen, older_gens);
+    rem_set()->younger_refs_iterate(_old_gen, older_gens, scope->n_threads());
     older_gens->reset_generation();
   }
 
-  _process_strong_tasks->all_tasks_completed();
+  _process_strong_tasks->all_tasks_completed(scope->n_threads());
 }
 
 
--- a/hotspot/src/share/vm/gc/shared/genCollectedHeap.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/genCollectedHeap.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -30,8 +30,9 @@
 #include "gc/shared/collectorPolicy.hpp"
 #include "gc/shared/generation.hpp"
 
+class FlexibleWorkGang;
+class StrongRootsScope;
 class SubTasksDone;
-class FlexibleWorkGang;
 
 // A "GenCollectedHeap" is a CollectedHeap that uses generational
 // collection.  It has two generations, young and old.
@@ -363,9 +364,6 @@
   // asserted to be this type.
   static GenCollectedHeap* heap();
 
-  void set_par_threads(uint t);
-  void set_n_termination(uint t);
-
   // Invoke the "do_oop" method of one of the closures "not_older_gens"
   // or "older_gens" on root locations for the generation at
   // "level".  (The "older_gens" closure is used for scanning references
@@ -385,7 +383,7 @@
   };
 
  private:
-  void process_roots(bool activate_scope,
+  void process_roots(StrongRootsScope* scope,
                      ScanningOption so,
                      OopClosure* strong_roots,
                      OopClosure* weak_roots,
@@ -393,24 +391,13 @@
                      CLDClosure* weak_cld_closure,
                      CodeBlobClosure* code_roots);
 
-  void gen_process_roots(int level,
-                         bool younger_gens_as_roots,
-                         bool activate_scope,
-                         ScanningOption so,
-                         OopsInGenClosure* not_older_gens,
-                         OopsInGenClosure* weak_roots,
-                         OopsInGenClosure* older_gens,
-                         CLDClosure* cld_closure,
-                         CLDClosure* weak_cld_closure,
-                         CodeBlobClosure* code_closure);
-
  public:
   static const bool StrongAndWeakRoots = false;
   static const bool StrongRootsOnly    = true;
 
-  void gen_process_roots(int level,
+  void gen_process_roots(StrongRootsScope* scope,
+                         int level,
                          bool younger_gens_as_roots,
-                         bool activate_scope,
                          ScanningOption so,
                          bool only_strong_roots,
                          OopsInGenClosure* not_older_gens,
--- a/hotspot/src/share/vm/gc/shared/genOopClosures.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/genOopClosures.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -35,11 +35,6 @@
 class DefNewGeneration;
 class KlassRemSet;
 
-template<class E, MEMFLAGS F, unsigned int N> class GenericTaskQueue;
-typedef GenericTaskQueue<oop, mtGC, TASKQUEUE_SIZE> OopTaskQueue;
-template<class T, MEMFLAGS F> class GenericTaskQueueSet;
-typedef GenericTaskQueueSet<OopTaskQueue, mtGC> OopTaskQueueSet;
-
 // Closure for iterating roots from a particular generation
 // Note: all classes deriving from this MUST call this do_barrier
 // method at the end of their own do_oop method!
--- a/hotspot/src/share/vm/gc/shared/genRemSet.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/genRemSet.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -77,10 +77,11 @@
   //  1) that are in objects allocated in "g" at the time of the last call
   //     to "save_Marks", and
   //  2) that point to objects in younger generations.
-  virtual void younger_refs_iterate(Generation* g, OopsInGenClosure* blk) = 0;
+  virtual void younger_refs_iterate(Generation* g, OopsInGenClosure* blk, uint n_threads) = 0;
 
   virtual void younger_refs_in_space_iterate(Space* sp,
-                                             OopsInGenClosure* cl) = 0;
+                                             OopsInGenClosure* cl,
+                                             uint n_threads) = 0;
 
   // This method is used to notify the remembered set that "new_val" has
   // been written into "field" by the garbage collector.
--- a/hotspot/src/share/vm/gc/shared/generation.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/generation.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -293,9 +293,10 @@
 }
 
 void Generation::younger_refs_in_space_iterate(Space* sp,
-                                               OopsInGenClosure* cl) {
+                                               OopsInGenClosure* cl,
+                                               uint n_threads) {
   GenRemSet* rs = GenCollectedHeap::heap()->rem_set();
-  rs->younger_refs_in_space_iterate(sp, cl);
+  rs->younger_refs_in_space_iterate(sp, cl, n_threads);
 }
 
 class GenerationObjIterateClosure : public SpaceClosure {
--- a/hotspot/src/share/vm/gc/shared/generation.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/generation.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -122,7 +122,7 @@
   // The iteration is only over objects allocated at the start of the
   // iterations; objects allocated as a result of applying the closure are
   // not included.
-  void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
+  void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl, uint n_threads);
 
  public:
   // The set of possible generation kinds.
@@ -526,7 +526,7 @@
   // in the current generation that contain pointers to objects in younger
   // generations. Objects allocated since the last "save_marks" call are
   // excluded.
-  virtual void younger_refs_iterate(OopsInGenClosure* cl) = 0;
+  virtual void younger_refs_iterate(OopsInGenClosure* cl, uint n_threads) = 0;
 
   // Inform a generation that it longer contains references to objects
   // in any younger generation.    [e.g. Because younger gens are empty,
--- a/hotspot/src/share/vm/gc/shared/space.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/space.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -181,7 +181,8 @@
 
 DirtyCardToOopClosure* Space::new_dcto_cl(ExtendedOopClosure* cl,
                                           CardTableModRefBS::PrecisionStyle precision,
-                                          HeapWord* boundary) {
+                                          HeapWord* boundary,
+                                          bool parallel) {
   return new DirtyCardToOopClosure(this, cl, precision, boundary);
 }
 
@@ -260,7 +261,8 @@
 DirtyCardToOopClosure*
 ContiguousSpace::new_dcto_cl(ExtendedOopClosure* cl,
                              CardTableModRefBS::PrecisionStyle precision,
-                             HeapWord* boundary) {
+                             HeapWord* boundary,
+                             bool parallel) {
   return new ContiguousSpaceDCTOC(this, cl, precision, boundary);
 }
 
--- a/hotspot/src/share/vm/gc/shared/space.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/space.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -183,7 +183,8 @@
   // operate. ResourceArea allocated.
   virtual DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
                                              CardTableModRefBS::PrecisionStyle precision,
-                                             HeapWord* boundary = NULL);
+                                             HeapWord* boundary,
+                                             bool parallel);
 
   // If "p" is in the space, returns the address of the start of the
   // "block" that contains "p".  We say "block" instead of "object" since
@@ -629,7 +630,8 @@
   // Override.
   DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
                                      CardTableModRefBS::PrecisionStyle precision,
-                                     HeapWord* boundary = NULL);
+                                     HeapWord* boundary,
+                                     bool parallel);
 
   // Apply "blk->do_oop" to the addresses of all reference fields in objects
   // starting with the _saved_mark_word, which was noted during a generation's
--- a/hotspot/src/share/vm/gc/shared/strongRootsScope.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/strongRootsScope.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -28,24 +28,18 @@
 #include "gc/shared/strongRootsScope.hpp"
 #include "runtime/thread.hpp"
 
-MarkScope::MarkScope(bool activate) : _active(activate) {
-  if (_active) {
-    nmethod::oops_do_marking_prologue();
-  }
+MarkScope::MarkScope() {
+  nmethod::oops_do_marking_prologue();
 }
 
 MarkScope::~MarkScope() {
-  if (_active) {
-    nmethod::oops_do_marking_epilogue();
-  }
+  nmethod::oops_do_marking_epilogue();
 }
 
-StrongRootsScope::StrongRootsScope(bool activate) : MarkScope(activate) {
-  if (_active) {
-    Threads::change_thread_claim_parity();
-    // Zero the claimed high water mark in the StringTable
-    StringTable::clear_parallel_claimed_index();
-  }
+StrongRootsScope::StrongRootsScope(uint n_threads) : _n_threads(n_threads) {
+  Threads::change_thread_claim_parity();
+  // Zero the claimed high water mark in the StringTable
+  StringTable::clear_parallel_claimed_index();
 }
 
 StrongRootsScope::~StrongRootsScope() {
--- a/hotspot/src/share/vm/gc/shared/strongRootsScope.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/strongRootsScope.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -29,18 +29,21 @@
 
 class MarkScope : public StackObj {
  protected:
-  bool _active;
- public:
-  MarkScope(bool activate = true);
+  MarkScope();
   ~MarkScope();
 };
 
 // Sets up and tears down the required state for parallel root processing.
 
 class StrongRootsScope : public MarkScope {
+  // Number of threads participating in the roots processing.
+  const uint _n_threads;
+
  public:
-  StrongRootsScope(bool activate = true);
+  StrongRootsScope(uint n_threads);
   ~StrongRootsScope();
+
+  uint n_threads() const { return _n_threads; }
 };
 
 #endif // SHARE_VM_GC_SHARED_STRONGROOTSSCOPE_HPP
--- a/hotspot/src/share/vm/gc/shared/taskqueue.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/taskqueue.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -382,6 +382,8 @@
   bool steal(uint queue_num, int* seed, E& t);
 
   bool peek();
+
+  uint size() const { return _n; }
 };
 
 template<class T, MEMFLAGS F> void
--- a/hotspot/src/share/vm/gc/shared/workgroup.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/workgroup.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -133,8 +133,6 @@
 }
 
 void WorkGang::run_task(AbstractGangTask* task, uint no_of_parallel_workers) {
-  task->set_for_termination(no_of_parallel_workers);
-
   // This thread is executed by the VM thread which does not block
   // on ordinary MutexLocker's.
   MutexLockerEx ml(monitor(), Mutex::_no_safepoint_check_flag);
@@ -434,7 +432,7 @@
 // SubTasksDone functions.
 
 SubTasksDone::SubTasksDone(uint n) :
-  _n_tasks(n), _n_threads(1), _tasks(NULL) {
+  _n_tasks(n), _tasks(NULL) {
   _tasks = NEW_C_HEAP_ARRAY(uint, n, mtInternal);
   guarantee(_tasks != NULL, "alloc failure");
   clear();
@@ -444,12 +442,6 @@
   return _tasks != NULL;
 }
 
-void SubTasksDone::set_n_threads(uint t) {
-  assert(_claimed == 0 || _threads_completed == _n_threads,
-         "should not be called while tasks are being processed!");
-  _n_threads = (t == 0 ? 1 : t);
-}
-
 void SubTasksDone::clear() {
   for (uint i = 0; i < _n_tasks; i++) {
     _tasks[i] = 0;
@@ -477,7 +469,7 @@
   return res;
 }
 
-void SubTasksDone::all_tasks_completed() {
+void SubTasksDone::all_tasks_completed(uint n_threads) {
   jint observed = _threads_completed;
   jint old;
   do {
@@ -485,7 +477,10 @@
     observed = Atomic::cmpxchg(old+1, &_threads_completed, old);
   } while (observed != old);
   // If this was the last thread checking in, clear the tasks.
-  if (observed+1 == (jint)_n_threads) clear();
+  uint adjusted_thread_count = (n_threads == 0 ? 1 : n_threads);
+  if (observed + 1 == (jint)adjusted_thread_count) {
+    clear();
+  }
 }
 
 
--- a/hotspot/src/share/vm/gc/shared/workgroup.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/gc/shared/workgroup.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -59,13 +59,6 @@
   // The argument tells you which member of the gang you are.
   virtual void work(uint worker_id) = 0;
 
-  // This method configures the task for proper termination.
-  // Some tasks do not have any requirements on termination
-  // and may inherit this method that does nothing.  Some
-  // tasks do some coordination on termination and override
-  // this method to implement that coordination.
-  virtual void set_for_termination(uint active_workers) {};
-
   // Debugging accessor for the name.
   const char* name() const PRODUCT_RETURN_(return NULL;);
   int counter() { return _counter; }
@@ -99,12 +92,9 @@
   OopTaskQueueSet*       _queues;
   ParallelTaskTerminator _terminator;
  public:
-  AbstractGangTaskWOopQueues(const char* name, OopTaskQueueSet* queues) :
-    AbstractGangTask(name), _queues(queues), _terminator(0, _queues) {}
+  AbstractGangTaskWOopQueues(const char* name, OopTaskQueueSet* queues, uint n_threads) :
+    AbstractGangTask(name), _queues(queues), _terminator(n_threads, _queues) {}
   ParallelTaskTerminator* terminator() { return &_terminator; }
-  virtual void set_for_termination(uint active_workers) {
-    terminator()->reset_for_reuse(active_workers);
-  }
   OopTaskQueueSet* queues() { return _queues; }
 };
 
@@ -315,16 +305,20 @@
   uint _active_workers;
  public:
   // Constructor and destructor.
-  // Initialize active_workers to a minimum value.  Setting it to
-  // the parameter "workers" will initialize it to a maximum
-  // value which is not desirable.
   FlexibleWorkGang(const char* name, uint workers,
                    bool are_GC_task_threads,
                    bool  are_ConcurrentGC_threads) :
     WorkGang(name, workers, are_GC_task_threads, are_ConcurrentGC_threads),
-    _active_workers(UseDynamicNumberOfGCThreads ? 1U : ParallelGCThreads) {}
-  // Accessors for fields
-  virtual uint active_workers() const { return _active_workers; }
+    _active_workers(UseDynamicNumberOfGCThreads ? 1U : workers) {}
+
+  // Accessors for fields.
+  virtual uint active_workers() const {
+    assert(_active_workers <= _total_workers,
+           err_msg("_active_workers: %u > _total_workers: %u", _active_workers, _total_workers));
+    assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers,
+           "Unless dynamic should use total workers");
+    return _active_workers;
+  }
   void set_active_workers(uint v) {
     assert(v <= _total_workers,
            "Trying to set more workers active than there are");
@@ -390,12 +384,6 @@
 class SubTasksDone: public CHeapObj<mtInternal> {
   uint* _tasks;
   uint _n_tasks;
-  // _n_threads is used to determine when a sub task is done.
-  // It does not control how many threads will execute the subtask
-  // but must be initialized to the number that do execute the task
-  // in order to correctly decide when the subtask is done (all the
-  // threads working on the task have finished).
-  uint _n_threads;
   uint _threads_completed;
 #ifdef ASSERT
   volatile uint _claimed;
@@ -413,11 +401,6 @@
   // True iff the object is in a valid state.
   bool valid();
 
-  // Get/set the number of parallel threads doing the tasks to "t".  Can only
-  // be called before tasks start or after they are complete.
-  uint n_threads() { return _n_threads; }
-  void set_n_threads(uint t);
-
   // Returns "false" if the task "t" is unclaimed, and ensures that task is
   // claimed.  The task "t" is required to be within the range of "this".
   bool is_task_claimed(uint t);
@@ -426,7 +409,9 @@
   // tasks that it will try to claim.  Every thread in the parallel task
   // must execute this.  (When the last thread does so, the task array is
   // cleared.)
-  void all_tasks_completed();
+  //
+  // n_threads - Number of threads executing the sub-tasks.
+  void all_tasks_completed(uint n_threads);
 
   // Destructor.
   ~SubTasksDone();
--- a/hotspot/src/share/vm/memory/iterator.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/memory/iterator.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -381,9 +381,4 @@
   template <class OopClosureType>             static bool do_metadata(OopClosureType* closure);
 };
 
-// Helper to convert the oop iterate macro suffixes into bool values that can be used by template functions.
-#define nvs_nv_to_bool true
-#define nvs_v_to_bool  false
-#define nvs_to_bool(nv_suffix) nvs##nv_suffix##_to_bool
-
 #endif // SHARE_VM_MEMORY_ITERATOR_HPP
--- a/hotspot/src/share/vm/oops/arrayKlass.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/arrayKlass.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -144,4 +144,36 @@
   void oop_verify_on(oop obj, outputStream* st);
 };
 
+// Array oop iteration macros for declarations.
+// Used to generate the declarations in the *ArrayKlass header files.
+
+#define OOP_OOP_ITERATE_DECL_RANGE(OopClosureType, nv_suffix)                                  \
+  int oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, int start, int end);
+
+#if INCLUDE_ALL_GCS
+// Named NO_BACKWARDS because the definition used by *ArrayKlass isn't reversed, see below.
+#define OOP_OOP_ITERATE_DECL_NO_BACKWARDS(OopClosureType, nv_suffix)           \
+  int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
+#endif // INCLUDE_ALL_GCS
+
+
+// Array oop iteration macros for definitions.
+// Used to generate the definitions in the *ArrayKlass.inline.hpp files.
+
+#define OOP_OOP_ITERATE_DEFN_RANGE(KlassType, OopClosureType, nv_suffix)                                 \
+                                                                                                         \
+int KlassType::oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, int start, int end) {  \
+  return oop_oop_iterate_range<nvs_to_bool(nv_suffix)>(obj, closure, start, end);                        \
+}
+
+#if INCLUDE_ALL_GCS
+#define OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(KlassType, OopClosureType, nv_suffix)          \
+int KlassType::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {  \
+  /* No reverse implementation ATM. */                                                   \
+  return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure);                          \
+}
+#else
+#define OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(KlassType, OopClosureType, nv_suffix)
+#endif
+
 #endif // SHARE_VM_OOPS_ARRAYKLASS_HPP
--- a/hotspot/src/share/vm/oops/instanceClassLoaderKlass.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceClassLoaderKlass.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -87,19 +87,12 @@
 
  public:
 
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)   \
-  int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk);                    \
-  int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, MemRegion mr);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
 
 #if INCLUDE_ALL_GCS
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix)  \
-  int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
 #endif // INCLUDE_ALL_GCS
 
 };
--- a/hotspot/src/share/vm/oops/instanceClassLoaderKlass.inline.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceClassLoaderKlass.inline.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -78,33 +78,9 @@
   return size;
 }
 
-
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)              \
-                                                                                              \
-int InstanceClassLoaderKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure);                               \
-}
-
-#if INCLUDE_ALL_GCS
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)              \
-                                                                                                        \
-int InstanceClassLoaderKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure);                                 \
-}
-#else
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix)                              \
-                                                                                                                \
-int InstanceClassLoaderKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) {  \
-  return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr);                                     \
-}
-
 #define ALL_INSTANCE_CLASS_LOADER_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)  \
-  InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN(          OopClosureType, nv_suffix)     \
-  InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m(        OopClosureType, nv_suffix)     \
-  InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
+  OOP_OOP_ITERATE_DEFN(          InstanceClassLoaderKlass, OopClosureType, nv_suffix)    \
+  OOP_OOP_ITERATE_DEFN_BOUNDED(  InstanceClassLoaderKlass, OopClosureType, nv_suffix)    \
+  OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceClassLoaderKlass, OopClosureType, nv_suffix)
 
 #endif // SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -1084,19 +1084,12 @@
 
  public:
 
-#define InstanceKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)                   \
-  int  oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure);                    \
-  int  oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
 
 #if INCLUDE_ALL_GCS
-#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix)  \
-  int  oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
 #endif // INCLUDE_ALL_GCS
 
   u2 idnum_allocated_count() const      { return _idnum_allocated_count; }
--- a/hotspot/src/share/vm/oops/instanceKlass.inline.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceKlass.inline.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -27,6 +27,7 @@
 
 #include "memory/iterator.hpp"
 #include "oops/instanceKlass.hpp"
+#include "oops/klass.hpp"
 #include "oops/oop.inline.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/globalDefinitions.hpp"
@@ -187,29 +188,9 @@
 
 #undef INLINE
 
-
-#define InstanceKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)              \
-int InstanceKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure);                    \
-}
-
-#if INCLUDE_ALL_GCS
-#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)              \
-int InstanceKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure);                      \
-}
-#else
-#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-#define InstanceKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix)                              \
-int InstanceKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) {  \
-  return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr);                          \
-}
-
 #define ALL_INSTANCE_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)  \
-  InstanceKlass_OOP_OOP_ITERATE_DEFN(          OopClosureType, nv_suffix)   \
-  InstanceKlass_OOP_OOP_ITERATE_DEFN_m(        OopClosureType, nv_suffix)   \
-  InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
+  OOP_OOP_ITERATE_DEFN(          InstanceKlass, OopClosureType, nv_suffix)  \
+  OOP_OOP_ITERATE_DEFN_BOUNDED(  InstanceKlass, OopClosureType, nv_suffix)  \
+  OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceKlass, OopClosureType, nv_suffix)
 
 #endif // SHARE_VM_OOPS_INSTANCEKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/instanceMirrorKlass.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceMirrorKlass.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -149,19 +149,12 @@
 
  public:
 
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)           \
-  int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk);                       \
-  int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, MemRegion mr);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
 
 #if INCLUDE_ALL_GCS
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
-  int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
 #endif // INCLUDE_ALL_GCS
 };
 
--- a/hotspot/src/share/vm/oops/instanceMirrorKlass.inline.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceMirrorKlass.inline.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -27,6 +27,7 @@
 #include "classfile/javaClasses.hpp"
 #include "oops/instanceKlass.inline.hpp"
 #include "oops/instanceMirrorKlass.hpp"
+#include "oops/klass.hpp"
 #include "oops/oop.inline.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/globalDefinitions.hpp"
@@ -132,33 +133,9 @@
   return oop_size(obj);
 }
 
-
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)              \
-                                                                                         \
-int InstanceMirrorKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure);                          \
-}
-
-#if INCLUDE_ALL_GCS
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)              \
-                                                                                                   \
-int InstanceMirrorKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure);                            \
-}
-#else
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix)                              \
-                                                                                                           \
-int InstanceMirrorKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) {  \
-  return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr);                                \
-}
-
 #define ALL_INSTANCE_MIRROR_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)  \
-  InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN(          OopClosureType, nv_suffix)    \
-  InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m(        OopClosureType, nv_suffix)    \
-  InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
+  OOP_OOP_ITERATE_DEFN(          InstanceMirrorKlass, OopClosureType, nv_suffix)   \
+  OOP_OOP_ITERATE_DEFN_BOUNDED(  InstanceMirrorKlass, OopClosureType, nv_suffix)   \
+  OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceMirrorKlass, OopClosureType, nv_suffix)
 
 #endif // SHARE_VM_OOPS_INSTANCEMIRRORKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/instanceRefKlass.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceRefKlass.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -119,19 +119,12 @@
 
  public:
 
-#define InstanceRefKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)               \
-  int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure);                    \
-  int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
 
 #if INCLUDE_ALL_GCS
-#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix)     \
-  int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
 #endif // INCLUDE_ALL_GCS
 
   static void release_and_notify_pending_list_lock(BasicLock *pending_list_basic_lock);
--- a/hotspot/src/share/vm/oops/instanceRefKlass.inline.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/instanceRefKlass.inline.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -141,34 +141,9 @@
 
 // Macro to define InstanceRefKlass::oop_oop_iterate for virtual/nonvirtual for
 // all closures.  Macros calling macros above for each oop size.
-
-#define InstanceRefKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)              \
-                                                                                      \
-int InstanceRefKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure);                       \
-}
-
-#if INCLUDE_ALL_GCS
-#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)              \
-                                                                                                \
-int InstanceRefKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure);                         \
-}
-#else
-#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-
-#define InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix)                              \
-                                                                                                        \
-int InstanceRefKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) {  \
-  return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr);                             \
-}
-
 #define ALL_INSTANCE_REF_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)  \
-  InstanceRefKlass_OOP_OOP_ITERATE_DEFN(          OopClosureType, nv_suffix)    \
-  InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m(        OopClosureType, nv_suffix)    \
-  InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-
+  OOP_OOP_ITERATE_DEFN(          InstanceRefKlass, OopClosureType, nv_suffix)   \
+  OOP_OOP_ITERATE_DEFN_BOUNDED(  InstanceRefKlass, OopClosureType, nv_suffix)   \
+  OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceRefKlass, OopClosureType, nv_suffix)
 
 #endif // SHARE_VM_OOPS_INSTANCEREFKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/klass.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/klass.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -583,20 +583,20 @@
 
   // Iterators specialized to particular subtypes
   // of ExtendedOopClosure, to avoid closure virtual calls.
-#define Klass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)                                      \
-  virtual int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) = 0;                    \
-  /* Iterates "closure" over all the oops in "obj" (of type "this") within "mr". */                \
-  virtual int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) = 0;
+#define Klass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)                                          \
+  virtual int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) = 0;                        \
+  /* Iterates "closure" over all the oops in "obj" (of type "this") within "mr". */                    \
+  virtual int oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr) = 0;
 
   ALL_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_DECL)
   ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL)
 
 #if INCLUDE_ALL_GCS
-#define Klass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix)                    \
+#define Klass_OOP_OOP_ITERATE_DECL_BACKWARDS(OopClosureType, nv_suffix)                    \
   virtual int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) = 0;
 
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_BACKWARDS_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_DECL_BACKWARDS)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL_BACKWARDS)
 #endif // INCLUDE_ALL_GCS
 
   virtual void array_klasses_do(void f(Klass* k)) {}
@@ -651,4 +651,44 @@
   void klass_update_barrier_set_pre(oop* p, oop v);
 };
 
+// Helper to convert the oop iterate macro suffixes into bool values that can be used by template functions.
+#define nvs_nv_to_bool true
+#define nvs_v_to_bool  false
+#define nvs_to_bool(nv_suffix) nvs##nv_suffix##_to_bool
+
+// Oop iteration macros for declarations.
+// Used to generate declarations in the *Klass header files.
+
+#define OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)                                    \
+  int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure);                        \
+  int oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr);
+
+#if INCLUDE_ALL_GCS
+#define OOP_OOP_ITERATE_DECL_BACKWARDS(OopClosureType, nv_suffix)              \
+  int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
+#endif // INCLUDE_ALL_GCS
+
+
+// Oop iteration macros for definitions.
+// Used to generate definitions in the *Klass.inline.hpp files.
+
+#define OOP_OOP_ITERATE_DEFN(KlassType, OopClosureType, nv_suffix)             \
+int KlassType::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {  \
+  return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure);                \
+}
+
+#if INCLUDE_ALL_GCS
+#define OOP_OOP_ITERATE_DEFN_BACKWARDS(KlassType, OopClosureType, nv_suffix)             \
+int KlassType::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {  \
+  return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure);                  \
+}
+#else
+#define OOP_OOP_ITERATE_DEFN_BACKWARDS(KlassType, OopClosureType, nv_suffix)
+#endif
+
+#define OOP_OOP_ITERATE_DEFN_BOUNDED(KlassType, OopClosureType, nv_suffix)                           \
+int KlassType::oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr) {  \
+  return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr);                          \
+}
+
 #endif // SHARE_VM_OOPS_KLASS_HPP
--- a/hotspot/src/share/vm/oops/objArrayKlass.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/objArrayKlass.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -163,22 +163,14 @@
 
  public:
 
-#define ObjArrayKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)   \
-  int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk);         \
-  int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk,      \
-                                     MemRegion mr);                     \
-  int oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* blk,    \
-                                     int start, int end);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(ObjArrayKlass_OOP_OOP_ITERATE_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(ObjArrayKlass_OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_RANGE)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_RANGE)
 
 #if INCLUDE_ALL_GCS
-#define ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
-  int  oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
 #endif // INCLUDE_ALL_GCS
 
   // JVM support
--- a/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -27,6 +27,8 @@
 
 #include "memory/memRegion.hpp"
 #include "memory/iterator.inline.hpp"
+#include "oops/arrayKlass.hpp"
+#include "oops/klass.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
@@ -149,41 +151,10 @@
   return size;
 }
 
-
-#define ObjArrayKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)              \
-                                                                                   \
-int ObjArrayKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {  \
-  return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure);                    \
-}
-
-#if INCLUDE_ALL_GCS
-#define ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)              \
-int ObjArrayKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {  \
-  /* No reverse implementation ATM. */                                                       \
-  return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure);                              \
-}
-#else
-#define ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-#define ObjArrayKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix)                              \
-                                                                                                     \
-int ObjArrayKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) {  \
-  return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr);                          \
-}
-
-#define ObjArrayKlass_OOP_OOP_ITERATE_DEFN_r(OopClosureType, nv_suffix)                                      \
-                                                                                                             \
-int ObjArrayKlass::oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, int start, int end) {  \
-  return oop_oop_iterate_range<nvs_to_bool(nv_suffix)>(obj, closure, start, end);                            \
-}
-
-
-#define ALL_OBJ_ARRAY_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)  \
-  ObjArrayKlass_OOP_OOP_ITERATE_DEFN(          OopClosureType, nv_suffix)    \
-  ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)    \
-  ObjArrayKlass_OOP_OOP_ITERATE_DEFN_m(        OopClosureType, nv_suffix)    \
-  ObjArrayKlass_OOP_OOP_ITERATE_DEFN_r(        OopClosureType, nv_suffix)
-
+#define ALL_OBJ_ARRAY_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)    \
+  OOP_OOP_ITERATE_DEFN(             ObjArrayKlass, OopClosureType, nv_suffix)  \
+  OOP_OOP_ITERATE_DEFN_BOUNDED(     ObjArrayKlass, OopClosureType, nv_suffix)  \
+  OOP_OOP_ITERATE_DEFN_RANGE(       ObjArrayKlass, OopClosureType, nv_suffix)  \
+  OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(ObjArrayKlass, OopClosureType, nv_suffix)
 
 #endif // SHARE_VM_OOPS_OBJARRAYKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/oop.inline.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/oop.inline.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -741,7 +741,7 @@
 }                                                                     \
                                                                       \
 inline int oopDesc::oop_iterate(OopClosureType* blk, MemRegion mr) {  \
-  return klass()->oop_oop_iterate##nv_suffix##_m(this, blk, mr);      \
+  return klass()->oop_oop_iterate_bounded##nv_suffix(this, blk, mr);  \
 }
 
 
--- a/hotspot/src/share/vm/oops/typeArrayKlass.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/typeArrayKlass.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -92,24 +92,24 @@
   // The implementation used by all oop_oop_iterate functions in TypeArrayKlasses.
   inline int oop_oop_iterate_impl(oop obj, ExtendedOopClosure* closure);
 
+  // Wraps oop_oop_iterate_impl to conform to macros.
+  template <bool nv, typename OopClosureType>
+  inline int oop_oop_iterate(oop obj, OopClosureType* closure);
+
+  // Wraps oop_oop_iterate_impl to conform to macros.
+  template <bool nv, typename OopClosureType>
+  inline int oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr);
+
  public:
 
-#define TypeArrayKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)    \
-  int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure);       \
-  int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure,    \
-                                     MemRegion mr);                       \
-  int oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure,  \
-                                     int start, int end);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(TypeArrayKlass_OOP_OOP_ITERATE_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(TypeArrayKlass_OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_RANGE)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_RANGE)
 
 #if INCLUDE_ALL_GCS
-#define TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix)  \
-  int  oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
-
-  ALL_OOP_OOP_ITERATE_CLOSURES_1(TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
-  ALL_OOP_OOP_ITERATE_CLOSURES_2(TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+  ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
+  ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
 #endif // INCLUDE_ALL_GCS
 
 
--- a/hotspot/src/share/vm/oops/typeArrayKlass.inline.hpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/oops/typeArrayKlass.inline.hpp	Mon Jun 08 11:31:09 2015 -0700
@@ -25,6 +25,8 @@
 #ifndef SHARE_VM_OOPS_TYPEARRAYKLASS_INLINE_HPP
 #define SHARE_VM_OOPS_TYPEARRAYKLASS_INLINE_HPP
 
+#include "oops/arrayKlass.hpp"
+#include "oops/klass.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayKlass.hpp"
 #include "oops/typeArrayOop.hpp"
@@ -39,35 +41,19 @@
   return t->object_size();
 }
 
-#define TypeArrayKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)  \
-                                                                        \
-int TypeArrayKlass::                                                    \
-oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) {          \
-  return oop_oop_iterate_impl(obj, closure);                            \
+template <bool nv, typename OopClosureType>
+int TypeArrayKlass::oop_oop_iterate(oop obj, OopClosureType* closure) {
+  return oop_oop_iterate_impl(obj, closure);
 }
 
-#if INCLUDE_ALL_GCS
-#define TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)  \
-                                                                                  \
-int TypeArrayKlass::                                                              \
-oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) {          \
-  return oop_oop_iterate_impl(obj, closure);                                      \
-}
-#else
-#define TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-
-#define TypeArrayKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix)          \
-                                                                                  \
-int TypeArrayKlass::                                                              \
-oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) {  \
-  return oop_oop_iterate_impl(obj, closure);                                      \
+template <bool nv, typename OopClosureType>
+int TypeArrayKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) {
+  return oop_oop_iterate_impl(obj, closure);
 }
 
-#define ALL_TYPE_ARRAY_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)  \
-  TypeArrayKlass_OOP_OOP_ITERATE_DEFN(          OopClosureType, nv_suffix)    \
-  TypeArrayKlass_OOP_OOP_ITERATE_DEFN_m(        OopClosureType, nv_suffix)    \
-  TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
+#define ALL_TYPE_ARRAY_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)    \
+  OOP_OOP_ITERATE_DEFN(             TypeArrayKlass, OopClosureType, nv_suffix)  \
+  OOP_OOP_ITERATE_DEFN_BOUNDED(     TypeArrayKlass, OopClosureType, nv_suffix)  \
+  OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(TypeArrayKlass, OopClosureType, nv_suffix)
 
 #endif // SHARE_VM_OOPS_TYPEARRAYKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -1278,10 +1278,8 @@
 
   // Preferred young gen size for "short" pauses:
   // upper bound depends on # of threads and NewRatio.
-  const uintx parallel_gc_threads =
-    (ParallelGCThreads == 0 ? 1 : ParallelGCThreads);
   const size_t preferred_max_new_size_unaligned =
-    MIN2(max_heap/(NewRatio+1), ScaleForWordSize(young_gen_per_worker * parallel_gc_threads));
+    MIN2(max_heap/(NewRatio+1), ScaleForWordSize(young_gen_per_worker * ParallelGCThreads));
   size_t preferred_max_new_size =
     align_size_up(preferred_max_new_size_unaligned, os::vm_page_size());
 
--- a/hotspot/src/share/vm/utilities/elfFile.cpp	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/src/share/vm/utilities/elfFile.cpp	Mon Jun 08 11:31:09 2015 -0700
@@ -261,7 +261,12 @@
       }
     }
   }
+// AARCH64 defaults to noexecstack. All others default to execstack.
+#ifdef AARCH64
+  return true;
+#else
   return false;
+#endif
 }
 #endif
 
--- a/hotspot/test/compiler/stable/StableConfiguration.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/hotspot/test/compiler/stable/StableConfiguration.java	Mon Jun 08 11:31:09 2015 -0700
@@ -41,10 +41,32 @@
         System.out.println("Server Compiler: " + get());
     }
 
+    // The method 'get' below returns true if the method is server compiled
+    // and is used by the Stable tests to determine whether methods in
+    // general are being server compiled or not as the -XX:+FoldStableValues
+    // option is only applicable to -server.
+    //
+    // On aarch64 we DeOptimize when patching. This means that when the
+    // method is compiled as a result of -Xcomp it DeOptimizes immediately.
+    // The result is that getMethodCompilationLevel returns 0. This means
+    // the method returns true based on java.vm.name.
+    //
+    // However when the tests are run with -XX:+TieredCompilation and
+    // -XX:TieredStopAtLevel=1 this fails because methods will always
+    // be client compiled.
+    //
+    // Solution is to add a simple method 'get1' which should never be
+    // DeOpted and use that to determine the compilation level instead.
+    static void get1() {
+    }
+
+
+
     // ::get() is among immediately compiled methods.
     static boolean get() {
         try {
-            Method m = StableConfiguration.class.getDeclaredMethod("get");
+            get1();
+            Method m = StableConfiguration.class.getDeclaredMethod("get1");
             int level = WB.getMethodCompilationLevel(m);
             if (level > 0) {
               return (level == 4);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/sa/TestClassLoaderStats.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.Platform;
+import jdk.test.lib.ProcessTools;
+import jdk.test.lib.OutputAnalyzer;
+
+/*
+ * @test
+ * @library /testlibrary
+ * @build jdk.test.lib.*
+ * @run main TestClassLoaderStats
+ */
+public class TestClassLoaderStats {
+
+    public static void main(String[] args) throws Exception {
+        if (!Platform.shouldSAAttach()) {
+            System.out.println("SA attach not expected to work - test skipped.");
+            return;
+        }
+
+        ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
+                "-XX:+UsePerfData",
+                "sun.jvm.hotspot.tools.ClassLoaderStats",
+                Integer.toString(ProcessTools.getProcessId()));
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
+        System.out.println(output.getOutput());
+
+        output.shouldHaveExitValue(0);
+        output.shouldContain("Debugger attached successfully.");
+        // The class loader stats header needs to be presented in the output:
+        output.shouldMatch("class_loader\\W+classes\\W+bytes\\W+parent_loader\\W+alive?\\W+type");
+        output.stderrShouldNotMatch("[E|e]xception");
+        output.stderrShouldNotMatch("[E|e]rror");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/sa/TestStackTrace.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.Platform;
+import jdk.test.lib.ProcessTools;
+
+/*
+ * @test
+ * @library /testlibrary
+ * @build jdk.test.lib.*
+ * @run main TestStackTrace
+ */
+public class TestStackTrace {
+
+    public static void main(String[] args) throws Exception {
+        if (!Platform.shouldSAAttach()) {
+            System.out.println("SA attach not expected to work - test skipped.");
+            return;
+        }
+
+        ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
+                "-XX:+UsePerfData",
+                "sun.jvm.hotspot.tools.StackTrace",
+                Integer.toString(ProcessTools.getProcessId()));
+        OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
+        System.out.println(output.getOutput());
+
+        output.shouldHaveExitValue(0);
+        output.shouldContain("Debugger attached successfully.");
+        output.stderrShouldNotMatch("[E|e]xception");
+        output.stderrShouldNotMatch("[E|e]rror");
+     }
+
+}
--- a/jaxp/.hgtags	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxp/.hgtags	Mon Jun 08 11:31:09 2015 -0700
@@ -309,3 +309,4 @@
 6f91749b5aaef1a171ec2254163233438d1071d1 jdk9-b64
 ae7406e82828fe1c245ac7507a9da5fd5b1c9529 jdk9-b65
 d5963ccce28d7a3e96ee3e2dc8a8676e61699b70 jdk9-b66
+78c2685daabafae827c686ca2d1bb2e451faed2b jdk9-b67
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java	Mon Jun 08 11:31:09 2015 -0700
@@ -2116,7 +2116,7 @@
      */
     @Override
     public String getTextContent() throws DOMException {
-        return getNodeValue();  // overriden in some subclasses
+        return dtm.getStringValue(node).toString();
     }
 
      /**
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java	Mon Jun 08 11:31:09 2015 -0700
@@ -3145,11 +3145,7 @@
                                   m_data.elementAt(-dataIndex+1));
       }
     }
-    else if (DTM.ELEMENT_NODE == type)
-    {
-      return getStringValueX(nodeHandle);
-    }
-    else if (DTM.DOCUMENT_FRAGMENT_NODE == type
+    else if (DTM.ELEMENT_NODE == type || DTM.DOCUMENT_FRAGMENT_NODE == type
              || DTM.DOCUMENT_NODE == type)
     {
       return null;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/ProblemList.txt	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,26 @@
+###########################################################################
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# 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.
+#
+###########################################################################
+
+# No jaxp tests are on the problem list.
--- a/jaxp/test/TEST.ROOT	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxp/test/TEST.ROOT	Mon Jun 08 11:31:09 2015 -0700
@@ -1,8 +1,21 @@
 # This file identifies the root of the test-suite hierarchy.
 # It also contains test-suite configuration information.
 
+# The list of keywords supported in the entire test suite.  The
+# "intermittent" keyword marks tests known to fail intermittently.
+# The "randomness" keyword marks tests using randomness with test
+# cases differing from run to run. (A test using a fixed random seed
+# would not count as "randomness" by this definition.) Extra care
+# should be taken to handle test failures of intermittent or
+# randomness tests.
+
+keys=intermittent randomness
+
 # Tests that must run in othervm mode
 othervm.dirs=javax/xml/jaxp
 
 # Group definitions
 groups=TEST.groups 
+
+# Minimum jtreg version
+requiredVersion=4.1 b11
--- a/jaxp/test/TEST.groups	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxp/test/TEST.groups	Mon Jun 08 11:31:09 2015 -0700
@@ -1,4 +1,4 @@
-#  Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+#  Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
 #  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 #  This code is free software; you can redistribute it and/or modify it
@@ -20,5 +20,14 @@
 #  questions.
 #
 
+# Tiered testing definitions
+
+# No jaxp tests are tier 1.
+tier1 = 
+
+# All jaxp tests are tier 2.
+tier2 = \
+    :jaxp_all
+
 jaxp_all = \
     javax/xml/jaxp
--- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/DocumentExtFunc.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/DocumentExtFunc.java	Mon Jun 08 11:31:09 2015 -0700
@@ -30,6 +30,6 @@
 
     public static String test(NodeList list) {
         Node node = list.item(0);
-        return "["+node.getNodeName() + ":" + node.getNodeValue()+"]";
+        return "["+node.getNodeName() + ":" + node.getTextContent()+"]";
     }
 }
--- a/jaxws/.hgtags	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxws/.hgtags	Mon Jun 08 11:31:09 2015 -0700
@@ -312,3 +312,4 @@
 df100399ed27d0eaa57c137ca99819a0fee66178 jdk9-b64
 45ef73bb85c12ec1b291835c1d40e342a454e3f0 jdk9-b65
 1232f4013417e4a9cd291096798d10f2e601d69d jdk9-b66
+c9785bc8ade98a16a050d7520b70c68363857e00 jdk9-b67
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,6 +41,8 @@
 import javax.xml.bind.Unmarshaller;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.ws.WebServiceException;
+import java.io.IOException;
+import java.io.InputStream;
 import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.net.URI;
@@ -64,6 +66,7 @@
 // TODO Move the logic of this class directly into MetroConfig class.
 class MetroConfigLoader {
 
+    private static final String JAXWS_TUBES_JDK_XML_RESOURCE = "jaxws-tubes-default.xml";
     private static final Logger LOGGER = Logger.getLogger(MetroConfigLoader.class);
 
     private MetroConfigName defaultTubesConfigNames;
@@ -122,11 +125,10 @@
             defaultFileName = defaultTubesConfigNames.getDefaultFileName();
         }
         this.defaultConfigUrl = locateResource(defaultFileName, loaders);
-        if (defaultConfigUrl == null) {
-            throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(defaultFileName)));
+        if (defaultConfigUrl != null) {
+            LOGGER.config(TubelineassemblyMessages.MASM_0002_DEFAULT_CFG_FILE_LOCATED(defaultFileName, defaultConfigUrl));
         }
 
-        LOGGER.config(TubelineassemblyMessages.MASM_0002_DEFAULT_CFG_FILE_LOCATED(defaultFileName, defaultConfigUrl));
         this.defaultConfig = MetroConfigLoader.loadMetroConfig(defaultConfigUrl);
         if (defaultConfig == null) {
             throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(defaultFileName)));
@@ -235,17 +237,35 @@
     }
 
     private static MetroConfig loadMetroConfig(@NotNull URL resourceUrl) {
-        MetroConfig result = null;
-        try {
+        try (InputStream is = getConfigInputStream(resourceUrl)) {
             JAXBContext jaxbContext = createJAXBContext();
             Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
             XMLInputFactory factory = XmlUtil.newXMLInputFactory(true);
-            final JAXBElement<MetroConfig> configElement = unmarshaller.unmarshal(factory.createXMLStreamReader(resourceUrl.openStream()), MetroConfig.class);
-            result = configElement.getValue();
+            JAXBElement<MetroConfig> configElement = unmarshaller.unmarshal(factory.createXMLStreamReader(is), MetroConfig.class);
+            return configElement.getValue();
         } catch (Exception e) {
-            LOGGER.warning(TubelineassemblyMessages.MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(resourceUrl.toString()), e);
+            String message = TubelineassemblyMessages.MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(
+                    resourceUrl != null ? resourceUrl.toString() : null);
+            InternalError error = new InternalError(message);
+            LOGGER.logException(error, e, Level.SEVERE);
+            throw error;
         }
-        return result;
+    }
+
+    private static InputStream getConfigInputStream(URL resourceUrl) throws IOException {
+        InputStream is;
+        if (resourceUrl != null) {
+            is = resourceUrl.openStream();
+        } else {
+            is = MetroConfigLoader.class.getResourceAsStream(JAXWS_TUBES_JDK_XML_RESOURCE);
+
+            if (is == null)
+                throw LOGGER.logSevereException(
+                        new IllegalStateException(
+                                TubelineassemblyMessages.MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(JAXWS_TUBES_JDK_XML_RESOURCE)));
+        }
+
+        return is;
     }
 
     private static JAXBContext createJAXBContext() throws Exception {
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ConfigReader.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ConfigReader.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -181,7 +181,7 @@
     /**
      * Lazily parsed schema for the binding file.
      */
-    private static SchemaCache configSchema = new SchemaCache(Config.class.getResource("config.xsd"));
+    private static SchemaCache configSchema = new SchemaCache("config.xsd", Config.class);
 
 
     /**
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/SchemaCache.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/SchemaCache.java	Mon Jun 08 11:31:09 2015 -0700
@@ -25,14 +25,23 @@
 
 package com.sun.tools.internal.xjc;
 
-import java.net.URL;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
+import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
 import javax.xml.validation.SchemaFactory;
 import javax.xml.validation.ValidatorHandler;
 
 import com.sun.xml.internal.bind.v2.util.XmlFactory;
 import javax.xml.XMLConstants;
+
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSResourceResolver;
 import org.xml.sax.SAXException;
 
 import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowExternalAccess;
@@ -47,30 +56,170 @@
  */
 public final class SchemaCache {
 
+    private final boolean createResolver;
+    private final String resourceName;
+    private final Class<?> clazz;
+
     private Schema schema;
 
-    private final URL source;
+    public SchemaCache(String resourceName, Class<?> classToResolveResources) {
+        this(resourceName, classToResolveResources, false);
+    }
 
-    public SchemaCache(URL source) {
-        this.source = source;
+    public SchemaCache(String resourceName, Class<?> classToResolveResources, boolean createResolver) {
+        this.resourceName = resourceName;
+        this.createResolver = createResolver;
+        this.clazz = classToResolveResources;
     }
 
     public ValidatorHandler newValidator() {
-        synchronized(this) {
-            if(schema==null) {
-                try {
-                    // do not disable secure processing - these are well-known schemas
-                    SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, false);
-                    schema = allowExternalAccess(sf, "file", false).newSchema(source);
-                } catch (SAXException e) {
-                    // we make sure that the schema is correct before we ship.
-                    throw new AssertionError(e);
+        if (schema==null) {
+            synchronized (this) {
+                if (schema == null) {
+
+                    ResourceResolver resourceResolver = null;
+                    try (InputStream is = clazz.getResourceAsStream(resourceName)) {
+
+                        StreamSource source = new StreamSource(is);
+                        source.setSystemId(resourceName);
+                        // do not disable secure processing - these are well-known schemas
+
+                        SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, false);
+                        SchemaFactory schemaFactory = allowExternalAccess(sf, "file", false);
+
+                        if (createResolver) {
+                            resourceResolver = new ResourceResolver(clazz);
+                            schemaFactory.setResourceResolver(resourceResolver);
+                        }
+                        schema = schemaFactory.newSchema(source);
+
+                    } catch (IOException | SAXException e) {
+                        throw new InternalError(e);
+                    } finally {
+                        if (resourceResolver != null) resourceResolver.closeStreams();
+                    }
+                }
+            }
+        }
+        return schema.newValidatorHandler();
+    }
+
+    class ResourceResolver implements LSResourceResolver {
+
+        private List<InputStream> streamsToClose = Collections.synchronizedList(new ArrayList<InputStream>());
+        private Class<?> clazz;
+
+        ResourceResolver(Class<?> clazz) {
+            this.clazz = clazz;
+        }
+
+        @Override
+        public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
+            // XSOM passes the namespace URI to the publicID parameter.
+            // we do the same here .
+            InputStream is = clazz.getResourceAsStream(systemId);
+            streamsToClose.add(is);
+            return new Input(is, publicId, systemId);
+        }
+
+        void closeStreams() {
+            for (InputStream is : streamsToClose) {
+                if (is != null) {
+                    try {
+                        is.close();
+                    } catch (IOException e) {
+                        // nothing to do ...
+                    }
                 }
             }
         }
-
-        ValidatorHandler handler = schema.newValidatorHandler();
-        return handler;
     }
 
 }
+
+class Input implements LSInput {
+
+    private InputStream is;
+    private String publicId;
+    private String systemId;
+
+    public Input(InputStream is, String publicId, String systemId) {
+        this.is = is;
+        this.publicId = publicId;
+        this.systemId = systemId;
+    }
+
+    @Override
+    public Reader getCharacterStream() {
+        return null;
+    }
+
+    @Override
+    public void setCharacterStream(Reader characterStream) {
+    }
+
+    @Override
+    public InputStream getByteStream() {
+        return is;
+    }
+
+    @Override
+    public void setByteStream(InputStream byteStream) {
+    }
+
+    @Override
+    public String getStringData() {
+        return null;
+    }
+
+    @Override
+    public void setStringData(String stringData) {
+    }
+
+    @Override
+    public String getSystemId() {
+        return systemId;
+    }
+
+    @Override
+    public void setSystemId(String systemId) {
+    }
+
+    @Override
+    public String getPublicId() {
+        return publicId;
+    }
+
+    @Override
+    public void setPublicId(String publicId) {
+    }
+
+    @Override
+    public String getBaseURI() {
+        return null;
+    }
+
+    @Override
+    public void setBaseURI(String baseURI) {
+    }
+
+    @Override
+    public String getEncoding() {
+        return null;
+    }
+
+    @Override
+    public void setEncoding(String encoding) {
+    }
+
+    @Override
+    public boolean getCertifiedText() {
+        return false;
+    }
+
+    @Override
+    public void setCertifiedText(boolean certifiedText) {
+    }
+}
+
+
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BindInfo.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BindInfo.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -289,7 +289,7 @@
     /**
      * Lazily parsed schema for the binding file.
      */
-    private static SchemaCache bindingFileSchema = new SchemaCache(BindInfo.class.getResource("bindingfile.xsd"));
+    private static SchemaCache bindingFileSchema = new SchemaCache("bindingfile.xsd", BindInfo.class);
 
     /**
      * Parses an InputSource into dom4j Document.
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BindInfo.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BindInfo.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,5 +353,5 @@
     /**
      * Lazily parsed schema for the binding file.
      */
-    public static final SchemaCache bindingFileSchema = new SchemaCache(BindInfo.class.getResource("binding.xsd"));
+    public static SchemaCache bindingFileSchema = new SchemaCache("binding.xsd", BindInfo.class, true);
 }
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/ParserContext.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/ParserContext.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,8 @@
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -81,20 +83,18 @@
         this.owner = owner;
         this.parser = parser;
 
-        try {
-            parse(new InputSource(ParserContext.class.getResource("datatypes.xsd").toExternalForm()));
+        try (InputStream is = ParserContext.class.getResourceAsStream("datatypes.xsd")) {
+            InputSource source = new InputSource(is);
+            source.setSystemId("datatypes.xsd");
+            parse(source);
 
             SchemaImpl xs = (SchemaImpl)
-                schemaSet.getSchema("http://www.w3.org/2001/XMLSchema");
+                    schemaSet.getSchema("http://www.w3.org/2001/XMLSchema");
             xs.addSimpleType(schemaSet.anySimpleType,true);
             xs.addComplexType(schemaSet.anyType,true);
-        } catch( SAXException e ) {
+        } catch( SAXException | IOException e ) {
             // this must be a bug of XSOM
-            if(e.getException()!=null)
-                e.getException().printStackTrace();
-            else
-                e.printStackTrace();
-            throw new InternalError();
+            throw new InternalError(e.getMessage());
         }
     }
 
--- a/jdk/.hgtags	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/.hgtags	Mon Jun 08 11:31:09 2015 -0700
@@ -309,3 +309,4 @@
 7de8d036ad0980d988d1b9b4b4e6be555d9fbf98 jdk9-b64
 ed94f3e7ba6bbfec0772de6d24e39543e13f6d88 jdk9-b65
 4fbcca8ab812198c7fb747ea7b213b6e404f36e9 jdk9-b66
+1abd45df5480a04bff98fba1851d66a5230e67d4 jdk9-b67
--- a/jdk/make/mapfiles/libnet/mapfile-vers	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/make/mapfiles/libnet/mapfile-vers	Mon Jun 08 11:31:09 2015 -0700
@@ -42,7 +42,7 @@
 		Java_java_net_Inet4Address_init;
 		Java_java_net_Inet6Address_init;
 		Java_java_net_PlainDatagramSocketImpl_setTTL;
-		Java_java_net_PlainDatagramSocketImpl_socketSetOption;
+		Java_java_net_PlainDatagramSocketImpl_socketSetOption0;
 		Java_java_net_PlainDatagramSocketImpl_bind0;
 		Java_java_net_PlainSocketImpl_socketAccept;
 		Java_java_net_DatagramPacket_init;
@@ -73,7 +73,7 @@
 		Java_java_net_SocketOutputStream_init;
 		Java_java_net_PlainDatagramSocketImpl_peek;
 		Java_java_net_PlainDatagramSocketImpl_peekData;
-		Java_java_net_PlainSocketImpl_socketSetOption;
+		Java_java_net_PlainSocketImpl_socketSetOption0;
 		Java_java_net_PlainSocketImpl_socketSendUrgentData;
 		Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate;
 		Java_java_net_PlainSocketImpl_socketGetOption;
--- a/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLContext.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLContext.java	Mon Jun 08 11:31:09 2015 -0700
@@ -58,7 +58,7 @@
      *
      * @param contextSpi the delegate
      * @param provider the provider
-     * @param algorithm the algorithm
+     * @param protocol the protocol
      */
     protected SSLContext(SSLContextSpi contextSpi, Provider provider,
         String protocol) {
--- a/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLContextSpi.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLContextSpi.java	Mon Jun 08 11:31:09 2015 -0700
@@ -49,9 +49,9 @@
     /**
      * Initializes this context.
      *
-     * @param km the sources of authentication keys
-     * @param tm the sources of peer authentication trust decisions
-     * @param random the source of randomness for this generator
+     * @param ah the sources of authentication keys
+     * @param th the sources of peer authentication trust decisions
+     * @param sr the source of randomness for this generator
      */
     protected abstract void engineInit(KeyManager[] ah, TrustManager[] th,
         SecureRandom sr) throws KeyManagementException;
--- a/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLPermission.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/com/sun/net/ssl/SSLPermission.java	Mon Jun 08 11:31:09 2015 -0700
@@ -52,7 +52,6 @@
  * The following table lists all the possible SSLPermission target names,
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
- * <P>
  *
  * <table border=1 cellpadding=5>
  * <tr>
--- a/jdk/src/java.base/share/classes/java/io/File.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/io/File.java	Mon Jun 08 11:31:09 2015 -0700
@@ -2148,7 +2148,7 @@
      * WriteObject is called to save this filename.
      * The separator character is saved also so it can be replaced
      * in case the path is reconstituted on a different host type.
-     * <p>
+     *
      * @serialData  Default fields followed by separator character.
      */
     private synchronized void writeObject(java.io.ObjectOutputStream s)
--- a/jdk/src/java.base/share/classes/java/io/InputStream.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/io/InputStream.java	Mon Jun 08 11:31:09 2015 -0700
@@ -25,6 +25,7 @@
 
 package java.io;
 
+import java.util.Arrays;
 import java.util.Objects;
 
 /**
@@ -50,7 +51,7 @@
     // use when skipping.
     private static final int MAX_SKIP_BUFFER_SIZE = 2048;
 
-    private static final int TRANSFER_BUFFER_SIZE = 8192;
+    private static final int DEFAULT_BUFFER_SIZE = 8192;
 
     /**
      * Reads the next byte of data from the input stream. The value byte is
@@ -192,6 +193,128 @@
     }
 
     /**
+     * The maximum size of array to allocate.
+     * Some VMs reserve some header words in an array.
+     * Attempts to allocate larger arrays may result in
+     * OutOfMemoryError: Requested array size exceeds VM limit
+     */
+    private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;
+
+    /**
+     * Reads all remaining bytes from the input stream. This method blocks until
+     * all remaining bytes have been read and end of stream is detected, or an
+     * exception is thrown. This method does not close the input stream.
+     *
+     * <p> When this stream reaches end of stream, further invocations of this
+     * method will return an empty byte array.
+     *
+     * <p> Note that this method is intended for simple cases where it is
+     * convenient to read all bytes into a byte array. It is not intended for
+     * reading input streams with large amounts of data.
+     *
+     * <p> The behavior for the case where the input stream is <i>asynchronously
+     * closed</i>, or the thread interrupted during the read, is highly input
+     * stream specific, and therefore not specified.
+     *
+     * <p> If an I/O error occurs reading from the input stream, then it may do
+     * so after some, but not all, bytes have been read. Consequently the input
+     * stream may not be at end of stream and may be in an inconsistent state.
+     * It is strongly recommended that the stream be promptly closed if an I/O
+     * error occurs.
+     *
+     * @return a byte array containing the bytes read from this input stream
+     * @throws IOException if an I/O error occurs
+     * @throws OutOfMemoryError if an array of the required size cannot be
+     *         allocated. For example, if an array larger than {@code 2GB} would
+     *         be required to store the bytes.
+     *
+     * @since 1.9
+     */
+    public byte[] readAllBytes() throws IOException {
+        byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
+        int capacity = buf.length;
+        int nread = 0;
+        int n;
+        for (;;) {
+            // read to EOF which may read more or less than initial buffer size
+            while ((n = read(buf, nread, capacity - nread)) > 0)
+                nread += n;
+
+            // if the last call to read returned -1, then we're done
+            if (n < 0)
+                break;
+
+            // need to allocate a larger buffer
+            if (capacity <= MAX_BUFFER_SIZE - capacity) {
+                capacity = capacity << 1;
+            } else {
+                if (capacity == MAX_BUFFER_SIZE)
+                    throw new OutOfMemoryError("Required array size too large");
+                capacity = MAX_BUFFER_SIZE;
+            }
+            buf = Arrays.copyOf(buf, capacity);
+        }
+        return (capacity == nread) ? buf : Arrays.copyOf(buf, nread);
+    }
+
+    /**
+     * Reads the requested number of bytes from the input stream into the given
+     * byte array. This method blocks until {@code len} bytes of input data have
+     * been read, end of stream is detected, or an exception is thrown. The
+     * number of bytes actually read, possibly zero, is returned. This method
+     * does not close the input stream.
+     *
+     * <p> In the case where end of stream is reached before {@code len} bytes
+     * have been read, then the actual number of bytes read will be returned.
+     * When this stream reaches end of stream, further invocations of this
+     * method will return zero.
+     *
+     * <p> If {@code len} is zero, then no bytes are read and {@code 0} is
+     * returned; otherwise, there is an attempt to read up to {@code len} bytes.
+     *
+     * <p> The first byte read is stored into element {@code b[off]}, the next
+     * one in to {@code b[off+1]}, and so on. The number of bytes read is, at
+     * most, equal to {@code len}. Let <i>k</i> be the number of bytes actually
+     * read; these bytes will be stored in elements {@code b[off]} through
+     * {@code b[off+}<i>k</i>{@code -1]}, leaving elements {@code b[off+}<i>k</i>
+     * {@code ]} through {@code b[off+len-1]} unaffected.
+     *
+     * <p> The behavior for the case where the input stream is <i>asynchronously
+     * closed</i>, or the thread interrupted during the read, is highly input
+     * stream specific, and therefore not specified.
+     *
+     * <p> If an I/O error occurs reading from the input stream, then it may do
+     * so after some, but not all, bytes of {@code b} have been updated with
+     * data from the input stream. Consequently the input stream and {@code b}
+     * may be in an inconsistent state. It is strongly recommended that the
+     * stream be promptly closed if an I/O error occurs.
+     *
+     * @param  b the byte array into which the data is read
+     * @param  off the start offset in {@code b} at which the data is written
+     * @param  len the maximum number of bytes to read
+     * @return the actual number of bytes read into the buffer
+     * @throws IOException if an I/O error occurs
+     * @throws NullPointerException if {@code b} is {@code null}
+     * @throws IndexOutOfBoundsException If {@code off} is negative, {@code len}
+     *         is negative, or {@code len} is greater than {@code b.length - off}
+     *
+     * @since 1.9
+     */
+    public int readNBytes(byte[] b, int off, int len) throws IOException {
+        Objects.requireNonNull(b);
+        if (off < 0 || len < 0 || len > b.length - off)
+            throw new IndexOutOfBoundsException();
+        int n = 0;
+        while (n < len) {
+            int count = read(b, off + n, len - n);
+            if (count < 0)
+                break;
+            n += count;
+        }
+        return n;
+    }
+
+    /**
      * Skips over and discards <code>n</code> bytes of data from this input
      * stream. The <code>skip</code> method may, for a variety of reasons, end
      * up skipping over some smaller number of bytes, possibly <code>0</code>.
@@ -396,9 +519,9 @@
     public long transferTo(OutputStream out) throws IOException {
         Objects.requireNonNull(out, "out");
         long transferred = 0;
-        byte[] buffer = new byte[TRANSFER_BUFFER_SIZE];
+        byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
         int read;
-        while ((read = this.read(buffer, 0, TRANSFER_BUFFER_SIZE)) >= 0) {
+        while ((read = this.read(buffer, 0, DEFAULT_BUFFER_SIZE)) >= 0) {
             out.write(buffer, 0, read);
             transferred += read;
         }
--- a/jdk/src/java.base/share/classes/java/lang/Process.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/lang/Process.java	Mon Jun 08 11:31:09 2015 -0700
@@ -368,7 +368,7 @@
      * Processes returned from {@link ProcessBuilder#start} override the
      * default implementation to provide an efficient mechanism to wait
      * for process exit.
-     * <p>
+     *
      * @apiNote
      * Using {@link #onExit() onExit} is an alternative to
      * {@link #waitFor() waitFor} that enables both additional concurrency
--- a/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/lang/ProcessHandle.java	Mon Jun 08 11:31:09 2015 -0700
@@ -71,7 +71,7 @@
  * The ability to control processes is also restricted by the native system,
  * ProcessHandle provides no more access to, or control over, the native process
  * than would be allowed by a native application.
- * <p>
+ *
  * @implSpec
  * In the case where ProcessHandles cannot be supported then the factory
  * methods must consistently throw {@link java.lang.UnsupportedOperationException}.
--- a/jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -312,11 +312,16 @@
             ret = socketGetOption(opt, null);
             return ret;
         case IP_TOS:
-            ret = socketGetOption(opt, null);
-            if (ret == -1) { // ipv6 tos
-                return trafficClass;
-            } else {
-                return ret;
+            try {
+                ret = socketGetOption(opt, null);
+                if (ret == -1) { // ipv6 tos
+                    return trafficClass;
+                } else {
+                    return ret;
+                }
+            } catch (SocketException se) {
+                    // TODO - should make better effort to read TOS or TCLASS
+                    return trafficClass; // ipv6 tos
             }
         case SO_KEEPALIVE:
             ret = socketGetOption(opt, null);
--- a/jdk/src/java.base/share/classes/java/net/DatagramSocket.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/net/DatagramSocket.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1184,7 +1184,14 @@
 
         if (isClosed())
             throw new SocketException("Socket is closed");
-        getImpl().setOption(SocketOptions.IP_TOS, tc);
+        try {
+            getImpl().setOption(SocketOptions.IP_TOS, tc);
+        } catch (SocketException se) {
+            // not supported if socket already connected
+            // Solaris returns error in such cases
+            if(!isConnected())
+                throw se;
+        }
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/net/Socket.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/net/Socket.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1380,7 +1380,14 @@
 
         if (isClosed())
             throw new SocketException("Socket is closed");
-        getImpl().setOption(SocketOptions.IP_TOS, tc);
+        try {
+            getImpl().setOption(SocketOptions.IP_TOS, tc);
+        } catch (SocketException se) {
+            // not supported if socket already connected
+            // Solaris returns error in such cases
+            if(!isConnected())
+                throw se;
+        }
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Mon Jun 08 11:31:09 2015 -0700
@@ -2374,7 +2374,7 @@
     /**
      * After reading an object from the input stream, the format
      * pattern in the object is verified.
-     * <p>
+     *
      * @exception InvalidObjectException if the pattern is invalid
      */
     private void readObject(ObjectInputStream stream)
--- a/jdk/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -156,6 +156,7 @@
      * @param offsetAfter  the offset at and after the transition, not null
      */
     ZoneOffsetTransition(LocalDateTime transition, ZoneOffset offsetBefore, ZoneOffset offsetAfter) {
+        assert transition.getNano() == 0;
         this.epochSecond = transition.toEpochSecond(offsetBefore);
         this.transition = transition;
         this.offsetBefore = offsetBefore;
@@ -250,7 +251,7 @@
      * @return the transition instant, not null
      */
     public Instant getInstant() {
-        return transition.toInstant(offsetBefore);
+        return Instant.ofEpochSecond(epochSecond);
     }
 
     /**
@@ -403,13 +404,7 @@
      */
     @Override
     public int compareTo(ZoneOffsetTransition transition) {
-        if (epochSecond < transition.epochSecond) {
-            return -1;
-        } else if (epochSecond > transition.epochSecond) {
-            return 1;
-        } else {
-            return this.getInstant().compareTo(transition.getInstant());
-        }
+        return Long.compare(epochSecond, transition.epochSecond);
     }
 
     //-----------------------------------------------------------------------
@@ -429,7 +424,6 @@
         if (other instanceof ZoneOffsetTransition) {
             ZoneOffsetTransition d = (ZoneOffsetTransition) other;
             return epochSecond == d.epochSecond &&
-                transition.equals(d.transition) &&
                 offsetBefore.equals(d.offsetBefore) && offsetAfter.equals(d.offsetAfter);
         }
         return false;
--- a/jdk/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -167,6 +167,7 @@
      * @return the rule, not null
      * @throws IllegalArgumentException if the day of month indicator is invalid
      * @throws IllegalArgumentException if the end of day flag is true when the time is not midnight
+     * @throws IllegalArgumentException if {@code time.getNano()} returns non-zero value
      */
     public static ZoneOffsetTransitionRule of(
             Month month,
@@ -190,6 +191,9 @@
         if (timeEndOfDay && time.equals(LocalTime.MIDNIGHT) == false) {
             throw new IllegalArgumentException("Time must be midnight when end of day flag is true");
         }
+        if (time.getNano() != 0) {
+            throw new IllegalArgumentException("Time's nano-of-second must be zero");
+        }
         return new ZoneOffsetTransitionRule(month, dayOfMonthIndicator, dayOfWeek, time, timeEndOfDay, timeDefnition, standardOffset, offsetBefore, offsetAfter);
     }
 
@@ -220,6 +224,7 @@
             ZoneOffset standardOffset,
             ZoneOffset offsetBefore,
             ZoneOffset offsetAfter) {
+        assert time.getNano() == 0;
         this.month = month;
         this.dom = (byte) dayOfMonthIndicator;
         this.dow = dayOfWeek;
--- a/jdk/src/java.base/share/classes/java/util/Enumeration.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/util/Enumeration.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,14 @@
  * vector, the keys of a hashtable, and the values in a hashtable.
  * Enumerations are also used to specify the input streams to a
  * <code>SequenceInputStream</code>.
- * <p>
- * NOTE: The functionality of this interface is duplicated by the Iterator
- * interface.  In addition, Iterator adds an optional remove operation, and
- * has shorter method names.  New implementations should consider using
- * Iterator in preference to Enumeration.
+ *
+ * @apiNote
+ * The functionality of this interface is duplicated by the {@link Iterator}
+ * interface.  In addition, {@code Iterator} adds an optional remove operation,
+ * and has shorter method names.  New implementations should consider using
+ * {@code Iterator} in preference to {@code Enumeration}. It is possible to
+ * adapt an {@code Enumeration} to an {@code Iterator} by using the
+ * {@link #asIterator} method.
  *
  * @see     java.util.Iterator
  * @see     java.io.SequenceInputStream
@@ -76,4 +79,49 @@
      * @exception  NoSuchElementException  if no more elements exist.
      */
     E nextElement();
+
+    /**
+     * Returns an {@link Iterator} that traverses the remaining elements
+     * covered by this enumeration. Traversal is undefined if any methods
+     * are called on this enumeration after the call to {@code asIterator}.
+     *
+     * @apiNote
+     * This method is intended to help adapt code that produces
+     * {@code Enumeration} instances to code that consumes {@code Iterator}
+     * instances. For example, the {@link java.util.jar.JarFile#entries
+     * JarFile.entries()} method returns an {@code Enumeration<JarEntry>}.
+     * This can be turned into an {@code Iterator}, and then the
+     * {@code forEachRemaining()} method can be used:
+     *
+     * <pre>{@code
+     *     JarFile jarFile = ... ;
+     *     jarFile.entries().asIterator().forEachRemaining(entry -> { ... });
+     * }</pre>
+     *
+     * (Note that there is also a {@link java.util.jar.JarFile#stream
+     * JarFile.stream()} method that returns a {@code Stream} of entries,
+     * which may be more convenient in some cases.)
+     *
+     * @implSpec
+     * The default implementation returns an {@code Iterator} whose
+     * {@link Iterator#hasNext hasNext} method calls this Enumeration's
+     * {@code hasMoreElements} method, whose {@link Iterator#next next}
+     * method calls this Enumeration's {@code nextElement} method, and
+     * whose {@link Iterator#remove remove} method throws
+     * {@code UnsupportedOperationException}.
+     *
+     * @return an Iterator representing the remaining elements of this Enumeration
+     *
+     * @since 1.9
+     */
+    default Iterator<E> asIterator() {
+        return new Iterator<>() {
+            @Override public boolean hasNext() {
+                return hasMoreElements();
+            }
+            @Override public E next() {
+                return nextElement();
+            }
+        };
+    }
 }
--- a/jdk/src/java.base/share/classes/java/util/Iterator.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/util/Iterator.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,10 @@
  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
  * Java Collections Framework</a>.
  *
+ * @apiNote
+ * An {@link Enumeration} can be converted into an {@code Iterator} by
+ * using the {@link Enumeration#asIterator} method.
+ *
  * @param <E> the type of elements returned by this iterator
  *
  * @author  Josh Bloch
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngineResult.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngineResult.java	Mon Jun 08 11:31:09 2015 -0700
@@ -280,7 +280,7 @@
      * @apiNote  Note that sequence number is an unsigned long and cannot
      *           exceed {@code -1L}.  It is desired to use the unsigned
      *           long comparing mode for comparison of unsigned long values
-     *           (see also {@link java.lang.Long#compareUnsigned()
+     *           (see also {@link java.lang.Long#compareUnsigned(long, long)
      *           Long.compareUnsigned()}).
      *           <P>
      *           For DTLS protocols, the first 16 bits of the sequence
@@ -300,7 +300,7 @@
      *          record; or ${@code -1L} if no record is produced or consumed,
      *          or this operation is not supported by the underlying provider
      *
-     * @see     java.lang.Long#compareUnsigned(boolean, boolean)
+     * @see     java.lang.Long#compareUnsigned(long, long)
      *
      * @since   1.9
      */
--- a/jdk/src/java.base/share/classes/javax/security/auth/Subject.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Subject.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1401,8 +1401,6 @@
         /**
          * Writes this object out to a stream (i.e., serializes it).
          *
-         * <p>
-         *
          * @serialData If this is a private credential set,
          *      a security check is performed to ensure that
          *      the caller has permission to access each credential
--- a/jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceClassVisitor.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/TraceClassVisitor.java	Mon Jun 08 11:31:09 2015 -0700
@@ -74,36 +74,34 @@
  * visitor chain to trace the class that is visited at a given point in this
  * chain. This may be useful for debugging purposes.
  * <p>
- * The trace printed when visiting the <tt>Hello</tt> class is the following:
- * <p>
+ * The trace printed when visiting the {@code Hello} class is the following:
  * <blockquote>
  *
- * <pre>
+ * <pre>{@code
  * // class version 49.0 (49) // access flags 0x21 public class Hello {
  *
  * // compiled from: Hello.java
  *
- * // access flags 0x1 public &lt;init&gt; ()V ALOAD 0 INVOKESPECIAL
- * java/lang/Object &lt;init&gt; ()V RETURN MAXSTACK = 1 MAXLOCALS = 1
+ * // access flags 0x1 public <init> ()V ALOAD 0 INVOKESPECIAL
+ * java/lang/Object <init> ()V RETURN MAXSTACK = 1 MAXLOCALS = 1
  *
  * // access flags 0x9 public static main ([Ljava/lang/String;)V GETSTATIC
- * java/lang/System out Ljava/io/PrintStream; LDC &quot;hello&quot;
+ * java/lang/System out Ljava/io/PrintStream; LDC "hello"
  * INVOKEVIRTUAL java/io/PrintStream println (Ljava/lang/String;)V RETURN
  * MAXSTACK = 2 MAXLOCALS = 1 }
- * </pre>
+ * }</pre>
  *
- * </blockquote> where <tt>Hello</tt> is defined by:
- * <p>
+ * </blockquote> where {@code Hello} is defined by:
  * <blockquote>
  *
- * <pre>
+ * <pre>{@code
  * public class Hello {
  *
  *     public static void main(String[] args) {
- *         System.out.println(&quot;hello&quot;);
+ *         System.out.println("hello");
  *     }
  * }
- * </pre>
+ * }</pre>
  *
  * </blockquote>
  *
@@ -137,7 +135,7 @@
      *
      * @param cv
      *            the {@link ClassVisitor} to which this visitor delegates
-     *            calls. May be <tt>null</tt>.
+     *            calls. May be {@code null}.
      * @param pw
      *            the print writer to be used to print the class.
      */
@@ -150,7 +148,7 @@
      *
      * @param cv
      *            the {@link ClassVisitor} to which this visitor delegates
-     *            calls. May be <tt>null</tt>.
+     *            calls. May be {@code null}.
      * @param p
      *            the object that actually converts visit events into text.
      * @param pw
--- a/jdk/src/java.base/share/classes/sun/invoke/util/BytecodeName.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/invoke/util/BytecodeName.java	Mon Jun 08 11:31:09 2015 -0700
@@ -464,7 +464,7 @@
      * Report whether a character is safe in a bytecode name.
      * This is true of any unicode character except the following
      * <em>dangerous characters</em>: {@code ".;:$[]<>/"}.
-     * @param s the proposed character
+     * @param c the proposed character
      * @return true if the character is safe to use in classfiles
      */
     public static boolean isSafeBytecodeChar(char c) {
--- a/jdk/src/java.base/share/classes/sun/net/TelnetInputStream.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/TelnetInputStream.java	Mon Jun 08 11:31:09 2015 -0700
@@ -31,7 +31,7 @@
  * This class provides input and output streams for telnet clients.
  * This class overrides read to do CRLF processing as specified in
  * RFC 854. The class assumes it is running on a system where lines
- * are terminated with a single newline <LF> character.
+ * are terminated with a single newline {@literal <LF>} character.
  *
  * This is the relevant section of RFC 824 regarding CRLF processing:
  *
--- a/jdk/src/java.base/share/classes/sun/net/TelnetOutputStream.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/TelnetOutputStream.java	Mon Jun 08 11:31:09 2015 -0700
@@ -31,7 +31,7 @@
  * This class provides input and output streams for telnet clients.
  * This class overrides write to do CRLF processing as specified in
  * RFC 854. The class assumes it is running on a system where lines
- * are terminated with a single newline <LF> character.
+ * are terminated with a single newline {@literal <LF>} character.
  *
  * This is the relevant section of RFC 824 regarding CRLF processing:
  *
--- a/jdk/src/java.base/share/classes/sun/net/URLCanonicalizer.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/URLCanonicalizer.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,10 +28,12 @@
 /**
  * Helper class to map URL "abbreviations" to real URLs.
  * The default implementation supports the following mappings:
+ * <pre>{@code
  *   ftp.mumble.bar/... => ftp://ftp.mumble.bar/...
  *   gopher.mumble.bar/... => gopher://gopher.mumble.bar/...
  *   other.name.dom/... => http://other.name.dom/...
  *   /foo/... => file:/foo/...
+ * }</pre>
  *
  * Full URLs (those including a protocol name) are passed through unchanged.
  *
--- a/jdk/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1211,7 +1211,7 @@
      * The <code>OutputStream</code> is not closed by this method at the end
      * of the transfer.
      *
-     * @param name a <code>String<code> containing the name of the file to
+     * @param name a {@code String} containing the name of the file to
      *        retreive from the server.
      * @param local the <code>OutputStream</code> the file should be written to.
      * @throws IOException if the transfer fails.
--- a/jdk/src/java.base/share/classes/sun/net/www/MessageHeader.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/www/MessageHeader.java	Mon Jun 08 11:31:09 2015 -0700
@@ -411,7 +411,7 @@
     }
 
     /** Convert a message-id string to canonical form (strips off
-        leading and trailing <>s) */
+        leading and trailing {@literal <>s}) */
     public static String canonicalID(String id) {
         if (id == null)
             return "";
--- a/jdk/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Mon Jun 08 11:31:09 2015 -0700
@@ -625,7 +625,7 @@
     }
 
     /** Parse the first line of the HTTP request.  It usually looks
-        something like: "HTTP/1.0 <number> comment\r\n". */
+        something like: {@literal "HTTP/1.0 <number> comment\r\n"}. */
 
     public boolean parseHTTP(MessageHeader responses, ProgressSource pi, HttpURLConnection httpuc)
     throws IOException {
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java	Mon Jun 08 11:31:09 2015 -0700
@@ -68,13 +68,14 @@
  * <LI>Disconnect</LI>
  * </UL>
  * You should not have to use it directly in most cases because all will be handled
- * in a abstract layer. Here is an example of how to use the class :
- * <P>
- * <code>URL url = new URL("ftp://ftp.sun.com/pub/test.txt");<p>
- * UrlConnection con = url.openConnection();<p>
- * InputStream is = con.getInputStream();<p>
- * ...<p>
- * is.close();</code>
+ * in a abstract layer. Here is an example of how to use the class:
+ * <pre>{@code
+ * URL url = new URL("ftp://ftp.sun.com/pub/test.txt");
+ * UrlConnection con = url.openConnection();
+ * InputStream is = con.getInputStream();
+ * ...
+ * is.close();
+ * }</pre>
  *
  * @see sun.net.ftp.FtpClient
  */
@@ -158,7 +159,7 @@
     /**
      * Creates an FtpURLConnection from a URL.
      *
-     * @param   url     The <code>URL</code> to retrieve or store.
+     * @param   url     The {@code URL} to retrieve or store.
      */
     public FtpURLConnection(URL url) {
         this(url, null);
@@ -382,7 +383,7 @@
      * Get the InputStream to retreive the remote file. It will issue the
      * "get" (or "dir") command to the ftp server.
      *
-     * @return  the <code>InputStream</code> to the connection.
+     * @return  the {@code InputStream} to the connection.
      *
      * @throws  IOException if already opened for output
      * @throws  FtpProtocolException if errors occur during the transfert.
@@ -495,7 +496,7 @@
      * Get the OutputStream to store the remote file. It will issue the
      * "put" command to the ftp server.
      *
-     * @return  the <code>OutputStream</code> to the connection.
+     * @return  the {@code OutputStream} to the connection.
      *
      * @throws  IOException if already opened for input or the URL
      *          points to a directory
@@ -548,9 +549,9 @@
     }
 
     /**
-     * Gets the <code>Permission</code> associated with the host & port.
+     * Gets the {@code Permission} associated with the host and port.
      *
-     * @return  The <code>Permission</code> object.
+     * @return  The {@code Permission} object.
      */
     @Override
     public Permission getPermission() {
@@ -568,7 +569,7 @@
      * exists, overwrite its value with the new value.
      *
      * @param   key     the keyword by which the request is known
-     *                  (e.g., "<code>accept</code>").
+     *                  (e.g., "{@code accept}").
      * @param   value   the value associated with it.
      * @throws IllegalStateException if already connected
      * @see #getRequestProperty(java.lang.String)
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpAuthenticator.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpAuthenticator.java	Mon Jun 08 11:31:09 2015 -0700
@@ -59,6 +59,7 @@
      * supplied or could be found.
      * <P>
      * Example:
+     * <pre>{@code
      * --> GET http://www.authorization-required.com/ HTTP/1.0
      * <-- HTTP/1.0 403 Unauthorized
      * <-- WWW-Authenticate: Basic realm="WallyWorld"
@@ -67,8 +68,9 @@
      *   return "QWadhgWERghghWERfdfQ=="
      * --> GET http://www.authorization-required.com/ HTTP/1.0
      * --> Authorization: Basic QWadhgWERghghWERfdfQ==
-     * <-- HTTP/1.0 200 OK
+     * <-- HTTP/1.0 200 OK}
      * <B> YAY!!!</B>
+     * </pre>
      */
 
     public String authString (URL u, String scheme, String realm);
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1954,7 +1954,7 @@
     /**
      * Set the tunneling status.
      *
-     * @param  the state
+     * @param tunnelState the state
      */
     public void setTunnelState(TunnelState tunnelState) {
         this.tunnelState = tunnelState;
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java	Mon Jun 08 11:31:09 2015 -0700
@@ -338,7 +338,7 @@
      * Sets the value of the <code>ifModifiedSince</code> field of
      * this <code>URLConnection</code> to the specified value.
      *
-     * @param   value   the new value.
+     * @param   ifmodifiedsince   the new value.
      * @see     java.net.URLConnection#ifModifiedSince
      */
     public void setIfModifiedSince(long ifmodifiedsince) {
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java	Mon Jun 08 11:31:09 2015 -0700
@@ -295,7 +295,7 @@
 
     /**
      * Returns an annotation of the given type backed by the given
-     * member -> value map.
+     * member {@literal ->} value map.
      */
     public static Annotation annotationForMap(final Class<? extends Annotation> type,
                                               final Map<String, Object> memberValues)
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Mon Jun 08 11:31:09 2015 -0700
@@ -73,8 +73,8 @@
     /**
      * Returns an AnnotationType instance for the specified annotation type.
      *
-     * @throw IllegalArgumentException if the specified class object for
-     *     does not represent a valid annotation type
+     * @throws IllegalArgumentException if the specified class object
+     *         does not represent a valid annotation type
      */
     public static AnnotationType getInstance(
         Class<? extends Annotation> annotationClass)
@@ -183,7 +183,7 @@
 
     /**
      * Returns member types for this annotation type
-     * (member name -> type mapping).
+     * (member name {@literal ->} type mapping).
      */
     public Map<String, Class<?>> memberTypes() {
         return memberTypes;
@@ -191,7 +191,7 @@
 
     /**
      * Returns members of this annotation type
-     * (member name -> associated Method object mapping).
+     * (member name {@literal ->} associated Method object mapping).
      */
     public Map<String, Method> members() {
         return members;
@@ -199,7 +199,7 @@
 
     /**
      * Returns the default values for this annotation type
-     * (Member name -> default value mapping).
+     * (Member name {@literal ->} default value mapping).
      */
     public Map<String, Object> memberDefaults() {
         return memberDefaults;
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Mon Jun 08 11:31:09 2015 -0700
@@ -199,7 +199,7 @@
      * Regular Annotations on TypeVariables are stored in the type
      * annotation byte[] in the class file.
      *
-     * @param genericsDecl the declaration declaring the type variable
+     * @param genericDecl the declaration declaring the type variable
      * @param typeVarIndex the 0-based index of this type variable in the declaration
      */
     public static <D extends GenericDeclaration> Annotation[] parseTypeVariableAnnotations(D genericDecl,
--- a/jdk/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/ParameterizedTypeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/ParameterizedTypeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -73,17 +73,17 @@
      * <p> This method throws a MalformedParameterizedTypeException
      * under the following circumstances:
      * If the number of actual type arguments (i.e., the size of the
-     * array <tt>typeArgs</tt>) does not correspond to the number of
+     * array {@code typeArgs}) does not correspond to the number of
      * formal type arguments.
      * If any of the actual type arguments is not an instance of the
      * bounds on the corresponding formal.
      * @param rawType the Class representing the generic type declaration being
      * instantiated
-     * @param actualTypeArguments - a (possibly empty) array of types
+     * @param actualTypeArguments a (possibly empty) array of types
      * representing the actual type arguments to the parameterized type
-     * @param ownerType - the enclosing type, if known.
-     * @return An instance of <tt>ParameterizedType</tt>
-     * @throws MalformedParameterizedTypeException - if the instantiation
+     * @param ownerType the enclosing type, if known.
+     * @return An instance of {@code ParameterizedType}
+     * @throws MalformedParameterizedTypeException if the instantiation
      * is invalid
      */
     public static ParameterizedTypeImpl make(Class<?> rawType,
@@ -95,18 +95,18 @@
 
 
     /**
-     * Returns an array of <tt>Type</tt> objects representing the actual type
+     * Returns an array of {@code Type} objects representing the actual type
      * arguments to this type.
      *
      * <p>Note that in some cases, the returned array be empty. This can occur
      * if this type represents a non-parameterized type nested within
      * a parameterized type.
      *
-     * @return an array of <tt>Type</tt> objects representing the actual type
+     * @return an array of {@code Type} objects representing the actual type
      *     arguments to this type
-     * @throws <tt>TypeNotPresentException</tt> if any of the
+     * @throws TypeNotPresentException if any of the
      *     actual type arguments refers to a non-existent type declaration
-     * @throws <tt>MalformedParameterizedTypeException</tt> if any of the
+     * @throws MalformedParameterizedTypeException if any of the
      *     actual type parameters refer to a parameterized type that cannot
      *     be instantiated for any reason
      * @since 1.5
@@ -116,10 +116,10 @@
     }
 
     /**
-     * Returns the <tt>Type</tt> object representing the class or interface
+     * Returns the {@code Type} object representing the class or interface
      * that declared this type.
      *
-     * @return the <tt>Type</tt> object representing the class or interface
+     * @return the {@code Type} object representing the class or interface
      *     that declared this type
      */
     public Class<?> getRawType() {
@@ -128,18 +128,18 @@
 
 
     /**
-     * Returns a <tt>Type</tt> object representing the type that this type
-     * is a member of.  For example, if this type is <tt>O<T>.I<S></tt>,
-     * return a representation of <tt>O<T></tt>.
+     * Returns a {@code Type} object representing the type that this type
+     * is a member of.  For example, if this type is {@code O<T>.I<S>},
+     * return a representation of {@code O<T>}.
      *
-     * <p>If this type is a top-level type, <tt>null</tt> is returned.
+     * <p>If this type is a top-level type, {@code null} is returned.
      *
-     * @return a <tt>Type</tt> object representing the type that
+     * @return a {@code Type} object representing the type that
      *     this type is a member of. If this type is a top-level type,
-     *     <tt>null</tt> is returned
-     * @throws <tt>TypeNotPresentException</tt> if the owner type
+     *     {@code null} is returned
+     * @throws TypeNotPresentException if the owner type
      *     refers to a non-existent type declaration
-     * @throws <tt>MalformedParameterizedTypeException</tt> if the owner type
+     * @throws MalformedParameterizedTypeException if the owner type
      *     refers to a parameterized type that cannot be instantiated
      *     for any reason
      *
--- a/jdk/src/java.base/share/classes/sun/reflect/generics/scope/ConstructorScope.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/reflect/generics/scope/ConstructorScope.java	Mon Jun 08 11:31:09 2015 -0700
@@ -56,9 +56,9 @@
     }
 
     /**
-     * Factory method. Takes a <tt>Constructor</tt> object and creates a
+     * Factory method. Takes a {@code Constructor} object and creates a
      * scope for it.
-     * @param m - A Constructor whose scope we want to obtain
+     * @param c - A Constructor whose scope we want to obtain
      * @return The type-variable scope for the constructor m
      */
     public static ConstructorScope make(Constructor<?> c) {
--- a/jdk/src/java.base/share/classes/sun/text/resources/en/FormatData_en_SG.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/text/resources/en/FormatData_en_SG.java	Mon Jun 08 11:31:09 2015 -0700
@@ -88,6 +88,14 @@
                     "NaN",
                 }
             },
+            { "DatePatterns",
+                new String[] {
+                    "EEEE, d MMMM, yyyy", // full date pattern
+                    "d MMMM, yyyy",       // long date pattern
+                    "d MMM, yyyy",        // medium date pattern
+                    "d/M/yy",             // short date pattern
+                }
+            },
         };
     }
 }
--- a/jdk/src/java.base/share/classes/sun/util/PreHashedMap.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/util/PreHashedMap.java	Mon Jun 08 11:31:09 2015 -0700
@@ -121,8 +121,7 @@
      * <p> This method must construct the map's hash chains and store them into
      * the appropriate elements of the given hash-table row array.
      *
-     * @param rows
-     *        The row array to be initialized
+     * @param ht The row array to be initialized
      */
     protected abstract void init(Object[] ht);
 
--- a/jdk/src/java.base/share/classes/sun/util/calendar/BaseCalendar.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/util/calendar/BaseCalendar.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,7 +28,7 @@
 import java.util.TimeZone;
 
 /**
- * The <code>BaseCalendar</code> provides basic calendar calculation
+ * The {@code BaseCalendar} provides basic calendar calculation
  * functions to support the Julian, Gregorian, and Gregorian-based
  * calendar systems.
  *
@@ -290,11 +290,11 @@
     /**
      * Returns 366 if the specified date is in a leap year, or 365
      * otherwise This method does not perform the normalization with
-     * the specified <code>CalendarDate</code>. The
-     * <code>CalendarDate</code> must be normalized to get a correct
+     * the specified {@code CalendarDate}. The
+     * {@code CalendarDate} must be normalized to get a correct
      * value.
      *
-     * @param a <code>CalendarDate</code>
+     * @param date a {@code CalendarDate}
      * @return a year length in days
      * @throws ClassCastException if the specified date is not a
      * {@link BaseCalendar.Date}
@@ -412,7 +412,7 @@
 
     /**
      * Calculates calendar fields and store them in the specified
-     * <code>CalendarDate</code>.
+     * {@code CalendarDate}.
      */
     // should be 'protected'
     public void getCalendarDateFromFixedDate(CalendarDate date,
--- a/jdk/src/java.base/share/classes/sun/util/calendar/CalendarUtils.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/util/calendar/CalendarUtils.java	Mon Jun 08 11:31:09 2015 -0700
@@ -94,7 +94,7 @@
      * <code>0</code> and <code>-1%4</code> is <code>-1</code>.
      *
      * @param n the numerator
-     * @param d a divisor which must be > 0
+     * @param d a divisor which must be {@literal > 0}
      * @param r an array of at least one element in which the value
      * <code>mod(n, d)</code> is returned.
      * @return the floor of the quotient.
@@ -117,7 +117,7 @@
      * <code>0</code> and <code>-1%4</code> is <code>-1</code>.
      *
      * @param n the numerator
-     * @param d a divisor which must be > 0
+     * @param d a divisor which must be {@literal > 0}
      * @param r an array of at least one element in which the value
      * <code>mod(n, d)</code> is returned.
      * @return the floor of the quotient.
--- a/jdk/src/java.base/share/classes/sun/util/calendar/ZoneInfo.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/util/calendar/ZoneInfo.java	Mon Jun 08 11:31:09 2015 -0700
@@ -364,7 +364,7 @@
      *                  0 for January.
      * @param day       The day-in-month of the given date.
      * @param dayOfWeek The day-of-week of the given date.
-     * @param millis    The milliseconds in day in <em>standard</em> local time.
+     * @param milliseconds The milliseconds in day in <em>standard</em> local time.
      * @return The milliseconds to add to UTC to get local time.
      */
     public int getOffset(int era, int year, int month, int day,
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleNameProviderImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/LocaleNameProviderImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -72,7 +72,7 @@
      * If the name returned cannot be localized according to <code>locale</code>,
      * (say, the provider does not have a Japanese name for Croatian),
      * this method returns null.
-     * @param languageCode the ISO 639 language code string in the form of two
+     * @param lang the ISO 639 language code string in the form of two
      *     lower-case letters between 'a' (U+0061) and 'z' (U+007A)
      * @param locale the desired locale
      * @return the name of the given language code for the specified locale, or null if it's not
@@ -129,7 +129,7 @@
      * If the name returned cannot be localized according to <code>locale</code>,
      * (say, the provider does not have a Japanese name for Croatia),
      * this method returns null.
-     * @param countryCode the ISO 3166 country code string in the form of two
+     * @param ctry the ISO 3166 country code string in the form of two
      *     upper-case letters between 'A' (U+0041) and 'Z' (U+005A)
      * @param locale the desired locale
      * @return the name of the given country code for the specified locale, or null if it's not
@@ -152,7 +152,7 @@
      * is appropriate for display to the user.
      * If the name returned cannot be localized according to <code>locale</code>,
      * this method returns null.
-     * @param variant the variant string
+     * @param vrnt the variant string
      * @param locale the desired locale
      * @return the name of the given variant string for the specified locale, or null if it's not
      *     available.
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameProviderImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameProviderImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -79,7 +79,7 @@
      * appropriate for daylight saving time even if the specified time zone
      * has not observed daylight saving time in the past.
      *
-     * @param ID a time zone ID string
+     * @param id a time zone ID string
      * @param daylight if true, return the daylight saving name.
      * @param style either {@link java.util.TimeZone#LONG TimeZone.LONG} or
      *    {@link java.util.TimeZone#SHORT TimeZone.SHORT}
--- a/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Mon Jun 08 11:31:09 2015 -0700
@@ -74,10 +74,10 @@
  *   java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
  *
  * Limitation:
- * <JAVA_HOME>/conf/logging.properties is the system-wide logging
+ * {@code <JAVA_HOME>/conf/logging.properties} is the system-wide logging
  * configuration defined in the specification and read in the
  * default case to configure any java.util.logging.Logger instances.
- * Platform loggers will not detect if <JAVA_HOME>/conf/logging.properties
+ * Platform loggers will not detect if {@code <JAVA_HOME>/conf/logging.properties}
  * is modified. In other words, unless the java.util.logging API
  * is used at runtime or the logging system properties is set,
  * the platform loggers will use the default setting described above.
--- a/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNamesBundle.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/util/resources/TimeZoneNamesBundle.java	Mon Jun 08 11:31:09 2015 -0700
@@ -55,7 +55,7 @@
  *     array for the enumeration returned by <code>getKeys</code>.
  * <li>Inserts the time zone ID (the key of the bundle entries) into
  *     the string arrays returned by <code>handleGetObject</code>.
- * <ul>
+ * </ul>
  * All <code>TimeZoneNames</code> resource bundles must extend this
  * class and implement the <code>getContents</code> method.
  */
--- a/jdk/src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -80,6 +80,15 @@
         return options;
     }
 
+    protected void socketSetOption(int opt, Object val) throws SocketException {
+        try {
+            socketSetOption0(opt, val);
+        } catch (SocketException se) {
+            if (!connected)
+                throw se;
+        }
+    }
+
     protected synchronized native void bind0(int lport, InetAddress laddr)
         throws SocketException;
 
@@ -112,7 +121,7 @@
 
     protected native void datagramSocketClose();
 
-    protected native void socketSetOption(int opt, Object val)
+    protected native void socketSetOption0(int opt, Object val)
         throws SocketException;
 
     protected native Object socketGetOption(int opt) throws SocketException;
--- a/jdk/src/java.base/unix/classes/java/net/PlainSocketImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/classes/java/net/PlainSocketImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -94,6 +94,15 @@
         return options;
     }
 
+    protected void socketSetOption(int opt, boolean b, Object val) throws SocketException {
+        try {
+            socketSetOption0(opt, b, val);
+        } catch (SocketException se) {
+            if (socket == null || !socket.isConnected())
+                throw se;
+        }
+    }
+
     native void socketCreate(boolean isServer) throws IOException;
 
     native void socketConnect(InetAddress address, int port, int timeout)
@@ -114,7 +123,7 @@
 
     static native void initProto();
 
-    native void socketSetOption(int cmd, boolean on, Object value)
+    native void socketSetOption0(int cmd, boolean on, Object value)
         throws SocketException;
 
     native int socketGetOption(int opt, Object iaContainerObj) throws SocketException;
--- a/jdk/src/java.base/unix/classes/sun/misc/FileURLMapper.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/classes/sun/misc/FileURLMapper.java	Mon Jun 08 11:31:09 2015 -0700
@@ -50,7 +50,7 @@
     }
 
     /**
-     * @returns the platform specific path corresponding to the URL
+     * @return the platform specific path corresponding to the URL
      *  so long as the URL does not contain a hostname in the authority field.
      */
 
--- a/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Mon Jun 08 11:31:09 2015 -0700
@@ -113,7 +113,8 @@
     Client client;
     /**
      * Create a NTLMAuthentication:
-     * Username may be specified as domain<BACKSLASH>username in the application Authenticator.
+     * Username may be specified as {@literal domain<BACKSLASH>username}
+     * in the application Authenticator.
      * If this notation is not used, then the domain will be taken
      * from a system property: "http.auth.ntlm.domain".
      */
--- a/jdk/src/java.base/unix/native/libnet/Inet4AddressImpl.c	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/native/libnet/Inet4AddressImpl.c	Mon Jun 08 11:31:09 2015 -0700
@@ -121,7 +121,7 @@
     jobjectArray ret = 0;
     int retLen = 0;
 
-    int error=0;
+    int getaddrinfo_error=0;
     struct addrinfo hints, *res, *resNew = NULL;
 
     initInetAddressIDs(env);
@@ -149,22 +149,24 @@
         return NULL;
     }
 
+
+    getaddrinfo_error = getaddrinfo(hostname, NULL, &hints, &res);
+
 #ifdef MACOSX
-    /* If we're looking up the local machine, bypass DNS lookups and get
-     * address from getifaddrs.
-     */
-    ret = lookupIfLocalhost(env, hostname, JNI_FALSE);
-    if (ret != NULL || (*env)->ExceptionCheck(env)) {
-        JNU_ReleaseStringPlatformChars(env, host, hostname);
-        return ret;
+    if (getaddrinfo_error) {
+        // If getaddrinfo fails try getifaddrs.
+        ret = lookupIfLocalhost(env, hostname, JNI_FALSE);
+        if (ret != NULL || (*env)->ExceptionCheck(env)) {
+            JNU_ReleaseStringPlatformChars(env, host, hostname);
+            return ret;
+        }
     }
 #endif
 
-    error = getaddrinfo(hostname, NULL, &hints, &res);
-
-    if (error) {
+    if (getaddrinfo_error) {
         /* report error */
-        NET_ThrowUnknownHostExceptionWithGaiError(env, hostname, error);
+        NET_ThrowUnknownHostExceptionWithGaiError(
+            env, hostname, getaddrinfo_error);
         JNU_ReleaseStringPlatformChars(env, host, hostname);
         return NULL;
     } else {
--- a/jdk/src/java.base/unix/native/libnet/Inet6AddressImpl.c	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/native/libnet/Inet6AddressImpl.c	Mon Jun 08 11:31:09 2015 -0700
@@ -254,7 +254,7 @@
     jobjectArray ret = 0;
     int retLen = 0;
 
-    int error=0;
+    int getaddrinfo_error=0;
 #ifdef AF_INET6
     struct addrinfo hints, *res, *resNew = NULL;
 #endif /* AF_INET6 */
@@ -269,19 +269,6 @@
     hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
     CHECK_NULL_RETURN(hostname, NULL);
 
-#ifdef MACOSX
-    /*
-     * If we're looking up the local machine, attempt to get the address
-     * from getifaddrs. This ensures we get an IPv6 address for the local
-     * machine.
-     */
-    ret = lookupIfLocalhost(env, hostname, JNI_TRUE);
-    if (ret != NULL || (*env)->ExceptionCheck(env)) {
-        JNU_ReleaseStringPlatformChars(env, host, hostname);
-        return ret;
-    }
-#endif
-
 #ifdef AF_INET6
     /* Try once, with our static buffer. */
     memset(&hints, 0, sizeof(hints));
@@ -301,11 +288,27 @@
     }
 #endif
 
-    error = getaddrinfo(hostname, NULL, &hints, &res);
+    getaddrinfo_error = getaddrinfo(hostname, NULL, &hints, &res);
 
-    if (error) {
+#ifdef MACOSX
+    if (getaddrinfo_error) {
+        /*
+         * If getaddrinfo fails looking up the local machine, attempt to get the
+         * address from getifaddrs. This ensures we get an IPv6 address for the
+         * local machine.
+         */
+        ret = lookupIfLocalhost(env, hostname, JNI_TRUE);
+        if (ret != NULL || (*env)->ExceptionCheck(env)) {
+            JNU_ReleaseStringPlatformChars(env, host, hostname);
+            return ret;
+        }
+    }
+#endif
+
+    if (getaddrinfo_error) {
         /* report error */
-        NET_ThrowUnknownHostExceptionWithGaiError(env, hostname, error);
+        NET_ThrowUnknownHostExceptionWithGaiError(
+            env, hostname, getaddrinfo_error);
         JNU_ReleaseStringPlatformChars(env, host, hostname);
         return NULL;
     } else {
--- a/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Mon Jun 08 11:31:09 2015 -0700
@@ -1294,11 +1294,11 @@
 
 /*
  * Class:     java_net_PlainDatagramSocketImpl
- * Method:    socketSetOption
+ * Method:    socketSetOption0
  * Signature: (ILjava/lang/Object;)V
  */
 JNIEXPORT void JNICALL
-Java_java_net_PlainDatagramSocketImpl_socketSetOption(JNIEnv *env,
+Java_java_net_PlainDatagramSocketImpl_socketSetOption0(JNIEnv *env,
                                                       jobject this,
                                                       jint opt,
                                                       jobject value) {
--- a/jdk/src/java.base/unix/native/libnet/PlainSocketImpl.c	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/native/libnet/PlainSocketImpl.c	Mon Jun 08 11:31:09 2015 -0700
@@ -847,11 +847,11 @@
 
 /*
  * Class:     java_net_PlainSocketImpl
- * Method:    socketSetOption
+ * Method:    socketSetOption0
  * Signature: (IZLjava/lang/Object;)V
  */
 JNIEXPORT void JNICALL
-Java_java_net_PlainSocketImpl_socketSetOption(JNIEnv *env, jobject this,
+Java_java_net_PlainSocketImpl_socketSetOption0(JNIEnv *env, jobject this,
                                               jint cmd, jboolean on,
                                               jobject value) {
     int fd;
--- a/jdk/src/java.base/unix/native/libnet/net_util_md.c	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/unix/native/libnet/net_util_md.c	Mon Jun 08 11:31:09 2015 -0700
@@ -1023,12 +1023,10 @@
 
     int i;
 
-    /*
-     * Different multicast options if IPv6 is enabled
-     */
 #ifdef AF_INET6
     if (ipv6_available()) {
         switch (cmd) {
+            // Different multicast options if IPv6 is enabled
             case java_net_SocketOptions_IP_MULTICAST_IF:
             case java_net_SocketOptions_IP_MULTICAST_IF2:
                 *level = IPPROTO_IPV6;
@@ -1039,6 +1037,13 @@
                 *level = IPPROTO_IPV6;
                 *optname = IPV6_MULTICAST_LOOP;
                 return 0;
+#if (defined(__solaris__) || defined(MACOSX))
+            // Map IP_TOS request to IPV6_TCLASS
+            case java_net_SocketOptions_IP_TOS:
+                *level = IPPROTO_IPV6;
+                *optname = IPV6_TCLASS;
+                return 0;
+#endif
         }
     }
 #endif
@@ -1214,9 +1219,6 @@
  * Wrapper for getsockopt system routine - does any necessary
  * pre/post processing to deal with OS specific oddities :-
  *
- * IP_TOS is a no-op with IPv6 sockets as it's setup when
- * the connection is established.
- *
  * On Linux the SO_SNDBUF/SO_RCVBUF values must be post-processed
  * to compensate for an incorrect value returned by the kernel.
  */
@@ -1227,21 +1229,6 @@
     int rv;
     socklen_t socklen = *len;
 
-#ifdef AF_INET6
-    if ((level == IPPROTO_IP) && (opt == IP_TOS)) {
-        if (ipv6_available()) {
-
-            /*
-             * For IPv6 socket option implemented at Java-level
-             * so return -1.
-             */
-            int *tc = (int *)result;
-            *tc = -1;
-            return 0;
-        }
-    }
-#endif
-
     rv = getsockopt(fd, level, opt, result, &socklen);
     *len = socklen;
 
@@ -1285,8 +1272,7 @@
  *
  * For IP_TOS socket option need to mask off bits as this
  * aren't automatically masked by the kernel and results in
- * an error. In addition IP_TOS is a NOOP with IPv6 as it
- * should be setup as connection time.
+ * an error.
  */
 int
 NET_SetSockOpt(int fd, int level, int  opt, const void *arg,
@@ -1317,9 +1303,9 @@
 
     /*
      * IPPROTO/IP_TOS :-
-     * 1. IPv6 on Solaris/Mac OS: NOOP and will be set
-     *    in flowinfo field when connecting TCP socket,
-     *    or sending UDP packet.
+     * 1. IPv6 on Solaris/Mac OS:
+     *    Set the TOS OR Traffic Class value to cater for
+     *    IPv6 and IPv4 scenarios.
      * 2. IPv6 on Linux: By default Linux ignores flowinfo
      *    field so enable IPV6_FLOWINFO_SEND so that flowinfo
      *    will be examined. We also set the IPv4 TOS option in this case.
@@ -1329,12 +1315,6 @@
     if (level == IPPROTO_IP && opt == IP_TOS) {
         int *iptos;
 
-#if defined(AF_INET6) && (defined(__solaris__) || defined(MACOSX))
-        if (ipv6_available()) {
-            return 0;
-        }
-#endif
-
 #if defined(AF_INET6) && defined(__linux__)
         if (ipv6_available()) {
             int optval = 1;
@@ -1342,6 +1322,16 @@
                            (void *)&optval, sizeof(optval)) < 0) {
                 return -1;
             }
+           /*
+            * Let's also set the IPV6_TCLASS flag.
+            * Linux appears to allow both IP_TOS and IPV6_TCLASS to be set
+            * This helps in mixed environments where IPv4 and IPv6 sockets
+            * are connecting.
+            */
+           if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS,
+                           arg, len) < 0) {
+                return -1;
+            }
         }
 #endif
 
@@ -1435,7 +1425,7 @@
      * On Linux the receive buffer is used for both socket
      * structures and the packet payload. The implication
      * is that if SO_RCVBUF is too small then small packets
-     * must be discard.
+     * must be discarded.
      */
 #ifdef __linux__
     if (level == SOL_SOCKET && opt == SO_RCVBUF) {
@@ -1619,7 +1609,7 @@
  * NET_WAIT_READ, NET_WAIT_WRITE & NET_WAIT_CONNECT.
  *
  * The function will return when either the socket is ready for one
- * of the specified operation or the timeout expired.
+ * of the specified operations or the timeout expired.
  *
  * It returns the time left from the timeout (possibly 0), or -1 if it expired.
  */
--- a/jdk/src/java.base/windows/classes/sun/misc/FileURLMapper.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/windows/classes/sun/misc/FileURLMapper.java	Mon Jun 08 11:31:09 2015 -0700
@@ -46,7 +46,7 @@
     }
 
     /**
-     * @returns the platform specific path corresponding to the URL, and in particular
+     * @return the platform specific path corresponding to the URL, and in particular
      *  returns a UNC when the authority contains a hostname
      */
 
--- a/jdk/src/java.base/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Mon Jun 08 11:31:09 2015 -0700
@@ -83,7 +83,8 @@
 
     /**
      * Create a NTLMAuthentication:
-     * Username may be specified as domain<BACKSLASH>username in the application Authenticator.
+     * Username may be specified as {@literal domain<BACKSLASH>username}
+     * in the application Authenticator.
      * If this notation is not used, then the domain will be taken
      * from a system property: "http.auth.ntlm.domain".
      */
--- a/jdk/src/java.base/windows/native/libjava/ProcessHandleImpl_win.c	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.base/windows/native/libjava/ProcessHandleImpl_win.c	Mon Jun 08 11:31:09 2015 -0700
@@ -32,10 +32,11 @@
 
 #include <windows.h>
 #include <tlhelp32.h>
+#include <sddl.h>
 
 static void getStatInfo(JNIEnv *env, HANDLE handle, jobject jinfo);
 static void getCmdlineInfo(JNIEnv *env, HANDLE handle, jobject jinfo);
-static void procToUser( JNIEnv *env, HANDLE handle, jobject jinfo);
+static void procToUser(JNIEnv *env, HANDLE handle, jobject jinfo);
 
 /**************************************************************
  * Implementation of ProcessHandleImpl_Info native methods.
@@ -387,15 +388,15 @@
     }
 }
 
-static void procToUser( JNIEnv *env, HANDLE handle, jobject jinfo) {
+static void procToUser(JNIEnv *env, HANDLE handle, jobject jinfo) {
 #define TOKEN_LEN 256
     DWORD token_len = TOKEN_LEN;
     char token_buf[TOKEN_LEN];
     TOKEN_USER *token_user = (TOKEN_USER*)token_buf;
     HANDLE tokenHandle;
-    WCHAR domain[255];
-    WCHAR name[255];
-    DWORD domainLen = sizeof(domain);
+    WCHAR domain[255 + 1 + 255 + 1];    // large enough to concat with '/' and name
+    WCHAR name[255 + 1];
+    DWORD domainLen = sizeof(domain) - sizeof(name);
     DWORD nameLen = sizeof(name);
     SID_NAME_USE use;
     jstring s;
@@ -416,11 +417,18 @@
 
     if (LookupAccountSidW(NULL, token_user->User.Sid, &name[0], &nameLen,
                           &domain[0], &domainLen, &use) == 0) {
-        // Name not available
-        return;
+        // Name not available, convert to a String
+        LPWSTR str;
+        if (ConvertSidToStringSidW(token_user->User.Sid, &str) == 0) {
+            return;
+        }
+        s = (*env)->NewString(env, (const jchar *)str, (jsize)wcslen(str));
+        LocalFree(str);
+    } else {
+        wcscat(domain, L"\\");
+        wcscat(domain, name);
+        s = (*env)->NewString(env, (const jchar *)domain, (jsize)wcslen(domain));
     }
-
-    s = (*env)->NewString(env, (const jchar *)name, (jsize)wcslen(name));
     CHECK_NULL(s);
     (*env)->SetObjectField(env, jinfo, ProcessHandleImpl_Info_userID, s);
 }
--- a/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DataFlavorUtil.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.datatransfer/share/classes/sun/datatransfer/DataFlavorUtil.java	Mon Jun 08 11:31:09 2015 -0700
@@ -55,7 +55,7 @@
 /**
  * Utility class with different datatransfer helper functions
  *
- * @see 1.9
+ * @since 1.9
  */
 public class DataFlavorUtil {
 
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eio/FileManager.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eio/FileManager.java	Mon Jun 08 11:31:09 2015 -0700
@@ -97,7 +97,8 @@
 
 
         /**
-         * Converts an OSType (e.g. "macs" from <CarbonCore/Folders.h>) into an int.
+         * Converts an OSType (e.g. "macs"
+         * from {@literal <CarbonCore/Folders.h>}) into an int.
          *
          * @param type the 4 character type to convert.
          * @return an int representing the 4 character value
@@ -355,7 +356,7 @@
         /**
          * Moves the specified file to the Trash
          *
-         * @param file
+         * @param file the file
          * @return returns true if the NSFileManager successfully moved the file to the Trash.
          * @throws FileNotFoundException
          *
--- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java	Mon Jun 08 11:31:09 2015 -0700
@@ -121,7 +121,7 @@
      * @throws IOException if an I/O exception occurs
      * @throws IllegalArgumentException if the file type is not supported by the
      *         system
-     * @see #isFileTypeSupported(Type, AudioInputStream)
+     * @see #isFileTypeSupported(AudioFileFormat.Type, AudioInputStream)
      * @see #getAudioFileTypes
      */
     public abstract int write(AudioInputStream stream, Type fileType,
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java	Mon Jun 08 11:31:09 2015 -0700
@@ -344,12 +344,14 @@
      * Execute applet events.
      * Here is the state transition diagram
      *
+     * <pre>{@literal
      *   Note: (XXX) is the action
      *         APPLET_XXX is the state
-     *  (applet code loaded) --> APPLET_LOAD -- (applet init called)--> APPLET_INIT -- (
-     *   applet start called) --> APPLET_START -- (applet stop called) -->APPLET_STOP --(applet
-     *   destroyed called) --> APPLET_DESTROY -->(applet gets disposed) -->
-     *   APPLET_DISPOSE -->....
+     *  (applet code loaded) --> APPLET_LOAD -- (applet init called)--> APPLET_INIT --
+     *  (applet start called) --> APPLET_START -- (applet stop called) --> APPLET_STOP --
+     *  (applet destroyed called) --> APPLET_DESTROY --> (applet gets disposed) -->
+     *   APPLET_DISPOSE --> ...
+     * }</pre>
      *
      * In the legacy lifecycle model. The applet gets loaded, inited and started. So it stays
      * in the APPLET_START state unless the applet goes away(refresh page or leave the page).
@@ -364,10 +366,9 @@
      * APPLET_STOP to APPLET_DESTROY and to APPLET_INIT .
      *
      * Also, the applet can jump from APPLET_INIT state to APPLET_DESTROY (in Netscape/Mozilla case).
-         * Same as APPLET_LOAD to
+     * Same as APPLET_LOAD to
      * APPLET_DISPOSE since all of this are triggered by browser.
      *
-     *
      */
     @Override
     public void run() {
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletViewer.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletViewer.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1093,7 +1093,7 @@
     }
 
     /**
-     * Scan an html file for <applet> tags
+     * Scan an html file for {@code <applet>} tags
      */
     public static void parse(URL url, String enc) throws IOException {
         encoding = enc;
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapName.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapName.java	Mon Jun 08 11:31:09 2015 -0700
@@ -358,7 +358,7 @@
      * Serializes only the unparsed DN, for compactness and to avoid
      * any implementation dependency.
      *
-     * @serialdata      The DN string and a boolean indicating whether
+     * @serialData      The DN string and a boolean indicating whether
      * the values are case sensitive.
      */
     private void writeObject(java.io.ObjectOutputStream s)
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Mon Jun 08 11:31:09 2015 -0700
@@ -260,7 +260,11 @@
     }
 
     /**
-     * Gets all values for the specified keys.
+     * Gets all values (at least one) for the specified keys separated by
+     * a whitespace, or null if there is no such keys.
+     * The values can either be provided on a single line, or on multiple lines
+     * using the same key. When provided on a single line, the value can be
+     * comma or space separated.
      * @throws IllegalArgumentException if any of the keys is illegal
      *         (See {@link #get})
      */
@@ -270,6 +274,7 @@
         StringBuilder sb = new StringBuilder();
         boolean first = true;
         for (String s: v) {
+            s = s.replaceAll("[\\s,]+", " ");
             if (first) {
                 sb.append(s);
                 first = false;
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java	Mon Jun 08 11:31:09 2015 -0700
@@ -34,6 +34,9 @@
 import sun.security.krb5.internal.*;
 import sun.security.krb5.internal.crypto.KeyUsage;
 import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
 import sun.security.util.DerValue;
 
 /**
@@ -76,10 +79,24 @@
         options.set(KDCOptions.FORWARDABLE, true);
 
         HostAddresses sAddrs = null;
-        // XXX Also NT_GSS_KRB5_PRINCIPAL can be a host based principal
+
         // GSSName.NT_HOSTBASED_SERVICE should display with KRB_NT_SRV_HST
-        if (server.getNameType() == PrincipalName.KRB_NT_SRV_HST)
-            sAddrs=  new HostAddresses(server);
+        if (server.getNameType() == PrincipalName.KRB_NT_SRV_HST) {
+            sAddrs = new HostAddresses(server);
+        } else if (server.getNameType() == PrincipalName.KRB_NT_UNKNOWN) {
+            // Sometimes this is also a server
+            if (server.getNameStrings().length >= 2) {
+                String host = server.getNameStrings()[1];
+                try {
+                    InetAddress[] addr = InetAddress.getAllByName(host);
+                    if (addr != null && addr.length > 0) {
+                        sAddrs = new HostAddresses(addr);
+                    }
+                } catch (UnknownHostException ioe) {
+                    // maybe we guessed wrong, let sAddrs be null
+                }
+            }
+        }
 
         KrbTgsReq tgsReq = new KrbTgsReq(options, tgt, tgService,
                                          null, null, null, null, sAddrs, null, null, null);
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java	Mon Jun 08 11:31:09 2015 -0700
@@ -31,16 +31,14 @@
 
 package sun.security.krb5.internal;
 
+import sun.security.krb5.Config;
 import sun.security.krb5.PrincipalName;
 import sun.security.krb5.KrbException;
 import sun.security.krb5.Asn1Exception;
 import sun.security.util.*;
-import java.util.Vector;
-import java.util.ArrayList;
-import java.net.InetAddress;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.UnknownHostException;
+
+import java.net.*;
+import java.util.*;
 import java.io.IOException;
 import sun.security.krb5.internal.ccache.CCacheOutputStream;
 
@@ -293,34 +291,35 @@
      */
     public static HostAddresses getLocalAddresses() throws IOException
     {
-        String hostname = null;
-        InetAddress[] inetAddresses = null;
+        Set<InetAddress> all = new LinkedHashSet<>();
         try {
-            InetAddress localHost = InetAddress.getLocalHost();
-            hostname = localHost.getHostName();
-            inetAddresses = InetAddress.getAllByName(hostname);
-            HostAddress[] hAddresses = new HostAddress[inetAddresses.length];
-            for (int i = 0; i < inetAddresses.length; i++)
-                {
-                    hAddresses[i] = new HostAddress(inetAddresses[i]);
-                }
             if (DEBUG) {
-                System.out.println(">>> KrbKdcReq local addresses for "
-                                   + hostname + " are: ");
-
-                for (int i = 0; i < inetAddresses.length; i++) {
-                    System.out.println("\n\t" + inetAddresses[i]);
-                    if (inetAddresses[i] instanceof Inet4Address)
-                        System.out.println("IPv4 address");
-                    if (inetAddresses[i] instanceof Inet6Address)
-                        System.out.println("IPv6 address");
+                System.out.println(">>> KrbKdcReq local addresses are:");
+            }
+            String extra = Config.getInstance().getAll(
+                    "libdefaults", "extra_addresses");
+            if (extra != null) {
+                for (String s: extra.split("\\s+")) {
+                    all.add(InetAddress.getByName(s));
+                    if (DEBUG) {
+                        System.out.println("   extra_addresses: "
+                                + InetAddress.getByName(s));
+                    }
                 }
             }
-            return (new HostAddresses(hAddresses));
+            for (NetworkInterface ni:
+                    Collections.list(NetworkInterface.getNetworkInterfaces())) {
+                if (DEBUG) {
+                    System.out.println("   NetworkInterface " + ni + ":");
+                    System.out.println("      "
+                            + Collections.list(ni.getInetAddresses()));
+                }
+                all.addAll(Collections.list(ni.getInetAddresses()));
+            }
+            return new HostAddresses(all.toArray(new InetAddress[all.size()]));
         } catch (Exception exc) {
             throw new IOException(exc.toString());
         }
-
     }
 
     /**
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/JdbcRowSetImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/JdbcRowSetImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -35,7 +35,7 @@
 import javax.sql.rowset.*;
 
 /**
- * The standard implementation of the <code>JdbcRowSet</code> interface. See the interface
+ * The standard implementation of the {@code JdbcRowSet} interface. See the interface
  * definition for full behavior and implementation requirements.
  *
  * @author Jonathan Bruce, Amit Handa
@@ -44,40 +44,40 @@
 public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
 
     /**
-     * The <code>Connection</code> object that is this rowset's
+     * The {@code Connection} object that is this rowset's
      * current connection to the database.  This field is set
      * internally when the connection is established.
      */
     private Connection conn;
 
     /**
-     * The <code>PreparedStatement</code> object that is this rowset's
+     * The {@code PreparedStatement} object that is this rowset's
      * current command.  This field is set internally when the method
-     * <code>execute</code> creates the <code>PreparedStatement</code>
+     * {@code execute} creates the {@code PreparedStatement}
      * object.
      */
     private PreparedStatement ps;
 
     /**
-     * The <code>ResultSet</code> object that is this rowset's
+     * The {@code ResultSet} object that is this rowset's
      * current result set.  This field is set internally when the method
-     * <code>execute</code> executes the rowset's command and thereby
-     * creates the rowset's <code>ResultSet</code> object.
+     * {@code execute} executes the rowset's command and thereby
+     * creates the rowset's {@code ResultSet} object.
      */
     private ResultSet rs;
 
     /**
-     * The <code>RowSetMetaDataImpl</code> object that is constructed when
-     * a <code>ResultSet</code> object is passed to the <code>JdbcRowSet</code>
+     * The {@code RowSetMetaDataImpl} object that is constructed when
+     * a {@code ResultSet} object is passed to the {@code JdbcRowSet}
      * constructor. This helps in constructing all metadata associated
-     * with the <code>ResultSet</code> object using the setter methods of
-     * <code>RowSetMetaDataImpl</code>.
+     * with the {@code ResultSet} object using the setter methods of
+     * {@code RowSetMetaDataImpl}.
      */
     private RowSetMetaDataImpl rowsMD;
 
     /**
-     * The <code>ResultSetMetaData</code> object from which this
-     * <code>RowSetMetaDataImpl</code> is formed and which  helps in getting
+     * The {@code ResultSetMetaData} object from which this
+     * {@code RowSetMetaDataImpl} is formed and which  helps in getting
      * the metadata information.
      */
     private ResultSetMetaData resMD;
@@ -97,13 +97,13 @@
     protected transient JdbcRowSetResourceBundle resBundle;
 
     /**
-     * Constructs a default <code>JdbcRowSet</code> object.
-     * The new instance of <code>JdbcRowSet</code> will serve as a proxy
-     * for the <code>ResultSet</code> object it creates, and by so doing,
+     * Constructs a default {@code JdbcRowSet} object.
+     * The new instance of {@code JdbcRowSet} will serve as a proxy
+     * for the {@code ResultSet} object it creates, and by so doing,
      * it will make it possible to use the result set as a JavaBeans
      * component.
      * <P>
-     * The following is true of a default <code>JdbcRowSet</code> instance:
+     * The following is true of a default {@code JdbcRowSet} instance:
      * <UL>
      *   <LI>Does not show deleted rows
      *   <LI>Has no time limit for how long a driver may take to
@@ -114,17 +114,17 @@
      *       made by others
      *   <LI>Will not see uncommitted data (make "dirty" reads)
      *   <LI>Has escape processing turned on
-     *   <LI>Has its connection's type map set to <code>null</code>
-     *   <LI>Has an empty <code>Hashtable</code> object for storing any
+     *   <LI>Has its connection's type map set to {@code null}
+     *   <LI>Has an empty {@code Hashtable} object for storing any
      *       parameters that are set
      * </UL>
-     * A newly created <code>JdbcRowSet</code> object must have its
-     * <code>execute</code> method invoked before other public methods
+     * A newly created {@code JdbcRowSet} object must have its
+     * {@code execute} method invoked before other public methods
      * are called on it; otherwise, such method calls will cause an
      * exception to be thrown.
      *
      * @throws SQLException [1] if any of its public methods are called prior
-     * to calling the <code>execute</code> method; [2] if invalid JDBC driver
+     * to calling the {@code execute} method; [2] if invalid JDBC driver
      * properties are set or [3] if no connection to a data source exists.
      */
     public JdbcRowSetImpl() {
@@ -217,14 +217,14 @@
     }
 
     /**
-     * Constructs a default <code>JdbcRowSet</code> object given a
-     * valid <code>Connection</code> object. The new
-     * instance of <code>JdbcRowSet</code> will serve as a proxy for
-     * the <code>ResultSet</code> object it creates, and by so doing,
+     * Constructs a default {@code JdbcRowSet} object given a
+     * valid {@code Connection} object. The new
+     * instance of {@code JdbcRowSet} will serve as a proxy for
+     * the {@code ResultSet} object it creates, and by so doing,
      * it will make it possible to use the result set as a JavaBeans
      * component.
      * <P>
-     * The following is true of a default <code>JdbcRowSet</code> instance:
+     * The following is true of a default {@code JdbcRowSet} instance:
      * <UL>
      *   <LI>Does not show deleted rows
      *   <LI>Has no time limit for how long a driver may take to
@@ -235,17 +235,17 @@
      *       made by others
      *   <LI>Will not see uncommitted data (make "dirty" reads)
      *   <LI>Has escape processing turned on
-     *   <LI>Has its connection's type map set to <code>null</code>
-     *   <LI>Has an empty <code>Hashtable</code> object for storing any
+     *   <LI>Has its connection's type map set to {@code null}
+     *   <LI>Has an empty {@code Hashtable} object for storing any
      *       parameters that are set
      * </UL>
-     * A newly created <code>JdbcRowSet</code> object must have its
-     * <code>execute</code> method invoked before other public methods
+     * A newly created {@code JdbcRowSet} object must have its
+     * {@code execute} method invoked before other public methods
      * are called on it; otherwise, such method calls will cause an
      * exception to be thrown.
      *
      * @throws SQLException [1] if any of its public methods are called prior
-     * to calling the <code>execute</code> method, [2] if invalid JDBC driver
+     * to calling the {@code execute} method, [2] if invalid JDBC driver
      * properties are set, or [3] if no connection to a data source exists.
      */
     public JdbcRowSetImpl(Connection con) throws SQLException {
@@ -289,15 +289,15 @@
     }
 
     /**
-     * Constructs a default <code>JdbcRowSet</code> object using the
+     * Constructs a default {@code JdbcRowSet} object using the
      * URL, username, and password arguments supplied. The new
-     * instance of <code>JdbcRowSet</code> will serve as a proxy for
-     * the <code>ResultSet</code> object it creates, and by so doing,
+     * instance of {@code JdbcRowSet} will serve as a proxy for
+     * the {@code ResultSet} object it creates, and by so doing,
      * it will make it possible to use the result set as a JavaBeans
      * component.
      *
      * <P>
-     * The following is true of a default <code>JdbcRowSet</code> instance:
+     * The following is true of a default {@code JdbcRowSet} instance:
      * <UL>
      *   <LI>Does not show deleted rows
      *   <LI>Has no time limit for how long a driver may take to
@@ -308,17 +308,17 @@
      *       made by others
      *   <LI>Will not see uncommitted data (make "dirty" reads)
      *   <LI>Has escape processing turned on
-     *   <LI>Has its connection's type map set to <code>null</code>
-     *   <LI>Has an empty <code>Hashtable</code> object for storing any
+     *   <LI>Has its connection's type map set to {@code null}
+     *   <LI>Has an empty {@code Hashtable} object for storing any
      *       parameters that are set
      * </UL>
      *
-     * @param url - a JDBC URL for the database to which this <code>JdbcRowSet</code>
+     * @param url a JDBC URL for the database to which this {@code JdbcRowSet}
      *        object will be connected. The form for a JDBC URL is
-     *        <code>jdbc:subprotocol:subname</code>.
-     * @param user - the database user on whose behalf the connection
+     *        {@code jdbc:subprotocol:subname}.
+     * @param user the database user on whose behalf the connection
      *        is being made
-     * @param password - the user's password
+     * @param password the user's password
      *
      * @throws SQLException if a database access error occurs
      *
@@ -372,15 +372,15 @@
 
 
     /**
-     * Constructs a <code>JdbcRowSet</code> object using the given valid
-     * <code>ResultSet</code> object. The new
-     * instance of <code>JdbcRowSet</code> will serve as a proxy for
-     * the <code>ResultSet</code> object, and by so doing,
+     * Constructs a {@code JdbcRowSet} object using the given valid
+     * {@code ResultSet} object. The new
+     * instance of {@code JdbcRowSet} will serve as a proxy for
+     * the {@code ResultSet} object, and by so doing,
      * it will make it possible to use the result set as a JavaBeans
      * component.
      *
      * <P>
-     * The following is true of a default <code>JdbcRowSet</code> instance:
+     * The following is true of a default {@code JdbcRowSet} instance:
      * <UL>
      *   <LI>Does not show deleted rows
      *   <LI>Has no time limit for how long a driver may take to
@@ -391,12 +391,12 @@
      *       made by others
      *   <LI>Will not see uncommitted data (make "dirty" reads)
      *   <LI>Has escape processing turned on
-     *   <LI>Has its connection's type map set to <code>null</code>
-     *   <LI>Has an empty <code>Hashtable</code> object for storing any
+     *   <LI>Has its connection's type map set to {@code null}
+     *   <LI>Has an empty {@code Hashtable} object for storing any
      *       parameters that are set
      * </UL>
      *
-     * @param res a valid <code>ResultSet</code> object
+     * @param res a valid {@code ResultSet} object
      *
      * @throws SQLException if a database access occurs due to a non
      * valid ResultSet handle.
@@ -460,13 +460,13 @@
     }
 
     /**
-     * Initializes the given <code>RowSetMetaData</code> object with the values
-     * in the given <code>ResultSetMetaData</code> object.
-     *
-     * @param md the <code>RowSetMetaData</code> object for this
-     *           <code>JdbcRowSetImpl</code> object, which will be set with
+     * Initializes the given {@code RowSetMetaData} object with the values
+     * in the given {@code ResultSetMetaData} object.
+     *
+     * @param md the {@code RowSetMetaData} object for this
+     *           {@code JdbcRowSetImpl} object, which will be set with
      *           values from rsmd
-     * @param rsmd the <code>ResultSetMetaData</code> object from which new
+     * @param rsmd the {@code ResultSetMetaData} object from which new
      *             values for md will be read
      * @throws SQLException if an error occurs
      */
@@ -511,24 +511,24 @@
     //---------------------------------------------------------------------
 
     /**
-     * Creates the internal <code>ResultSet</code> object for which this
-     * <code>JdbcRowSet</code> object is a wrapper, effectively
+     * Creates the internal {@code ResultSet} object for which this
+     * {@code JdbcRowSet} object is a wrapper, effectively
      * making the result set a JavaBeans component.
      * <P>
      * Certain properties must have been set before this method is called
      * so that it can establish a connection to a database and execute the
-     * query that will create the result set.  If a <code>DataSource</code>
+     * query that will create the result set.  If a {@code DataSource}
      * object will be used to create the connection, properties for the
      * data source name, user name, and password must be set.  If the
-     * <code>DriverManager</code> will be used, the properties for the
+     * {@code DriverManager} will be used, the properties for the
      * URL, user name, and password must be set.  In either case, the
      * property for the command must be set.  If the command has placeholder
      * parameters, those must also be set. This method throws
      * an exception if the required properties are not set.
      * <P>
      * Other properties have default values that may optionally be set
-     * to new values. The <code>execute</code> method will use the value
-     * for the command property to create a <code>PreparedStatement</code>
+     * to new values. The {@code execute} method will use the value
+     * for the command property to create a {@code PreparedStatement}
      * object and set its properties (escape processing, maximum field
      * size, maximum number of rows, and query timeout limit) to be those
      * of this rowset.
@@ -784,20 +784,20 @@
     }
 
     /**
-     * Moves the cursor for this rowset's <code>ResultSet</code>
+     * Moves the cursor for this rowset's {@code ResultSet}
      * object down one row from its current position.
-     * A <code>ResultSet</code> cursor is initially positioned
+     * A {@code ResultSet} cursor is initially positioned
      * before the first row; the first call to the method
-     * <code>next</code> makes the first row the current row; the
+     * {@code next} makes the first row the current row; the
      * second call makes the second row the current row, and so on.
      *
      * <P>If an input stream is open for the current row, a call
-     * to the method <code>next</code> will
-     * implicitly close it. A <code>ResultSet</code> object's
+     * to the method {@code next} will
+     * implicitly close it. A {@code ResultSet} object's
      * warning chain is cleared when a new row is read.
      *
-     * @return <code>true</code> if the new current row is valid;
-     *         <code>false</code> if there are no more rows
+     * @return {@code true} if the new current row is valid;
+     *         {@code false} if there are no more rows
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -811,16 +811,16 @@
     }
 
     /**
-     * Releases this rowset's <code>ResultSet</code> object's database and
+     * Releases this rowset's {@code ResultSet} object's database and
      * JDBC resources immediately instead of waiting for
      * this to happen when it is automatically closed.
      *
-     * <P><B>Note:</B> A <code>ResultSet</code> object
+     * <P><B>Note:</B> A {@code ResultSet} object
      * is automatically closed by the
-     * <code>Statement</code> object that generated it when
-     * that <code>Statement</code> object is closed,
+     * {@code Statement} object that generated it when
+     * that {@code Statement} object is closed,
      * re-executed, or is used to retrieve the next result from a
-     * sequence of multiple results. A <code>ResultSet</code> object
+     * sequence of multiple results. A {@code ResultSet} object
      * is also automatically closed when it is garbage collected.
      *
      * @throws SQLException if a database access error occurs
@@ -836,14 +836,14 @@
 
     /**
      * Reports whether the last column read from this rowset's
-     * <code>ResultSet</code> object had a value of SQL <code>NULL</code>.
-     * Note that you must first call one of the <code>getXXX</code> methods
+     * {@code ResultSet} object had a value of SQL {@code NULL}.
+     * Note that you must first call one of the {@code getXXX} methods
      * on a column to try to read its value and then call
-     * the method <code>wasNull</code> to see if the value read was
-     * SQL <code>NULL</code>.
-     *
-     * @return <code>true</code> if the last column value read was SQL
-     *         <code>NULL</code> and <code>false</code> otherwise
+     * the method {@code wasNull} to see if the value read was
+     * SQL {@code NULL}.
+     *
+     * @return {@code true} if the last column value read was SQL
+     *         {@code NULL} and {@code false} otherwise
      * @throws SQLException if a database access error occurs
      *            or this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -860,12 +860,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>String</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code String}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -878,12 +878,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>boolean</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code boolean}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>false</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code false}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -896,12 +896,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>byte</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code byte}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -914,12 +914,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>short</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code short}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -932,12 +932,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * an <code>int</code>.
+     * of this rowset's {@code ResultSet} object as
+     * an {@code int}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -950,12 +950,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>long</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code long}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -968,12 +968,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>float</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code float}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -986,12 +986,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>double</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code double}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1004,13 +1004,13 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>java.sql.BigDecimal</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code java.sql.BigDecimal}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param scale the number of digits to the right of the decimal point
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1025,13 +1025,13 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>byte</code> array in the Java programming language.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code byte} array in the Java programming language.
      * The bytes represent the raw values returned by the driver.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1044,12 +1044,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>java.sql.Date</code> object in the Java programming language.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code java.sql.Date} object in the Java programming language.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1062,12 +1062,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>java.sql.Time</code> object in the Java programming language.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code java.sql.Time} object in the Java programming language.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1080,12 +1080,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>java.sql.Timestamp</code> object in the Java programming language.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code java.sql.Timestamp} object in the Java programming language.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1098,25 +1098,25 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
+     * of this rowset's {@code ResultSet} object as
      * a stream of ASCII characters. The value can then be read in chunks from the
      * stream. This method is particularly
-     * suitable for retrieving large <code>LONGVARCHAR</code> values.
+     * suitable for retrieving large {@code LONGVARCHAR} values.
      * The JDBC driver will
      * do any necessary conversion from the database format into ASCII.
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
-     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
-     * stream may return <code>0</code> when the method
-     * <code>InputStream.available</code>
+     * call to a {@code getXXX} method implicitly closes the stream.  Also, a
+     * stream may return {@code 0} when the method
+     * {@code InputStream.available}
      * is called whether there is data available or not.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @return a Java input stream that delivers the database column value
-     * as a stream of one-byte ASCII characters;
-     * if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     *         as a stream of one-byte ASCII characters;
+     *         if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) database access error occurs
      *            (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1129,31 +1129,31 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
+     * of this rowset's {@code ResultSet} object as
      * as a stream of Unicode characters.
      * The value can then be read in chunks from the
      * stream. This method is particularly
-     * suitable for retrieving large<code>LONGVARCHAR</code>values.  The JDBC driver will
+     * suitable for retrieving large{@code LONGVARCHAR}values.  The JDBC driver will
      * do any necessary conversion from the database format into Unicode.
      * The byte format of the Unicode stream must be Java UTF-8,
      * as specified in the Java virtual machine specification.
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
-     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
-     * stream may return <code>0</code> when the method
-     * <code>InputStream.available</code>
+     * call to a {@code getXXX} method implicitly closes the stream.  Also, a
+     * stream may return {@code 0} when the method
+     * {@code InputStream.available}
      * is called whether there is data available or not.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @return a Java input stream that delivers the database column value
-     * as a stream in Java UTF-8 byte format;
-     * if the value is SQL <code>NULL</code>, the value returned is <code>null</code>
+     *         as a stream in Java UTF-8 byte format;
+     *         if the value is SQL {@code NULL}, the value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
-     * @deprecated use <code>getCharacterStream</code> in place of
-     *              <code>getUnicodeStream</code>
+     * @deprecated use {@code getCharacterStream} in place of
+     *              {@code getUnicodeStream}
      */
     @Deprecated
     public java.io.InputStream getUnicodeStream(int columnIndex) throws SQLException {
@@ -1165,22 +1165,22 @@
     /**
      * Gets the value of a column in the current row as a stream of
      * the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a binary stream of
+     * of this rowset's {@code ResultSet} object as a binary stream of
      * uninterpreted bytes. The value can then be read in chunks from the
      * stream. This method is particularly
-     * suitable for retrieving large <code>LONGVARBINARY</code> values.
+     * suitable for retrieving large {@code LONGVARBINARY} values.
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
-     * call to a <code>getXXX</code> method implicitly closes the stream.  Also, a
-     * stream may return <code>0</code> when the method
-     * <code>InputStream.available</code>
+     * call to a {@code getXXX} method implicitly closes the stream.  Also, a
+     * stream may return {@code 0} when the method
+     * {@code InputStream.available}
      * is called whether there is data available or not.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @return a Java input stream that delivers the database column value
-     * as a stream of uninterpreted bytes;
-     * if the value is SQL <code>NULL</code>, the value returned is <code>null</code>
+     *         as a stream of uninterpreted bytes;
+     *         if the value is SQL {@code NULL}, the value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1198,12 +1198,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>String</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code String}.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1214,12 +1214,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>boolean</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code boolean}.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>false</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code false}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1230,12 +1230,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>byte</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code byte}.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1246,12 +1246,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>short</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code short}.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1262,12 +1262,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * an <code>int</code>.
+     * of this rowset's {@code ResultSet} object as
+     * an {@code int}.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1278,12 +1278,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>long</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code long}.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if a database access error occurs
      *            or this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1294,12 +1294,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>float</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code float}.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1310,12 +1310,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>double</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code double}.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code 0}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1326,13 +1326,13 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>java.math.BigDecimal</code>.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code java.math.BigDecimal}.
      *
      * @param columnName the SQL name of the column
      * @param scale the number of digits to the right of the decimal point
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     * value returned is {@code null}
      * @throws SQLException if (1) adatabase access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1345,13 +1345,13 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>byte</code> array in the Java programming language.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code byte} array in the Java programming language.
      * The bytes represent the raw values returned by the driver.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1362,12 +1362,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>java.sql.Date</code> object in the Java programming language.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code java.sql.Date} object in the Java programming language.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1378,13 +1378,13 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>java.sql.Time</code> object in the Java programming language.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code java.sql.Time} object in the Java programming language.
      *
      * @param columnName the SQL name of the column
      * @return the column value;
-     * if the value is SQL <code>NULL</code>,
-     * the value returned is <code>null</code>
+     * if the value is SQL {@code NULL},
+     * the value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1395,12 +1395,12 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * a <code>java.sql.Timestamp</code> object.
+     * of this rowset's {@code ResultSet} object as
+     * a {@code java.sql.Timestamp} object.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     * value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1411,24 +1411,24 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a stream of
+     * of this rowset's {@code ResultSet} object as a stream of
      * ASCII characters. The value can then be read in chunks from the
      * stream. This method is particularly
-     * suitable for retrieving large <code>LONGVARCHAR</code> values.
+     * suitable for retrieving large {@code LONGVARCHAR} values.
      * The JDBC driver will
      * do any necessary conversion from the database format into ASCII.
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
-     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
-     * stream may return <code>0</code> when the method <code>available</code>
+     * call to a {@code getXXX} method implicitly closes the stream. Also, a
+     * stream may return {@code 0} when the method {@code available}
      * is called whether there is data available or not.
      *
      * @param columnName the SQL name of the column
      * @return a Java input stream that delivers the database column value
-     * as a stream of one-byte ASCII characters.
-     * If the value is SQL <code>NULL</code>,
-     * the value returned is <code>null</code>.
+     *         as a stream of one-byte ASCII characters.
+     *         If the value is SQL {@code NULL},
+     *         the value returned is {@code null}.
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1439,10 +1439,10 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a stream of
+     * of this rowset's {@code ResultSet} object as a stream of
      * Unicode characters. The value can then be read in chunks from the
      * stream. This method is particularly
-     * suitable for retrieving large <code>LONGVARCHAR</code> values.
+     * suitable for retrieving large {@code LONGVARCHAR} values.
      * The JDBC driver will
      * do any necessary conversion from the database format into Unicode.
      * The byte format of the Unicode stream must be Java UTF-8,
@@ -1450,15 +1450,15 @@
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
-     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
-     * stream may return <code>0</code> when the method <code>available</code>
+     * call to a {@code getXXX} method implicitly closes the stream. Also, a
+     * stream may return {@code 0} when the method {@code available}
      * is called whether there is data available or not.
      *
      * @param columnName the SQL name of the column
      * @return a Java input stream that delivers the database column value
-     * as a stream of two-byte Unicode characters.
-     * If the value is SQL <code>NULL</code>,
-     * the value returned is <code>null</code>.
+     *         as a stream of two-byte Unicode characters.
+     *         If the value is SQL {@code NULL},
+     *         the value returned is {@code null}.
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1471,23 +1471,23 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a stream of uninterpreted
-     * <code>byte</code>s.
+     * of this rowset's {@code ResultSet} object as a stream of uninterpreted
+     * {@code byte}s.
      * The value can then be read in chunks from the
      * stream. This method is particularly
-     * suitable for retrieving large <code>LONGVARBINARY</code>
+     * suitable for retrieving large {@code LONGVARBINARY}
      * values.
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
-     * call to a <code>getXXX</code> method implicitly closes the stream. Also, a
-     * stream may return <code>0</code> when the method <code>available</code>
+     * call to a {@code getXXX} method implicitly closes the stream. Also, a
+     * stream may return {@code 0} when the method {@code available}
      * is called whether there is data available or not.
      *
      * @param columnName the SQL name of the column
      * @return a Java input stream that delivers the database column value
-     * as a stream of uninterpreted bytes;
-     * if the value is SQL <code>NULL</code>, the result is <code>null</code>
+     *         as a stream of uninterpreted bytes;
+     *         if the value is SQL {@code NULL}, the result is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1503,21 +1503,21 @@
 
     /**
      * Returns the first warning reported by calls on this rowset's
-     * <code>ResultSet</code> object.
-     * Subsequent warnings on this rowset's <code>ResultSet</code> object
-     * will be chained to the <code>SQLWarning</code> object that
+     * {@code ResultSet} object.
+     * Subsequent warnings on this rowset's {@code ResultSet} object
+     * will be chained to the {@code SQLWarning} object that
      * this method returns.
      *
      * <P>The warning chain is automatically cleared each time a new
      * row is read.
      *
      * <P><B>Note:</B> This warning chain only covers warnings caused
-     * by <code>ResultSet</code> methods.  Any warning caused by
-     * <code>Statement</code> methods
+     * by {@code ResultSet} methods.  Any warning caused by
+     * {@code Statement} methods
      * (such as reading OUT parameters) will be chained on the
-     * <code>Statement</code> object.
-     *
-     * @return the first <code>SQLWarning</code> object reported or <code>null</code>
+     * {@code Statement} object.
+     *
+     * @return the first {@code SQLWarning} object reported or {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1529,10 +1529,10 @@
     }
 
     /**
-     * Clears all warnings reported on this rowset's <code>ResultSet</code> object.
-     * After this method is called, the method <code>getWarnings</code>
-     * returns <code>null</code> until a new warning is
-     * reported for this rowset's <code>ResultSet</code> object.
+     * Clears all warnings reported on this rowset's {@code ResultSet} object.
+     * After this method is called, the method {@code getWarnings}
+     * returns {@code null} until a new warning is
+     * reported for this rowset's {@code ResultSet} object.
      *
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not have a currently valid connection,
@@ -1545,26 +1545,26 @@
     }
 
     /**
-     * Gets the name of the SQL cursor used by this rowset's <code>ResultSet</code>
+     * Gets the name of the SQL cursor used by this rowset's {@code ResultSet}
      * object.
      *
      * <P>In SQL, a result table is retrieved through a cursor that is
      * named. The current row of a result set can be updated or deleted
      * using a positioned update/delete statement that references the
      * cursor name. To insure that the cursor has the proper isolation
-     * level to support update, the cursor's <code>select</code> statement should be
+     * level to support update, the cursor's {@code select} statement should be
      * of the form 'select for update'. If the 'for update' clause is
      * omitted, the positioned updates may fail.
      *
      * <P>The JDBC API supports this SQL feature by providing the name of the
-     * SQL cursor used by a <code>ResultSet</code> object.
-     * The current row of a <code>ResultSet</code> object
+     * SQL cursor used by a {@code ResultSet} object.
+     * The current row of a {@code ResultSet} object
      * is also the current row of this SQL cursor.
      *
      * <P><B>Note:</B> If positioned update is not supported, a
-     * <code>SQLException</code> is thrown.
-     *
-     * @return the SQL name for this rowset's <code>ResultSet</code> object's cursor
+     * {@code SQLException} is thrown.
+     *
+     * @return the SQL name for this rowset's {@code ResultSet} object's cursor
      * @throws SQLException if (1) a database access error occurs
      *            or (2) xthis rowset does not have a currently valid connection,
      *            prepared statement, and result set
@@ -1577,9 +1577,9 @@
 
     /**
      * Retrieves the  number, types and properties of
-     * this rowset's <code>ResultSet</code> object's columns.
-     *
-     * @return the description of this rowset's <code>ResultSet</code>
+     * this rowset's {@code ResultSet} object's columns.
+     *
+     * @return the description of this rowset's {@code ResultSet}
      *     object's columns
      * @throws SQLException if (1) a database access error occurs
      *     or (2) this rowset does not have a currently valid connection,
@@ -1607,8 +1607,8 @@
 
     /**
      * <p>Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * an <code>Object</code>.
+     * of this rowset's {@code ResultSet} object as
+     * an {@code Object}.
      *
      * <p>This method will return the value of the given column as a
      * Java object.  The type of the Java object will be the default
@@ -1620,14 +1620,14 @@
      * abstract data types.
      *
      * In the JDBC 3.0 API, the behavior of method
-     * <code>getObject</code> is extended to materialize
+     * {@code getObject} is extended to materialize
      * data of SQL user-defined types.  When a column contains
      * a structured or distinct value, the behavior of this method is as
-     * if it were a call to: <code>getObject(columnIndex,
-     * this.getStatement().getConnection().getTypeMap())</code>.
+     * if it were a call to: {@code getObject(columnIndex,
+     * this.getStatement().getConnection().getTypeMap())}.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @return a <code>java.lang.Object</code> holding the column value
+     * @return a {@code java.lang.Object} holding the column value
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -1640,8 +1640,8 @@
 
     /**
      * <p>Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as
-     * an <code>Object</code>.
+     * of this rowset's {@code ResultSet} object as
+     * an {@code Object}.
      *
      * <p>This method will return the value of the given column as a
      * Java object.  The type of the Java object will be the default
@@ -1653,14 +1653,14 @@
      * abstract data types.
      *
      * In the JDBC 3.0 API, the behavior of the method
-     * <code>getObject</code> is extended to materialize
+     * {@code getObject} is extended to materialize
      * data of SQL user-defined types.  When a column contains
      * a structured or distinct value, the behavior of this method is as
-     * if it were a call to: <code>getObject(columnIndex,
-     * this.getStatement().getConnection().getTypeMap())</code>.
+     * if it were a call to: {@code getObject(columnIndex,
+     * this.getStatement().getConnection().getTypeMap())}.
      *
      * @param columnName the SQL name of the column
-     * @return a <code>java.lang.Object</code> holding the column value
+     * @return a {@code java.lang.Object} holding the column value
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -1672,9 +1672,9 @@
     //----------------------------------------------------------------
 
     /**
-     * Maps the given <code>JdbcRowSetImpl</code> column name to its
-     * <code>JdbcRowSetImpl</code> column index and reflects this on
-     * the internal <code>ResultSet</code> object.
+     * Maps the given {@code JdbcRowSetImpl} column name to its
+     * {@code JdbcRowSetImpl} column index and reflects this on
+     * the internal {@code ResultSet} object.
      *
      * @param columnName the name of the column
      * @return the column index of the given column name
@@ -1697,11 +1697,11 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a
-     * <code>java.io.Reader</code> object.
-     * @return a <code>java.io.Reader</code> object that contains the column
-     * value; if the value is SQL <code>NULL</code>, the value returned is
-     * <code>null</code>.
+     * of this rowset's {@code ResultSet} object as a
+     * {@code java.io.Reader} object.
+     * @return a {@code java.io.Reader} object that contains the column
+     * value; if the value is SQL {@code NULL}, the value returned is
+     * {@code null}.
      * @param columnIndex the first column is 1, the second is 2, and so on
      *
      */
@@ -1713,14 +1713,14 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a
-     * <code>java.io.Reader</code> object.
-     *
-     * @return a <code>java.io.Reader</code> object that contains the column
-     * value; if the value is SQL <code>NULL</code>, the value returned is
-     * <code>null</code>.
+     * of this rowset's {@code ResultSet} object as a
+     * {@code java.io.Reader} object.
+     *
+     * @return a {@code java.io.Reader} object that contains the column
+     * value; if the value is SQL {@code NULL}, the value returned is
+     * {@code null}.
      * @param columnName the name of the column
-     * @return the value in the specified column as a <code>java.io.Reader</code>
+     * @return the value in the specified column as a {@code java.io.Reader}
      *
      */
     public java.io.Reader getCharacterStream(String columnName) throws SQLException {
@@ -1729,13 +1729,13 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a
-     * <code>java.math.BigDecimal</code> with full precision.
+     * of this rowset's {@code ResultSet} object as a
+     * {@code java.math.BigDecimal} with full precision.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @return the column value (full precision);
-     * if the value is SQL <code>NULL</code>, the value returned is
-     * <code>null</code>.
+     *         if the value is SQL {@code NULL}, the value returned is
+     *         {@code null}.
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid
      *            connection, prepared statement, and result set
@@ -1748,13 +1748,13 @@
 
     /**
      * Gets the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a
-     * <code>java.math.BigDecimal</code> with full precision.
+     * of this rowset's {@code ResultSet} object as a
+     * {@code java.math.BigDecimal} with full precision.
      *
      * @param columnName the column name
      * @return the column value (full precision);
-     * if the value is SQL <code>NULL</code>, the value returned is
-     * <code>null</code>.
+     *         if the value is SQL {@code NULL}, the value returned is
+     *         {@code null}.
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid
      *            connection, prepared statement, and result set
@@ -1769,11 +1769,11 @@
 
     /**
      * Indicates whether the cursor is before the first row in
-     * this rowset's <code>ResultSet</code> object.
-     *
-     * @return <code>true</code> if the cursor is before the first row;
-     * <code>false</code> if the cursor is at any other position or the
-     * result set contains no rows
+     * this rowset's {@code ResultSet} object.
+     *
+     * @return {@code true} if the cursor is before the first row;
+     *         {@code false} if the cursor is at any other position or the
+     *         result set contains no rows
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid
      *            connection, prepared statement, and result set
@@ -1786,11 +1786,11 @@
 
     /**
      * Indicates whether the cursor is after the last row in
-     * this rowset's <code>ResultSet</code> object.
-     *
-     * @return <code>true</code> if the cursor is after the last row;
-     * <code>false</code> if the cursor is at any other position or the
-     * result set contains no rows
+     * this rowset's {@code ResultSet} object.
+     *
+     * @return {@code true} if the cursor is after the last row;
+     *         {@code false} if the cursor is at any other position or the
+     *         result set contains no rows
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid
      *            connection, prepared statement, and result set
@@ -1803,10 +1803,10 @@
 
     /**
      * Indicates whether the cursor is on the first row of
-     * this rowset's <code>ResultSet</code> object.
-     *
-     * @return <code>true</code> if the cursor is on the first row;
-     * <code>false</code> otherwise
+     * this rowset's {@code ResultSet} object.
+     *
+     * @return {@code true} if the cursor is on the first row;
+     *         {@code false} otherwise
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid
      *            connection, prepared statement, and result set
@@ -1819,14 +1819,14 @@
 
     /**
      * Indicates whether the cursor is on the last row of
-     * this rowset's <code>ResultSet</code> object.
-     * Note: Calling the method <code>isLast</code> may be expensive
+     * this rowset's {@code ResultSet} object.
+     * Note: Calling the method {@code isLast} may be expensive
      * because the JDBC driver
      * might need to fetch ahead one row in order to determine
      * whether the current row is the last row in the result set.
      *
-     * @return <code>true</code> if the cursor is on the last row;
-     * <code>false</code> otherwise
+     * @return {@code true} if the cursor is on the last row;
+     *         {@code false} otherwise
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid
      *            connection, prepared statement, and result set
@@ -1840,11 +1840,11 @@
 
     /**
      * Moves the cursor to the front of
-     * this rowset's <code>ResultSet</code> object, just before the
+     * this rowset's {@code ResultSet} object, just before the
      * first row. This method has no effect if the result set contains no rows.
      *
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
+     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
      *            or (3) this rowset does not currently have a valid
      *            connection, prepared statement, and result set
      */
@@ -1857,10 +1857,10 @@
 
     /**
      * Moves the cursor to the end of
-     * this rowset's <code>ResultSet</code> object, just after the
+     * this rowset's {@code ResultSet} object, just after the
      * last row. This method has no effect if the result set contains no rows.
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
+     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
      *            or (3) this rowset does not currently have a valid
      *            connection, prepared statement, and result set
      */
@@ -1873,12 +1873,12 @@
 
     /**
      * Moves the cursor to the first row in
-     * this rowset's <code>ResultSet</code> object.
-     *
-     * @return <code>true</code> if the cursor is on a valid row;
-     * <code>false</code> if there are no rows in the result set
+     * this rowset's {@code ResultSet} object.
+     *
+     * @return {@code true} if the cursor is on a valid row;
+     * {@code false} if there are no rows in the result set
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
+     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
      *            or (3) this rowset does not currently have a valid
      *            connection, prepared statement, and result set
      */
@@ -1893,12 +1893,12 @@
 
     /**
      * Moves the cursor to the last row in
-     * this rowset's <code>ResultSet</code> object.
-     *
-     * @return <code>true</code> if the cursor is on a valid row;
-     * <code>false</code> if there are no rows in the result set
+     * this rowset's {@code ResultSet} object.
+     *
+     * @return {@code true} if the cursor is on a valid row;
+     * {@code false} if there are no rows in the result set
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
+     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
      *            or (3) this rowset does not currently have a valid
      *            connection, prepared statement, and result set
      */
@@ -1914,7 +1914,7 @@
      * Retrieves the current row number.  The first row is number 1, the
      * second is number 2, and so on.
      *
-     * @return the current row number; <code>0</code> if there is no current row
+     * @return the current row number; {@code 0} if there is no current row
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -1927,7 +1927,7 @@
 
     /**
      * Moves the cursor to the given row number in
-     * this rowset's internal <code>ResultSet</code> object.
+     * this rowset's internal {@code ResultSet} object.
      *
      * <p>If the row number is positive, the cursor moves to
      * the given row number with respect to the
@@ -1937,23 +1937,23 @@
      * <p>If the given row number is negative, the cursor moves to
      * an absolute row position with respect to
      * the end of the result set.  For example, calling the method
-     * <code>absolute(-1)</code> positions the
-     * cursor on the last row, calling the method <code>absolute(-2)</code>
+     * {@code absolute(-1)} positions the
+     * cursor on the last row, calling the method {@code absolute(-2)}
      * moves the cursor to the next-to-last row, and so on.
      *
      * <p>An attempt to position the cursor beyond the first/last row in
      * the result set leaves the cursor before the first row or after
      * the last row.
      *
-     * <p><B>Note:</B> Calling <code>absolute(1)</code> is the same
-     * as calling <code>first()</code>. Calling <code>absolute(-1)</code>
-     * is the same as calling <code>last()</code>.
-     *
-     * @return <code>true</code> if the cursor is on the result set;
-     * <code>false</code> otherwise
+     * <p><B>Note:</B> Calling {@code absolute(1)} is the same
+     * as calling {@code first()}. Calling {@code absolute(-1)}
+     * is the same as calling {@code last()}.
+     *
+     * @return {@code true} if the cursor is on the result set;
+     * {@code false} otherwise
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) the row is <code>0</code>, (3) the result set
-     *            type is <code>TYPE_FORWARD_ONLY</code>, or (4) this
+     *            (2) the row is {@code 0}, (3) the result set
+     *            type is {@code TYPE_FORWARD_ONLY}, or (4) this
      *            rowset does not currently have a valid connection,
      *            prepared statement, and result set
      */
@@ -1969,21 +1969,21 @@
      * Moves the cursor a relative number of rows, either positive or negative.
      * Attempting to move beyond the first/last row in the
      * result set positions the cursor before/after the
-     * the first/last row. Calling <code>relative(0)</code> is valid, but does
+     * the first/last row. Calling {@code relative(0)} is valid, but does
      * not change the cursor position.
      *
-     * <p>Note: Calling the method <code>relative(1)</code>
-     * is different from calling the method <code>next()</code>
-     * because is makes sense to call <code>next()</code> when there
+     * <p>Note: Calling the method {@code relative(1)}
+     * is different from calling the method {@code next()}
+     * because is makes sense to call {@code next()} when there
      * is no current row,
      * for example, when the cursor is positioned before the first row
      * or after the last row of the result set.
      *
-     * @return <code>true</code> if the cursor is on a row;
-     * <code>false</code> otherwise
+     * @return {@code true} if the cursor is on a row;
+     *         {@code false} otherwise
      * @throws SQLException if (1) a database access error occurs,
      *            (2) there is no current row, (3) the result set
-     *            type is <code>TYPE_FORWARD_ONLY</code>, or (4) this
+     *            type is {@code TYPE_FORWARD_ONLY}, or (4) this
      *            rowset does not currently have a valid connection,
      *            prepared statement, and result set
      */
@@ -1997,16 +1997,16 @@
 
     /**
      * Moves the cursor to the previous row in this
-     * <code>ResultSet</code> object.
-     *
-     * <p><B>Note:</B> Calling the method <code>previous()</code> is not the same as
-     * calling the method <code>relative(-1)</code> because it
-     * makes sense to call <code>previous()</code> when there is no current row.
-     *
-     * @return <code>true</code> if the cursor is on a valid row;
-     * <code>false</code> if it is off the result set
+     * {@code ResultSet} object.
+     *
+     * <p><B>Note:</B> Calling the method {@code previous()} is not the same as
+     * calling the method {@code relative(-1)} because it
+     * makes sense to call {@code previous()} when there is no current row.
+     *
+     * @return {@code true} if the cursor is on a valid row;
+     *         {@code false} if it is off the result set
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>,
+     *            (2) the result set type is {@code TYPE_FORWARD_ONLY},
      *            or (3) this rowset does not currently have a valid
      *            connection, prepared statement, and result set
      */
@@ -2020,15 +2020,15 @@
 
     /**
      * Gives a hint as to the direction in which the rows in this
-     * <code>ResultSet</code> object will be processed.
+     * {@code ResultSet} object will be processed.
      * The initial value is determined by the
-     * <code>Statement</code> object
-     * that produced this rowset's <code>ResultSet</code> object.
+     * {@code Statement} object
+     * that produced this rowset's {@code ResultSet} object.
      * The fetch direction may be changed at any time.
      *
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) the result set type is <code>TYPE_FORWARD_ONLY</code>
-     *            and the fetch direction is not <code>FETCH_FORWARD</code>,
+     *            (2) the result set type is {@code TYPE_FORWARD_ONLY}
+     *            and the fetch direction is not {@code FETCH_FORWARD},
      *            or (3) this rowset does not currently have a valid
      *            connection, prepared statement, and result set
      * @see java.sql.Statement#setFetchDirection
@@ -2041,10 +2041,10 @@
 
     /**
      * Returns the fetch direction for this
-     * <code>ResultSet</code> object.
+     * {@code ResultSet} object.
      *
      * @return the current fetch direction for this rowset's
-     *         <code>ResultSet</code> object
+     *         {@code ResultSet} object
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -2061,16 +2061,16 @@
     /**
      * Gives the JDBC driver a hint as to the number of rows that should
      * be fetched from the database when more rows are needed for this
-     * <code>ResultSet</code> object.
+     * {@code ResultSet} object.
      * If the fetch size specified is zero, the JDBC driver
      * ignores the value and is free to make its own best guess as to what
      * the fetch size should be.  The default value is set by the
-     * <code>Statement</code> object
+     * {@code Statement} object
      * that created the result set.  The fetch size may be changed at any time.
      *
      * @param rows the number of rows to fetch
      * @throws SQLException if (1) a database access error occurs, (2) the
-     *            condition <code>0 <= rows <= this.getMaxRows()</code> is not
+     *            condition {@code 0 <= rows <= this.getMaxRows()} is not
      *            satisfied, or (3) this rowset does not currently have a valid
      *            connection, prepared statement, and result set
      *
@@ -2084,9 +2084,9 @@
     /**
      *
      * Returns the fetch size for this
-     * <code>ResultSet</code> object.
-     *
-     * @return the current fetch size for this rowset's <code>ResultSet</code> object
+     * {@code ResultSet} object.
+     *
+     * @return the current fetch size for this rowset's {@code ResultSet} object
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -2111,12 +2111,12 @@
     }
 
     /**
-     * Returns the concurrency mode of this rowset's <code>ResultSet</code> object.
+     * Returns the concurrency mode of this rowset's {@code ResultSet} object.
      * The concurrency used is determined by the
-     * <code>Statement</code> object that created the result set.
-     *
-     * @return the concurrency type, either <code>CONCUR_READ_ONLY</code>
-     * or <code>CONCUR_UPDATABLE</code>
+     * {@code Statement} object that created the result set.
+     *
+     * @return the concurrency type, either {@code CONCUR_READ_ONLY}
+     * or {@code CONCUR_UPDATABLE}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -2138,7 +2138,7 @@
      * Indicates whether the current row has been updated.  The value returned
      * depends on whether or not the result set can detect updates.
      *
-     * @return <code>true</code> if the row has been visibly updated
+     * @return {@code true} if the row has been visibly updated
      * by the owner or another, and updates are detected
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
@@ -2154,10 +2154,10 @@
     /**
      * Indicates whether the current row has had an insertion.
      * The value returned depends on whether or not this
-     * <code>ResultSet</code> object can detect visible inserts.
-     *
-     * @return <code>true</code> if a row has had an insertion
-     * and insertions are detected; <code>false</code> otherwise
+     * {@code ResultSet} object can detect visible inserts.
+     *
+     * @return {@code true} if a row has had an insertion
+     *         and insertions are detected; {@code false} otherwise
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -2174,10 +2174,10 @@
      * Indicates whether a row has been deleted.  A deleted row may leave
      * a visible "hole" in a result set.  This method can be used to
      * detect holes in a result set.  The value returned depends on whether
-     * or not this rowset's <code>ResultSet</code> object can detect deletions.
-     *
-     * @return <code>true</code> if a row was deleted and deletions are detected;
-     * <code>false</code> otherwise
+     * or not this rowset's {@code ResultSet} object can detect deletions.
+     *
+     * @return {@code true} if a row was deleted and deletions are detected;
+     *         {@code false} otherwise
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -2192,10 +2192,10 @@
     /**
      * Gives a nullable column a null value.
      *
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code>
-     * or <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow}
+     * or {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @throws SQLException if a database access error occurs
@@ -2213,11 +2213,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>boolean</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code boolean} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2237,11 +2237,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>byte</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code byte} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
@@ -2262,11 +2262,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>short</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code short} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2286,11 +2286,11 @@
     }
 
     /**
-     * Updates the designated column with an <code>int</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with an {@code int} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2309,11 +2309,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>long</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code long} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2333,11 +2333,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>float</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code float} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2357,11 +2357,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>double</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code double} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2381,12 +2381,12 @@
     }
 
     /**
-     * Updates the designated column with a <code>java.math.BigDecimal</code>
+     * Updates the designated column with a {@code java.math.BigDecimal}
      * value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2406,11 +2406,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>String</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code String} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2430,11 +2430,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>byte</code> array value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code byte} array value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2454,11 +2454,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>java.sql.Date</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code java.sql.Date} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2479,11 +2479,11 @@
 
 
     /**
-     * Updates the designated column with a <code>java.sql.Time</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code java.sql.Time} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2503,12 +2503,12 @@
     }
 
     /**
-     * Updates the designated column with a <code>java.sql.Timestamp</code>
+     * Updates the designated column with a {@code java.sql.Timestamp}
      * value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2529,10 +2529,10 @@
 
     /**
      * Updates the designated column with an ascii stream value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2554,10 +2554,10 @@
 
     /**
      * Updates the designated column with a binary stream value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2579,10 +2579,10 @@
 
     /**
      * Updates the designated column with a character stream value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2603,18 +2603,18 @@
     }
 
     /**
-     * Updates the designated column with an <code>Object</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with an {@code Object} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
-     * @param scale for <code>java.sql.Types.DECIMAl</code>
-     *  or <code>java.sql.Types.NUMERIC</code> types,
-     *  this is the number of digits after the decimal point.  For all other
-     *  types this value will be ignored.
+     * @param scale for {@code java.sql.Types.DECIMAl}
+     *        or {@code java.sql.Types.NUMERIC} types,
+     *        this is the number of digits after the decimal point.  For all other
+     *        types this value will be ignored.
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -2631,11 +2631,11 @@
     }
 
     /**
-     * Updates the designated column with an <code>Object</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with an {@code Object} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
      * @param x the new column value
@@ -2655,11 +2655,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>null</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code null} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @throws SQLException if a database access error occurs
@@ -2672,11 +2672,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>boolean</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code boolean} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2688,11 +2688,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>byte</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code byte} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2704,11 +2704,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>short</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code short} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2720,11 +2720,11 @@
     }
 
     /**
-     * Updates the designated column with an <code>int</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with an {@code int} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2736,11 +2736,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>long</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code long} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2752,11 +2752,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>float </code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code float } value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2768,11 +2768,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>double</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code double} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2784,12 +2784,12 @@
     }
 
     /**
-     * Updates the designated column with a <code>java.sql.BigDecimal</code>
+     * Updates the designated column with a {@code java.sql.BigDecimal}
      * value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2801,11 +2801,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>String</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code String} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2817,19 +2817,19 @@
     }
 
     /**
-     * Updates the designated column with a <code>boolean</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code boolean} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * JDBC 2.0
      *
      * Updates a column with a byte array value.
      *
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row, or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code>
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row, or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or {@code insertRow}
      * methods are called to update the database.
      *
      * @param columnName the name of the column
@@ -2842,11 +2842,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>java.sql.Date</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code java.sql.Date} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2858,11 +2858,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>java.sql.Time</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with a {@code java.sql.Time} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2874,12 +2874,12 @@
     }
 
     /**
-     * Updates the designated column with a <code>java.sql.Timestamp</code>
+     * Updates the designated column with a {@code java.sql.Timestamp}
      * value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2892,10 +2892,10 @@
 
     /**
      * Updates the designated column with an ascii stream value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2909,10 +2909,10 @@
 
     /**
      * Updates the designated column with a binary stream value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2926,14 +2926,14 @@
 
     /**
      * Updates the designated column with a character stream value.
-     * The <code>updateXXX</code> methods are used to update column values
-     * in the current row or the insert row.  The <code>updateXXX</code>
+     * The {@code updateXXX} methods are used to update column values
+     * in the current row or the insert row.  The {@code updateXXX}
      * methods do not update the underlying database; instead the
-     * <code>updateRow</code> or <code>insertRow</code> methods are called
+     * {@code updateRow} or {@code insertRow} methods are called
      * to update the database.
      *
      * @param columnName the name of the column
-     * @param reader the new column <code>Reader</code> stream value
+     * @param reader the new column {@code Reader} stream value
      * @param length the length of the stream
      * @throws SQLException if a database access error occurs
      *
@@ -2943,16 +2943,16 @@
     }
 
     /**
-     * Updates the designated column with an <code>Object</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with an {@code Object} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
-     * @param scale for <code>java.sql.Types.DECIMAL</code>
-     *  or <code>java.sql.Types.NUMERIC</code> types,
+     * @param scale for {@code java.sql.Types.DECIMAL}
+     *  or {@code java.sql.Types.NUMERIC} types,
      *  this is the number of digits after the decimal point.  For all other
      *  types this value will be ignored.
      * @throws SQLException if a database access error occurs
@@ -2963,11 +2963,11 @@
     }
 
     /**
-     * Updates the designated column with an <code>Object</code> value.
-     * The <code>updateXXX</code> methods are used to update column values in the
-     * current row or the insert row.  The <code>updateXXX</code> methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * Updates the designated column with an {@code Object} value.
+     * The {@code updateXXX} methods are used to update column values in the
+     * current row or the insert row.  The {@code updateXXX} methods do not
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnName the name of the column
      * @param x the new column value
@@ -2980,7 +2980,7 @@
 
     /**
      * Inserts the contents of the insert row into this
-     * <code>ResultSet</code> object and into the database
+     * {@code ResultSet} object and into the database
      * and also notifies listeners that a row has changed.
      * The cursor must be on the insert row when this method is called.
      *
@@ -3000,14 +3000,14 @@
 
     /**
      * Updates the underlying database with the new contents of the
-     * current row of this rowset's <code>ResultSet</code> object
+     * current row of this rowset's {@code ResultSet} object
      * and notifies listeners that a row has changed.
      * This method cannot be called when the cursor is on the insert row.
      *
      * @throws SQLException if (1) a database access error occurs,
      *            (2) this method is called when the cursor is
      *             on the insert row, (3) the concurrency of the result
-     *             set is <code>ResultSet.CONCUR_READ_ONLY</code>, or
+     *             set is {@code ResultSet.CONCUR_READ_ONLY}, or
      *             (4) this rowset does not currently have a valid connection,
      *             prepared statement, and result set
      */
@@ -3019,18 +3019,18 @@
     }
 
     /**
-     * Deletes the current row from this rowset's <code>ResultSet</code> object
+     * Deletes the current row from this rowset's {@code ResultSet} object
      * and from the underlying database and also notifies listeners that a row
      * has changed.  This method cannot be called when the cursor is on the insert
      * row.
      *
      * @throws SQLException if a database access error occurs
-     * or if this method is called when the cursor is on the insert row
+     *         or if this method is called when the cursor is on the insert row
      * @throws SQLException if (1) a database access error occurs,
      *            (2) this method is called when the cursor is before the
      *            first row, after the last row, or on the insert row,
      *            (3) the concurrency of this rowset's result
-     *            set is <code>ResultSet.CONCUR_READ_ONLY</code>, or
+     *            set is {@code ResultSet.CONCUR_READ_ONLY}, or
      *            (4) this rowset does not currently have a valid connection,
      *            prepared statement, and result set
      */
@@ -3042,24 +3042,24 @@
     }
 
     /**
-     * Refreshes the current row of this rowset's <code>ResultSet</code>
+     * Refreshes the current row of this rowset's {@code ResultSet}
      * object with its most recent value in the database.  This method
      * cannot be called when the cursor is on the insert row.
      *
-     * <P>The <code>refreshRow</code> method provides a way for an
+     * <P>The {@code refreshRow} method provides a way for an
      * application to explicitly tell the JDBC driver to refetch
      * a row(s) from the database.  An application may want to call
-     * <code>refreshRow</code> when caching or prefetching is being
+     * {@code refreshRow} when caching or prefetching is being
      * done by the JDBC driver to fetch the latest value of a row
      * from the database.  The JDBC driver may actually refresh multiple
      * rows at once if the fetch size is greater than one.
      *
      * <P> All values are refetched subject to the transaction isolation
-     * level and cursor sensitivity.  If <code>refreshRow</code> is called after
-     * calling an <code>updateXXX</code> method, but before calling
-     * the method <code>updateRow</code>, then the
+     * level and cursor sensitivity.  If {@code refreshRow} is called after
+     * calling an {@code updateXXX} method, but before calling
+     * the method {@code updateRow}, then the
      * updates made to the row are lost.  Calling the method
-     * <code>refreshRow</code> frequently will likely slow performance.
+     * {@code refreshRow} frequently will likely slow performance.
      *
      * @throws SQLException if (1) a database access error occurs,
      *            (2) this method is called when the cursor is
@@ -3076,12 +3076,12 @@
 
     /**
      * Cancels the updates made to the current row in this
-     * <code>ResultSet</code> object and notifies listeners that a row
+     * {@code ResultSet} object and notifies listeners that a row
      * has changed. This method may be called after calling an
-     * <code>updateXXX</code> method(s) and before calling
-     * the method <code>updateRow</code> to roll back
+     * {@code updateXXX} method(s) and before calling
+     * the method {@code updateRow} to roll back
      * the updates made to a row.  If no updates have been made or
-     * <code>updateRow</code> has already been called, this method has no
+     * {@code updateRow} has already been called, this method has no
      * effect.
      *
      * @throws SQLException if (1) a database access error occurs,
@@ -3104,19 +3104,19 @@
      *
      * The insert row is a special row associated with an updatable
      * result set.  It is essentially a buffer where a new row may
-     * be constructed by calling the <code>updateXXX</code> methods prior to
+     * be constructed by calling the {@code updateXXX} methods prior to
      * inserting the row into the result set.
      *
-     * Only the <code>updateXXX</code>, <code>getXXX</code>,
-     * and <code>insertRow</code> methods may be
+     * Only the {@code updateXXX}, {@code getXXX},
+     * and {@code insertRow} methods may be
      * called when the cursor is on the insert row.  All of the columns in
      * a result set must be given a value each time this method is
-     * called before calling <code>insertRow</code>.
-     * An <code>updateXXX</code> method must be called before a
-     * <code>getXXX</code> method can be called on a column value.
+     * called before calling {@code insertRow}.
+     * An {@code updateXXX} method must be called before a
+     * {@code getXXX} method can be called on a column value.
      *
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) this rowset's <code>ResultSet</code> object is
+     *            (2) this rowset's {@code ResultSet} object is
      *             not updatable, or (3) this rowset does not
      *             currently have a valid connection, prepared statement,
      *             and result set
@@ -3134,7 +3134,7 @@
      * the insert row.
      *
      * @throws SQLException if (1) a database access error occurs,
-     *            (2) this rowset's <code>ResultSet</code> object is
+     *            (2) this rowset's {@code ResultSet} object is
      *             not updatable, or (3) this rowset does not
      *             currently have a valid connection, prepared statement,
      *             and result set
@@ -3146,14 +3146,14 @@
     }
 
     /**
-     * Returns the <code>Statement</code> object that produced this
-     * <code>ResultSet</code> object.
+     * Returns the {@code Statement} object that produced this
+     * {@code ResultSet} object.
      * If the result set was generated some other way, such as by a
-     * <code>DatabaseMetaData</code> method, this method returns
-     * <code>null</code>.
-     *
-     * @return the <code>Statement</code> object that produced
-     * this rowset's <code>ResultSet</code> object or <code>null</code>
+     * {@code DatabaseMetaData} method, this method returns
+     * {@code null}.
+     *
+     * @return the {@code Statement} object that produced
+     * this rowset's {@code ResultSet} object or {@code null}
      * if the result set was produced some other way
      * @throws SQLException if a database access error occurs
      */
@@ -3169,16 +3169,16 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as an <code>Object</code>.
-     * This method uses the given <code>Map</code> object
+     * of this rowset's {@code ResultSet} object as an {@code Object}.
+     * This method uses the given {@code Map} object
      * for the custom mapping of the
      * SQL structured or distinct type that is being retrieved.
      *
      * @param i the first column is 1, the second is 2, and so on
-     * @param map a <code>java.util.Map</code> object that contains the mapping
-     * from SQL type names to classes in the Java programming language
-     * @return an <code>Object</code> in the Java programming language
-     * representing the SQL value
+     * @param map a {@code java.util.Map} object that contains the mapping
+     *        from SQL type names to classes in the Java programming language
+     * @return an {@code Object} in the Java programming language
+     *         representing the SQL value
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -3193,10 +3193,10 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>Ref</code> object.
+     * of this rowset's {@code ResultSet} object as a {@code Ref} object.
      *
      * @param i the first column is 1, the second is 2, and so on
-     * @return a <code>Ref</code> object representing an SQL <code>REF</code> value
+     * @return a {@code Ref} object representing an SQL {@code REF} value
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -3210,10 +3210,10 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>Blob</code> object.
+     * of this rowset's {@code ResultSet} object as a {@code Blob} object.
      *
      * @param i the first column is 1, the second is 2, and so on
-     * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
+     * @return a {@code Blob} object representing the SQL {@code BLOB}
      *         value in the specified column
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
@@ -3227,10 +3227,10 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>Clob</code> object.
+     * of this rowset's {@code ResultSet} object as a {@code Clob} object.
      *
      * @param i the first column is 1, the second is 2, and so on
-     * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
+     * @return a {@code Clob} object representing the SQL {@code CLOB}
      *         value in the specified column
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
@@ -3244,10 +3244,10 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as an <code>Array</code> object.
+     * of this rowset's {@code ResultSet} object as an {@code Array} object.
      *
      * @param i the first column is 1, the second is 2, and so on.
-     * @return an <code>Array</code> object representing the SQL <code>ARRAY</code>
+     * @return an {@code Array} object representing the SQL {@code ARRAY}
      *         value in the specified column
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
@@ -3261,14 +3261,14 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as an <code>Object</code>.
-     * This method uses the specified <code>Map</code> object for
+     * of this rowset's {@code ResultSet} object as an {@code Object}.
+     * This method uses the specified {@code Map} object for
      * custom mapping if appropriate.
      *
      * @param colName the name of the column from which to retrieve the value
-     * @param map a <code>java.util.Map</code> object that contains the mapping
+     * @param map a {@code java.util.Map} object that contains the mapping
      * from SQL type names to classes in the Java programming language
-     * @return an <code>Object</code> representing the SQL
+     * @return an {@code Object} representing the SQL
      *         value in the specified column
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
@@ -3282,10 +3282,10 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>Ref</code> object.
+     * of this rowset's {@code ResultSet} object as a {@code Ref} object.
      *
      * @param colName the column name
-     * @return a <code>Ref</code> object representing the SQL <code>REF</code> value in
+     * @return a {@code Ref} object representing the SQL {@code REF} value in
      *         the specified column
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
@@ -3297,10 +3297,10 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>Blob</code> object.
+     * of this rowset's {@code ResultSet} object as a {@code Blob} object.
      *
      * @param colName the name of the column from which to retrieve the value
-     * @return a <code>Blob</code> object representing the SQL <code>BLOB</code>
+     * @return a {@code Blob} object representing the SQL {@code BLOB}
      *         value in the specified column
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
@@ -3312,10 +3312,10 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>Clob</code> object.
+     * of this rowset's {@code ResultSet} object as a {@code Clob} object.
      *
      * @param colName the name of the column from which to retrieve the value
-     * @return a <code>Clob</code> object representing the SQL <code>CLOB</code>
+     * @return a {@code Clob} object representing the SQL {@code CLOB}
      *         value in the specified column
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
@@ -3327,10 +3327,10 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as an <code>Array</code> object.
+     * of this rowset's {@code ResultSet} object as an {@code Array} object.
      *
      * @param colName the name of the column from which to retrieve the value
-     * @return an <code>Array</code> object representing the SQL <code>ARRAY</code>
+     * @return an {@code Array} object representing the SQL {@code ARRAY}
      *         value in the specified column
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
@@ -3342,17 +3342,17 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Date</code>
+     * of this rowset's {@code ResultSet} object as a {@code java.sql.Date}
      * object. This method uses the given calendar to construct an appropriate
      * millisecond value for the date if the underlying database does not store
      * timezone information.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @param cal the <code>java.util.Calendar</code> object
+     * @param cal the {@code java.util.Calendar} object
      *        to use in constructing the date
-     * @return the column value as a <code>java.sql.Date</code> object;
-     *         if the value is SQL <code>NULL</code>,
-     *         the value returned is <code>null</code>
+     * @return the column value as a {@code java.sql.Date} object;
+     *         if the value is SQL {@code NULL},
+     *         the value returned is {@code null}
      * @throws SQLException if (1) a database access error occurs
      *            or (2) this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -3365,17 +3365,17 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Date</code>
+     * of this rowset's {@code ResultSet} object as a {@code java.sql.Date}
      * object. This method uses the given calendar to construct an appropriate
      * millisecond value for the date if the underlying database does not store
      * timezone information.
      *
      * @param columnName the SQL name of the column from which to retrieve the value
-     * @param cal the <code>java.util.Calendar</code> object
+     * @param cal the {@code java.util.Calendar} object
      *        to use in constructing the date
-     * @return the column value as a <code>java.sql.Date</code> object;
-     *         if the value is SQL <code>NULL</code>,
-     *         the value returned is <code>null</code>
+     * @return the column value as a {@code java.sql.Date} object;
+     *         if the value is SQL {@code NULL},
+     *         the value returned is {@code null}
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -3387,17 +3387,17 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Time</code>
+     * of this rowset's {@code ResultSet} object as a {@code java.sql.Time}
      * object. This method uses the given calendar to construct an appropriate
      * millisecond value for the date if the underlying database does not store
      * timezone information.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @param cal the <code>java.util.Calendar</code> object
+     * @param cal the {@code java.util.Calendar} object
      *        to use in constructing the time
-     * @return the column value as a <code>java.sql.Time</code> object;
-     *         if the value is SQL <code>NULL</code>,
-     *         the value returned is <code>null</code> in the Java programming language
+     * @return the column value as a {@code java.sql.Time} object;
+     *         if the value is SQL {@code NULL},
+     *         the value returned is {@code null} in the Java programming language
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -3410,17 +3410,17 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a <code>java.sql.Time</code>
+     * of this rowset's {@code ResultSet} object as a {@code java.sql.Time}
      * object. This method uses the given calendar to construct an appropriate
      * millisecond value for the date if the underlying database does not store
      * timezone information.
      *
      * @param columnName the SQL name of the column
-     * @param cal the <code>java.util.Calendar</code> object
+     * @param cal the {@code java.util.Calendar} object
      *        to use in constructing the time
-     * @return the column value as a <code>java.sql.Time</code> object;
-     *         if the value is SQL <code>NULL</code>,
-     *         the value returned is <code>null</code> in the Java programming language
+     * @return the column value as a {@code java.sql.Time} object;
+     *         if the value is SQL {@code NULL},
+     *         the value returned is {@code null} in the Java programming language
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -3431,18 +3431,18 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a
-     * <code>java.sql.Timestamp</code> object.
+     * of this rowset's {@code ResultSet} object as a
+     * {@code java.sql.Timestamp} object.
      * This method uses the given calendar to construct an appropriate millisecond
      * value for the timestamp if the underlying database does not store
      * timezone information.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on
-     * @param cal the <code>java.util.Calendar</code> object
+     * @param cal the {@code java.util.Calendar} object
      *        to use in constructing the timestamp
-     * @return the column value as a <code>java.sql.Timestamp</code> object;
-     *         if the value is SQL <code>NULL</code>,
-     *         the value returned is <code>null</code>
+     * @return the column value as a {@code java.sql.Timestamp} object;
+     *         if the value is SQL {@code NULL},
+     *         the value returned is {@code null}
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -3455,18 +3455,18 @@
 
     /**
      * Returns the value of the designated column in the current row
-     * of this rowset's <code>ResultSet</code> object as a
-     * <code>java.sql.Timestamp</code> object.
+     * of this rowset's {@code ResultSet} object as a
+     * {@code java.sql.Timestamp} object.
      * This method uses the given calendar to construct an appropriate millisecond
      * value for the timestamp if the underlying database does not store
      * timezone information.
      *
      * @param columnName the SQL name of the column
-     * @param cal the <code>java.util.Calendar</code> object
+     * @param cal the {@code java.util.Calendar} object
      *        to use in constructing the timestamp
-     * @return the column value as a <code>java.sql.Timestamp</code> object;
-     *         if the value is SQL <code>NULL</code>,
-     *         the value returned is <code>null</code>
+     * @return the column value as a {@code java.sql.Timestamp} object;
+     *         if the value is SQL {@code NULL},
+     *         the value returned is {@code null}
      * @throws SQLException if a database access error occurs
      *            or this rowset does not currently have a valid connection,
      *            prepared statement, and result set
@@ -3478,8 +3478,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>JdbcRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code JdbcRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3490,14 +3490,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param ref the new <code>Ref</code> column value
+     * @param ref the new {@code Ref} column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateRef(int columnIndex, java.sql.Ref ref)
         throws SQLException {
@@ -3507,8 +3507,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>JdbcRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code JdbcRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3519,13 +3519,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param ref the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateRef(String columnName, java.sql.Ref ref)
         throws SQLException {
@@ -3534,8 +3534,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>JdbcRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code JdbcRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3546,14 +3546,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param c the new column <code>Clob</code> value
+     * @param c the new column {@code Clob} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateClob(int columnIndex, Clob c) throws SQLException {
         checkState();
@@ -3563,8 +3563,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>JdbcRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code JdbcRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3575,13 +3575,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param c the new column <code>Clob</code> value
+     * @param c the new column {@code Clob} value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateClob(String columnName, Clob c) throws SQLException {
         updateClob(findColumn(columnName), c);
@@ -3589,8 +3589,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>JdbcRowSetImpl</code> object with the given
-     * <code>java.sql.Blob</code> value.
+     * row of this {@code JdbcRowSetImpl} object with the given
+     * {@code java.sql.Blob} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3601,14 +3601,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param b the new column <code>Blob</code> value
+     * @param b the new column {@code Blob} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBlob(int columnIndex, Blob b) throws SQLException {
         checkState();
@@ -3617,8 +3617,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>JdbcRowSetImpl</code> object with the given
-     * <code>java.sql.Blob </code> value.
+     * row of this {@code JdbcRowSetImpl} object with the given
+     * {@code java.sql.Blob } value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3629,13 +3629,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param b the new column <code>Blob</code> value
+     * @param b the new column {@code Blob} value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBlob(String columnName, Blob b) throws SQLException {
         updateBlob(findColumn(columnName), b);
@@ -3643,8 +3643,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>JdbcRowSetImpl</code> object with the given
-     * <code>java.sql.Array</code> values.
+     * row of this {@code JdbcRowSetImpl} object with the given
+     * {@code java.sql.Array} values.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3655,14 +3655,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param a the new column <code>Array</code> value
+     * @param a the new column {@code Array} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateArray(int columnIndex, Array a) throws SQLException {
         checkState();
@@ -3671,8 +3671,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>JdbcRowSetImpl</code> object with the given
-     * <code>java.sql.Array</code> value.
+     * row of this {@code JdbcRowSetImpl} object with the given
+     * {@code java.sql.Array} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3683,20 +3683,20 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param a the new column <code>Array</code> value
+     * @param a the new column {@code Array} value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateArray(String columnName, Array a) throws SQLException {
         updateArray(findColumn(columnName), a);
     }
 
     /**
-     * Provide interface coverage for getURL(int) in ResultSet->RowSet
+     * Provide interface coverage for getURL(int) in {@code ResultSet->RowSet}
      */
     public java.net.URL getURL(int columnIndex) throws SQLException {
         checkState();
@@ -3704,7 +3704,7 @@
     }
 
     /**
-     * Provide interface coverage for getURL(String) in ResultSet->RowSet
+     * Provide interface coverage for getURL(String) in {@code ResultSet->RowSet}
      */
     public java.net.URL getURL(String columnName) throws SQLException {
         return getURL(findColumn(columnName));
@@ -3712,14 +3712,14 @@
 
     /**
      * Return the RowSetWarning object for the current row of a
-     * <code>JdbcRowSetImpl</code>
+     * {@code JdbcRowSetImpl}
      */
     public RowSetWarning getRowSetWarnings() throws SQLException {
        return null;
     }
     /**
      * Unsets the designated parameter to the given int array.
-     * This was set using <code>setMatchColumn</code>
+     * This was set using {@code setMatchColumn}
      * as the column which will form the basis of the join.
      * <P>
      * The parameter value unset by this method should be same
@@ -3728,8 +3728,8 @@
      * @param columnIdxes the index into this rowset
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
-     *  parameter index is out of bounds or if the columnIdx is
-     *  not the same as set using <code>setMatchColumn(int [])</code>
+     *         parameter index is out of bounds or if the columnIdx is
+     *         not the same as set using {@code setMatchColumn(int [])}
      */
     public void unsetMatchColumn(int[] columnIdxes) throws SQLException {
 
@@ -3748,7 +3748,7 @@
 
    /**
      * Unsets the designated parameter to the given String array.
-     * This was set using <code>setMatchColumn</code>
+     * This was set using {@code setMatchColumn}
      * as the column which will form the basis of the join.
      * <P>
      * The parameter value unset by this method should be same
@@ -3757,8 +3757,8 @@
      * @param columnIdxes the index into this rowset
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
-     *  parameter index is out of bounds or if the columnName is
-     *  not the same as set using <code>setMatchColumn(String [])</code>
+     *         parameter index is out of bounds or if the columnName is
+     *         not the same as set using {@code setMatchColumn(String [])}
      */
     public void unsetMatchColumn(String[] columnIdxes) throws SQLException {
 
@@ -3774,11 +3774,11 @@
     }
 
     /**
-     * Retrieves the column name as <code>String</code> array
-     * that was set using <code>setMatchColumn(String [])</code>
+     * Retrieves the column name as {@code String} array
+     * that was set using {@code setMatchColumn(String [])}
      * for this rowset.
      *
-     * @return a <code>String</code> array object that contains the column names
+     * @return a {@code String} array object that contains the column names
      *         for the rowset which has this the match columns
      *
      * @throws SQLException if an error occurs or column name is not set
@@ -3796,10 +3796,10 @@
     }
 
     /**
-     * Retrieves the column id as <code>int</code> array that was set using
-     * <code>setMatchColumn(int [])</code> for this rowset.
-     *
-     * @return a <code>int</code> array object that contains the column ids
+     * Retrieves the column id as {@code int} array that was set using
+     * {@code setMatchColumn(int [])} for this rowset.
+     *
+     * @return a {@code int} array object that contains the column ids
      *         for the rowset which has this as the match columns.
      *
      * @throws SQLException if an error occurs or column index is not set
@@ -3829,19 +3829,19 @@
     /**
      * Sets the designated parameter to the given int array.
      * This forms the basis of the join for the
-     * <code>JoinRowSet</code> as the column which will form the basis of the
+     * {@code JoinRowSet} as the column which will form the basis of the
      * join.
      * <P>
      * The parameter value set by this method is stored internally and
      * will be supplied as the appropriate parameter in this rowset's
-     * command when the method <code>getMatchColumnIndexes</code> is called.
+     * command when the method {@code getMatchColumnIndexes} is called.
      *
      * @param columnIdxes the indexes into this rowset
      *        object's internal representation of parameter values; the
      *        first parameter is 0, the second is 1, and so on; must be
-     *        <code>0</code> or greater
+     *        {@code 0} or greater
      * @throws SQLException if an error occurs or the
-     *                         parameter index is out of bounds
+     *         parameter index is out of bounds
      */
     public void setMatchColumn(int[] columnIdxes) throws SQLException {
 
@@ -3858,17 +3858,17 @@
     /**
      * Sets the designated parameter to the given String array.
      *  This forms the basis of the join for the
-     * <code>JoinRowSet</code> as the column which will form the basis of the
+     * {@code JoinRowSet} as the column which will form the basis of the
      * join.
      * <P>
      * The parameter value set by this method is stored internally and
      * will be supplied as the appropriate parameter in this rowset's
-     * command when the method <code>getMatchColumn</code> is called.
+     * command when the method {@code getMatchColumn} is called.
      *
      * @param columnNames the name of the column into this rowset
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
-     *  parameter index is out of bounds
+     *         parameter index is out of bounds
      */
     public void setMatchColumn(String[] columnNames) throws SQLException {
 
@@ -3883,22 +3883,22 @@
     }
 
 
-        /**
-     * Sets the designated parameter to the given <code>int</code>
+    /**
+     * Sets the designated parameter to the given {@code int}
      * object.  This forms the basis of the join for the
-     * <code>JoinRowSet</code> as the column which will form the basis of the
+     * {@code JoinRowSet} as the column which will form the basis of the
      * join.
      * <P>
      * The parameter value set by this method is stored internally and
      * will be supplied as the appropriate parameter in this rowset's
-     * command when the method <code>getMatchColumn</code> is called.
+     * command when the method {@code getMatchColumn} is called.
      *
      * @param columnIdx the index into this rowset
      *        object's internal representation of parameter values; the
      *        first parameter is 0, the second is 1, and so on; must be
-     *        <code>0</code> or greater
+     *        {@code 0} or greater
      * @throws SQLException if an error occurs or the
-     *                         parameter index is out of bounds
+     *         parameter index is out of bounds
      */
     public void setMatchColumn(int columnIdx) throws SQLException {
         // validate, if col is ok to be set
@@ -3912,19 +3912,19 @@
     }
 
     /**
-     * Sets the designated parameter to the given <code>String</code>
+     * Sets the designated parameter to the given {@code String}
      * object.  This forms the basis of the join for the
-     * <code>JoinRowSet</code> as the column which will form the basis of the
+     * {@code JoinRowSet} as the column which will form the basis of the
      * join.
      * <P>
      * The parameter value set by this method is stored internally and
      * will be supplied as the appropriate parameter in this rowset's
-     * command when the method <code>getMatchColumn</code> is called.
+     * command when the method {@code getMatchColumn} is called.
      *
      * @param columnName the name of the column into this rowset
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
-     *  parameter index is out of bounds
+     *         parameter index is out of bounds
      */
     public void setMatchColumn(String columnName) throws SQLException {
         // validate, if col is ok to be set
@@ -3938,8 +3938,8 @@
     }
 
     /**
-     * Unsets the designated parameter to the given <code>int</code>
-     * object.  This was set using <code>setMatchColumn</code>
+     * Unsets the designated parameter to the given {@code int}
+     * object.  This was set using {@code setMatchColumn}
      * as the column which will form the basis of the join.
      * <P>
      * The parameter value unset by this method should be same
@@ -3948,8 +3948,8 @@
      * @param columnIdx the index into this rowset
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
-     *  parameter index is out of bounds or if the columnIdx is
-     *  not the same as set using <code>setMatchColumn(int)</code>
+     *         parameter index is out of bounds or if the columnIdx is
+     *         not the same as set using {@code setMatchColumn(int)}
      */
     public void unsetMatchColumn(int columnIdx) throws SQLException {
         // check if we are unsetting the SAME column
@@ -3964,8 +3964,8 @@
     }
 
     /**
-     * Unsets the designated parameter to the given <code>String</code>
-     * object.  This was set using <code>setMatchColumn</code>
+     * Unsets the designated parameter to the given {@code String}
+     * object.  This was set using {@code setMatchColumn}
      * as the column which will form the basis of the join.
      * <P>
      * The parameter value unset by this method should be same
@@ -3974,8 +3974,8 @@
      * @param columnName the index into this rowset
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
-     *  parameter index is out of bounds or if the columnName is
-     *  not the same as set using <code>setMatchColumn(String)</code>
+     *         parameter index is out of bounds or if the columnName is
+     *         not the same as set using {@code setMatchColumn(String)}
      *
      */
     public void unsetMatchColumn(String columnName) throws SQLException {
@@ -3992,12 +3992,12 @@
     }
 
     /**
-     * Retrieves the <code>DatabaseMetaData</code> associated with
+     * Retrieves the {@code DatabaseMetaData} associated with
      * the connection handle associated with this
-     * <code>JdbcRowSet</code> object.
-     *
-     * @return the <code>DatabaseMetadata</code> associated
-     *  with the rowset's connection.
+     * {@code JdbcRowSet} object.
+     *
+     * @return the {@code DatabaseMetadata} associated
+     *         with the rowset's connection.
      * @throws SQLException if a database access error occurs
      */
     public DatabaseMetaData getDatabaseMetaData() throws SQLException {
@@ -4006,12 +4006,12 @@
     }
 
     /**
-     * Retrieves the <code>ParameterMetaData</code> associated with
+     * Retrieves the {@code ParameterMetaData} associated with
      * the connection handle associated with this
-     * <code>JdbcRowSet</code> object.
-     *
-     * @return the <code>ParameterMetadata</code> associated
-     *  with the rowset's connection.
+     * {@code JdbcRowSet} object.
+     *
+     * @return the {@code ParameterMetadata} associated
+     *         with the rowset's connection.
      * @throws SQLException if a database access error occurs
      */
     public ParameterMetaData getParameterMetaData() throws SQLException {
@@ -4020,18 +4020,18 @@
     }
 
     /**
-     * Commits all updates in this <code>JdbcRowSet</code> object by
-     * wrapping the internal <code>Connection</code> object and calling
-     * its <code>commit</code> method.
-     * This method sets this <code>JdbcRowSet</code> object's private field
-     * <code>rs</code> to <code>null</code> after saving its value to another
-     * object, but only if the <code>ResultSet</code>
-     * constant <code>HOLD_CURSORS_OVER_COMMIT</code> has not been set.
-     * (The field <code>rs</code> is this <code>JdbcRowSet</code> object's
-     * <code>ResultSet</code> object.)
+     * Commits all updates in this {@code JdbcRowSet} object by
+     * wrapping the internal {@code Connection} object and calling
+     * its {@code commit} method.
+     * This method sets this {@code JdbcRowSet} object's private field
+     * {@code rs} to {@code null} after saving its value to another
+     * object, but only if the {@code ResultSet}
+     * constant {@code HOLD_CURSORS_OVER_COMMIT} has not been set.
+     * (The field {@code rs} is this {@code JdbcRowSet} object's
+     * {@code ResultSet} object.)
      *
      * @throws SQLException if autoCommit is set to true or if a database
-     * access error occurs
+     *         access error occurs
      */
     public void commit() throws SQLException {
       conn.commit();
@@ -4045,8 +4045,8 @@
     }
 
     /**
-     * Sets auto-commit on the internal <code>Connection</code> object with this
-     * <code>JdbcRowSet</code>
+     * Sets auto-commit on the internal {@code Connection} object with this
+     * {@code JdbcRowSet}
      *
      * @throws SQLException if a database access error occurs
      */
@@ -4074,7 +4074,7 @@
     }
 
     /**
-     * Returns the auto-commit status with this <code>JdbcRowSet</code>.
+     * Returns the auto-commit status with this {@code JdbcRowSet}.
      *
      * @return true if auto commit is true; false otherwise
      * @throws SQLException if a database access error occurs
@@ -4084,16 +4084,16 @@
     }
 
     /**
-     * Rolls back all the updates in this <code>JdbcRowSet</code> object by
-     * wrapping the internal <code>Connection</code> object and calling its
-     * <code>rollback</code> method.
-     * This method sets this <code>JdbcRowSet</code> object's private field
-     * <code>rs</code> to <code>null</code> after saving its value to another object.
-     * (The field <code>rs</code> is this <code>JdbcRowSet</code> object's
-     * internal <code>ResultSet</code> object.)
+     * Rolls back all the updates in this {@code JdbcRowSet} object by
+     * wrapping the internal {@code Connection} object and calling its
+     * {@code rollback} method.
+     * This method sets this {@code JdbcRowSet} object's private field
+     * {@code rs} to {@code null} after saving its value to another object.
+     * (The field {@code rs} is this {@code JdbcRowSet} object's
+     * internal {@code ResultSet} object.)
      *
      * @throws SQLException if autoCommit is set to true or a database
-     * access error occurs
+     *         access error occurs
      */
     public void rollback() throws SQLException {
         conn.rollback();
@@ -4106,14 +4106,14 @@
 
 
     /**
-     * Rollbacks all the updates in the <code>JdbcRowSet</code> back to the
-     * last <code>Savepoint</code> transaction marker. Wraps the internal
-     * <code>Connection</code> object and call it's rollback method
-     *
-     * @param s the <code>Savepoint</code> transaction marker to roll the
-     * transaction to.
+     * Rollbacks all the updates in the {@code JdbcRowSet} back to the
+     * last {@code Savepoint} transaction marker. Wraps the internal
+     * {@code Connection} object and call it's rollback method
+     *
+     * @param s the {@code Savepoint} transaction marker to roll the
+     *        transaction to.
      * @throws SQLException if autoCommit is set to true; or ia a database
-     * access error occurs
+     *         access error occurs
      */
     public void rollback(Savepoint s) throws SQLException {
         conn.rollback(s);
@@ -4144,10 +4144,10 @@
     //  Added as per Rave requirements
 
     /**
-     * Gets this <code>JdbcRowSet</code> object's Connection property
-     *
-     *
-     * @return the <code>Connection</code> object associated with this rowset;
+     * Gets this {@code JdbcRowSet} object's Connection property
+     *
+     *
+     * @return the {@code Connection} object associated with this rowset;
      */
 
     protected Connection getConnection() {
@@ -4158,10 +4158,10 @@
     // Added as per rave requirements
 
     /**
-     * Sets this <code>JdbcRowSet</code> object's connection property
-     * to the given <code>Connection</code> object.
-     *
-     * @param connection the <code>Connection</code> object.
+     * Sets this {@code JdbcRowSet} object's connection property
+     * to the given {@code Connection} object.
+     *
+     * @param connection the {@code Connection} object.
      */
 
     protected void setConnection(Connection connection) {
@@ -4172,10 +4172,10 @@
     // Added as per Rave requirements
 
     /**
-     * Gets this <code>JdbcRowSet</code> object's PreparedStatement property
-     *
-     *
-     * @return the <code>PreparedStatement</code> object associated with this rowset;
+     * Gets this {@code JdbcRowSet} object's PreparedStatement property
+     *
+     *
+     * @return the {@code PreparedStatement} object associated with this rowset;
      */
 
     protected PreparedStatement getPreparedStatement() {
@@ -4186,10 +4186,10 @@
     // Added as per Rave requirements
 
     /**
-     * Sets this <code>JdbcRowSet</code> object's preparedtsatement property
-     * to the given <code>PreparedStatemennt</code> object.
-     *
-     * @param preparedStatement the <code>PreparedStatement</code> object
+     * Sets this {@code JdbcRowSet} object's preparedtsatement property
+     * to the given {@code PreparedStatemennt} object.
+     *
+     * @param preparedStatement the {@code PreparedStatement} object
      *
      */
     protected void setPreparedStatement(PreparedStatement preparedStatement) {
@@ -4200,10 +4200,10 @@
     // Added as per Rave requirements
 
     /**
-     * Gets this <code>JdbcRowSet</code> object's ResultSet property
-     *
-     *
-     * @return the <code>ResultSet</code> object associated with this rowset;
+     * Gets this {@code JdbcRowSet} object's ResultSet property
+     *
+     *
+     * @return the {@code ResultSet} object associated with this rowset;
      */
 
     protected ResultSet getResultSet() throws SQLException {
@@ -4217,10 +4217,10 @@
     // Added as per Rave requirements
 
     /**
-     * Sets this <code>JdbcRowSet</code> object's resultset property
-     * to the given <code>ResultSet</code> object.
-     *
-     * @param resultSet the <code>ResultSet</code> object
+     * Sets this {@code JdbcRowSet} object's resultset property
+     * to the given {@code ResultSet} object.
+     *
+     * @param resultSet the {@code ResultSet} object
      *
      */
     protected void setResultSet(ResultSet resultSet) {
@@ -4228,25 +4228,25 @@
     }
 
     /**
-     * Sets this <code>JdbcRowSet</code> object's <code>command</code> property to
-     * the given <code>String</code> object and clears the parameters, if any,
+     * Sets this {@code JdbcRowSet} object's {@code command} property to
+     * the given {@code String} object and clears the parameters, if any,
      * that were set for the previous command. In addition,
-     * if the <code>command</code> property has previously been set to a
+     * if the {@code command} property has previously been set to a
      * non-null value and it is
-     * different from the <code>String</code> object supplied,
-     * this method sets this <code>JdbcRowSet</code> object's private fields
-     * <code>ps</code> and <code>rs</code> to <code>null</code>.
-     * (The field <code>ps</code> is its <code>PreparedStatement</code> object, and
-     * the field <code>rs</code> is its <code>ResultSet</code> object.)
+     * different from the {@code String} object supplied,
+     * this method sets this {@code JdbcRowSet} object's private fields
+     * {@code ps} and {@code rs} to {@code null}.
+     * (The field {@code ps} is its {@code PreparedStatement} object, and
+     * the field {@code rs} is its {@code ResultSet} object.)
      * <P>
-     * The <code>command</code> property may not be needed if the <code>RowSet</code>
+     * The {@code command} property may not be needed if the {@code RowSet}
      * object gets its data from a source that does not support commands,
      * such as a spreadsheet or other tabular file.
-     * Thus, this property is optional and may be <code>null</code>.
-     *
-     * @param command a <code>String</code> object containing an SQL query
-     *            that will be set as this <code>RowSet</code> object's command
-     *            property; may be <code>null</code> but may not be an empty string
+     * Thus, this property is optional and may be {@code null}.
+     *
+     * @param command a {@code String} object containing an SQL query
+     *            that will be set as this {@code RowSet} object's command
+     *            property; may be {@code null} but may not be an empty string
      * @throws SQLException if an empty string is provided as the command value
      * @see #getCommand
      */
@@ -4265,32 +4265,32 @@
     }
 
     /**
-     * Sets the <code>dataSourceName</code> property for this <code>JdbcRowSet</code>
-     * object to the given logical name and sets this <code>JdbcRowSet</code> object's
-     * Url property to <code>null</code>. In addition, if the <code>dataSourceName</code>
+     * Sets the {@code dataSourceName} property for this {@code JdbcRowSet}
+     * object to the given logical name and sets this {@code JdbcRowSet} object's
+     * Url property to {@code null}. In addition, if the {@code dataSourceName}
      * property has previously been set and is different from the one supplied,
-     * this method sets this <code>JdbcRowSet</code> object's private fields
-     * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
-     * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
-     * the field <code>rs</code> is its <code>ResultSet</code> object, and
-     * the field <code>conn</code> is its <code>Connection</code> object.)
+     * this method sets this {@code JdbcRowSet} object's private fields
+     * {@code ps}, {@code rs}, and {@code conn} to {@code null}.
+     * (The field {@code ps} is its {@code PreparedStatement} object,
+     * the field {@code rs} is its {@code ResultSet} object, and
+     * the field {@code conn} is its {@code Connection} object.)
      * <P>
      * The name supplied to this method must have been bound to a
-     * <code>DataSource</code> object in a JNDI naming service so that an
+     * {@code DataSource} object in a JNDI naming service so that an
      * application can do a lookup using that name to retrieve the
-     * <code>DataSource</code> object bound to it. The <code>DataSource</code>
+     * {@code DataSource} object bound to it. The {@code DataSource}
      * object can then be used to establish a connection to the data source it
      * represents.
      * <P>
      * Users should set either the Url property or the dataSourceName property.
      * If both properties are set, the driver will use the property set most recently.
      *
-     * @param dsName a <code>String</code> object with the name that can be supplied
+     * @param dsName a {@code String} object with the name that can be supplied
      *        to a naming service based on JNDI technology to retrieve the
-     *        <code>DataSource</code> object that can be used to get a connection;
-     *        may be <code>null</code>
+     *        {@code DataSource} object that can be used to get a connection;
+     *        may be {@code null}
      * @throws SQLException if there is a problem setting the
-     *          <code>dataSourceName</code> property
+     *          {@code dataSourceName} property
      * @see #getDataSourceName
      */
     public void setDataSourceName(String dsName) throws SQLException{
@@ -4310,42 +4310,42 @@
 
 
     /**
-     * Sets the Url property for this <code>JdbcRowSet</code> object
-     * to the given <code>String</code> object and sets the dataSource name
-     * property to <code>null</code>. In addition, if the Url property has
-     * previously been set to a non <code>null</code> value and its value
+     * Sets the Url property for this {@code JdbcRowSet} object
+     * to the given {@code String} object and sets the dataSource name
+     * property to {@code null}. In addition, if the Url property has
+     * previously been set to a non {@code null} value and its value
      * is different from the value to be set,
-     * this method sets this <code>JdbcRowSet</code> object's private fields
-     * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
-     * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
-     * the field <code>rs</code> is its <code>ResultSet</code> object, and
-     * the field <code>conn</code> is its <code>Connection</code> object.)
+     * this method sets this {@code JdbcRowSet} object's private fields
+     * {@code ps}, {@code rs}, and {@code conn} to {@code null}.
+     * (The field {@code ps} is its {@code PreparedStatement} object,
+     * the field {@code rs} is its {@code ResultSet} object, and
+     * the field {@code conn} is its {@code Connection} object.)
      * <P>
      * The Url property is a JDBC URL that is used when
      * the connection is created using a JDBC technology-enabled driver
-     * ("JDBC driver") and the <code>DriverManager</code>.
+     * ("JDBC driver") and the {@code DriverManager}.
      * The correct JDBC URL for the specific driver to be used can be found
      * in the driver documentation.  Although there are guidelines for how
      * a JDBC URL is formed,
-     * a driver vendor can specify any <code>String</code> object except
-     * one with a length of <code>0</code> (an empty string).
+     * a driver vendor can specify any {@code String} object except
+     * one with a length of {@code 0} (an empty string).
      * <P>
      * Setting the Url property is optional if connections are established using
-     * a <code>DataSource</code> object instead of the <code>DriverManager</code>.
+     * a {@code DataSource} object instead of the {@code DriverManager}.
      * The driver will use either the URL property or the
      * dataSourceName property to create a connection, whichever was
      * specified most recently. If an application uses a JDBC URL, it
      * must load a JDBC driver that accepts the JDBC URL before it uses the
-     * <code>RowSet</code> object to connect to a database.  The <code>RowSet</code>
+     * {@code RowSet} object to connect to a database.  The {@code RowSet}
      * object will use the URL internally to create a database connection in order
      * to read or write data.
      *
-     * @param url a <code>String</code> object that contains the JDBC URL
+     * @param url a {@code String} object that contains the JDBC URL
      *            that will be used to establish the connection to a database for this
-     *            <code>RowSet</code> object; may be <code>null</code> but must not
+     *            {@code RowSet} object; may be {@code null} but must not
      *            be an empty string
      * @throws SQLException if an error occurs setting the Url property or the
-     *         parameter supplied is a string with a length of <code>0</code> (an
+     *         parameter supplied is a string with a length of {@code 0} (an
      *         empty string)
      * @see #getUrl
      */
@@ -4365,24 +4365,24 @@
        }
     }
 
-     /**
-     * Sets the username property for this <code>JdbcRowSet</code> object
+    /**
+     * Sets the username property for this {@code JdbcRowSet} object
      * to the given user name. Because it
      * is not serialized, the username property is set at run time before
-     * calling the method <code>execute</code>. In addition,
-     * if the <code>username</code> property is already set with a
-     * non-null value and that value is different from the <code>String</code>
+     * calling the method {@code execute}. In addition,
+     * if the {@code username} property is already set with a
+     * non-null value and that value is different from the {@code String}
      * object to be set,
-     * this method sets this <code>JdbcRowSet</code> object's private fields
-     * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
-     * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
-     * <code>rs</code> is its <code>ResultSet</code> object, and
-     * <code>conn</code> is its <code>Connection</code> object.)
-     * Setting these fields to <code>null</code> ensures that only current
+     * this method sets this {@code JdbcRowSet} object's private fields
+     * {@code ps}, {@code rs}, and {@code conn} to {@code null}.
+     * (The field {@code ps} is its {@code PreparedStatement} object,
+     * {@code rs} is its {@code ResultSet} object, and
+     * {@code conn} is its {@code Connection} object.)
+     * Setting these fields to {@code null} ensures that only current
      * values will be used.
      *
-     * @param uname the <code>String</code> object containing the user name that
-     *     is supplied to the data source to create a connection. It may be null.
+     * @param uname the {@code String} object containing the user name that
+     *        is supplied to the data source to create a connection. It may be null.
      * @see #getUsername
      */
     public void setUsername(String uname) {
@@ -4401,23 +4401,23 @@
     }
 
      /**
-     * Sets the password property for this <code>JdbcRowSet</code> object
-     * to the given <code>String</code> object. Because it
+     * Sets the password property for this {@code JdbcRowSet} object
+     * to the given {@code String} object. Because it
      * is not serialized, the password property is set at run time before
-     * calling the method <code>execute</code>. Its default valus is
-     * <code>null</code>. In addition,
-     * if the <code>password</code> property is already set with a
+     * calling the method {@code execute}. Its default valus is
+     * {@code null}. In addition,
+     * if the {@code password} property is already set with a
      * non-null value and that value is different from the one being set,
-     * this method sets this <code>JdbcRowSet</code> object's private fields
-     * <code>ps</code>, <code>rs</code>, and <code>conn</code> to <code>null</code>.
-     * (The field <code>ps</code> is its <code>PreparedStatement</code> object,
-     * <code>rs</code> is its <code>ResultSet</code> object, and
-     * <code>conn</code> is its <code>Connection</code> object.)
-     * Setting these fields to <code>null</code> ensures that only current
+     * this method sets this {@code JdbcRowSet} object's private fields
+     * {@code ps}, {@code rs}, and {@code conn} to {@code null}.
+     * (The field {@code ps} is its {@code PreparedStatement} object,
+     * {@code rs} is its {@code ResultSet} object, and
+     * {@code conn} is its {@code Connection} object.)
+     * Setting these fields to {@code null} ensures that only current
      * values will be used.
      *
-     * @param password the <code>String</code> object that represents the password
-     *     that must be supplied to the database to create a connection
+     * @param password the {@code String} object that represents the password
+     *        that must be supplied to the database to create a connection
      */
     public void setPassword(String password) {
 
@@ -4435,18 +4435,18 @@
     }
 
     /**
-     * Sets the type for this <code>RowSet</code> object to the specified type.
-     * The default type is <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>.
+     * Sets the type for this {@code RowSet} object to the specified type.
+     * The default type is {@code ResultSet.TYPE_SCROLL_INSENSITIVE}.
      *
      * @param type one of the following constants:
-     *             <code>ResultSet.TYPE_FORWARD_ONLY</code>,
-     *             <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
-     *             <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
+     *             {@code ResultSet.TYPE_FORWARD_ONLY},
+     *             {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or
+     *             {@code ResultSet.TYPE_SCROLL_SENSITIVE}
      * @throws SQLException if the parameter supplied is not one of the
      *         following constants:
-     *          <code>ResultSet.TYPE_FORWARD_ONLY</code> or
-     *          <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>
-     *          <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
+     *          {@code ResultSet.TYPE_FORWARD_ONLY} or
+     *          {@code ResultSet.TYPE_SCROLL_INSENSITIVE}
+     *          {@code ResultSet.TYPE_SCROLL_SENSITIVE}
      * @see #getConcurrency
      * @see #getType
      */
@@ -4468,18 +4468,18 @@
     }
 
     /**
-     * Sets the concurrency for this <code>RowSet</code> object to
-     * the specified concurrency. The default concurrency for any <code>RowSet</code>
-     * object (connected or disconnected) is <code>ResultSet.CONCUR_UPDATABLE</code>,
+     * Sets the concurrency for this {@code RowSet} object to
+     * the specified concurrency. The default concurrency for any {@code RowSet}
+     * object (connected or disconnected) is {@code ResultSet.CONCUR_UPDATABLE},
      * but this method may be called at any time to change the concurrency.
      *
      * @param concur one of the following constants:
-     *                    <code>ResultSet.CONCUR_READ_ONLY</code> or
-     *                    <code>ResultSet.CONCUR_UPDATABLE</code>
+     *                    {@code ResultSet.CONCUR_READ_ONLY} or
+     *                    {@code ResultSet.CONCUR_UPDATABLE}
      * @throws SQLException if the parameter supplied is not one of the
      *         following constants:
-     *          <code>ResultSet.CONCUR_UPDATABLE</code> or
-     *          <code>ResultSet.CONCUR_READ_ONLY</code>
+     *          {@code ResultSet.CONCUR_UPDATABLE} or
+     *          {@code ResultSet.CONCUR_READ_ONLY}
      * @see #getConcurrency
      * @see #isReadOnly
      */
@@ -4500,8 +4500,8 @@
     }
 
     /**
-     * Retrieves the value of the designated <code>SQL XML</code> parameter as a
-     * <code>SQLXML</code> object in the Java programming language.
+     * Retrieves the value of the designated {@code SQL XML} parameter as a
+     * {@code SQLXML} object in the Java programming language.
      * @param columnIndex the first column is 1, the second is 2, ...
      * @return a SQLXML object that maps an SQL XML value
      * @throws SQLException if a database access error occurs
@@ -4512,8 +4512,8 @@
     }
 
     /**
-     * Retrieves the value of the designated <code>SQL XML</code> parameter as a
-     * <code>SQLXML</code> object in the Java programming language.
+     * Retrieves the value of the designated {@code SQL XML} parameter as a
+     * {@code SQLXML} object in the Java programming language.
      * @param colName the name of the column from which to retrieve the value
      * @return a SQLXML object that maps an SQL XML value
      * @throws SQLException if a database access error occurs
@@ -4524,12 +4524,12 @@
 
     /**
      * Retrieves the value of the designated column in the current row of this
-     * <code>ResultSet</code> object as a java.sql.RowId object in the Java
+     * {@code ResultSet} object as a java.sql.RowId object in the Java
      * programming language.
      *
      * @param columnIndex the first column is 1, the second 2, ...
-     * @return the column value if the value is a SQL <code>NULL</code> the
-     *     value returned is <code>null</code>
+     * @return the column value if the value is a SQL {@code NULL} the
+     *     value returned is {@code null}
      * @throws SQLException if a database access error occurs
      * @since 1.6
      */
@@ -4539,12 +4539,12 @@
 
     /**
      * Retrieves the value of the designated column in the current row of this
-     * <code>ResultSet</code> object as a java.sql.RowId object in the Java
+     * {@code ResultSet} object as a java.sql.RowId object in the Java
      * programming language.
      *
      * @param columnName the name of the column
-     * @return the column value if the value is a SQL <code>NULL</code> the
-     *     value returned is <code>null</code>
+     * @return the column value if the value is a SQL {@code NULL} the
+     *     value returned is {@code null}
      * @throws SQLException if a database access error occurs
      * @since 1.6
      */
@@ -4553,10 +4553,10 @@
     }
 
     /**
-     * Updates the designated column with a <code>RowId</code> value. The updater
+     * Updates the designated column with a {@code RowId} value. The updater
      * methods are used to update column values in the current row or the insert
      * row. The updater methods do not update the underlying database; instead
-     * the <code>updateRow<code> or <code>insertRow</code> methods are called
+     * the {@code updateRow} or {@code insertRow} methods are called
      * to update the database.
      *
      * @param columnIndex the first column is 1, the second 2, ...
@@ -4569,10 +4569,10 @@
     }
 
     /**
-     * Updates the designated column with a <code>RowId</code> value. The updater
+     * Updates the designated column with a {@code RowId} value. The updater
      * methods are used to update column values in the current row or the insert
      * row. The updater methods do not update the underlying database; instead
-     * the <code>updateRow<code> or <code>insertRow</code> methods are called
+     * the {@code updateRow} or {@code insertRow} methods are called
      * to update the database.
      *
      * @param columnName the name of the column
@@ -4631,8 +4631,8 @@
 
 
     /*o
-     * This method is used for updating SQL <code>NCLOB</code>  type that maps
-     * to <code>java.sql.Types.NCLOB</code>
+     * This method is used for updating SQL {@code NCLOB}  type that maps
+     * to {@code java.sql.Types.NCLOB}
      * @param columnIndex the first column is 1, the second 2, ...
      * @param nClob the value for the column to be updated
      * @throws SQLException if a database access error occurs
@@ -4643,8 +4643,8 @@
     }
 
     /**
-     * This method is used for updating SQL <code>NCLOB</code>  type that maps
-     * to <code>java.sql.Types.NCLOB</code>
+     * This method is used for updating SQL {@code NCLOB}  type that maps
+     * to {@code java.sql.Types.NCLOB}
      * @param columnName name of the column
      * @param nClob the value for the column to be updated
      * @throws SQLException if a database access error occurs
@@ -4656,12 +4656,12 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>ResultSet</code> object as a <code>NClob</code> object
+     * of this {@code ResultSet} object as a {@code NClob} object
      * in the Java programming language.
      *
      * @param i the first column is 1, the second is 2, ...
-     * @return a <code>NClob</code> object representing the SQL
-     *         <code>NCLOB</code> value in the specified column
+     * @return a {@code NClob} object representing the SQL
+     *         {@code NCLOB} value in the specified column
      * @exception SQLException if a database access error occurs
      * @since 1.6
      */
@@ -4672,11 +4672,11 @@
 
   /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>ResultSet</code> object as a <code>NClob</code> object
+     * of this {@code ResultSet} object as a {@code NClob} object
      * in the Java programming language.
      *
      * @param colName the name of the column from which to retrieve the value
-     * @return a <code>NClob</code> object representing the SQL <code>NCLOB</code>
+     * @return a {@code NClob} object representing the SQL {@code NCLOB}
      * value in the specified column
      * @exception SQLException if a database access error occurs
      * @since 1.6
@@ -4694,10 +4694,10 @@
     }
 
     /**
-      * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
-      * SQL <code>XML</code> value when it sends it to the database.
+      * Sets the designated parameter to the given {@code java.sql.SQLXML} object. The driver converts this to an
+      * SQL {@code XML} value when it sends it to the database.
       * @param parameterIndex index of the first parameter is 1, the second is 2, ...
-      * @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value
+      * @param xmlObject a {@code SQLXML} object that maps an SQL {@code XML} value
       * @throws SQLException if a database access error occurs
       * @since 1.6
       */
@@ -4706,10 +4706,10 @@
      }
 
     /**
-     * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
-     * <code>SQL XML</code> value when it sends it to the database.
+     * Sets the designated parameter to the given {@code java.sql.SQLXML} object. The driver converts this to an
+     * {@code SQL XML} value when it sends it to the database.
      * @param parameterName the name of the parameter
-     * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
+     * @param xmlObject a {@code SQLXML} object that maps an {@code SQL XML} value
      * @throws SQLException if a database access error occurs
      * @since 1.6
      */
@@ -4718,8 +4718,8 @@
      }
 
     /**
-     * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
-     * driver converts this to a SQL <code>ROWID</code> value when it sends it
+     * Sets the designated parameter to the given {@code java.sql.RowId} object. The
+     * driver converts this to a SQL {@code ROWID} value when it sends it
      * to the database
      *
      * @param parameterIndex the first parameter is 1, the second is 2, ...
@@ -4732,9 +4732,9 @@
          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
      }
 
-    /**
-    * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
-    * driver converts this to a SQL <code>ROWID</code> when it sends it to the
+   /**
+    * Sets the designated parameter to the given {@code java.sql.RowId} object. The
+    * driver converts this to a SQL {@code ROWID} when it sends it to the
     * database.
     *
     * @param parameterName the name of the parameter
@@ -4748,18 +4748,18 @@
 
 
    /**
-     * Sets the designated parameter to the given <code>String</code> object.
-     * The driver converts this to a SQL <code>NCHAR</code> or
-     * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
+     * Sets the designated parameter to the given {@code String} object.
+     * The driver converts this to a SQL {@code NCHAR} or
+     * {@code NVARCHAR} or {@code LONGNVARCHAR} value
      * (depending on the argument's
-     * size relative to the driver's limits on <code>NVARCHAR</code> values)
+     * size relative to the driver's limits on {@code NVARCHAR} values)
      * when it sends it to the database.
      *
      * @param parameterIndex of the first parameter is 1, the second is 2, ...
      * @param value the parameter value
      * @throws SQLException if the driver does not support national
      *         character sets;  if the driver can detect that a data conversion
-     *  error could occur ; or if a database access error occurs
+     *         error could occur ; or if a database access error occurs
      * @since 1.6
      */
      public void setNString(int parameterIndex, String value) throws SQLException {
@@ -4768,9 +4768,9 @@
 
 
    /**
-    * Sets the designated parameter in this <code>RowSet</code> object's command
-    * to a <code>Reader</code> object. The
-    * <code>Reader</code> reads the data till end-of-file is reached. The
+    * Sets the designated parameter in this {@code RowSet} object's command
+    * to a {@code Reader} object. The
+    * {@code Reader} reads the data till end-of-file is reached. The
     * driver does the necessary conversion from Java character format to
     * the national character set in the database.
 
@@ -4779,14 +4779,14 @@
     * standard interface.
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
     * it might be more efficient to use a version of
-    * <code>setNCharacterStream</code> which takes a length parameter.
+    * {@code setNCharacterStream} which takes a length parameter.
     *
     * @param parameterIndex of the first parameter is 1, the second is 2, ...
     * @param value the parameter value
     * @throws SQLException if the driver does not support national
     *         character sets;  if the driver can detect that a data conversion
-    *  error could occur ; if a database access error occurs; or
-    * this method is called on a closed <code>PreparedStatement</code>
+    *         error could occur ; if a database access error occurs; or
+    *         this method is called on a closed {@code PreparedStatement}
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     * @since 1.6
     */
@@ -4795,14 +4795,14 @@
     }
 
   /**
-    * Sets the designated parameter to a <code>java.sql.NClob</code> object. The object
-    * implements the <code>java.sql.NClob</code> interface. This <code>NClob</code>
-    * object maps to a SQL <code>NCLOB</code>.
+    * Sets the designated parameter to a {@code java.sql.NClob} object. The object
+    * implements the {@code java.sql.NClob} interface. This {@code NClob}
+    * object maps to a SQL {@code NCLOB}.
     * @param parameterName the name of the column to be set
     * @param value the parameter value
     * @throws SQLException if the driver does not support national
     *         character sets;  if the driver can detect that a data conversion
-    *  error could occur; or if a database access error occurs
+    *         error could occur; or if a database access error occurs
     * @since 1.6
     */
     public void setNClob(String parameterName, NClob value) throws SQLException {
@@ -4810,17 +4810,17 @@
      }
 
 
-  /**
+    /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>ResultSet</code> object as a
-     * <code>java.io.Reader</code> object.
+     * of this {@code ResultSet} object as a
+     * {@code java.io.Reader} object.
      * It is intended for use when
-     * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
-     * and <code>LONGNVARCHAR</code> columns.
-     *
-     * @return a <code>java.io.Reader</code> object that contains the column
-     * value; if the value is SQL <code>NULL</code>, the value returned is
-     * <code>null</code> in the Java programming language.
+     * accessing  {@code NCHAR},{@code NVARCHAR}
+     * and {@code LONGNVARCHAR} columns.
+     *
+     * @return a {@code java.io.Reader} object that contains the column
+     * value; if the value is SQL {@code NULL}, the value returned is
+     * {@code null} in the Java programming language.
      * @param columnIndex the first column is 1, the second is 2, ...
      * @exception SQLException if a database access error occurs
      * @since 1.6
@@ -4832,16 +4832,16 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>ResultSet</code> object as a
-     * <code>java.io.Reader</code> object.
+     * of this {@code ResultSet} object as a
+     * {@code java.io.Reader} object.
      * It is intended for use when
-     * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
-     * and <code>LONGNVARCHAR</code> columns.
+     * accessing  {@code NCHAR},{@code NVARCHAR}
+     * and {@code LONGNVARCHAR} columns.
      *
      * @param columnName the name of the column
-     * @return a <code>java.io.Reader</code> object that contains the column
-     * value; if the value is SQL <code>NULL</code>, the value returned is
-     * <code>null</code> in the Java programming language
+     * @return a {@code java.io.Reader} object that contains the column
+     * value; if the value is SQL {@code NULL}, the value returned is
+     * {@code null} in the Java programming language
      * @exception SQLException if a database access error occurs
      * @since 1.6
      */
@@ -4850,11 +4850,11 @@
      }
 
     /**
-     * Updates the designated column with a <code>java.sql.SQLXML</code> value.
+     * Updates the designated column with a {@code java.sql.SQLXML} value.
      * The updater
      * methods are used to update column values in the current row or the insert
      * row. The updater methods do not update the underlying database; instead
-     * the <code>updateRow</code> or <code>insertRow</code> methods are called
+     * the {@code updateRow} or {@code insertRow} methods are called
      * to update the database.
      * @param columnIndex the first column is 1, the second 2, ...
      * @param xmlObject the value for the column to be updated
@@ -4866,11 +4866,11 @@
     }
 
     /**
-     * Updates the designated column with a <code>java.sql.SQLXML</code> value.
+     * Updates the designated column with a {@code java.sql.SQLXML} value.
      * The updater
      * methods are used to update column values in the current row or the insert
      * row. The updater methods do not update the underlying database; instead
-     * the <code>updateRow</code> or <code>insertRow</code> methods are called
+     * the {@code updateRow} or {@code insertRow} methods are called
      * to update the database.
      *
      * @param columnName the name of the column
@@ -4884,15 +4884,15 @@
 
      /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>ResultSet</code> object as
-     * a <code>String</code> in the Java programming language.
+     * of this {@code ResultSet} object as
+     * a {@code String} in the Java programming language.
      * It is intended for use when
-     * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
-     * and <code>LONGNVARCHAR</code> columns.
+     * accessing  {@code NCHAR},{@code NVARCHAR}
+     * and {@code LONGNVARCHAR} columns.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     * value returned is {@code null}
      * @exception SQLException if a database access error occurs
      * @since 1.6
      */
@@ -4902,15 +4902,15 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>ResultSet</code> object as
-     * a <code>String</code> in the Java programming language.
+     * of this {@code ResultSet} object as
+     * a {@code String} in the Java programming language.
      * It is intended for use when
-     * accessing  <code>NCHAR</code>,<code>NVARCHAR</code>
-     * and <code>LONGNVARCHAR</code> columns.
+     * accessing  {@code NCHAR},{@code NVARCHAR}
+     * and {@code LONGNVARCHAR} columns.
      *
      * @param columnName the SQL name of the column
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     * value returned is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     * value returned is {@code null}
      * @exception SQLException if a database access error occurs
      * @since 1.6
      */
@@ -4927,9 +4927,9 @@
        * the insert row. The updater methods do not update the underlying database;
        * instead the updateRow or insertRow methods are called to update the database.
        *
-       * @param columnIndex - the first column is 1, the second is 2, ...
-       * @param x - the new column value
-       * @param length - the length of the stream
+       * @param columnIndex the first column is 1, the second is 2, ...
+       * @param x the new column value
+       * @param length the length of the stream
        * @exception SQLException if a database access error occurs
        * @since 1.6
        */
@@ -4949,9 +4949,9 @@
        * the insert row. The updater methods do not update the underlying database;
        * instead the updateRow or insertRow methods are called to update the database.
        *
-       * @param columnName - name of the Column
-       * @param x - the new column value
-       * @param length - the length of the stream
+       * @param columnName name of the Column
+       * @param x the new column value
+       * @param length the length of the stream
        * @exception SQLException if a database access error occurs
        * @since 1.6
        */
@@ -4963,26 +4963,27 @@
        }
 
     /**
-     * Updates the designated column with a character stream value.   The
+     * Updates the designated column with a character stream value. The
      * driver does the necessary conversion from Java character format to
      * the national character set in the database.
      * It is intended for use when
-     * updating  <code>NCHAR</code>,<code>NVARCHAR</code>
-     * and <code>LONGNVARCHAR</code> columns.
+     * updating  {@code NCHAR},{@code NVARCHAR}
+     * and {@code LONGNVARCHAR} columns.
      *
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateNCharacterStream</code> which takes a length parameter.
+     * {@code updateNCharacterStream} which takes a length parameter.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param x the new column value
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set
+     * the result set concurrency is {@code CONCUR_READ_ONLY} or this
+     * method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
      * @since 1.6
@@ -4997,26 +4998,27 @@
      * driver does the necessary conversion from Java character format to
      * the national character set in the database.
      * It is intended for use when
-     * updating  <code>NCHAR</code>,<code>NVARCHAR</code>
-     * and <code>LONGNVARCHAR</code> columns.
+     * updating  {@code NCHAR},{@code NVARCHAR}
+     * and {@code LONGNVARCHAR} columns.
      *
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateNCharacterStream</code> which takes a length parameter.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
-bel is the name of the column
-     * @param reader the <code>java.io.Reader</code> object containing
+     * {@code updateNCharacterStream} which takes a length parameter.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then the label is the name of the column
+     * @param reader the {@code java.io.Reader} object containing
      *        the new column value
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code> or this method is called on a closed result set
-      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *        the result set concurrency is {@code CONCUR_READ_ONLY} or
+     *        this method is called on a closed result set
+     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+     *        this method
      * @since 1.6
      */
     public void updateNCharacterStream(String columnLabel,
@@ -5027,9 +5029,9 @@
     /**
      * Updates the designated column using the given input stream, which
      * will have the specified number of bytes.
-     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
+     * When a very large ASCII value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.InputStream</code>. Data will be read from the stream
+     * {@code java.io.InputStream}. Data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from ASCII to the database char format.
      *
@@ -5039,16 +5041,16 @@
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param inputStream An object that contains the data to set the parameter
-     * value to.
+     *        value to.
      * @param length the number of bytes in the parameter data.
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
      * @since 1.6
@@ -5060,9 +5062,9 @@
     /**
      * Updates the designated column using the given input stream, which
      * will have the specified number of bytes.
-     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
+     * When a very large ASCII value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.InputStream</code>. Data will be read from the stream
+     * {@code java.io.InputStream}. Data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from ASCII to the database char format.
      *
@@ -5072,18 +5074,20 @@
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified,
+     *        then the label is the name of the column.
      * @param inputStream An object that contains the data to set the parameter
-     * value to.
+     *        value to.
      * @param length the number of bytes in the parameter data.
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
@@ -5092,9 +5096,9 @@
 
     /**
      * Updates the designated column using the given input stream.
-     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
+     * When a very large ASCII value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.InputStream</code>. Data will be read from the stream
+     * {@code java.io.InputStream}. Data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from ASCII to the database char format.
      *
@@ -5102,23 +5106,23 @@
      * Java stream object or your own subclass that implements the
      * standard interface.
      *
-     *  <P><B>Note:</B> Consult your JDBC driver documentation to determine if
+     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateBlob</code> which takes a length parameter.
+     * {@code updateBlob} which takes a length parameter.
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param inputStream An object that contains the data to set the parameter
-     * value to.
+     *        value to.
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
@@ -5127,9 +5131,9 @@
 
     /**
      * Updates the designated column using the given input stream.
-     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
+     * When a very large ASCII value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.InputStream</code>. Data will be read from the stream
+     * {@code java.io.InputStream}. Data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from ASCII to the database char format.
      *
@@ -5138,22 +5142,23 @@
      * standard interface.
      *   <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateBlob</code> which takes a length parameter.
+     * {@code updateBlob} which takes a length parameter.
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
-bel is the name of the column
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then the label
+     *        is the name of the column
      * @param inputStream An object that contains the data to set the parameter
-     * value to.
+     *        value to.
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *        the result set concurrency is {@code CONCUR_READ_ONLY}
+     *        or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *        this method
      * @since 1.6
      */
     public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
@@ -5161,11 +5166,11 @@
     }
 
     /**
-     * Updates the designated column using the given <code>Reader</code>
+     * Updates the designated column using the given {@code Reader}
      * object, which is the given number of characters long.
-     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.Reader</code> object. The data will be read from the stream
+     * {@code java.io.Reader} object. The data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from UNICODE to the database char format.
      *
@@ -5175,17 +5180,17 @@
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param reader An object that contains the data to set the parameter value to.
      * @param length the number of characters in the parameter data.
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateClob(int columnIndex,  Reader reader, long length) throws SQLException {
@@ -5193,11 +5198,11 @@
     }
 
     /**
-     * Updates the designated column using the given <code>Reader</code>
+     * Updates the designated column using the given {@code Reader}
      * object, which is the given number of characters long.
-     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.Reader</code> object. The data will be read from the stream
+     * {@code java.io.Reader} object. The data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from UNICODE to the database char format.
      *
@@ -5207,17 +5212,18 @@
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then the label is the name of the column
      * @param reader An object that contains the data to set the parameter value to.
      * @param length the number of characters in the parameter data.
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateClob(String columnLabel,  Reader reader, long length) throws SQLException {
@@ -5225,33 +5231,33 @@
     }
 
     /**
-     * Updates the designated column using the given <code>Reader</code>
+     * Updates the designated column using the given {@code Reader}
      * object.
-     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.Reader</code> object. The data will be read from the stream
+     * {@code java.io.Reader} object. The data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from UNICODE to the database char format.
      *
      * <P><B>Note:</B> This stream object can either be a standard
      * Java stream object or your own subclass that implements the
      * standard interface.
-     *   <P><B>Note:</B> Consult your JDBC driver documentation to determine if
+     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateClob</code> which takes a length parameter.
+     * {@code updateClob} which takes a length parameter.
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param reader An object that contains the data to set the parameter value to.
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateClob(int columnIndex,  Reader reader) throws SQLException {
@@ -5259,34 +5265,35 @@
     }
 
     /**
-     * Updates the designated column using the given <code>Reader</code>
+     * Updates the designated column using the given {@code Reader}
      * object.
-     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.Reader</code> object. The data will be read from the stream
+     * {@code java.io.Reader} object. The data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from UNICODE to the database char format.
      *
      * <P><B>Note:</B> This stream object can either be a standard
      * Java stream object or your own subclass that implements the
      * standard interface.
-     *  <P><B>Note:</B> Consult your JDBC driver documentation to determine if
+     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateClob</code> which takes a length parameter.
+     * {@code updateClob} which takes a length parameter.
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
-bel is the name of the column
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then the label
+     *        is the name of the column
      * @param reader An object that contains the data to set the parameter value to.
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateClob(String columnLabel,  Reader reader) throws SQLException {
@@ -5294,11 +5301,11 @@
     }
 
    /**
-     * Updates the designated column using the given <code>Reader</code>
+     * Updates the designated column using the given {@code Reader}
      * object, which is the given number of characters long.
-     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.Reader</code> object. The data will be read from the stream
+     * {@code java.io.Reader} object. The data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from UNICODE to the database char format.
      *
@@ -5308,19 +5315,19 @@
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second 2, ...
      * @param reader An object that contains the data to set the parameter value to.
      * @param length the number of characters in the parameter data.
      * @throws SQLException if the driver does not support national
      *         character sets;  if the driver can detect that a data conversion
-     *  error could occur; this method is called on a closed result set,
-     * if a database access error occurs or
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
+     *         error could occur; this method is called on a closed result set,
+     *         if a database access error occurs or
+     *         the result set concurrency is {@code CONCUR_READ_ONLY}
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateNClob(int columnIndex,  Reader reader, long length) throws SQLException {
@@ -5328,11 +5335,11 @@
     }
 
     /**
-     * Updates the designated column using the given <code>Reader</code>
+     * Updates the designated column using the given {@code Reader}
      * object, which is the given number of characters long.
-     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.Reader</code> object. The data will be read from the stream
+     * {@code java.io.Reader} object. The data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from UNICODE to the database char format.
      *
@@ -5342,19 +5349,20 @@
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then the label is the name of the column
      * @param reader An object that contains the data to set the parameter value to.
      * @param length the number of characters in the parameter data.
      * @throws SQLException if the driver does not support national
      *         character sets;  if the driver can detect that a data conversion
-     *  error could occur; this method is called on a closed result set;
-     *  if a database access error occurs or
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
+     *         error could occur; this method is called on a closed result set;
+     *         if a database access error occurs or
+     *         the result set concurrency is {@code CONCUR_READ_ONLY}
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateNClob(String columnLabel,  Reader reader, long length) throws SQLException {
@@ -5362,11 +5370,11 @@
     }
 
     /**
-     * Updates the designated column using the given <code>Reader</code>
+     * Updates the designated column using the given {@code Reader}
      * object.
-     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.Reader</code> object. The data will be read from the stream
+     * {@code java.io.Reader} object. The data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from UNICODE to the database char format.
      *
@@ -5375,22 +5383,22 @@
      * standard interface.
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateNClob</code> which takes a length parameter.
+     * {@code updateNClob} which takes a length parameter.
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second 2, ...
      * @param reader An object that contains the data to set the parameter value to.
      * @throws SQLException if the driver does not support national
      *         character sets;  if the driver can detect that a data conversion
-     *  error could occur; this method is called on a closed result set,
-     * if a database access error occurs or
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
+     *         error could occur; this method is called on a closed result set,
+     *         if a database access error occurs or
+     *         the result set concurrency is {@code CONCUR_READ_ONLY}
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateNClob(int columnIndex,  Reader reader) throws SQLException {
@@ -5398,11 +5406,11 @@
     }
 
     /**
-     * Updates the designated column using the given <code>Reader</code>
+     * Updates the designated column using the given {@code Reader}
      * object.
-     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+     * When a very large UNICODE value is input to a {@code LONGVARCHAR}
      * parameter, it may be more practical to send it via a
-     * <code>java.io.Reader</code> object. The data will be read from the stream
+     * {@code java.io.Reader} object. The data will be read from the stream
      * as needed until end-of-file is reached.  The JDBC driver will
      * do any necessary conversion from UNICODE to the database char format.
      *
@@ -5411,23 +5419,24 @@
      * standard interface.
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateNClob</code> which takes a length parameter.
+     * {@code updateNClob} which takes a length parameter.
      * <p>
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
-bel is the name of the column
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then
+     *        the label is the name of the column
      * @param reader An object that contains the data to set the parameter value to.
      * @throws SQLException if the driver does not support national
      *         character sets;  if the driver can detect that a data conversion
-     *  error could occur; this method is called on a closed result set;
-     *  if a database access error occurs or
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
+     *         error could occur; this method is called on a closed result set;
+     *         if a database access error occurs or
+     *         the result set concurrency is {@code CONCUR_READ_ONLY}
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *         this method
      * @since 1.6
      */
     public void updateNClob(String columnLabel,  Reader reader) throws SQLException {
@@ -5435,22 +5444,22 @@
     }
 
 
-        /**
+    /**
      * Updates the designated column with an ascii stream value, which will have
      * the specified number of bytes.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param x the new column value
      * @param length the length of the stream
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateAsciiStream(int columnIndex,
@@ -5464,17 +5473,17 @@
      * the specified number of bytes.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param x the new column value
      * @param length the length of the stream
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateBinaryStream(int columnIndex,
@@ -5488,17 +5497,17 @@
      * the specified number of bytes.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param x the new column value
      * @param length the length of the stream
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateCharacterStream(int columnIndex,
@@ -5512,17 +5521,19 @@
      * the specified number of bytes..
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then
+     *        the label is the name of the column
      * @param x the new column value
      * @param length the length of the stream
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateAsciiStream(String columnLabel,
@@ -5535,20 +5546,20 @@
      * Updates the designated column with an ascii stream value.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateAsciiStream</code> which takes a length parameter.
+     * {@code updateAsciiStream} which takes a length parameter.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param x the new column value
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateAsciiStream(int columnIndex,
@@ -5560,21 +5571,22 @@
      * Updates the designated column with an ascii stream value.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateAsciiStream</code> which takes a length parameter.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
-bel is the name of the column
+     * {@code updateAsciiStream} which takes a length parameter.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then the label
+     *        is the name of the column
      * @param x the new column value
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateAsciiStream(String columnLabel,
@@ -5588,15 +5600,17 @@
      * the specified number of bytes.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then
+     *        the label is the name of the column
      * @param x the new column value
      * @param length the length of the stream
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
      * @since 1.6
@@ -5611,18 +5625,18 @@
      * Updates the designated column with a binary stream value.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateBinaryStream</code> which takes a length parameter.
+     * {@code updateBinaryStream} which takes a length parameter.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param x the new column value
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
      * @since 1.6
@@ -5637,19 +5651,20 @@
      * Updates the designated column with a binary stream value.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateBinaryStream</code> which takes a length parameter.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
-bel is the name of the column
+     * {@code updateBinaryStream} which takes a length parameter.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then
+     *        the label is the name of the column
      * @param x the new column value
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
      * @since 1.6
@@ -5665,18 +5680,20 @@
      * the specified number of bytes.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the label is the name of the column
-     * @param reader the <code>java.io.Reader</code> object containing
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then
+     *        the label is the name of the column
+     * @param reader the {@code java.io.Reader} object containing
      *        the new column value
      * @param length the length of the stream
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateCharacterStream(String columnLabel,
@@ -5689,20 +5706,20 @@
      * Updates the designated column with a character stream value.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateCharacterStream</code> which takes a length parameter.
+     * {@code updateCharacterStream} which takes a length parameter.
      *
      * @param columnIndex the first column is 1, the second is 2, ...
      * @param x the new column value
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateCharacterStream(int columnIndex,
@@ -5714,22 +5731,23 @@
      * Updates the designated column with a character stream value.
      * The updater methods are used to update column values in the
      * current row or the insert row.  The updater methods do not
-     * update the underlying database; instead the <code>updateRow</code> or
-     * <code>insertRow</code> methods are called to update the database.
+     * update the underlying database; instead the {@code updateRow} or
+     * {@code insertRow} methods are called to update the database.
      *
      * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
      * it might be more efficient to use a version of
-     * <code>updateCharacterStream</code> which takes a length parameter.
-     *
-     * @param columnLabel the label for the column specified with the SQL AS clause.  If the SQL AS clause was not specified, then the la
-bel is the name of the column
-     * @param reader the <code>java.io.Reader</code> object containing
+     * {@code updateCharacterStream} which takes a length parameter.
+     *
+     * @param columnLabel the label for the column specified with the SQL AS clause.
+     *        If the SQL AS clause was not specified, then the label
+     *        is the name of the column
+     * @param reader the {@code java.io.Reader} object containing
      *        the new column value
      * @exception SQLException if a database access error occurs,
-     * the result set concurrency is <code>CONCUR_READ_ONLY</code>
-     * or this method is called on a closed result set
+     *            the result set concurrency is {@code CONCUR_READ_ONLY}
+     *            or this method is called on a closed result set
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-     * this method
+     *            this method
      * @since 1.6
      */
     public void updateCharacterStream(String columnLabel,
@@ -5738,97 +5756,98 @@
     }
 
 
-     /**
-  * Sets the designated parameter to the given <code>java.net.URL</code> value.
-  * The driver converts this to an SQL <code>DATALINK</code> value
-  * when it sends it to the database.
-  *
-  * @param parameterIndex the first parameter is 1, the second is 2, ...
-  * @param x the <code>java.net.URL</code> object to be set
-  * @exception SQLException if a database access error occurs or
-  * this method is called on a closed <code>PreparedStatement</code>
-  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-  * @since 1.4
-  */
+  /**
+   * Sets the designated parameter to the given {@code java.net.URL} value.
+   * The driver converts this to an SQL {@code DATALINK} value
+   * when it sends it to the database.
+   *
+   * @param parameterIndex the first parameter is 1, the second is 2, ...
+   * @param x the {@code java.net.URL} object to be set
+   * @exception SQLException if a database access error occurs or
+   *            this method is called on a closed {@code PreparedStatement}
+   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
+   * @since 1.4
+   */
   public void setURL(int parameterIndex, java.net.URL x) throws SQLException{
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
 
-   /**
-  * Sets the designated parameter to a <code>Reader</code> object.
-  * This method differs from the <code>setCharacterStream (int, Reader)</code> method
-  * because it informs the driver that the parameter value should be sent to
-  * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-  * driver may have to do extra work to determine whether the parameter
-  * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
-  * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
-  * it might be more efficient to use a version of
-  * <code>setNClob</code> which takes a length parameter.
-  *
-  * @param parameterIndex index of the first parameter is 1, the second is 2, ...
-  * @param reader An object that contains the data to set the parameter value to.
-  * @throws SQLException if parameterIndex does not correspond to a parameter
-  * marker in the SQL statement;
-  * if the driver does not support national character sets;
-  * if the driver can detect that a data conversion
-  *  error could occur;  if a database access error occurs or
-  * this method is called on a closed <code>PreparedStatement</code>
-  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-  *
-  * @since 1.6
-  */
+  /**
+   * Sets the designated parameter to a {@code Reader} object.
+   * This method differs from the {@code setCharacterStream (int, Reader)} method
+   * because it informs the driver that the parameter value should be sent to
+   * the server as a {@code NCLOB}.  When the {@code setCharacterStream} method is used, the
+   * driver may have to do extra work to determine whether the parameter
+   * data should be sent to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}
+   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
+   * it might be more efficient to use a version of
+   * {@code setNClob} which takes a length parameter.
+   *
+   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
+   * @param reader An object that contains the data to set the parameter value to.
+   * @throws SQLException if parameterIndex does not correspond to a parameter
+   *         marker in the SQL statement;
+   *         if the driver does not support national character sets;
+   *         if the driver can detect that a data conversion
+   *         error could occur;  if a database access error occurs or
+   *         this method is called on a closed {@code PreparedStatement}
+   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
+   *
+   * @since 1.6
+   */
   public void setNClob(int parameterIndex, Reader reader)
     throws SQLException{
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
-   /**
-  * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain the number
-             * of characters specified by length otherwise a <code>SQLException</code> will be
-            * generated when the <code>CallableStatement</code> is executed.
-            * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
-            * because it informs the driver that the parameter value should be sent to
-            * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-            * driver may have to do extra work to determine whether the parameter
-            * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
-            *
-            * @param parameterName the name of the parameter to be set
-            * @param reader An object that contains the data to set the parameter value to.
-            * @param length the number of characters in the parameter data.
-            * @throws SQLException if parameterIndex does not correspond to a parameter
-            * marker in the SQL statement; if the length specified is less than zero;
-            * if the driver does not support national
-            *         character sets;  if the driver can detect that a data conversion
-            *  error could occur; if a database access error occurs or
-            * this method is called on a closed <code>CallableStatement</code>
-            * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-            * this method
-            * @since 1.6
-            */
-            public void setNClob(String parameterName, Reader reader, long length)
+  /**
+   * Sets the designated parameter to a {@code Reader} object.
+   * The {@code reader} must contain the number
+   * of characters specified by length otherwise a {@code SQLException} will be
+   * generated when the {@code CallableStatement} is executed.
+   * This method differs from the {@code setCharacterStream (int, Reader, int)} method
+   * because it informs the driver that the parameter value should be sent to
+   * the server as a {@code NCLOB}.  When the {@code setCharacterStream} method is used, the
+   * driver may have to do extra work to determine whether the parameter
+   * data should be send to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}
+   *
+   * @param parameterName the name of the parameter to be set
+   * @param reader An object that contains the data to set the parameter value to.
+   * @param length the number of characters in the parameter data.
+   * @throws SQLException if parameterIndex does not correspond to a parameter
+   * marker in the SQL statement; if the length specified is less than zero;
+   * if the driver does not support national
+   *         character sets;  if the driver can detect that a data conversion
+   *  error could occur; if a database access error occurs or
+   * this method is called on a closed {@code CallableStatement}
+   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+   * this method
+   * @since 1.6
+   */
+  public void setNClob(String parameterName, Reader reader, long length)
     throws SQLException{
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
-   }
+  }
 
 
  /**
-  * Sets the designated parameter to a <code>Reader</code> object.
-  * This method differs from the <code>setCharacterStream (int, Reader)</code> method
+  * Sets the designated parameter to a {@code Reader} object.
+  * This method differs from the {@code setCharacterStream (int, Reader)} method
   * because it informs the driver that the parameter value should be sent to
-  * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+  * the server as a {@code NCLOB}.  When the {@code setCharacterStream} method is used, the
   * driver may have to do extra work to determine whether the parameter
-  * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
+  * data should be send to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}
   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
   * it might be more efficient to use a version of
-  * <code>setNClob</code> which takes a length parameter.
+  * {@code setNClob} which takes a length parameter.
   *
   * @param parameterName the name of the parameter
   * @param reader An object that contains the data to set the parameter value to.
   * @throws SQLException if the driver does not support national character sets;
-  * if the driver can detect that a data conversion
-  *  error could occur;  if a database access error occurs or
-  * this method is called on a closed <code>CallableStatement</code>
+  *         if the driver can detect that a data conversion
+  *         error could occur;  if a database access error occurs or
+  *         this method is called on a closed {@code CallableStatement}
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
   *
   * @since 1.6
@@ -5839,23 +5858,25 @@
    }
 
 
-   /**
-     ** of characters specified by length otherwise a <code>SQLException</code> will becontain  the number
-     * generated when the <code>PreparedStatement</code> is executed.
-     * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
+    /**
+     * Sets the designated parameter to a {@code Reader} object. The reader must contain the number
+     * of characters specified by length otherwise a {@code SQLException} will be
+     * generated when the {@code PreparedStatement} is executed.
+     * This method differs from the {@code setCharacterStream (int, Reader, int)} method
      * because it informs the driver that the parameter value should be sent to
-     * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+     * the server as a {@code NCLOB}.  When the {@code setCharacterStream} method is used, the
      * driver may have to do extra work to determine whether the parameter
-     * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
+     * data should be sent to the server as a {@code LONGNVARCHAR} or a {@code NCLOB}
+     *
      * @param parameterIndex index of the first parameter is 1, the second is 2, ...
      * @param reader An object that contains the data to set the parameter value to.
      * @param length the number of characters in the parameter data.
      * @throws SQLException if parameterIndex does not correspond to a parameter
-     * marker in the SQL statement; if the length specified is less than zero;
-     * if the driver does not support national character sets;
-     * if the driver can detect that a data conversion
-     *  error could occur;  if a database access error occurs or
-     * this method is called on a closed <code>PreparedStatement</code>
+     *         marker in the SQL statement; if the length specified is less than zero;
+     *         if the driver does not support national character sets;
+     *         if the driver can detect that a data conversion
+     *         error could occur;  if a database access error occurs or
+     *         this method is called on a closed {@code PreparedStatement}
      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
      *
      * @since 1.6
@@ -5867,14 +5888,14 @@
 
 
     /**
-     * Sets the designated parameter to a <code>java.sql.NClob</code> object. The driver converts this to
-a
-     * SQL <code>NCLOB</code> value when it sends it to the database.
+     * Sets the designated parameter to a {@code java.sql.NClob} object.
+     * The driver converts this to an
+     * SQL {@code NCLOB} value when it sends it to the database.
      * @param parameterIndex of the first parameter is 1, the second is 2, ...
      * @param value the parameter value
      * @throws SQLException if the driver does not support national
      *         character sets;  if the driver can detect that a data conversion
-     *  error could occur ; or if a database access error occurs
+     *         error could occur; or if a database access error occurs
      * @since 1.6
      */
      public void setNClob(int parameterIndex, NClob value) throws SQLException{
@@ -5883,14 +5904,14 @@
 
 
  /**
-  * Sets the designated parameter to the given <code>String</code> object.
-  * The driver converts this to a SQL <code>NCHAR</code> or
-  * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
+  * Sets the designated parameter to the given {@code String} object.
+  * The driver converts this to a SQL {@code NCHAR} or
+  * {@code NVARCHAR} or {@code LONGNVARCHAR}
   * @param parameterName the name of the column to be set
   * @param value the parameter value
   * @throws SQLException if the driver does not support national
   *         character sets;  if the driver can detect that a data conversion
-  *  error could occur; or if a database access error occurs
+  *         error could occur; or if a database access error occurs
   * @since 1.6
   */
  public void setNString(String parameterName, String value)
@@ -5899,8 +5920,8 @@
    }
 
  /**
-  * Sets the designated parameter to a <code>Reader</code> object. The
-  * <code>Reader</code> reads the data till end-of-file is reached. The
+  * Sets the designated parameter to a {@code Reader} object. The
+  * {@code Reader} reads the data till end-of-file is reached. The
   * driver does the necessary conversion from Java character format to
   * the national character set in the database.
   * @param parameterIndex of the first parameter is 1, the second is 2, ...
@@ -5908,7 +5929,7 @@
   * @param length the number of characters in the parameter data.
   * @throws SQLException if the driver does not support national
   *         character sets;  if the driver can detect that a data conversion
-  *  error could occur ; or if a database access error occurs
+  *         error could occur ; or if a database access error occurs
   * @since 1.6
   */
   public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException{
@@ -5918,8 +5939,8 @@
 
 
  /**
-  * Sets the designated parameter to a <code>Reader</code> object. The
-  * <code>Reader</code> reads the data till end-of-file is reached. The
+  * Sets the designated parameter to a {@code Reader} object. The
+  * {@code Reader} reads the data till end-of-file is reached. The
   * driver does the necessary conversion from Java character format to
   * the national character set in the database.
   * @param parameterName the name of the column to be set
@@ -5935,9 +5956,9 @@
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
-  /**
-  * Sets the designated parameter to a <code>Reader</code> object. The
-  * <code>Reader</code> reads the data till end-of-file is reached. The
+ /**
+  * Sets the designated parameter to a {@code Reader} object. The
+  * {@code Reader} reads the data till end-of-file is reached. The
   * driver does the necessary conversion from Java character format to
   * the national character set in the database.
 
@@ -5946,14 +5967,14 @@
   * standard interface.
   * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
   * it might be more efficient to use a version of
-  * <code>setNCharacterStream</code> which takes a length parameter.
+  * {@code setNCharacterStream} which takes a length parameter.
   *
   * @param parameterName the name of the parameter
   * @param value the parameter value
   * @throws SQLException if the driver does not support national
   *         character sets;  if the driver can detect that a data conversion
-  *  error could occur ; if a database access error occurs; or
-  * this method is called on a closed <code>CallableStatement</code>
+  *         error could occur ; if a database access error occurs; or
+  *         this method is called on a closed {@code CallableStatement}
   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
   * @since 1.6
   */
@@ -5962,23 +5983,23 @@
    }
 
   /**
-    * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value,
-    * using the given <code>Calendar</code> object.  The driver uses
-    * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value,
+    * Sets the designated parameter to the given {@code java.sql.Timestamp} value,
+    * using the given {@code Calendar} object.  The driver uses
+    * the {@code Calendar} object to construct an SQL {@code TIMESTAMP} value,
     * which the driver then sends to the database.  With a
-    * a <code>Calendar</code> object, the driver can calculate the timestamp
+    * a {@code Calendar} object, the driver can calculate the timestamp
     * taking into account a custom timezone.  If no
-    * <code>Calendar</code> object is specified, the driver uses the default
+    * {@code Calendar} object is specified, the driver uses the default
     * timezone, which is that of the virtual machine running the application.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
-    * @param cal the <code>Calendar</code> object the driver will use
-    *            to construct the timestamp
+    * @param cal the {@code Calendar} object the driver will use
+    *         to construct the timestamp
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getTimestamp
     * @since 1.4
     */
@@ -5987,28 +6008,29 @@
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
-    /**
-    * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain  the number
-               * of characters specified by length otherwise a <code>SQLException</code> will be
-               * generated when the <code>CallableStatement</code> is executed.
-              * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
-              * because it informs the driver that the parameter value should be sent to
-              * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-               * driver may have to do extra work to determine whether the parameter
-               * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
-               * @param parameterName the name of the parameter to be set
-              * @param reader An object that contains the data to set the parameter value to.
-              * @param length the number of characters in the parameter data.
-              * @throws SQLException if parameterIndex does not correspond to a parameter
-              * marker in the SQL statement; if the length specified is less than zero;
-              * a database access error occurs or
-              * this method is called on a closed <code>CallableStatement</code>
-              * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-              * this method
-              *
-              * @since 1.6
-              */
-      public  void setClob(String parameterName, Reader reader, long length)
+  /**
+   * Sets the designated parameter to a {@code Reader} object.  The {@code reader} must contain  the number
+   * of characters specified by length otherwise a {@code SQLException} will be
+   * generated when the {@code CallableStatement} is executed.
+   * This method differs from the {@code setCharacterStream (int, Reader, int)} method
+   * because it informs the driver that the parameter value should be sent to
+   * the server as a {@code CLOB}.  When the {@code setCharacterStream} method is used, the
+   * driver may have to do extra work to determine whether the parameter
+   * data should be send to the server as a {@code LONGVARCHAR} or a {@code CLOB}
+   *
+   * @param parameterName the name of the parameter to be set
+   * @param reader An object that contains the data to set the parameter value to.
+   * @param length the number of characters in the parameter data.
+   * @throws SQLException if parameterIndex does not correspond to a parameter
+   *         marker in the SQL statement; if the length specified is less than zero;
+   *         a database access error occurs or
+   *         this method is called on a closed {@code CallableStatement}
+   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+   *         this method
+   *
+   * @since 1.6
+   */
+   public  void setClob(String parameterName, Reader reader, long length)
       throws SQLException{
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
@@ -6016,16 +6038,16 @@
 
 
   /**
-    * Sets the designated parameter to the given <code>java.sql.Clob</code> object.
-    * The driver converts this to an SQL <code>CLOB</code> value when it
+    * Sets the designated parameter to the given {@code java.sql.Clob} object.
+    * The driver converts this to an SQL {@code CLOB} value when it
     * sends it to the database.
     *
     * @param parameterName the name of the parameter
-    * @param x a <code>Clob</code> object that maps an SQL <code>CLOB</code> value
+    * @param x a {@code Clob} object that maps an SQL {@code CLOB} value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @since 1.6
     */
     public void setClob (String parameterName, Clob x) throws SQLException{
@@ -6033,21 +6055,21 @@
    }
 
  /**
-    * Sets the designated parameter to a <code>Reader</code> object.
-    * This method differs from the <code>setCharacterStream (int, Reader)</code> method
+    * Sets the designated parameter to a {@code Reader} object.
+    * This method differs from the {@code setCharacterStream (int, Reader)} method
     * because it informs the driver that the parameter value should be sent to
-    * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+    * the server as a {@code CLOB}.  When the {@code setCharacterStream} method is used, the
     * driver may have to do extra work to determine whether the parameter
-    * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
+    * data should be send to the server as a {@code LONGVARCHAR} or a {@code CLOB}
     *
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
     * it might be more efficient to use a version of
-    * <code>setClob</code> which takes a length parameter.
+    * {@code setClob} which takes a length parameter.
     *
     * @param parameterName the name of the parameter
     * @param reader An object that contains the data to set the parameter value to.
     * @throws SQLException if a database access error occurs or this method is called on
-    * a closed <code>CallableStatement</code>
+    *         a closed {@code CallableStatement}
     *
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     * @since 1.6
@@ -6058,19 +6080,19 @@
    }
 
 
- /**
-    * Sets the designated parameter to the given <code>java.sql.Date</code> value
+   /**
+    * Sets the designated parameter to the given {@code java.sql.Date} value
     * using the default time zone of the virtual machine that is running
     * the application.
     * The driver converts this
-    * to an SQL <code>DATE</code> value when it sends it to the database.
+    * to an SQL {@code DATE} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getDate
     * @since 1.4
     */
@@ -6080,23 +6102,23 @@
    }
 
    /**
-    * Sets the designated parameter to the given <code>java.sql.Date</code> value,
-    * using the given <code>Calendar</code> object.  The driver uses
-    * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value,
+    * Sets the designated parameter to the given {@code java.sql.Date} value,
+    * using the given {@code Calendar} object.  The driver uses
+    * the {@code Calendar} object to construct an SQL {@code DATE} value,
     * which the driver then sends to the database.  With a
-    * a <code>Calendar</code> object, the driver can calculate the date
+    * a {@code Calendar} object, the driver can calculate the date
     * taking into account a custom timezone.  If no
-    * <code>Calendar</code> object is specified, the driver uses the default
+    * {@code Calendar} object is specified, the driver uses the default
     * timezone, which is that of the virtual machine running the application.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
-    * @param cal the <code>Calendar</code> object the driver will use
+    * @param cal the {@code Calendar} object the driver will use
     *            to construct the date
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getDate
     * @since 1.4
     */
@@ -6107,16 +6129,16 @@
 
 
  /**
-    * Sets the designated parameter to the given <code>java.sql.Time</code> value.
+    * Sets the designated parameter to the given {@code java.sql.Time} value.
     * The driver converts this
-    * to an SQL <code>TIME</code> value when it sends it to the database.
+    * to an SQL {@code TIME} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getTime
     * @since 1.4
     */
@@ -6126,23 +6148,23 @@
    }
 
  /**
-    * Sets the designated parameter to the given <code>java.sql.Time</code> value,
-    * using the given <code>Calendar</code> object.  The driver uses
-    * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value,
+    * Sets the designated parameter to the given {@code java.sql.Time} value,
+    * using the given {@code Calendar} object.  The driver uses
+    * the {@code Calendar} object to construct an SQL {@code TIME} value,
     * which the driver then sends to the database.  With a
-    * a <code>Calendar</code> object, the driver can calculate the time
+    * a {@code Calendar} object, the driver can calculate the time
     * taking into account a custom timezone.  If no
-    * <code>Calendar</code> object is specified, the driver uses the default
+    * {@code Calendar} object is specified, the driver uses the default
     * timezone, which is that of the virtual machine running the application.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
-    * @param cal the <code>Calendar</code> object the driver will use
+    * @param cal the {@code Calendar} object the driver will use
     *            to construct the time
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getTime
     * @since 1.4
     */
@@ -6152,22 +6174,22 @@
    }
 
    /**
-   * Sets the designated parameter to a <code>Reader</code> object.
-   * This method differs from the <code>setCharacterStream (int, Reader)</code> method
+   * Sets the designated parameter to a {@code Reader} object.
+   * This method differs from the {@code setCharacterStream (int, Reader)} method
    * because it informs the driver that the parameter value should be sent to
-   * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+   * the server as a {@code CLOB}.  When the {@code setCharacterStream} method is used, the
    * driver may have to do extra work to determine whether the parameter
-   * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
+   * data should be sent to the server as a {@code LONGVARCHAR} or a {@code CLOB}
    *
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
    * it might be more efficient to use a version of
-   * <code>setClob</code> which takes a length parameter.
+   * {@code setClob} which takes a length parameter.
    *
    * @param parameterIndex index of the first parameter is 1, the second is 2, ...
    * @param reader An object that contains the data to set the parameter value to.
    * @throws SQLException if a database access error occurs, this method is called on
-   * a closed <code>PreparedStatement</code>or if parameterIndex does not correspond to a parameter
-   * marker in the SQL statement
+   *         a closed {@code PreparedStatement}or if parameterIndex does not correspond to a parameter
+   *         marker in the SQL statement
    *
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
    * @since 1.6
@@ -6178,20 +6200,20 @@
    }
 
 
-   /**
-   * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
-   * of characters specified by length otherwise a <code>SQLException</code> will be
-   * generated when the <code>PreparedStatement</code> is executed.
-   *This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
+  /**
+   * Sets the designated parameter to a {@code Reader} object.  The reader must contain  the number
+   * of characters specified by length otherwise a {@code SQLException} will be
+   * generated when the {@code PreparedStatement} is executed.
+   * This method differs from the {@code setCharacterStream (int, Reader, int)} method
    * because it informs the driver that the parameter value should be sent to
-   * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+   * the server as a {@code CLOB}.  When the {@code setCharacterStream} method is used, the
    * driver may have to do extra work to determine whether the parameter
-   * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
+   * data should be sent to the server as a {@code LONGVARCHAR} or a {@code CLOB}
    * @param parameterIndex index of the first parameter is 1, the second is 2, ...
    * @param reader An object that contains the data to set the parameter value to.
    * @param length the number of characters in the parameter data.
    * @throws SQLException if a database access error occurs, this method is called on
-   * a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter
+   * a closed {@code PreparedStatement}, if parameterIndex does not correspond to a parameter
    * marker in the SQL statement, or if the length specified is less than zero.
    *
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
@@ -6203,26 +6225,27 @@
    }
 
 
- /**
-    * Sets the designated parameter to a <code>InputStream</code> object.  The inputstream must contain  the number
-    * of characters specified by length otherwise a <code>SQLException</code> will be
-    * generated when the <code>PreparedStatement</code> is executed.
-    * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
+   /**
+    * Sets the designated parameter to a {@code InputStream} object.  The inputstream must contain  the number
+    * of characters specified by length otherwise a {@code SQLException} will be
+    * generated when the {@code PreparedStatement} is executed.
+    * This method differs from the {@code setBinaryStream (int, InputStream, int)}
     * method because it informs the driver that the parameter value should be
-    * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
+    * sent to the server as a {@code BLOB}.  When the {@code setBinaryStream} method is used,
     * the driver may have to do extra work to determine whether the parameter
-    * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
+    * data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}
+    *
     * @param parameterIndex index of the first parameter is 1,
-    * the second is 2, ...
+    *        the second is 2, ...
     * @param inputStream An object that contains the data to set the parameter
-    * value to.
+    *        value to.
     * @param length the number of bytes in the parameter data.
     * @throws SQLException if a database access error occurs,
-    * this method is called on a closed <code>PreparedStatement</code>,
-    * if parameterIndex does not correspond
-    * to a parameter marker in the SQL statement,  if the length specified
-    * is less than zero or if the number of bytes in the inputstream does not match
-    * the specified length.
+    *         this method is called on a closed {@code PreparedStatement},
+    *         if parameterIndex does not correspond
+    *         to a parameter marker in the SQL statement,  if the length specified
+    *         is less than zero or if the number of bytes in the inputstream does not match
+    *         the specified length.
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     *
     * @since 1.6
@@ -6233,28 +6256,27 @@
    }
 
  /**
-    * Sets the designated parameter to a <code>InputStream</code> object.
-    * This method differs from the <code>setBinaryStream (int, InputStream)</code>
-    * This method differs from the <code>setBinaryStream (int, InputStream)</code>
+    * Sets the designated parameter to a {@code InputStream} object.
+    * This method differs from the {@code setBinaryStream (int, InputStream)}
+    * This method differs from the {@code setBinaryStream (int, InputStream)}
     * method because it informs the driver that the parameter value should be
-    * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
+    * sent to the server as a {@code BLOB}.  When the {@code setBinaryStream} method is used,
     * the driver may have to do extra work to determine whether the parameter
-    * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
+    * data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}
     *
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
     * it might be more efficient to use a version of
-    * <code>setBlob</code> which takes a length parameter.
+    * {@code setBlob} which takes a length parameter.
     *
     * @param parameterIndex index of the first parameter is 1,
-    * the second is 2, ...
-
-
+    *        the second is 2, ...
+    *
     * @param inputStream An object that contains the data to set the parameter
-    * value to.
+    *        value to.
     * @throws SQLException if a database access error occurs,
-    * this method is called on a closed <code>PreparedStatement</code> or
-    * if parameterIndex does not correspond
-    * to a parameter marker in the SQL statement,
+    *         this method is called on a closed {@code PreparedStatement} or
+    *         if parameterIndex does not correspond
+    *         to a parameter marker in the SQL statement,
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     *
     * @since 1.6
@@ -6264,72 +6286,72 @@
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
- /**
-    * Sets the designated parameter to a <code>InputStream</code> object.  The <code>inputstream</code> must contain  the number
-      * of characters specified by length, otherwise a <code>SQLException</code> will be
-      * generated when the <code>CallableStatement</code> is executed.
-      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
-      * method because it informs the driver that the parameter value should be
-      * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
-      * the driver may have to do extra work to determine whether the parameter
-      * data should be sent to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
-      *
-      * @param parameterName the name of the parameter to be set
-      * the second is 2, ...
-      *
-      * @param inputStream An object that contains the data to set the parameter
-      * value to.
-      * @param length the number of bytes in the parameter data.
-      * @throws SQLException  if parameterIndex does not correspond
-      * to a parameter marker in the SQL statement,  or if the length specified
-      * is less than zero; if the number of bytes in the inputstream does not match
-      * the specified length; if a database access error occurs or
-      * this method is called on a closed <code>CallableStatement</code>
-      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-      * this method
-      *
-      * @since 1.6
-      */
-      public void setBlob(String parameterName, InputStream inputStream, long length)
+   /**
+    * Sets the designated parameter to a {@code InputStream} object.  The {@code inputstream} must contain  the number
+    * of characters specified by length, otherwise a {@code SQLException} will be
+    * generated when the {@code CallableStatement} is executed.
+    * This method differs from the {@code setBinaryStream (int, InputStream, int)}
+    * method because it informs the driver that the parameter value should be
+    * sent to the server as a {@code BLOB}.  When the {@code setBinaryStream} method is used,
+    * the driver may have to do extra work to determine whether the parameter
+    * data should be sent to the server as a {@code LONGVARBINARY} or a {@code BLOB}
+    *
+    * @param parameterName the name of the parameter to be set
+    * the second is 2, ...
+    *
+    * @param inputStream An object that contains the data to set the parameter
+    *        value to.
+    * @param length the number of bytes in the parameter data.
+    * @throws SQLException  if parameterIndex does not correspond
+    *         to a parameter marker in the SQL statement,  or if the length specified
+    *         is less than zero; if the number of bytes in the inputstream does not match
+    *         the specified length; if a database access error occurs or
+    *         this method is called on a closed {@code CallableStatement}
+    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+    *         this method
+    *
+    * @since 1.6
+    */
+   public void setBlob(String parameterName, InputStream inputStream, long length)
          throws SQLException{
          throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
     }
 
 
- /**
-    * Sets the designated parameter to the given <code>java.sql.Blob</code> object.
-    * The driver converts this to an SQL <code>BLOB</code> value when it
+   /**
+    * Sets the designated parameter to the given {@code java.sql.Blob} object.
+    * The driver converts this to an SQL {@code BLOB} value when it
     * sends it to the database.
     *
     * @param parameterName the name of the parameter
-    * @param x a <code>Blob</code> object that maps an SQL <code>BLOB</code> value
+    * @param x a {@code Blob} object that maps an SQL {@code BLOB} value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @since 1.6
     */
    public void setBlob (String parameterName, Blob x) throws SQLException{
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
- /**
-    * Sets the designated parameter to a <code>InputStream</code> object.
-    * This method differs from the <code>setBinaryStream (int, InputStream)</code>
+   /**
+    * Sets the designated parameter to a {@code InputStream} object.
+    * This method differs from the {@code setBinaryStream (int, InputStream)}
     * method because it informs the driver that the parameter value should be
-    * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
+    * sent to the server as a {@code BLOB}.  When the {@code setBinaryStream} method is used,
     * the driver may have to do extra work to determine whether the parameter
-    * data should be send to the server as a <code>LONGVARBINARY</code> or a <code>BLOB</code>
+    * data should be send to the server as a {@code LONGVARBINARY} or a {@code BLOB}
     *
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
     * it might be more efficient to use a version of
-    * <code>setBlob</code> which takes a length parameter.
+    * {@code setBlob} which takes a length parameter.
     *
     * @param parameterName the name of the parameter
     * @param inputStream An object that contains the data to set the parameter
-    * value to.
+    *        value to.
     * @throws SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *         this method is called on a closed {@code CallableStatement}
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     *
     * @since 1.6
@@ -6339,22 +6361,22 @@
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
-  /**
+ /**
   * Sets the value of the designated parameter with the given object. The second
   * argument must be an object type; for integral values, the
-  * <code>java.lang</code> equivalent objects should be used.
+  * {@code java.lang} equivalent objects should be used.
   *
   * <p>The given Java object will be converted to the given targetSqlType
   * before being sent to the database.
   *
   * If the object has a custom mapping (is of a class implementing the
-  * interface <code>SQLData</code>),
-  * the JDBC driver should call the method <code>SQLData.writeSQL</code> to write it
+  * interface {@code SQLData}),
+  * the JDBC driver should call the method {@code SQLData.writeSQL} to write it
   * to the SQL data stream.
   * If, on the other hand, the object is of a class implementing
-  * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
-  *  <code>Struct</code>, <code>java.net.URL</code>,
-  * or <code>Array</code>, the driver should pass it to the database as a
+  * {@code Ref}, {@code Blob}, {@code Clob},  {@code NClob},
+  *  {@code Struct}, {@code java.net.URL},
+  * or {@code Array}, the driver should pass it to the database as a
   * value of the corresponding SQL type.
   * <P>
   * Note that this method may be used to pass datatabase-
@@ -6365,17 +6387,17 @@
   * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
   * sent to the database. The scale argument may further qualify this type.
   * @param scale for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types,
-  *          this is the number of digits after the decimal point.  For all other
-  *          types, this value will be ignored.
+  *        this is the number of digits after the decimal point.  For all other
+  *        types, this value will be ignored.
   * @exception SQLException if a database access error occurs or
-  * this method is called on a closed <code>CallableStatement</code>
-  * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
-  * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
-  * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
-  * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
-  *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
-  * or  <code>STRUCT</code> data type and the JDBC driver does not support
-  * this data type
+  *        this method is called on a closed {@code CallableStatement}
+  * @exception SQLFeatureNotSupportedException if {@code targetSqlType} is
+  *            an {@code ARRAY, BLOB, CLOB,
+  *            DATALINK, JAVA_OBJECT, NCHAR,
+  *            NCLOB, NVARCHAR, LONGNVARCHAR,
+  *            REF, ROWID, SQLXML}
+  *            or {@code STRUCT} data type and the JDBC driver does not support
+  *            this data type
   * @see Types
   * @see #getObject
   * @since 1.4
@@ -6387,7 +6409,7 @@
 
   /**
     * Sets the value of the designated parameter with the given object.
-    * This method is like the method <code>setObject</code>
+    * This method is like the method {@code setObject}
     * above, except that it assumes a scale of zero.
     *
     * @param parameterName the name of the parameter
@@ -6395,14 +6417,14 @@
     * @param targetSqlType the SQL type (as defined in java.sql.Types) to be
     *                      sent to the database
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
-    * @exception SQLFeatureNotSupportedException if <code>targetSqlType</code> is
-    * a <code>ARRAY</code>, <code>BLOB</code>, <code>CLOB</code>,
-    * <code>DATALINK</code>, <code>JAVA_OBJECT</code>, <code>NCHAR</code>,
-    * <code>NCLOB</code>, <code>NVARCHAR</code>, <code>LONGNVARCHAR</code>,
-    *  <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
-    * or  <code>STRUCT</code> data type and the JDBC driver does not support
-    * this data type
+    * this method is called on a closed {@code CallableStatement}
+    * @exception SQLFeatureNotSupportedException if {@code targetSqlType} is
+    *            an {@code ARRAY, BLOB, CLOB,
+    *            DATALINK, JAVA_OBJECT, NCHAR,
+    *            NCLOB, NVARCHAR, LONGNVARCHAR,
+    *            REF, ROWID, SQLXML}
+    *            or {@code STRUCT} data type and the JDBC driver does not support
+    *            this data type
     * @see #getObject
     * @since 1.4
     */
@@ -6411,13 +6433,13 @@
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
- /**
+  /**
    * Sets the value of the designated parameter with the given object.
-   * The second parameter must be of type <code>Object</code>; therefore, the
-   * <code>java.lang</code> equivalent objects should be used for built-in types.
+   * The second parameter must be of type {@code Object}; therefore, the
+   * {@code java.lang} equivalent objects should be used for built-in types.
    *
    * <p>The JDBC specification specifies a standard mapping from
-   * Java <code>Object</code> types to SQL types.  The given argument
+   * Java {@code Object} types to SQL types.  The given argument
    * will be converted to the corresponding SQL type before being
    * sent to the database.
    *
@@ -6425,13 +6447,13 @@
    * specific abstract data types, by using a driver-specific Java
    * type.
    *
-   * If the object is of a class implementing the interface <code>SQLData</code>,
-   * the JDBC driver should call the method <code>SQLData.writeSQL</code>
+   * If the object is of a class implementing the interface {@code SQLData},
+   * the JDBC driver should call the method {@code SQLData.writeSQL}
    * to write it to the SQL data stream.
    * If, on the other hand, the object is of a class implementing
-   * <code>Ref</code>, <code>Blob</code>, <code>Clob</code>,  <code>NClob</code>,
-   *  <code>Struct</code>, <code>java.net.URL</code>,
-   * or <code>Array</code>, the driver should pass it to the database as a
+   * {@code Ref}, {@code Blob}, {@code Clob},  {@code NClob},
+   *  {@code Struct}, {@code java.net.URL},
+   * or {@code Array}, the driver should pass it to the database as a
    * value of the corresponding SQL type.
    * <P>
    * This method throws an exception if there is an ambiguity, for example, if the
@@ -6440,10 +6462,10 @@
    * @param parameterName the name of the parameter
    * @param x the object containing the input parameter value
    * @exception SQLException if a database access error occurs,
-   * this method is called on a closed <code>CallableStatement</code> or if the given
-   *            <code>Object</code> parameter is ambiguous
+   *            this method is called on a closed {@code CallableStatement} or if the given
+   *            {@code Object} parameter is ambiguous
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-   * this method
+   *            this method
    * @see #getObject
    * @since 1.4
    */
@@ -6454,9 +6476,9 @@
   /**
   * Sets the designated parameter to the given input stream, which will have
   * the specified number of bytes.
-  * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
+  * When a very large ASCII value is input to a {@code LONGVARCHAR}
   * parameter, it may be more practical to send it via a
-  * <code>java.io.InputStream</code>. Data will be read from the stream
+  * {@code java.io.InputStream}. Data will be read from the stream
   * as needed until end-of-file is reached.  The JDBC driver will
   * do any necessary conversion from ASCII to the database char format.
   *
@@ -6468,9 +6490,9 @@
   * @param x the Java input stream that contains the ASCII parameter value
   * @param length the number of bytes in the stream
   * @exception SQLException if a database access error occurs or
-  * this method is called on a closed <code>CallableStatement</code>
+  *            this method is called on a closed {@code CallableStatement}
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-  * this method
+  *            this method
   * @since 1.4
   */
  public void setAsciiStream(String parameterName, java.io.InputStream x, int length)
@@ -6482,9 +6504,9 @@
 /**
   * Sets the designated parameter to the given input stream, which will have
   * the specified number of bytes.
-  * When a very large binary value is input to a <code>LONGVARBINARY</code>
+  * When a very large binary value is input to a {@code LONGVARBINARY}
   * parameter, it may be more practical to send it via a
-  * <code>java.io.InputStream</code> object. The data will be read from the stream
+  * {@code java.io.InputStream} object. The data will be read from the stream
   * as needed until end-of-file is reached.
   *
   * <P><B>Note:</B> This stream object can either be a standard
@@ -6495,9 +6517,9 @@
   * @param x the java input stream which contains the binary parameter value
   * @param length the number of bytes in the stream
   * @exception SQLException if a database access error occurs or
-  * this method is called on a closed <code>CallableStatement</code>
+  *            this method is called on a closed {@code CallableStatement}
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-  * this method
+  *            this method
   * @since 1.4
   */
  public void setBinaryStream(String parameterName, java.io.InputStream x,
@@ -6506,11 +6528,11 @@
  }
 
  /**
-   * Sets the designated parameter to the given <code>Reader</code>
+   * Sets the designated parameter to the given {@code Reader}
    * object, which is the given number of characters long.
-   * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+   * When a very large UNICODE value is input to a {@code LONGVARCHAR}
    * parameter, it may be more practical to send it via a
-   * <code>java.io.Reader</code> object. The data will be read from the stream
+   * {@code java.io.Reader} object. The data will be read from the stream
    * as needed until end-of-file is reached.  The JDBC driver will
    * do any necessary conversion from UNICODE to the database char format.
    *
@@ -6519,13 +6541,13 @@
    * standard interface.
    *
    * @param parameterName the name of the parameter
-   * @param reader the <code>java.io.Reader</code> object that
+   * @param reader the {@code java.io.Reader} object that
    *        contains the UNICODE data used as the designated parameter
    * @param length the number of characters in the stream
    * @exception SQLException if a database access error occurs or
-   * this method is called on a closed <code>CallableStatement</code>
+   *            this method is called on a closed {@code CallableStatement}
    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-   * this method
+   *            this method
    * @since 1.4
    */
   public void setCharacterStream(String parameterName,
@@ -6536,9 +6558,9 @@
 
   /**
    * Sets the designated parameter to the given input stream.
-   * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
+   * When a very large ASCII value is input to a {@code LONGVARCHAR}
    * parameter, it may be more practical to send it via a
-   * <code>java.io.InputStream</code>. Data will be read from the stream
+   * {@code java.io.InputStream}. Data will be read from the stream
    * as needed until end-of-file is reached.  The JDBC driver will
    * do any necessary conversion from ASCII to the database char format.
    *
@@ -6547,15 +6569,15 @@
    * standard interface.
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
    * it might be more efficient to use a version of
-   * <code>setAsciiStream</code> which takes a length parameter.
+   * {@code setAsciiStream} which takes a length parameter.
    *
    * @param parameterName the name of the parameter
    * @param x the Java input stream that contains the ASCII parameter value
    * @exception SQLException if a database access error occurs or
-   * this method is called on a closed <code>CallableStatement</code>
+   *            this method is called on a closed {@code CallableStatement}
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-     * @since 1.6
-  */
+   * @since 1.6
+   */
   public void setAsciiStream(String parameterName, java.io.InputStream x)
           throws SQLException{
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
@@ -6564,9 +6586,9 @@
 
  /**
     * Sets the designated parameter to the given input stream.
-    * When a very large binary value is input to a <code>LONGVARBINARY</code>
+    * When a very large binary value is input to a {@code LONGVARBINARY}
     * parameter, it may be more practical to send it via a
-    * <code>java.io.InputStream</code> object. The data will be read from the
+    * {@code java.io.InputStream} object. The data will be read from the
     * stream as needed until end-of-file is reached.
     *
     * <P><B>Note:</B> This stream object can either be a standard
@@ -6574,12 +6596,12 @@
     * standard interface.
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
     * it might be more efficient to use a version of
-    * <code>setBinaryStream</code> which takes a length parameter.
+    * {@code setBinaryStream} which takes a length parameter.
     *
     * @param parameterName the name of the parameter
     * @param x the java input stream which contains the binary parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     * @since 1.6
     */
@@ -6589,11 +6611,11 @@
    }
 
  /**
-    * Sets the designated parameter to the given <code>Reader</code>
+    * Sets the designated parameter to the given {@code Reader}
     * object.
-    * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
+    * When a very large UNICODE value is input to a {@code LONGVARCHAR}
     * parameter, it may be more practical to send it via a
-    * <code>java.io.Reader</code> object. The data will be read from the stream
+    * {@code java.io.Reader} object. The data will be read from the stream
     * as needed until end-of-file is reached.  The JDBC driver will
     * do any necessary conversion from UNICODE to the database char format.
     *
@@ -6602,13 +6624,13 @@
     * standard interface.
     * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
     * it might be more efficient to use a version of
-    * <code>setCharacterStream</code> which takes a length parameter.
+    * {@code setCharacterStream} which takes a length parameter.
     *
     * @param parameterName the name of the parameter
-    * @param reader the <code>java.io.Reader</code> object that contains the
+    * @param reader the {@code java.io.Reader} object that contains the
     *        Unicode data
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     * @since 1.6
     */
@@ -6619,16 +6641,16 @@
 
    /**
     * Sets the designated parameter to the given
-    * <code>java.math.BigDecimal</code> value.
-    * The driver converts this to an SQL <code>NUMERIC</code> value when
+    * {@code java.math.BigDecimal} value.
+    * The driver converts this to an SQL {@code NUMERIC} value when
     * it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getBigDecimal
     * @since 1.4
     */
@@ -6636,20 +6658,20 @@
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
- /**
-    * Sets the designated parameter to the given Java <code>String</code> value.
+   /**
+    * Sets the designated parameter to the given Java {@code String} value.
     * The driver converts this
-    * to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value
+    * to an SQL {@code VARCHAR} or {@code LONGVARCHAR} value
     * (depending on the argument's
-    * size relative to the driver's limits on <code>VARCHAR</code> values)
+    * size relative to the driver's limits on {@code VARCHAR} values)
     * when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getString
     * @since 1.4
     */
@@ -6659,19 +6681,19 @@
 
 
 
- /**
+   /**
     * Sets the designated parameter to the given Java array of bytes.
-    * The driver converts this to an SQL <code>VARBINARY</code> or
-    * <code>LONGVARBINARY</code> (depending on the argument's size relative
-    * to the driver's limits on <code>VARBINARY</code> values) when it sends
+    * The driver converts this to an SQL {@code VARBINARY} or
+    * {@code LONGVARBINARY} (depending on the argument's size relative
+    * to the driver's limits on {@code VARBINARY} values) when it sends
     * it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getBytes
     * @since 1.4
     */
@@ -6680,17 +6702,17 @@
    }
 
  /**
-    * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value.
+    * Sets the designated parameter to the given {@code java.sql.Timestamp} value.
     * The driver
-    * converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the
+    * converts this to an SQL {@code TIMESTAMP} value when it sends it to the
     * database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getTimestamp
     * @since 1.4
     */
@@ -6700,16 +6722,16 @@
    }
 
     /**
-    * Sets the designated parameter to SQL <code>NULL</code>.
+    * Sets the designated parameter to SQL {@code NULL}.
     *
     * <P><B>Note:</B> You must specify the parameter's SQL type.
     *
     * @param parameterName the name of the parameter
-    * @param sqlType the SQL type code defined in <code>java.sql.Types</code>
+    * @param sqlType the SQL type code defined in {@code java.sql.Types}
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @since 1.4
     */
    public void setNull(String parameterName, int sqlType) throws SQLException {
@@ -6717,8 +6739,8 @@
    }
 
  /**
-    * Sets the designated parameter to SQL <code>NULL</code>.
-    * This version of the method <code>setNull</code> should
+    * Sets the designated parameter to SQL {@code NULL}.
+    * This version of the method {@code setNull} should
     * be used for user-defined types and REF type parameters.  Examples
     * of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and
     * named array types.
@@ -6738,14 +6760,14 @@
     *
     *
     * @param parameterName the name of the parameter
-    * @param sqlType a value from <code>java.sql.Types</code>
+    * @param sqlType a value from {@code java.sql.Types}
     * @param typeName the fully-qualified name of an SQL user-defined type;
     *        ignored if the parameter is not a user-defined type or
-    *        SQL <code>REF</code> value
+    *        SQL {@code REF} value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *        this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *        this method
     * @since 1.4
     */
    public void setNull (String parameterName, int sqlType, String typeName)
@@ -6754,17 +6776,17 @@
    }
 
  /**
-    * Sets the designated parameter to the given Java <code>boolean</code> value.
+    * Sets the designated parameter to the given Java {@code boolean} value.
     * The driver converts this
-    * to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.
+    * to an SQL {@code BIT} or {@code BOOLEAN} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @see #getBoolean
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @since 1.4
     */
    public void setBoolean(String parameterName, boolean x) throws SQLException{
@@ -6774,16 +6796,16 @@
 
 
  /**
-    * Sets the designated parameter to the given Java <code>byte</code> value.
+    * Sets the designated parameter to the given Java {@code byte} value.
     * The driver converts this
-    * to an SQL <code>TINYINT</code> value when it sends it to the database.
+    * to an SQL {@code TINYINT} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getByte
     * @since 1.4
     */
@@ -6793,16 +6815,16 @@
 
 
  /**
-    * Sets the designated parameter to the given Java <code>short</code> value.
+    * Sets the designated parameter to the given Java {@code short} value.
     * The driver converts this
-    * to an SQL <code>SMALLINT</code> value when it sends it to the database.
+    * to an SQL {@code SMALLINT} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getShort
     * @since 1.4
     */
@@ -6812,16 +6834,16 @@
 
 
    /**
-    * Sets the designated parameter to the given Java <code>int</code> value.
+    * Sets the designated parameter to the given Java {@code int} value.
     * The driver converts this
-    * to an SQL <code>INTEGER</code> value when it sends it to the database.
+    * to an SQL {@code INTEGER} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getInt
     * @since 1.4
     */
@@ -6829,17 +6851,17 @@
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
- /**
-    * Sets the designated parameter to the given Java <code>long</code> value.
+   /**
+    * Sets the designated parameter to the given Java {@code long} value.
     * The driver converts this
-    * to an SQL <code>BIGINT</code> value when it sends it to the database.
+    * to an SQL {@code BIGINT} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getLong
     * @since 1.4
     */
@@ -6848,17 +6870,17 @@
    }
 
 
- /**
-    * Sets the designated parameter to the given Java <code>float</code> value.
+   /**
+    * Sets the designated parameter to the given Java {@code float} value.
     * The driver converts this
-    * to an SQL <code>FLOAT</code> value when it sends it to the database.
+    * to an SQL {@code FLOAT} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getFloat
     * @since 1.4
     */
@@ -6866,17 +6888,17 @@
         throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
    }
 
- /**
-    * Sets the designated parameter to the given Java <code>double</code> value.
+   /**
+    * Sets the designated parameter to the given Java {@code double} value.
     * The driver converts this
-    * to an SQL <code>DOUBLE</code> value when it sends it to the database.
+    * to an SQL {@code DOUBLE} value when it sends it to the database.
     *
     * @param parameterName the name of the parameter
     * @param x the parameter value
     * @exception SQLException if a database access error occurs or
-    * this method is called on a closed <code>CallableStatement</code>
+    *            this method is called on a closed {@code CallableStatement}
     * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-    * this method
+    *            this method
     * @see #getDouble
     * @since 1.4
     */
@@ -6887,7 +6909,6 @@
     /**
      * This method re populates the resBundle
      * during the deserialization process
-     *
      */
     private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
         // Default state initialization happens here
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/internal/CachedRowSetWriter.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/internal/CachedRowSetWriter.java	Mon Jun 08 11:31:09 2015 -0700
@@ -43,22 +43,22 @@
 
 
 /**
- * The facility called on internally by the <code>RIOptimisticProvider</code> implementation to
+ * The facility called on internally by the {@code RIOptimisticProvider} implementation to
  * propagate changes back to the data source from which the rowset got its data.
  * <P>
- * A <code>CachedRowSetWriter</code> object, called a writer, has the public
- * method <code>writeData</code> for writing modified data to the underlying data source.
+ * A {@code CachedRowSetWriter} object, called a writer, has the public
+ * method {@code writeData} for writing modified data to the underlying data source.
  * This method is invoked by the rowset internally and is never invoked directly by an application.
  * A writer also has public methods for setting and getting
- * the <code>CachedRowSetReader</code> object, called a reader, that is associated
+ * the {@code CachedRowSetReader} object, called a reader, that is associated
  * with the writer. The remainder of the methods in this class are private and
  * are invoked internally, either directly or indirectly, by the method
- * <code>writeData</code>.
+ * {@code writeData}.
  * <P>
- * Typically the <code>SyncFactory</code> manages the <code>RowSetReader</code> and
- * the <code>RowSetWriter</code> implementations using <code>SyncProvider</code> objects.
+ * Typically the {@code SyncFactory} manages the {@code RowSetReader} and
+ * the {@code RowSetWriter} implementations using {@code SyncProvider} objects.
  * Standard JDBC RowSet implementations provide an object instance of this
- * writer by invoking the <code>SyncProvider.getRowSetWriter()</code> method.
+ * writer by invoking the {@code SyncProvider.getRowSetWriter()} method.
  *
  * @version 0.2
  * @author Jonathan Bruce
@@ -69,15 +69,15 @@
 public class CachedRowSetWriter implements TransactionalWriter, Serializable {
 
 /**
- * The <code>Connection</code> object that this writer will use to make a
+ * The {@code Connection} object that this writer will use to make a
  * connection to the data source to which it will write data.
  *
  */
     private transient Connection con;
 
 /**
- * The SQL <code>SELECT</code> command that this writer will call
- * internally. The method <code>initSQLStatements</code> builds this
+ * The SQL {@code SELECT} command that this writer will call
+ * internally. The method {@code initSQLStatements} builds this
  * command by supplying the words "SELECT" and "FROM," and using
  * metadata to get the table name and column names .
  *
@@ -86,9 +86,9 @@
     private String selectCmd;
 
 /**
- * The SQL <code>UPDATE</code> command that this writer will call
+ * The SQL {@code UPDATE} command that this writer will call
  * internally to write data to the rowset's underlying data source.
- * The method <code>initSQLStatements</code> builds this <code>String</code>
+ * The method {@code initSQLStatements} builds this {@code String}
  * object.
  *
  * @serial
@@ -96,8 +96,8 @@
     private String updateCmd;
 
 /**
- * The SQL <code>WHERE</code> clause the writer will use for update
- * statements in the <code>PreparedStatement</code> object
+ * The SQL {@code WHERE} clause the writer will use for update
+ * statements in the {@code PreparedStatement} object
  * it sends to the underlying data source.
  *
  * @serial
@@ -105,7 +105,7 @@
     private String updateWhere;
 
 /**
- * The SQL <code>DELETE</code> command that this writer will call
+ * The SQL {@code DELETE} command that this writer will call
  * internally to delete a row in the rowset's underlying data source.
  *
  * @serial
@@ -113,8 +113,8 @@
     private String deleteCmd;
 
 /**
- * The SQL <code>WHERE</code> clause the writer will use for delete
- * statements in the <code>PreparedStatement</code> object
+ * The SQL {@code WHERE} clause the writer will use for delete
+ * statements in the {@code PreparedStatement} object
  * it sends to the underlying data source.
  *
  * @serial
@@ -122,9 +122,9 @@
     private String deleteWhere;
 
 /**
- * The SQL <code>INSERT INTO</code> command that this writer will internally use
+ * The SQL {@code INSERT INTO} command that this writer will internally use
  * to insert data into the rowset's underlying data source.  The method
- * <code>initSQLStatements</code> builds this command with a question
+ * {@code initSQLStatements} builds this command with a question
  * mark parameter placeholder for each column in the rowset.
  *
  * @serial
@@ -133,8 +133,8 @@
 
 /**
  * An array containing the column numbers of the columns that are
- * needed to uniquely identify a row in the <code>CachedRowSet</code> object
- * for which this <code>CachedRowSetWriter</code> object is the writer.
+ * needed to uniquely identify a row in the {@code CachedRowSet} object
+ * for which this {@code CachedRowSetWriter} object is the writer.
  *
  * @serial
  */
@@ -142,7 +142,7 @@
 
 /**
  * An array of the parameters that should be used to set the parameter
- * placeholders in a <code>PreparedStatement</code> object that this
+ * placeholders in a {@code PreparedStatement} object that this
  * writer will execute.
  *
  * @serial
@@ -150,33 +150,33 @@
     private Object[] params;
 
 /**
- * The <code>CachedRowSetReader</code> object that has been
- * set as the reader for the <code>CachedRowSet</code> object
- * for which this <code>CachedRowSetWriter</code> object is the writer.
+ * The {@code CachedRowSetReader} object that has been
+ * set as the reader for the {@code CachedRowSet} object
+ * for which this {@code CachedRowSetWriter} object is the writer.
  *
  * @serial
  */
     private CachedRowSetReader reader;
 
 /**
- * The <code>ResultSetMetaData</code> object that contains information
- * about the columns in the <code>CachedRowSet</code> object
- * for which this <code>CachedRowSetWriter</code> object is the writer.
+ * The {@code ResultSetMetaData} object that contains information
+ * about the columns in the {@code CachedRowSet} object
+ * for which this {@code CachedRowSetWriter} object is the writer.
  *
  * @serial
  */
     private ResultSetMetaData callerMd;
 
 /**
- * The number of columns in the <code>CachedRowSet</code> object
- * for which this <code>CachedRowSetWriter</code> object is the writer.
+ * The number of columns in the {@code CachedRowSet} object
+ * for which this {@code CachedRowSetWriter} object is the writer.
  *
  * @serial
  */
     private int callerColumnCount;
 
 /**
- * This <code>CachedRowSet<code> will hold the conflicting values
+ * This {@code CachedRowSet} will hold the conflicting values
  *  retrieved from the db and hold it.
  */
     private CachedRowSetImpl crsResolve;
@@ -209,8 +209,8 @@
     }
 
 /**
- * Propagates changes in the given <code>RowSet</code> object
- * back to its underlying data source and returns <code>true</code>
+ * Propagates changes in the given {@code RowSet} object
+ * back to its underlying data source and returns {@code true}
  * if successful. The writer will check to see if
  * the data in the pre-modified rowset (the original values) differ
  * from the data in the underlying data source.  If data in the data
@@ -221,15 +221,15 @@
  * access for concurrent users.
  * <P>
  * This method is called by the rowset internally when
- * the application invokes the method <code>acceptChanges</code>.
- * The <code>writeData</code> method in turn calls private methods that
+ * the application invokes the method {@code acceptChanges}.
+ * The {@code writeData} method in turn calls private methods that
  * it defines internally.
  * The following is a general summary of what the method
- * <code>writeData</code> does, much of which is accomplished
+ * {@code writeData} does, much of which is accomplished
  * through calls to its own internal methods.
  * <OL>
- * <LI>Creates a <code>CachedRowSet</code> object from the given
- *     <code>RowSet</code> object
+ * <LI>Creates a {@code CachedRowSet} object from the given
+ *     {@code RowSet} object
  * <LI>Makes a connection with the data source
  *   <UL>
  *      <LI>Disables autocommit mode if it is not already disabled
@@ -237,32 +237,32 @@
  *   </UL>
  * <LI>Checks to see if the reader has read new data since the writer
  *     was last called and, if so, calls the method
- *    <code>initSQLStatements</code> to initialize new SQL statements
+ *    {@code initSQLStatements} to initialize new SQL statements
  *   <UL>
- *       <LI>Builds new <code>SELECT</code>, <code>UPDATE</code>,
- *           <code>INSERT</code>, and <code>DELETE</code> statements
- *       <LI>Uses the <code>CachedRowSet</code> object's metadata to
+ *       <LI>Builds new {@code SELECT}, {@code UPDATE},
+ *           {@code INSERT}, and {@code DELETE} statements
+ *       <LI>Uses the {@code CachedRowSet} object's metadata to
  *           determine the table name, column names, and the columns
  *           that make up the primary key
  *   </UL>
  * <LI>When there is no conflict, propagates changes made to the
- *     <code>CachedRowSet</code> object back to its underlying data source
+ *     {@code CachedRowSet} object back to its underlying data source
  *   <UL>
- *      <LI>Iterates through each row of the <code>CachedRowSet</code> object
+ *      <LI>Iterates through each row of the {@code CachedRowSet} object
  *          to determine whether it has been updated, inserted, or deleted
  *      <LI>If the corresponding row in the data source has not been changed
  *          since the rowset last read its
  *          values, the writer will use the appropriate command to update,
  *          insert, or delete the row
  *      <LI>If any data in the data source does not match the original values
- *          for the <code>CachedRowSet</code> object, the writer will roll
+ *          for the {@code CachedRowSet} object, the writer will roll
  *          back any changes it has made to the row in the data source.
  *   </UL>
  * </OL>
  *
- * @return <code>true</code> if changes to the rowset were successfully
+ * @return {@code true} if changes to the rowset were successfully
  *         written to the rowset's underlying data source;
- *         <code>false</code> otherwise
+ *         {@code false} otherwise
  */
     public boolean writeData(RowSetInternal caller) throws SQLException {
         long conflicts = 0;
@@ -434,25 +434,25 @@
 
   } //end writeData
 
-/**
- * Updates the given <code>CachedRowSet</code> object's underlying data
- * source so that updates to the rowset are reflected in the original
- * data source, and returns <code>false</code> if the update was successful.
- * A return value of <code>true</code> indicates that there is a conflict,
- * meaning that a value updated in the rowset has already been changed by
- * someone else in the underlying data source.  A conflict can also exist
- * if, for example, more than one row in the data source would be affected
- * by the update or if no rows would be affected.  In any case, if there is
- * a conflict, this method does not update the underlying data source.
- * <P>
- * This method is called internally by the method <code>writeData</code>
- * if a row in the <code>CachedRowSet</code> object for which this
- * <code>CachedRowSetWriter</code> object is the writer has been updated.
- *
- * @return <code>false</code> if the update to the underlying data source is
- *         successful; <code>true</code> otherwise
- * @throws SQLException if a database access error occurs
- */
+    /**
+     * Updates the given {@code CachedRowSet} object's underlying data
+     * source so that updates to the rowset are reflected in the original
+     * data source, and returns {@code false} if the update was successful.
+     * A return value of {@code true} indicates that there is a conflict,
+     * meaning that a value updated in the rowset has already been changed by
+     * someone else in the underlying data source.  A conflict can also exist
+     * if, for example, more than one row in the data source would be affected
+     * by the update or if no rows would be affected.  In any case, if there is
+     * a conflict, this method does not update the underlying data source.
+     * <P>
+     * This method is called internally by the method {@code writeData}
+     * if a row in the {@code CachedRowSet} object for which this
+     * {@code CachedRowSetWriter} object is the writer has been updated.
+     *
+     * @return {@code false} if the update to the underlying data source is
+     *         successful; {@code true} otherwise
+     * @throws SQLException if a database access error occurs
+     */
     private boolean updateOriginalRow(CachedRowSet crs)
         throws SQLException {
         PreparedStatement pstmt;
@@ -805,16 +805,16 @@
 
    /**
     * Inserts a row that has been inserted into the given
-    * <code>CachedRowSet</code> object into the data source from which
-    * the rowset is derived, returning <code>false</code> if the insertion
+    * {@code CachedRowSet} object into the data source from which
+    * the rowset is derived, returning {@code false} if the insertion
     * was successful.
     *
-    * @param crs the <code>CachedRowSet</code> object that has had a row inserted
+    * @param crs the {@code CachedRowSet} object that has had a row inserted
     *            and to whose underlying data source the row will be inserted
-    * @param pstmt the <code>PreparedStatement</code> object that will be used
+    * @param pstmt the {@code PreparedStatement} object that will be used
     *              to execute the insertion
-    * @return <code>false</code> to indicate that the insertion was successful;
-    *         <code>true</code> otherwise
+    * @return {@code false} to indicate that the insertion was successful;
+    *         {@code true} otherwise
     * @throws SQLException if a database access error occurs
     */
    private boolean insertNewRow(CachedRowSet crs,
@@ -917,24 +917,24 @@
        }
    }
 
-/**
- * Deletes the row in the underlying data source that corresponds to
- * a row that has been deleted in the given <code> CachedRowSet</code> object
- * and returns <code>false</code> if the deletion was successful.
- * <P>
- * This method is called internally by this writer's <code>writeData</code>
- * method when a row in the rowset has been deleted. The values in the
- * deleted row are the same as those that are stored in the original row
- * of the given <code>CachedRowSet</code> object.  If the values in the
- * original row differ from the row in the underlying data source, the row
- * in the data source is not deleted, and <code>deleteOriginalRow</code>
- * returns <code>true</code> to indicate that there was a conflict.
- *
- *
- * @return <code>false</code> if the deletion was successful, which means that
- *         there was no conflict; <code>true</code> otherwise
- * @throws SQLException if there was a database access error
- */
+   /**
+    * Deletes the row in the underlying data source that corresponds to
+    * a row that has been deleted in the given {@code  CachedRowSet} object
+    * and returns {@code false} if the deletion was successful.
+    * <P>
+    * This method is called internally by this writer's {@code writeData}
+    * method when a row in the rowset has been deleted. The values in the
+    * deleted row are the same as those that are stored in the original row
+    * of the given {@code CachedRowSet} object.  If the values in the
+    * original row differ from the row in the underlying data source, the row
+    * in the data source is not deleted, and {@code deleteOriginalRow}
+    * returns {@code true} to indicate that there was a conflict.
+    *
+    *
+    * @return {@code false} if the deletion was successful, which means that
+    *         there was no conflict; {@code true} otherwise
+    * @throws SQLException if there was a database access error
+    */
     private boolean deleteOriginalRow(CachedRowSet crs, CachedRowSetImpl crsRes) throws SQLException {
         PreparedStatement pstmt;
         int i;
@@ -1056,13 +1056,13 @@
     }
 
     /**
-     * Composes a <code>SELECT</code>, <code>UPDATE</code>, <code>INSERT</code>,
-     * and <code>DELETE</code> statement that can be used by this writer to
-     * write data to the data source backing the given <code>CachedRowSet</code>
+     * Composes a {@code SELECT}, {@code UPDATE}, {@code INSERT},
+     * and {@code DELETE} statement that can be used by this writer to
+     * write data to the data source backing the given {@code CachedRowSet}
      * object.
      *
-     * @ param caller a <code>CachedRowSet</code> object for which this
-     *                <code>CachedRowSetWriter</code> object is the writer
+     * @param caller a {@code CachedRowSet} object for which this
+     *        {@code CachedRowSetWriter} object is the writer
      * @throws SQLException if a database access error occurs
      */
     private void initSQLStatements(CachedRowSet caller) throws SQLException {
@@ -1177,13 +1177,13 @@
      * table names. The given metadata object is used to get the proper order
      * and separator.
      *
-     * @param dbmd a <code>DatabaseMetaData</code> object that contains metadata
-     *          about this writer's <code>CachedRowSet</code> object
-     * @param catalog a <code>String</code> object with the rowset's catalog
+     * @param dbmd a {@code DatabaseMetaData} object that contains metadata
+     *          about this writer's {@code CachedRowSet} object
+     * @param catalog a {@code String} object with the rowset's catalog
      *          name
-     * @param table a <code>String</code> object with the name of the table from
+     * @param table a {@code String} object with the name of the table from
      *          which this writer's rowset was derived
-     * @return a <code>String</code> object with the fully qualified name of the
+     * @return a {@code String} object with the fully qualified name of the
      *          table from which this writer's rowset was derived
      * @throws SQLException if a database access error occurs
      */
@@ -1221,21 +1221,21 @@
     }
 
     /**
-     * Assigns to the given <code>CachedRowSet</code> object's
-     * <code>params</code>
+     * Assigns to the given {@code CachedRowSet} object's
+     * {@code params}
      * field an array whose length equals the number of columns needed
      * to uniquely identify a row in the rowset. The array is given
-     * values by the method <code>buildWhereClause</code>.
+     * values by the method {@code buildWhereClause}.
      * <P>
-     * If the <code>CachedRowSet</code> object's <code>keyCols</code>
-     * field has length <code>0</code> or is <code>null</code>, the array
+     * If the {@code CachedRowSet} object's {@code keyCols}
+     * field has length {@code 0} or is {@code null}, the array
      * is set with the column number of every column in the rowset.
-     * Otherwise, the array in the field <code>keyCols</code> is set with only
+     * Otherwise, the array in the field {@code keyCols} is set with only
      * the column numbers of the columns that are required to form a unique
      * identifier for a row.
      *
-     * @param crs the <code>CachedRowSet</code> object for which this
-     *     <code>CachedRowSetWriter</code> object is the writer
+     * @param crs the {@code CachedRowSet} object for which this
+     *     {@code CachedRowSetWriter} object is the writer
      *
      * @throws SQLException if a database access error occurs
      */
@@ -1263,29 +1263,29 @@
     }
 
     /**
-         * Constructs an SQL <code>WHERE</code> clause using the given
-         * string as a starting point. The resulting clause will contain
-         * a column name and " = ?" for each key column, that is, each column
-         * that is needed to form a unique identifier for a row in the rowset.
-         * This <code>WHERE</code> clause can be added to
-         * a <code>PreparedStatement</code> object that updates, inserts, or
-         * deletes a row.
-         * <P>
-         * This method uses the given result set to access values in the
-         * <code>CachedRowSet</code> object that called this writer.  These
-         * values are used to build the array of parameters that will serve as
-         * replacements for the "?" parameter placeholders in the
-         * <code>PreparedStatement</code> object that is sent to the
-         * <code>CachedRowSet</code> object's underlying data source.
-         *
-         * @param whereClause a <code>String</code> object that is an empty
-         *                    string ("")
-         * @param rs a <code>ResultSet</code> object that can be used
-         *           to access the <code>CachedRowSet</code> object's data
-         * @return a <code>WHERE</code> clause of the form "<code>WHERE</code>
-         *         columnName = ? AND columnName = ? AND columnName = ? ..."
-         * @throws SQLException if a database access error occurs
-         */
+     * Constructs an SQL {@code WHERE} clause using the given
+     * string as a starting point. The resulting clause will contain
+     * a column name and " = ?" for each key column, that is, each column
+     * that is needed to form a unique identifier for a row in the rowset.
+     * This {@code WHERE} clause can be added to
+     * a {@code PreparedStatement} object that updates, inserts, or
+     * deletes a row.
+     * <P>
+     * This method uses the given result set to access values in the
+     * {@code CachedRowSet} object that called this writer.  These
+     * values are used to build the array of parameters that will serve as
+     * replacements for the "?" parameter placeholders in the
+     * {@code PreparedStatement} object that is sent to the
+     * {@code CachedRowSet} object's underlying data source.
+     *
+     * @param whereClause a {@code String} object that is an empty
+     *                    string ("")
+     * @param rs a {@code ResultSet} object that can be used
+     *           to access the {@code CachedRowSet} object's data
+     * @return a {@code WHERE} clause of the form "{@code WHERE}
+     *         columnName = ? AND columnName = ? AND columnName = ? ..."
+     * @throws SQLException if a database access error occurs
+     */
     private String buildWhereClause(String whereClause,
                                     ResultSet rs) throws SQLException {
         whereClause = "WHERE ";
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/internal/SyncResolverImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/internal/SyncResolverImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -39,8 +39,8 @@
 
 /**
  * There will be two sets of data which will be maintained by the rowset at the
- * time of synchronization. The <code>SyncProvider</code> will utilize the
- * <code>SyncResolver</code> to synchronize the changes back to database.
+ * time of synchronization. The {@code SyncProvider} will utilize the
+ * {@code SyncResolver} to synchronize the changes back to database.
  */
 public class SyncResolverImpl extends CachedRowSetImpl implements SyncResolver {
     /**
@@ -79,19 +79,19 @@
     private int rowStatus;
 
     /**
-     * This will contain the size of the <code>CachedRowSet</code> object
+     * This will contain the size of the {@code CachedRowSet} object
      */
     private int sz;
 
     /**
-     * The <code>Connection</code> handle used to synchronize the changes
+     * The {@code Connection} handle used to synchronize the changes
      * back to datasource. This is the same connection handle as was passed
      * to the CachedRowSet while fetching the data.
      */
     private transient Connection con;
 
     /**
-     * The <code>CachedRowSet</code> object which will encapsulate
+     * The {@code CachedRowSet} object which will encapsulate
      * a row at any time. This will be built from CachedRowSet and
      * SyncResolver values. Synchronization takes place on a row by
      * row basis encapsulated as a CahedRowSet.
@@ -123,13 +123,13 @@
 
     /**
      * Retrieves the conflict status of the current row of this
-     * <code>SyncResolver</code>, which indicates the operationthe <code>RowSet</code>
+     * {@code SyncResolver}, which indicates the operationthe {@code RowSet}
      * object was attempting when the conflict occurred.
      *
      * @return one of the following constants:
-     *         <code>SyncResolver.UPDATE_ROW_CONFLICT</code>,
-     *         <code>SyncResolver.DELETE_ROW_CONFLICT</code>, or
-     *         <code>SyncResolver.INSERT_ROW_CONFLICT</code>
+     *         {@code SyncResolver.UPDATE_ROW_CONFLICT},
+     *         {@code SyncResolver.DELETE_ROW_CONFLICT}, or
+     *         {@code SyncResolver.INSERT_ROW_CONFLICT}
      */
     public int getStatus() {
         return ((Integer)stats.get(rowStatus-1)).intValue();
@@ -137,10 +137,10 @@
 
     /**
      * Retrieves the value in the designated column in the current row of this
-     * <code>SyncResolver</code> object, which is the value that caused a conflict.
-     *
-     * @param index <code>int</code> designating the column in this row of this
-     *        <code>SyncResolver</code> object from which to retrieve the value
+     * {@code SyncResolver} object, which is the value that caused a conflict.
+     *
+     * @param index {@code int} designating the column in this row of this
+     *        {@code SyncResolver} object from which to retrieve the value
      *        causing a conflict
      */
     public Object getConflictValue(int index) throws SQLException {
@@ -153,10 +153,10 @@
 
     /**
      * Retrieves the value in the designated column in the current row of this
-     * <code>SyncResolver</code> object, which is the value that caused a conflict.
-     *
-     * @param columnName a <code>String</code> object designating the column in this row of this
-     *        <code>SyncResolver</code> object from which to retrieve the value
+     * {@code SyncResolver} object, which is the value that caused a conflict.
+     *
+     * @param columnName a {@code String} object designating the column in this row of this
+     *        {@code SyncResolver} object from which to retrieve the value
      *        causing a conflict
      */
     public Object getConflictValue(String columnName) throws SQLException {
@@ -169,12 +169,12 @@
 
     /**
      * Sets <i>obj</i> as the value in column <i>index</i> in the current row of the
-     * <code>RowSet</code> object. This value is the resolved value that is to be
+     * {@code RowSet} object. This value is the resolved value that is to be
      * persisted in the data source.
      *
-     * @param index an <code>int</code> giving the number of the column into which to
+     * @param index an {@code int} giving the number of the column into which to
      *        set the value to be persisted
-     * @param obj an <code>Object</code> that is the value to be set in the data source
+     * @param obj an {@code Object} that is the value to be set in the data source
      */
     public void setResolvedValue(int index, Object obj) throws SQLException {
         // modify method to throw SQLException in spec
@@ -291,18 +291,18 @@
      * This passes a CachedRowSet as a row to the CachedRowSetWriter
      * after the values have been resolved, back to the datasource.
      *
-     * @param row a <code>CachedRowSet</code> object which will hold the
+     * @param row a {@code CachedRowSet} object which will hold the
      *        values of a particular row after they have been resolved by
      *        the user to synchronize back to datasource.
      * @throws SQLException if synchronization does not happen properly
-     *         maybe beacuse <code>Connection</code> has timed out.
+     *         maybe beacuse {@code Connection} has timed out.
      **/
      private void writeData(CachedRowSet row) throws SQLException {
         crw.updateResolvedConflictToDB(row, crw.getReader().connect((RowSetInternal)crsSync));
      }
 
     /**
-     * This function builds a row  as a <code>CachedRowSet</code> object
+     * This function builds a row  as a {@code CachedRowSet} object
      * which has been resolved and is ready to be synchrinized to the datasource
      *
      * @throws SQLException if there is problem in building
@@ -385,12 +385,12 @@
 
     /**
      * Sets <i>obj</i> as the value in column <i>columnName</i> in the current row of the
-     * <code>RowSet</code> object. This value is the resolved value that is to be
+     * {@code RowSet} object. This value is the resolved value that is to be
      * persisted in the data source.
      *
-     * @param columnName a <code>String</code> object giving the name of the column
+     * @param columnName a {@code String} object giving the name of the column
      *        into which to set the value to be persisted
-     * @param obj an <code>Object</code> that is the value to be set in the data source
+     * @param obj an {@code Object} that is the value to be set in the data source
      */
     public void setResolvedValue(String columnName, Object obj) throws SQLException {
        // modify method to throw SQLException in spec
@@ -445,13 +445,13 @@
     }
 
     /**
-     * Moves the cursor down one row from its current position. A <code>SyncResolver</code>
+     * Moves the cursor down one row from its current position. A {@code SyncResolver}
      * cursor is initially positioned before the first conflict row; the first call to the
-     * method <code>nextConflict()</code> makes the first conflict row the current row;
+     * method {@code nextConflict()} makes the first conflict row the current row;
      * the second call makes the second conflict row the current row, and so on.
      * <p>
      * If an input stream is open for the current row, a call to the method next will
-     * implicitly close it. A <code>SyncResolver</code> object's warning chain is cleared
+     * implicitly close it. A {@code SyncResolver} object's warning chain is cleared
      * when a new row
      *
      * @return true if the new current row is valid; false if there are no more rows
@@ -495,9 +495,9 @@
 
 
     /**
-     * Moves the cursor to the previous conflict row in this <code>SyncResolver</code> object.
-     *
-     * @return <code>true</code> if the cursor is on a valid row; <code>false</code>
+     * Moves the cursor to the previous conflict row in this {@code SyncResolver} object.
+     *
+     * @return {@code true} if the cursor is on a valid row; {@code false}
      *     if it is off the result set
      * @throws SQLException if a database access error occurs or the result set type
      *     is TYPE_FORWARD_ONLY
@@ -511,17 +511,17 @@
     //-----------------------------------------------------------------------
 
     /**
-     * Sets this <code>CachedRowSetImpl</code> object's command property
-     * to the given <code>String</code> object and clears the parameters,
+     * Sets this {@code CachedRowSetImpl} object's command property
+     * to the given {@code String} object and clears the parameters,
      * if any, that were set for the previous command.
      * <P>
      * The command property may not be needed
      * if the rowset is produced by a data source, such as a spreadsheet,
      * that does not support commands. Thus, this property is optional
-     * and may be <code>null</code>.
-     *
-     * @param cmd a <code>String</code> object containing an SQL query
-     *            that will be set as the command; may be <code>null</code>
+     * and may be {@code null}.
+     *
+     * @param cmd a {@code String} object containing an SQL query
+     *            that will be set as the command; may be {@code null}
      * @throws SQLException if an error occurs
      */
     public void setCommand(String cmd) throws SQLException {
@@ -534,25 +534,25 @@
     //---------------------------------------------------------------------
 
     /**
-     * Populates this <code>CachedRowSetImpl</code> object with data from
-     * the given <code>ResultSet</code> object.  This
-     * method is an alternative to the method <code>execute</code>
-     * for filling the rowset with data.  The method <code>populate</code>
+     * Populates this {@code CachedRowSetImpl} object with data from
+     * the given {@code ResultSet} object.  This
+     * method is an alternative to the method {@code execute}
+     * for filling the rowset with data.  The method {@code populate}
      * does not require that the properties needed by the method
-     * <code>execute</code>, such as the <code>command</code> property,
-     * be set. This is true because the method <code>populate</code>
-     * is given the <code>ResultSet</code> object from
+     * {@code execute}, such as the {@code command} property,
+     * be set. This is true because the method {@code populate}
+     * is given the {@code ResultSet} object from
      * which to get data and thus does not need to use the properties
      * required for setting up a connection and executing this
-     * <code>CachedRowSetImpl</code> object's command.
+     * {@code CachedRowSetImpl} object's command.
      * <P>
      * After populating this rowset with data, the method
-     * <code>populate</code> sets the rowset's metadata and
-     * then sends a <code>RowSetChangedEvent</code> object
+     * {@code populate} sets the rowset's metadata and
+     * then sends a {@code RowSetChangedEvent} object
      * to all registered listeners prior to returning.
      *
-     * @param data the <code>ResultSet</code> object containing the data
-     *             to be read into this <code>CachedRowSetImpl</code> object
+     * @param data the {@code ResultSet} object containing the data
+     *             to be read into this {@code CachedRowSetImpl} object
      * @throws SQLException if an error occurs; or the max row setting is
      *          violated while populating the RowSet
      * @see #execute
@@ -562,18 +562,18 @@
     }
 
     /**
-     * Populates this <code>CachedRowSetImpl</code> object with data,
+     * Populates this {@code CachedRowSetImpl} object with data,
      * using the given connection to produce the result set from
      * which data will be read.  A second form of this method,
      * which takes no arguments, uses the values from this rowset's
      * user, password, and either url or data source properties to
-     * create a new database connection. The form of <code>execute</code>
+     * create a new database connection. The form of {@code execute}
      * that is given a connection ignores these properties.
      *
-     * @param conn A standard JDBC <code>Connection</code> object that this
-     * <code>CachedRowSet</code> object can pass to a synchronization provider
+     * @param conn A standard JDBC {@code Connection} object that this
+     * {@code CachedRowSet} object can pass to a synchronization provider
      * to establish a connection to the data source
-     * @throws SQLException if an invalid <code>Connection</code> is supplied
+     * @throws SQLException if an invalid {@code Connection} is supplied
      *           or an error occurs in establishing the connection to the
      *           data source
      * @see #populate
@@ -585,11 +585,11 @@
 
     /**
      * Propagates all row update, insert, and delete changes to the
-     * underlying data source backing this <code>CachedRowSetImpl</code>
+     * underlying data source backing this {@code CachedRowSetImpl}
      * object.
      * <P>
      * <b>Note</b>In the reference implementation an optimistic concurrency implementation
-     * is provided as a sample implementation of a the <code>SyncProvider</code>
+     * is provided as a sample implementation of a the {@code SyncProvider}
      * abstract class.
      * <P>
      * This method fails if any of the updates cannot be propagated back
@@ -601,17 +601,17 @@
      * In that case, when deleted rows are not shown, which is usually true,
      * the current row is not affected.
      * <P>
-     * If no <code>SyncProvider</code> is configured, the reference implementation
-     * leverages the <code>RIOptimisticProvider</code> available which provides the
+     * If no {@code SyncProvider} is configured, the reference implementation
+     * leverages the {@code RIOptimisticProvider} available which provides the
      * default and reference synchronization capabilities for disconnected
-     * <code>RowSets</code>.
+     * {@code RowSets}.
      *
      * @throws SQLException if the cursor is on the insert row or the underlying
      *          reference synchronization provider fails to commit the updates
      *          to the datasource
      * @throws SyncProviderException if an internal error occurs within the
-     *          <code>SyncProvider</code> instance during either during the
-     *          process or at any time when the <code>SyncProvider</code>
+     *          {@code SyncProvider} instance during either during the
+     *          process or at any time when the {@code SyncProvider}
      *          instance touches the data source.
      * @see #acceptChanges(java.sql.Connection)
      * @see javax.sql.RowSetWriter
@@ -623,18 +623,18 @@
 
     /**
      * Propagates all row update, insert, and delete changes to the
-     * data source backing this <code>CachedRowSetImpl</code> object
-     * using the given <code>Connection</code> object.
+     * data source backing this {@code CachedRowSetImpl} object
+     * using the given {@code Connection} object.
      * <P>
-     * The reference implementation <code>RIOptimisticProvider</code>
+     * The reference implementation {@code RIOptimisticProvider}
      * modifies its synchronization to a write back function given
      * the updated connection
      * The reference implementation modifies its synchronization behaviour
-     * via the <code>SyncProvider</code> to ensure the synchronization
-     * occurs according to the updated JDBC <code>Connection</code>
+     * via the {@code SyncProvider} to ensure the synchronization
+     * occurs according to the updated JDBC {@code Connection}
      * properties.
      *
-     * @param con a standard JDBC <code>Connection</code> object
+     * @param con a standard JDBC {@code Connection} object
      * @throws SQLException if the cursor is on the insert row or the underlying
      *                   synchronization provider fails to commit the updates
      *                   back to the data source
@@ -648,11 +648,11 @@
     }
 
     /**
-     * Restores this <code>CachedRowSetImpl</code> object to its original state,
+     * Restores this {@code CachedRowSetImpl} object to its original state,
      * that is, its state before the last set of changes.
      * <P>
      * Before returning, this method moves the cursor before the first row
-     * and sends a <code>rowSetChanged</code> event to all registered
+     * and sends a {@code rowSetChanged} event to all registered
      * listeners.
      * @throws SQLException if an error is occurs rolling back the RowSet
      *           state to the definied original value.
@@ -663,8 +663,8 @@
     }
 
     /**
-     * Releases the current contents of this <code>CachedRowSetImpl</code>
-     * object and sends a <code>rowSetChanged</code> event object to all
+     * Releases the current contents of this {@code CachedRowSetImpl}
+     * object and sends a {@code rowSetChanged} event object to all
      * registered listeners.
      *
      * @throws SQLException if an error occurs flushing the contents of
@@ -690,7 +690,7 @@
 
     /**
      * Immediately removes the current row from this
-     * <code>CachedRowSetImpl</code> object if the row has been inserted, and
+     * {@code CachedRowSetImpl} object if the row has been inserted, and
      * also notifies listeners the a row has changed.  An exception is thrown
      * if the row is not a row that has been inserted or the cursor is before
      * the first row, after the last row, or on the insert row.
@@ -710,10 +710,10 @@
      * row has been modified. This method can be
      * called to reverse updates on a all columns until all updates in a row have
      * been rolled back to their originating state since the last synchronization
-     * (<code>acceptChanges</code>) or population. This method may also be called
+     * ({@code acceptChanges}) or population. This method may also be called
      * while performing updates to the insert row.
      * <P>
-     * <code>undoUpdate</code may be called at any time during the life-time of a
+     * {@code undoUpdate} may be called at any time during the life-time of a
      * rowset, however after a synchronization has occurs this method has no
      * affect until further modification to the RowSet data occurs.
      *
@@ -733,12 +733,12 @@
     //--------------------------------------------------------------------
 
     /**
-     * Returns a new <code>RowSet</code> object backed by the same data as
-     * that of this <code>CachedRowSetImpl</code> object and sharing a set of cursors
+     * Returns a new {@code RowSet} object backed by the same data as
+     * that of this {@code CachedRowSetImpl} object and sharing a set of cursors
      * with it. This allows cursors to interate over a shared set of rows, providing
      * multiple views of the underlying data.
      *
-     * @return a <code>RowSet</code> object that is a copy of this <code>CachedRowSetImpl</code>
+     * @return a {@code RowSet} object that is a copy of this {@code CachedRowSetImpl}
      * object and shares a set of cursors with it
      * @throws SQLException if an error occurs or cloning is
      *                         not supported
@@ -750,19 +750,19 @@
     }
 
     /**
-     * Returns a new <code>RowSet</code> object containing by the same data
-     * as this <code>CachedRowSetImpl</code> object.  This method
-     * differs from the method <code>createCopy</code> in that it throws a
-     * <code>CloneNotSupportedException</code> object instead of an
-     * <code>SQLException</code> object, as the method <code>createShared</code>
-     * does.  This <code>clone</code>
-     * method is called internally by the method <code>createShared</code>,
-     * which catches the <code>CloneNotSupportedException</code> object
-     * and in turn throws a new <code>SQLException</code> object.
-     *
-     * @return a copy of this <code>CachedRowSetImpl</code> object
+     * Returns a new {@code RowSet} object containing by the same data
+     * as this {@code CachedRowSetImpl} object.  This method
+     * differs from the method {@code createCopy} in that it throws a
+     * {@code CloneNotSupportedException} object instead of an
+     * {@code SQLException} object, as the method {@code createShared}
+     * does.  This {@code clone}
+     * method is called internally by the method {@code createShared},
+     * which catches the {@code CloneNotSupportedException} object
+     * and in turn throws a new {@code SQLException} object.
+     *
+     * @return a copy of this {@code CachedRowSetImpl} object
      * @throws CloneNotSupportedException if an error occurs when
-     * attempting to clone this <code>CachedRowSetImpl</code> object
+     * attempting to clone this {@code CachedRowSetImpl} object
      * @see #createShared
      */
     protected Object clone() throws CloneNotSupportedException  {
@@ -770,8 +770,8 @@
     }
 
     /**
-     * Creates a <code>RowSet</code> object that is a deep copy of
-     * this <code>CachedRowSetImpl</code> object's data, including
+     * Creates a {@code RowSet} object that is a deep copy of
+     * this {@code CachedRowSetImpl} object's data, including
      * constraints.  Updates made
      * on a copy are not visible to the original rowset;
      * a copy of a rowset is completely independent from the original.
@@ -780,12 +780,12 @@
      * from first principles, which can be quite expensive.
      * For example, it can eliminate the need to query a
      * remote database server.
-     * @return a new <code>CachedRowSet</code> object that is a deep copy
-     *           of this <code>CachedRowSet</code> object and is
-     *           completely independent from this <code>CachedRowSetImpl</code>
+     * @return a new {@code CachedRowSet} object that is a deep copy
+     *           of this {@code CachedRowSet} object and is
+     *           completely independent from this {@code CachedRowSetImpl}
      *           object.
      * @throws SQLException if an error occurs in generating the copy of this
-     *           of the <code>CachedRowSetImpl</code>
+     *           of the {@code CachedRowSetImpl}
      * @see #createShared
      * @see javax.sql.RowSetEvent
      * @see javax.sql.RowSetListener
@@ -795,21 +795,21 @@
     }
 
     /**
-     * Creates a <code>RowSet</code> object that is a copy of
-     * this <code>CachedRowSetImpl</code> object's table structure
+     * Creates a {@code RowSet} object that is a copy of
+     * this {@code CachedRowSetImpl} object's table structure
      * and the constraints only.
      * There will be no data in the object being returned.
      * Updates made on a copy are not visible to the original rowset.
      * <P>
      * This helps in getting the underlying XML schema which can
-     * be used as the basis for populating a <code>WebRowSet</code>.
-     *
-     * @return a new <code>CachedRowSet</code> object that is a copy
-     * of this <code>CachedRowSetImpl</code> object's schema and
+     * be used as the basis for populating a {@code WebRowSet}.
+     *
+     * @return a new {@code CachedRowSet} object that is a copy
+     * of this {@code CachedRowSetImpl} object's schema and
      * retains all the constraints on the original rowset but contains
      * no data
      * @throws SQLException if an error occurs in generating the copy
-     * of the <code>CachedRowSet</code> object
+     * of the {@code CachedRowSet} object
      * @see #createShared
      * @see #createCopy
      * @see #createCopyNoConstraints
@@ -821,17 +821,17 @@
     }
 
     /**
-     * Creates a <code>CachedRowSet</code> object that is a copy of
-     * this <code>CachedRowSetImpl</code> object's data only.
+     * Creates a {@code CachedRowSet} object that is a copy of
+     * this {@code CachedRowSetImpl} object's data only.
      * All constraints set in this object will not be there
      * in the returning object.  Updates made
      * on a copy are not visible to the original rowset.
      *
-     * @return a new <code>CachedRowSet</code> object that is a deep copy
-     * of this <code>CachedRowSetImpl</code> object and is
-     * completely independent from this <code>CachedRowSetImpl</code> object
+     * @return a new {@code CachedRowSet} object that is a deep copy
+     * of this {@code CachedRowSetImpl} object and is
+     * completely independent from this {@code CachedRowSetImpl} object
      * @throws SQLException if an error occurs in generating the copy of the
-     * of the <code>CachedRowSet</code>
+     * of the {@code CachedRowSet}
      * @see #createShared
      * @see #createCopy
      * @see #createCopySchema
@@ -843,15 +843,15 @@
     }
 
     /**
-     * Converts this <code>CachedRowSetImpl</code> object to a collection
-     * of tables. The sample implementation utilitizes the <code>TreeMap</code>
+     * Converts this {@code CachedRowSetImpl} object to a collection
+     * of tables. The sample implementation utilitizes the {@code TreeMap}
      * collection type.
      * This class guarantees that the map will be in ascending key order,
      * sorted according to the natural order for the key's class.
      *
-     * @return a <code>Collection</code> object consisting of tables,
+     * @return a {@code Collection} object consisting of tables,
      *         each of which is a copy of a row in this
-     *         <code>CachedRowSetImpl</code> object
+     *         {@code CachedRowSetImpl} object
      * @throws SQLException if an error occurs in generating the collection
      * @see #toCollection(int)
      * @see #toCollection(String)
@@ -863,16 +863,16 @@
     }
 
     /**
-     * Returns the specified column of this <code>CachedRowSetImpl</code> object
-     * as a <code>Collection</code> object.  This method makes a copy of the
-     * column's data and utilitizes the <code>Vector</code> to establish the
-     * collection. The <code>Vector</code> class implements a growable array
+     * Returns the specified column of this {@code CachedRowSetImpl} object
+     * as a {@code Collection} object.  This method makes a copy of the
+     * column's data and utilitizes the {@code Vector} to establish the
+     * collection. The {@code Vector} class implements a growable array
      * objects allowing the individual components to be accessed using an
      * an integer index similar to that of an array.
      *
-     * @return a <code>Collection</code> object that contains the value(s)
+     * @return a {@code Collection} object that contains the value(s)
      *         stored in the specified column of this
-     *         <code>CachedRowSetImpl</code>
+     *         {@code CachedRowSetImpl}
      *         object
      * @throws SQLException if an error occurs generated the collection; or
      *          an invalid column is provided.
@@ -886,16 +886,16 @@
     }
 
     /**
-     * Returns the specified column of this <code>CachedRowSetImpl</code> object
-     * as a <code>Collection</code> object.  This method makes a copy of the
-     * column's data and utilitizes the <code>Vector</code> to establish the
-     * collection. The <code>Vector</code> class implements a growable array
+     * Returns the specified column of this {@code CachedRowSetImpl} object
+     * as a {@code Collection} object.  This method makes a copy of the
+     * column's data and utilitizes the {@code Vector} to establish the
+     * collection. The {@code Vector} class implements a growable array
      * objects allowing the individual components to be accessed using an
      * an integer index similar to that of an array.
      *
-     * @return a <code>Collection</code> object that contains the value(s)
+     * @return a {@code Collection} object that contains the value(s)
      *         stored in the specified column of this
-     *         <code>CachedRowSetImpl</code>
+     *         {@code CachedRowSetImpl}
      *         object
      * @throws SQLException if an error occurs generated the collection; or
      *          an invalid column is provided.
@@ -914,25 +914,25 @@
 
 
     /**
-     * Returns the <code>SyncProvider</code> implementation being used
-     * with this <code>CachedRowSetImpl</code> implementation rowset.
+     * Returns the {@code SyncProvider} implementation being used
+     * with this {@code CachedRowSetImpl} implementation rowset.
      *
      * @return the SyncProvider used by the rowset. If not provider was
      *          set when the rowset was instantiated, the reference
      *          implementation (default) provider is returned.
      * @throws SQLException if error occurs while return the
-     *          <code>SyncProvider</code> instance.
+     *          {@code SyncProvider} instance.
      */
     public SyncProvider getSyncProvider() throws SQLException {
       throw new UnsupportedOperationException();
     }
 
     /**
-     * Sets the active <code>SyncProvider</code> and attempts to load
-     * load the new provider using the <code>SyncFactory</code> SPI.
+     * Sets the active {@code SyncProvider} and attempts to load
+     * load the new provider using the {@code SyncFactory} SPI.
      *
      * @throws SQLException if an error occurs while resetting the
-     *          <code>SyncProvider</code>.
+     *          {@code SyncProvider}.
      */
     public void setSyncProvider(String providerStr) throws SQLException {
         throw new UnsupportedOperationException();
@@ -953,23 +953,23 @@
     //---------------------------------------------------------------------
 
     /**
-     * Populates this <code>CachedRowSetImpl</code> object with data.
+     * Populates this {@code CachedRowSetImpl} object with data.
      * This form of the method uses the rowset's user, password, and url or
      * data source name properties to create a database
      * connection.  If properties that are needed
      * have not been set, this method will throw an exception.
      * <P>
-     * Another form of this method uses an existing JDBC <code>Connection</code>
+     * Another form of this method uses an existing JDBC {@code Connection}
      * object instead of creating a new one; therefore, it ignores the
      * properties used for establishing a new connection.
      * <P>
      * The query specified by the command property is executed to create a
-     * <code>ResultSet</code> object from which to retrieve data.
+     * {@code ResultSet} object from which to retrieve data.
      * The current contents of the rowset are discarded, and the
      * rowset's metadata is also (re)set.  If there are outstanding updates,
      * they are also ignored.
      * <P>
-     * The method <code>execute</code> closes any database connections that it
+     * The method {@code execute} closes any database connections that it
      * creates.
      *
      * @throws SQLException if an error occurs or the
@@ -987,20 +987,20 @@
 
     /**
      * Moves the cursor down one row from its current position and
-     * returns <code>true</code> if the new cursor position is a
+     * returns {@code true} if the new cursor position is a
      * valid row.
-     * The cursor for a new <code>ResultSet</code> object is initially
+     * The cursor for a new {@code ResultSet} object is initially
      * positioned before the first row. The first call to the method
-     * <code>next</code> moves the cursor to the first row, making it
+     * {@code next} moves the cursor to the first row, making it
      * the current row; the second call makes the second row the
      * current row, and so on.
      *
      * <P>If an input stream from the previous row is open, it is
-     * implicitly closed. The <code>ResultSet</code> object's warning
+     * implicitly closed. The {@code ResultSet} object's warning
      * chain is cleared when a new row is read.
      *
-     * @return <code>true</code> if the new current row is valid;
-     *         <code>false</code> if there are no more rows
+     * @return {@code true} if the new current row is valid;
+     *         {@code false} if there are no more rows
      * @throws SQLException if an error occurs or
      *            the cursor is not positioned in the rowset, before
      *            the first row, or after the last row
@@ -1010,9 +1010,9 @@
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the next
-     * row and returns <code>true</code> if the cursor is still in the rowset;
-     * returns <code>false</code> if the cursor has moved to the position after
+     * Moves this {@code CachedRowSetImpl} object's cursor to the next
+     * row and returns {@code true} if the cursor is still in the rowset;
+     * returns {@code false} if the cursor has moved to the position after
      * the last row.
      * <P>
      * This method handles the cases where the cursor moves to a row that
@@ -1021,15 +1021,15 @@
      * that has been deleted, this method moves the cursor to the next
      * row until the cursor is on a row that has not been deleted.
      * <P>
-     * The method <code>internalNext</code> is called by methods such as
-     * <code>next</code>, <code>absolute</code>, and <code>relative</code>,
+     * The method {@code internalNext} is called by methods such as
+     * {@code next}, {@code absolute}, and {@code relative},
      * and, as its name implies, is only called internally.
      * <p>
      * This is a implementation only method and is not required as a standard
-     * implementation of the <code>CachedRowSet</code> interface.
-     *
-     * @return <code>true</code> if the cursor is on a valid row in this
-     *         rowset; <code>false</code> if it is after the last row
+     * implementation of the {@code CachedRowSet} interface.
+     *
+     * @return {@code true} if the cursor is on a valid row in this
+     *         rowset; {@code false} if it is after the last row
      * @throws SQLException if an error occurs
      */
     protected boolean internalNext() throws SQLException {
@@ -1037,25 +1037,25 @@
     }
 
     /**
-     * Closes this <code>CachedRowSetImpl</code> objecy and releases any resources
+     * Closes this {@code CachedRowSetImpl} objecy and releases any resources
      * it was using.
      *
      * @throws SQLException if an error occurs when releasing any resources in use
-     * by this <code>CachedRowSetImpl</code> object
+     * by this {@code CachedRowSetImpl} object
      */
     public void close() throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Reports whether the last column read was SQL <code>NULL</code>.
-     * Note that you must first call the method <code>getXXX</code>
+     * Reports whether the last column read was SQL {@code NULL}.
+     * Note that you must first call the method {@code getXXX}
      * on a column to try to read its value and then call the method
-     * <code>wasNull</code> to determine whether the value was
-     * SQL <code>NULL</code>.
-     *
-     * @return <code>true</code> if the value in the last column read
-     *         was SQL <code>NULL</code>; <code>false</code> otherwise
+     * {@code wasNull} to determine whether the value was
+     * SQL {@code NULL}.
+     *
+     * @return {@code true} if the value in the last column read
+     *         was SQL {@code NULL}; {@code false} otherwise
      * @throws SQLException if an error occurs
      */
     public boolean wasNull() throws SQLException {
@@ -1064,9 +1064,9 @@
 
     /**
      * Returns the insert row or the current row of this
-     * <code>CachedRowSetImpl</code>object.
-     *
-     * @return the <code>Row</code> object on which this <code>CachedRowSetImpl</code>
+     * {@code CachedRowSetImpl}object.
+     *
+     * @return the {@code Row} object on which this {@code CachedRowSetImpl}
      * objects's cursor is positioned
      */
     protected BaseRow getCurrentRow() {
@@ -1077,7 +1077,7 @@
      * Removes the row on which the cursor is positioned.
      * <p>
      * This is a implementation only method and is not required as a standard
-     * implementation of the <code>CachedRowSet</code> interface.
+     * implementation of the {@code CachedRowSet} interface.
      *
      * @throws SQLException if the cursor is positioned on the insert
      *            row
@@ -1089,20 +1089,20 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>String</code> object.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code String} object.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     *         result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         result is {@code null}
      * @throws SQLException if (1) the given column index is out of bounds,
      * (2) the cursor is not on one of this rowset's rows or its
      * insert row, or (3) the designated column does not store an
-     * SQL <code>TINYINT, SMALLINT, INTEGER, BIGINT, REAL,
-     * FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, <b>CHAR</b>, <b>VARCHAR</b></code>
-     * or <code>LONGVARCHAR</code> value. The bold SQL type designates the
+     * SQL {@code TINYINT, SMALLINT, INTEGER, BIGINT, REAL,
+     * FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT,} <b>{@code CHAR, VARCHAR}</b>
+     * or {@code LONGVARCHAR} value. The bold SQL type designates the
      * recommended return type.
      */
     public String getString(int columnIndex) throws SQLException {
@@ -1111,18 +1111,18 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>boolean</code> value.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code boolean} value.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value as a <code>boolean</code> in the Java progamming language;
-     *        if the value is SQL <code>NULL</code>, the result is <code>false</code>
+     * @return the column value as a {@code boolean} in the Java progamming language;
+     *        if the value is SQL {@code NULL}, the result is {@code false}
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) the designated column does not store an
-     *            SQL <code>BOOLEAN</code> value
+     *            SQL {@code BOOLEAN} value
      * @see #getBoolean(String)
      */
     public boolean getBoolean(int columnIndex) throws SQLException {
@@ -1131,20 +1131,20 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>byte</code> value.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code byte} value.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value as a <code>byte</code> in the Java programming
-     * language; if the value is SQL <code>NULL</code>, the result is <code>0</code>
+     * @return the column value as a {@code byte} in the Java programming
+     * language; if the value is SQL {@code NULL}, the result is {@code 0}
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) the designated column does not store an
-     *            SQL <code><b>TINYINT</b>, SMALLINT, INTEGER, BIGINT, REAL,
-     *            FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR, VARCHAR</code>
-     *            or <code>LONGVARCHAR</code> value. The bold SQL type
+     *            SQL <b>{@code TINYINT}</b>, {@code SMALLINT, INTEGER,
+     *            BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR,
+     *            VARCHAR} or {@code LONGVARCHAR} value. The bold SQL type
      *            designates the recommended return type.
      * @see #getByte(String)
      */
@@ -1154,21 +1154,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>short</code> value.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code short} value.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     *         result is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         result is {@code 0}
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>TINYINT, <b>SMALLINT</b>, INTEGER, BIGINT, REAL
-     * FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR, VARCHAR</code>
-     * or <code>LONGVARCHAR</code> value. The bold SQL type designates the
-     * recommended return type.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code TINYINT}, <b>{@code SMALLINT}</b>,
+     *         {@code INTEGER, BIGINT, REAL, FLOAT, DOUBLE,
+     *         DECIMAL, NUMERIC, BIT, CHAR, VARCHAR}
+     *         or {@code LONGVARCHAR} value. The bold SQL type
+     *         designates the recommended return type.
      * @see #getShort(String)
      */
     public short getShort(int columnIndex) throws SQLException {
@@ -1177,21 +1178,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as an
-     * <code>int</code> value.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as an
+     * {@code int} value.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     *         result is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         result is {@code 0}
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>TINYINT, SMALLINT, <b>INTEGER</b>, BIGINT, REAL
-     * FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR, VARCHAR</code>
-     * or <code>LONGVARCHAR</code> value. The bold SQL type designates the
-     * recommended return type.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code TINYINT, SMALLINT,} <b>{@code INTEGER}</b>,
+     *         {@code BIGINT, REAL, FLOAT, DOUBLE, DECIMAL,
+     *         NUMERIC, BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the
+     *         recommended return type.
      */
     public int getInt(int columnIndex) throws SQLException {
         throw new UnsupportedOperationException();
@@ -1199,21 +1201,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>long</code> value.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code long} value.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     *         result is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         result is {@code 0}
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>TINYINT, SMALLINT, INTEGER, <b>BIGINT</b>, REAL
-     * FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR, VARCHAR</code>
-     * or <code>LONGVARCHAR</code> value. The bold SQL type designates the
-     * recommended return type.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code TINYINT, SMALLINT, INTEGER,}
+     *         <b>{@code BIGINT}</b>, {@code REAL, FLOAT, DOUBLE,
+     *         DECIMAL, NUMERIC, BIT, CHAR, VARCHAR}
+     *         or {@code LONGVARCHAR} value. The bold SQL type
+     * designates the recommended return type.
      * @see #getLong(String)
      */
     public long getLong(int columnIndex) throws SQLException {
@@ -1222,21 +1225,21 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>float</code> value.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code float} value.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     *         result is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         result is {@code 0}
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>TINYINT, SMALLINT, INTEGER, BIGINT, <b>REAL</b>,
-     * FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR, VARCHAR</code>
-     * or <code>LONGVARCHAR</code> value. The bold SQL type designates the
-     * recommended return type.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code TINYINT, SMALLINT, INTEGER, BIGINT,}
+     *         <b>{@code REAL}</b>, {@code FLOAT, DOUBLE, DECIMAL, NUMERIC,
+     *         BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the recommended return type.
      * @see #getFloat(String)
      */
     public float getFloat(int columnIndex) throws SQLException {
@@ -1245,21 +1248,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>double</code> value.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code double} value.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     *         result is <code>0</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         result is {@code 0}
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>TINYINT, SMALLINT, INTEGER, BIGINT, REAL,
-     * <b>FLOAT</b>, <b>DOUBLE</b>, DECIMAL, NUMERIC, BIT, CHAR, VARCHAR</code>
-     * or <code>LONGVARCHAR</code> value. The bold SQL type designates the
-     * recommended return type.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code TINYINT, SMALLINT, INTEGER, BIGINT, REAL,}
+     *         <b>{@code FLOAT, DOUBLE}</b>,
+     *         {@code DECIMAL, NUMERIC, BIT, CHAR, VARCHAR}
+     *         or {@code LONGVARCHAR} value. The bold SQL type
+     *         designates the recommended return type.
      * @see #getDouble(String)
      *
      */
@@ -1269,21 +1273,21 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>java.math.BigDecimal</code> object.
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code java.math.BigDecimal} object.
      * <P>
-     * This method is deprecated; use the version of <code>getBigDecimal</code>
+     * This method is deprecated; use the version of {@code getBigDecimal}
      * that does not take a scale parameter and returns a value with full
      * precision.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
      * @param scale the number of digits to the right of the decimal point in the
      *        value returned
      * @return the column value with the specified number of digits to the right
-     *         of the decimal point; if the value is SQL <code>NULL</code>, the
-     *         result is <code>null</code>
+     *         of the decimal point; if the value is SQL {@code NULL}, the
+     *         result is {@code null}
      * @throws SQLException if the given column index is out of bounds,
      *            the cursor is not on a valid row, or this method fails
      * @deprecated
@@ -1295,22 +1299,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>byte</code> array value.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code byte} array value.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value as a <code>byte</code> array in the Java programming
-     * language; if the value is SQL <code>NULL</code>, the
-     * result is <code>null</code>
+     * @return the column value as a {@code byte} array in the Java programming
+     * language; if the value is SQL {@code NULL}, the
+     * result is {@code null}
      *
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code><b>BINARY</b>, <b>VARBINARY</b> or
-     * LONGVARBINARY</code> value.
-     * The bold SQL type designates the recommended return type.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL <b>{@code BINARY, VARBINARY}</b> or
+     *         {@code LONGVARBINARY} value.
+     *         The bold SQL type designates the recommended return type.
      * @see #getBytes(String)
      */
     public byte[] getBytes(int columnIndex) throws SQLException {
@@ -1319,17 +1323,17 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>java.sql.Date</code> object.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code java.sql.Date} object.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value as a <code>java.sql.Data</code> object; if
-     *        the value is SQL <code>NULL</code>, the
-     *        result is <code>null</code>
+     * @return the column value as a {@code java.sql.Data} object; if
+     *        the value is SQL {@code NULL}, the
+     *        result is {@code null}
      * @throws SQLException if the given column index is out of bounds,
-     *            the cursor is not on a valid row, or this method fails
+     *         the cursor is not on a valid row, or this method fails
      */
     public java.sql.Date getDate(int columnIndex) throws SQLException {
         throw new UnsupportedOperationException();
@@ -1337,14 +1341,14 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>java.sql.Time</code> object.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code java.sql.Time} object.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     *         result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         result is {@code null}
      * @throws SQLException if the given column index is out of bounds,
      *         the cursor is not on a valid row, or this method fails
      */
@@ -1354,14 +1358,14 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>java.sql.Timestamp</code> object.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code java.sql.Timestamp} object.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return the column value; if the value is SQL <code>NULL</code>, the
-     *         result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL}, the
+     *         result is {@code null}
      * @throws SQLException if the given column index is out of bounds,
      *            the cursor is not on a valid row, or this method fails
      */
@@ -1371,33 +1375,33 @@
 
     /**
      * Retrieves the value of the designated column in the current row of this
-     * <code>CachedRowSetImpl</code> object as a <code>java.io.InputStream</code>
+     * {@code CachedRowSetImpl} object as a {@code java.io.InputStream}
      * object.
      *
      * A column value can be retrieved as a stream of ASCII characters
      * and then read in chunks from the stream.  This method is particularly
-     * suitable for retrieving large <code>LONGVARCHAR</code> values.  The JDBC
+     * suitable for retrieving large {@code LONGVARCHAR} values.  The JDBC
      * driver will do any necessary conversion from the database format into ASCII.
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
      * call to a get method implicitly closes the stream. . Also, a
-     * stream may return <code>0</code> for <code>CachedRowSetImpl.available()</code>
+     * stream may return {@code 0} for {@code CachedRowSetImpl.available()}
      * whether there is data available or not.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @return a Java input stream that delivers the database column value
      *         as a stream of one-byte ASCII characters.  If the value is SQL
-     *         <code>NULL</code>, the result is <code>null</code>.
+     *         {@code NULL}, the result is {@code null}.
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>CHAR, VARCHAR</code>, <code><b>LONGVARCHAR</b></code>
-     * <code>BINARY, VARBINARY</code> or <code>LONGVARBINARY</code> value. The
-     * bold SQL type designates the recommended return types that this method is
-     * used to retrieve.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code CHAR, VARCHAR}, <b>{@code LONGVARCHAR}</b>,
+     *         {@code BINARY, VARBINARY} or {@code LONGVARBINARY} value. The
+     *         bold SQL type designates the recommended return types
+     *         that this method is used to retrieve.
      * @see #getAsciiStream(String)
      */
     public java.io.InputStream getAsciiStream(int columnIndex) throws SQLException {
@@ -1416,8 +1420,8 @@
      * stream may return 0 for available() whether there is data
      * available or not.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @return a Java input stream that delivers the database column value
      * as a stream of two byte Unicode characters.  If the value is SQL NULL
@@ -1432,30 +1436,30 @@
 
     /**
      * Retrieves the value of the designated column in the current row of this
-     * <code>CachedRowSetImpl</code> object as a <code>java.io.InputStream</code>
+     * {@code CachedRowSetImpl} object as a {@code java.io.InputStream}
      * object.
      * <P>
      * A column value can be retrieved as a stream of uninterpreted bytes
      * and then read in chunks from the stream.  This method is particularly
-     * suitable for retrieving large <code>LONGVARBINARY</code> values.
+     * suitable for retrieving large {@code LONGVARBINARY} values.
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
      * call to a get method implicitly closes the stream. Also, a
-     * stream may return <code>0</code> for
-     * <code>CachedRowSetImpl.available()</code> whether there is data
+     * stream may return {@code 0} for
+     * {@code CachedRowSetImpl.available()} whether there is data
      * available or not.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     * is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     * is {@code 2}, and so on; must be {@code 1} or larger
      * and equal to or less than the number of columns in the rowset
      * @return a Java input stream that delivers the database column value
-     * as a stream of uninterpreted bytes.  If the value is SQL <code>NULL</code>
-     * then the result is <code>null</code>.
+     * as a stream of uninterpreted bytes.  If the value is SQL {@code NULL}
+     * then the result is {@code null}.
      * @throws SQLException if (1) the given column index is out of bounds,
      * (2) the cursor is not on one of this rowset's rows or its
      * insert row, or (3) the designated column does not store an
-     * SQL <code>BINARY, VARBINARY</code> or <code><b>LONGVARBINARY</b></code>
+     * SQL {@code BINARY, VARBINARY} or <b>{@code LONGVARBINARY}</b>.
      * The bold type indicates the SQL type that this method is recommened
      * to retrieve.
      * @see #getBinaryStream(String)
@@ -1472,19 +1476,19 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>String</code> object.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * of the current row as a {@code String} object.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code>TINYINT, SMALLINT, INTEGER
-     * BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, <b>CHAR</b>,
-     * <b>VARCHAR</b></code> or <code>LONGVARCHAR<</code> value. The bold SQL type
-     * designates the recommended return type.
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code TINYINT, SMALLINT, INTEGER,
+     *         BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT,}
+     *         <b>{@code CHAR, VARCHAR}</b> or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the recommended return type.
      */
     public String getString(String columnName) throws SQLException {
         throw new UnsupportedOperationException();
@@ -1492,17 +1496,17 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>boolean</code> value.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value as a <code>boolean</code> in the Java programming
-     *        language; if the value is SQL <code>NULL</code>,
-     *        the result is <code>false</code>
+     * of the current row as a {@code boolean} value.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value as a {@code boolean} in the Java programming
+     *        language; if the value is SQL {@code NULL},
+     *        the result is {@code false}
      * @throws SQLException if (1) the given column name is not the name of
-     *            a column in this rowset, (2) the cursor is not on one of
-     *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>BOOLEAN</code> value
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code BOOLEAN} value
      * @see #getBoolean(int)
      */
     public boolean getBoolean(String columnName) throws SQLException {
@@ -1511,19 +1515,19 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>byte</code> value.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value as a <code>byte</code> in the Java programming
-     * language; if the value is SQL <code>NULL</code>, the result is <code>0</code>
+     * of the current row as a {@code byte} value.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value as a {@code byte} in the Java programming
+     * language; if the value is SQL {@code NULL}, the result is {@code 0}
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code><B>TINYINT</B>, SMALLINT, INTEGER,
-     * BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR,
-     * VARCHAR</code> or <code>LONGVARCHAR</code> value. The
-     * bold type designates the recommended return type
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL <b>{@code TINYINT}</b>,
+     *         {@code SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE,
+     *         DECIMAL, NUMERIC, BIT, CHAR, VARCHAR} or {@code LONGVARCHAR}
+     *         value. The bold type designates the recommended return type.
      */
     public byte getByte(String columnName) throws SQLException {
         throw new UnsupportedOperationException();
@@ -1531,19 +1535,20 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>short</code> value.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>0</code>
+     * of the current row as a {@code short} value.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code 0}
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code>TINYINT, <b>SMALLINT</b>, INTEGER
-     * BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR,
-     * VARCHAR</code> or <code>LONGVARCHAR</code> value. The bold SQL type
-     * designates the recommended return type.
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code TINYINT,}
+     *         <b>{@code SMALLINT}</b>, {@code INTEGER,
+     *         BIGINT, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR,
+     *         VARCHAR} or {@code LONGVARCHAR} value. The bold SQL type
+     *         designates the recommended return type.
      * @see #getShort(int)
      */
     public short getShort(String columnName) throws SQLException {
@@ -1552,20 +1557,21 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as an <code>int</code> value.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>0</code>
+     * of the current row as an {@code int} value.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code 0}
      * @throws SQLException if (1) the given column name is not the name
-     * of a column in this rowset,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>TINYINT, SMALLINT, <b>INTEGER</b>, BIGINT, REAL
-     * FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR, VARCHAR</code>
-     * or <code>LONGVARCHAR</code> value. The bold SQL type designates the
-     * recommended return type.
+     *         of a column in this rowset,
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code TINYINT, SMALLINT,} <b>{@code INTEGER}</b>,
+     *         {@code BIGINT, REAL, FLOAT, DOUBLE, DECIMAL,
+     *         NUMERIC, BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the
+     *         recommended return type.
      */
     public int getInt(String columnName) throws SQLException {
         throw new UnsupportedOperationException();
@@ -1573,19 +1579,19 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>long</code> value.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>0</code>
+     * of the current row as a {@code long} value.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code 0}
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code>TINYINT, SMALLINT, INTEGER
-     * <b>BIGINT</b>, REAL, FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR,
-     * VARCHAR</code> or <code>LONGVARCHAR</code> value. The bold SQL type
-     * designates the recommended return type.
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code TINYINT, SMALLINT, INTEGER,}
+     *         <b>{@code BIGINT}</b>, {@code REAL, FLOAT, DOUBLE, DECIMAL,
+     *         NUMERIC, BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the recommended return type.
      * @see #getLong(int)
      */
     public long getLong(String columnName) throws SQLException {
@@ -1594,19 +1600,19 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>float</code> value.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>0</code>
+     * of the current row as a {@code float} value.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code 0}
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code>TINYINT, SMALLINT, INTEGER
-     * BIGINT, <b>REAL</b>, FLOAT, DOUBLE, DECIMAL, NUMERIC, BIT, CHAR,
-     * VARCHAR</code> or <code>LONGVARCHAR</code> value. The bold SQL type
-     * designates the recommended return type.
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code TINYINT, SMALLINT, INTEGER,
+     *         BIGINT,} <b>{@code REAL}</b>, {@code FLOAT, DOUBLE, DECIMAL,
+     *         NUMERIC, BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the recommended return type.
      * @see #getFloat(String)
      */
     public float getFloat(String columnName) throws SQLException {
@@ -1615,20 +1621,20 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row of this <code>CachedRowSetImpl</code> object
-     * as a <code>double</code> value.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>0</code>
+     * of the current row of this {@code CachedRowSetImpl} object
+     * as a {@code double} value.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code 0}
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code>TINYINT, SMALLINT, INTEGER
-     * BIGINT, REAL, <b>FLOAT</b>, <b>DOUBLE</b>, DECIMAL, NUMERIC, BIT, CHAR,
-     * VARCHAR</code> or <code>LONGVARCHAR</code> value. The bold SQL type
-     * designates the recommended return types.
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code TINYINT, SMALLINT, INTEGER,
+     *         BIGINT, REAL,} <b>{@code FLOAT, DOUBLE}</b>, {@code DECIMAL,
+     *         NUMERIC, BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the recommended return types.
      * @see #getDouble(int)
      */
     public double getDouble(String columnName) throws SQLException {
@@ -1637,22 +1643,22 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>java.math.BigDecimal</code> object.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
+     * of the current row as a {@code java.math.BigDecimal} object.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
      * @param scale the number of digits to the right of the decimal point
-     * @return a java.math.BugDecimal object with <code><i>scale</i></code>
-     * number of digits to the right of the decimal point.
+     * @return a java.math.BugDecimal object with <i>{@code scale}</i>
+     *         number of digits to the right of the decimal point.
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code>TINYINT, SMALLINT, INTEGER
-     * BIGINT, REAL, FLOAT, DOUBLE, <b>DECIMAL</b>, <b>NUMERIC</b>, BIT CHAR,
-     * VARCHAR</code> or <code>LONGVARCHAR</code> value. The bold SQL type
-     * designates the recommended return type that this method is used to
-     * retrieve.
-     * @deprecated Use the <code>getBigDecimal(String columnName)</code>
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code TINYINT, SMALLINT, INTEGER,
+     *         BIGINT, REAL, FLOAT, DOUBLE,} <b>{@code DECIMAL, NUMERIC}</b>,
+     *         {@code BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the recommended return type
+     *         that this method is used to retrieve.
+     * @deprecated Use the {@code getBigDecimal(String columnName)}
      *             method instead
      */
     @Deprecated
@@ -1662,19 +1668,19 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>byte</code> array.
+     * of the current row as a {@code byte} array.
      * The bytes represent the raw values returned by the driver.
      *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value as a <code>byte</code> array in the Java programming
-     * language; if the value is SQL <code>NULL</code>, the result is <code>null</code>
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value as a {@code byte} array in the Java programming
+     *         language; if the value is SQL {@code NULL}, the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code><b>BINARY</b>, <b>VARBINARY</b>
-     * </code> or <code>LONGVARBINARY</code> values
-     * The bold SQL type designates the recommended return type.
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL <b>{@code BINARY, VARBINARY}</b>
+     *         or {@code LONGVARBINARY} values.
+     *         The bold SQL type designates the recommended return type.
      * @see #getBytes(int)
      */
     public byte[] getBytes(String columnName) throws SQLException {
@@ -1683,17 +1689,17 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>java.sql.Date</code> object.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * of the current row as a {@code java.sql.Date} object.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>DATE</code> or
-     *            <code>TIMESTAMP</code> value
+     *            column does not store an SQL {@code DATE} or
+     *            {@code TIMESTAMP} value
      */
     public java.sql.Date getDate(String columnName) throws SQLException {
         throw new UnsupportedOperationException();
@@ -1701,12 +1707,12 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>java.sql.Time</code> object.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * of the current row as a {@code java.sql.Time} object.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if the given column name does not match one of
      *            this rowset's column names or the cursor is not on one of
      *            this rowset's rows or its insert row
@@ -1717,12 +1723,12 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>java.sql.Timestamp</code> object.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * of the current row as a {@code java.sql.Timestamp} object.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if the given column name does not match one of
      *            this rowset's column names or the cursor is not on one of
      *            this rowset's rows or its insert row
@@ -1733,32 +1739,32 @@
 
     /**
      * Retrieves the value of the designated column in the current row of this
-     * <code>CachedRowSetImpl</code> object as a <code>java.io.InputStream</code>
+     * {@code CachedRowSetImpl} object as a {@code java.io.InputStream}
      * object.
      *
      * A column value can be retrieved as a stream of ASCII characters
      * and then read in chunks from the stream. This method is particularly
-     * suitable for retrieving large <code>LONGVARCHAR</code> values. The
-     * <code>SyncProvider</code> will rely on the JDBC driver to do any necessary
+     * suitable for retrieving large {@code LONGVARCHAR} values. The
+     * {@code SyncProvider} will rely on the JDBC driver to do any necessary
      * conversion from the database format into ASCII format.
      *
      * <P><B>Note:</B> All the data in the returned stream must
      * be read prior to getting the value of any other column. The
-     * next call to a <code>getXXX</code> method implicitly closes the stream.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
+     * next call to a {@code getXXX} method implicitly closes the stream.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
      * @return a Java input stream that delivers the database column value
      *         as a stream of one-byte ASCII characters.  If the value is SQL
-     *         <code>NULL</code>, the result is <code>null</code>.
+     *         {@code NULL}, the result is {@code null}.
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>CHAR, VARCHAR</code>, <code><b>LONGVARCHAR</b></code>
-     * <code>BINARY, VARBINARY</code> or <code>LONGVARBINARY</code> value. The
-     * bold SQL type designates the recommended return types that this method is
-     * used to retrieve.
+     *         a column in this rowset
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code CHAR, VARCHAR}, <b>{@code LONGVARCHAR}</b>,
+     *         {@code BINARY, VARBINARY} or {@code LONGVARBINARY} value. The
+     *         bold SQL type designates the recommended return types
+     *         that this method is used to retrieve.
      * @see #getAsciiStream(int)
      */
     public java.io.InputStream getAsciiStream(String columnName) throws SQLException {
@@ -1769,23 +1775,23 @@
     /**
      * A column value can be retrieved as a stream of Unicode characters
      * and then read in chunks from the stream.  This method is particularly
-     * suitable for retrieving large <code>LONGVARCHAR</code> values.
+     * suitable for retrieving large {@code LONGVARCHAR} values.
      * The JDBC driver will do any necessary conversion from the database
      * format into Unicode.
      *
      * <P><B>Note:</B> All the data in the returned stream must
      * be read prior to getting the value of any other column. The
-     * next call to a <code>getXXX</code> method implicitly closes the stream.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
+     * next call to a {@code getXXX} method implicitly closes the stream.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
      * @return a Java input stream that delivers the database column value
      *         as a stream of two-byte Unicode characters.  If the value is
-     *         SQL <code>NULL</code>, the result is <code>null</code>.
+     *         SQL {@code NULL}, the result is {@code null}.
      * @throws SQLException if the given column name does not match one of
      *            this rowset's column names or the cursor is not on one of
      *            this rowset's rows or its insert row
-     * @deprecated use the method <code>getCharacterStream</code> instead
+     * @deprecated use the method {@code getCharacterStream} instead
      */
     @Deprecated
     public java.io.InputStream getUnicodeStream(String columnName) throws SQLException {
@@ -1794,30 +1800,30 @@
 
     /**
      * Retrieves the value of the designated column in the current row of this
-     * <code>CachedRowSetImpl</code> object as a <code>java.io.InputStream</code>
+     * {@code CachedRowSetImpl} object as a {@code java.io.InputStream}
      * object.
      * <P>
      * A column value can be retrieved as a stream of uninterpreted bytes
      * and then read in chunks from the stream.  This method is particularly
-     * suitable for retrieving large <code>LONGVARBINARY</code> values.
+     * suitable for retrieving large {@code LONGVARBINARY} values.
      *
      * <P><B>Note:</B> All the data in the returned stream must be
      * read prior to getting the value of any other column. The next
      * call to a get method implicitly closes the stream. Also, a
-     * stream may return <code>0</code> for <code>CachedRowSetImpl.available()</code>
+     * stream may return {@code 0} for {@code CachedRowSetImpl.available()}
      * whether there is data available or not.
      *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
      * @return a Java input stream that delivers the database column value
      *         as a stream of uninterpreted bytes.  If the value is SQL
-     *         <code>NULL</code>, the result is <code>null</code>.
+     *         {@code NULL}, the result is {@code null}.
      * @throws SQLException if (1) the given column name is unknown,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>BINARY, VARBINARY</code> or <code><b>LONGVARBINARY</b></code>
-     * The bold type indicates the SQL type that this method is recommened
-     * to retrieve.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code BINARY, VARBINARY} or <b>{@code LONGVARBINARY}</b>
+     *         The bold type indicates the SQL type that this method is recommened
+     *         to retrieve.
      * @see #getBinaryStream(int)
      *
      */
@@ -1831,17 +1837,17 @@
     //=====================================================================
 
     /**
-     * The first warning reported by calls on this <code>CachedRowSetImpl</code>
-     * object is returned. Subsequent <code>CachedRowSetImpl</code> warnings will
-     * be chained to this <code>SQLWarning</code>.
+     * The first warning reported by calls on this {@code CachedRowSetImpl}
+     * object is returned. Subsequent {@code CachedRowSetImpl} warnings will
+     * be chained to this {@code SQLWarning}.
      *
      * <P>The warning chain is automatically cleared each time a new
      * row is read.
      *
      * <P><B>Note:</B> This warning chain only covers warnings caused
-     * by <code>ResultSet</code> methods.  Any warning caused by statement
+     * by {@code ResultSet} methods.  Any warning caused by statement
      * methods (such as reading OUT parameters) will be chained on the
-     * <code>Statement</code> object.
+     * {@code Statement} object.
      *
      * @return the first SQLWarning or null
      */
@@ -1850,10 +1856,10 @@
     }
 
     /**
-     * Clears all the warnings reporeted for the <code>CachedRowSetImpl</code>
-     * object. After a call to this method, the <code>getWarnings</code> method
-     * returns <code>null</code> until a new warning is reported for this
-     * <code>CachedRowSetImpl</code> object.
+     * Clears all the warnings reporeted for the {@code CachedRowSetImpl}
+     * object. After a call to this method, the {@code getWarnings} method
+     * returns {@code null} until a new warning is reported for this
+     * {@code CachedRowSetImpl} object.
      */
     public void clearWarnings() {
        throw new UnsupportedOperationException();
@@ -1861,25 +1867,25 @@
 
     /**
      * Retrieves the name of the SQL cursor used by this
-     * <code>CachedRowSetImpl</code> object.
+     * {@code CachedRowSetImpl} object.
      *
      * <P>In SQL, a result table is retrieved through a cursor that is
-     * named. The current row of a <code>ResultSet</code> can be updated or deleted
+     * named. The current row of a {@code ResultSet} can be updated or deleted
      * using a positioned update/delete statement that references the
      * cursor name. To ensure that the cursor has the proper isolation
-     * level to support an update operation, the cursor's <code>SELECT</code>
-     * statement should be of the form <code>select for update</code>.
-     * If the <code>for update</code> clause
+     * level to support an update operation, the cursor's {@code SELECT}
+     * statement should be of the form {@code select for update}.
+     * If the {@code for update} clause
      * is omitted, positioned updates may fail.
      *
      * <P>JDBC supports this SQL feature by providing the name of the
-     * SQL cursor used by a <code>ResultSet</code> object. The current row
+     * SQL cursor used by a {@code ResultSet} object. The current row
      * of a result set is also the current row of this SQL cursor.
      *
      * <P><B>Note:</B> If positioned updates are not supported, an
-     * <code>SQLException</code> is thrown.
-     *
-     * @return the SQL cursor name for this <code>CachedRowSetImpl</code> object's
+     * {@code SQLException} is thrown.
+     *
+     * @return the SQL cursor name for this {@code CachedRowSetImpl} object's
      *         cursor
      * @throws SQLException if an error occurs
      */
@@ -1888,12 +1894,12 @@
     }
 
     /**
-     * Retrieves a <code>ResultSetMetaData</code> object instance that
-     * contains information about the <code>CachedRowSet</code> object.
+     * Retrieves a {@code ResultSetMetaData} object instance that
+     * contains information about the {@code CachedRowSet} object.
      * However, applications should cast the returned object to a
-     * <code>RowSetMetaData</code> interface implementation. In the
+     * {@code RowSetMetaData} interface implementation. In the
      * reference implementation, this cast can be done on the
-     * <code>RowSetMetaDataImpl</code> class.
+     * {@code RowSetMetaDataImpl} class.
      * <P>
      * For example:
      * <pre>
@@ -1907,10 +1913,10 @@
      * crs.setMetaData(metaData);
      * </pre>
      *
-     * @return the <code>ResultSetMetaData</code> object that describes this
-     *         <code>CachedRowSetImpl</code> object's columns
+     * @return the {@code ResultSetMetaData} object that describes this
+     *         {@code CachedRowSetImpl} object's columns
      * @throws SQLException if an error occurs in generating the RowSet
-     * meta data; or if the <code>CachedRowSetImpl</code> is empty.
+     * meta data; or if the {@code CachedRowSetImpl} is empty.
      * @see javax.sql.RowSetMetaData
      */
     public ResultSetMetaData getMetaData() throws SQLException {
@@ -1920,10 +1926,10 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as an
-     * <code>Object</code> value.
+     * of this {@code CachedRowSetImpl} object as an
+     * {@code Object} value.
      * <P>
-     * The type of the <code>Object</code> will be the default
+     * The type of the {@code Object} will be the default
      * Java object type corresponding to the column's SQL type,
      * following the mapping for built-in types specified in the JDBC 3.0
      * specification.
@@ -1931,23 +1937,23 @@
      * This method may also be used to read datatabase-specific
      * abstract data types.
      * <P>
-     * This implementation of the method <code>getObject</code> extends its
+     * This implementation of the method {@code getObject} extends its
      * behavior so that it gets the attributes of an SQL structured type
-     * as an array of <code>Object</code> values.  This method also custom
+     * as an array of {@code Object} values.  This method also custom
      * maps SQL user-defined types to classes in the Java programming language.
      * When the specified column contains
      * a structured or distinct value, the behavior of this method is as
-     * if it were a call to the method <code>getObject(columnIndex,
-     * this.getStatement().getConnection().getTypeMap())</code>.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * if it were a call to the method {@code getObject(columnIndex,
+     * this.getStatement().getConnection().getTypeMap())}.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return a <code>java.lang.Object</code> holding the column value;
-     *         if the value is SQL <code>NULL</code>, the result is <code>null</code>
+     * @return a {@code java.lang.Object} holding the column value;
+     *         if the value is SQL {@code NULL}, the result is {@code null}
      * @throws SQLException if the given column index is out of bounds,
      *            the cursor is not on a valid row, or there is a problem getting
-     *            the <code>Class</code> object for a custom mapping
+     *            the {@code Class} object for a custom mapping
      * @see #getObject(String)
      */
     public Object getObject(int columnIndex) throws SQLException {
@@ -1956,10 +1962,10 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as an
-     * <code>Object</code> value.
+     * of this {@code CachedRowSetImpl} object as an
+     * {@code Object} value.
      * <P>
-     * The type of the <code>Object</code> will be the default
+     * The type of the {@code Object} will be the default
      * Java object type corresponding to the column's SQL type,
      * following the mapping for built-in types specified in the JDBC 3.0
      * specification.
@@ -1967,23 +1973,23 @@
      * This method may also be used to read datatabase-specific
      * abstract data types.
      * <P>
-     * This implementation of the method <code>getObject</code> extends its
+     * This implementation of the method {@code getObject} extends its
      * behavior so that it gets the attributes of an SQL structured type
-     * as an array of <code>Object</code> values.  This method also custom
+     * as an array of {@code Object} values.  This method also custom
      * maps SQL user-defined types to classes
      * in the Java programming language. When the specified column contains
      * a structured or distinct value, the behavior of this method is as
-     * if it were a call to the method <code>getObject(columnIndex,
-     * this.getStatement().getConnection().getTypeMap())</code>.
-     *
-     * @param columnName a <code>String</code> object that must match the
+     * if it were a call to the method {@code getObject(columnIndex,
+     * this.getStatement().getConnection().getTypeMap())}.
+     *
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @return a <code>java.lang.Object</code> holding the column value;
-     *         if the value is SQL <code>NULL</code>, the result is <code>null</code>
+     * @return a {@code java.lang.Object} holding the column value;
+     *         if the value is SQL {@code NULL}, the result is {@code null}
      * @throws SQLException if (1) the given column name does not match one of
      *            this rowset's column names, (2) the cursor is not
      *            on a valid row, or (3) there is a problem getting
-     *            the <code>Class</code> object for a custom mapping
+     *            the {@code Class} object for a custom mapping
      * @see #getObject(int)
      */
     public Object getObject(String columnName) throws SQLException {
@@ -1993,10 +1999,10 @@
     //----------------------------------------------------------------
 
     /**
-     * Maps the given column name for one of this <code>CachedRowSetImpl</code>
+     * Maps the given column name for one of this {@code CachedRowSetImpl}
      * object's columns to its column number.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @return the column index of the given column name
      * @throws SQLException if the given column name does not match one
@@ -2014,25 +2020,25 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>java.io.Reader</code> object.
+     * of the current row as a {@code java.io.Reader} object.
      *
      * <P><B>Note:</B> All the data in the returned stream must
      * be read prior to getting the value of any other column. The
-     * next call to a <code>getXXX</code> method implicitly closes the stream.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * next call to a {@code getXXX} method implicitly closes the stream.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
      * @return a Java character stream that delivers the database column value
      * as a stream of two-byte unicode characters in a
-     * <code>java.io.Reader</code> object.  If the value is
-     * SQL <code>NULL</code>, the result is <code>null</code>.
+     * {@code java.io.Reader} object.  If the value is
+     * SQL {@code NULL}, the result is {@code null}.
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>CHAR, VARCHAR, <b>LONGVARCHAR</b>, BINARY, VARBINARY</code> or
-     * <code>LONGVARBINARY</code> value.
-     * The bold SQL type designates the recommended return type.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code CHAR, VARCHAR,} <b>{@code LONGVARCHAR}</b>,
+     *         {@code BINARY, VARBINARY} or {@code LONGVARBINARY} value.
+     *         The bold SQL type designates the recommended return type.
      * @see #getCharacterStream(String)
      */
     public java.io.Reader getCharacterStream(int columnIndex) throws SQLException{
@@ -2041,23 +2047,24 @@
 
     /**
      * Retrieves the value stored in the designated column
-     * of the current row as a <code>java.io.Reader</code> object.
+     * of the current row as a {@code java.io.Reader} object.
      *
      * <P><B>Note:</B> All the data in the returned stream must
      * be read prior to getting the value of any other column. The
-     * next call to a <code>getXXX</code> method implicitly closes the stream.
-     *
-     * @param columnName a <code>String</code> object giving the SQL name of
-     *        a column in this <code>CachedRowSetImpl</code> object
+     * next call to a {@code getXXX} method implicitly closes the stream.
+     *
+     * @param columnName a {@code String} object giving the SQL name of
+     *        a column in this {@code CachedRowSetImpl} object
      * @return a Java input stream that delivers the database column value
      *         as a stream of two-byte Unicode characters.  If the value is
-     *         SQL <code>NULL</code>, the result is <code>null</code>.
+     *         SQL {@code NULL}, the result is {@code null}.
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code>CHAR, VARCHAR, <b>LONGVARCHAR</b>,
-     * BINARY, VARYBINARY</code> or <code>LONGVARBINARY</code> value.
-     * The bold SQL type designates the recommended return type.
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code CHAR, VARCHAR,}
+     *         <b>{@code LONGVARCHAR}</b>,
+     *         {@code BINARY, VARYBINARY} or {@code LONGVARBINARY} value.
+     *         The bold SQL type designates the recommended return type.
      */
     public java.io.Reader getCharacterStream(String columnName) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2065,21 +2072,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>java.math.BigDecimal</code> object.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code java.math.BigDecimal} object.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @return a <code>java.math.BigDecimal</code> value with full precision;
-     *         if the value is SQL <code>NULL</code>, the result is <code>null</code>
+     * @return a {@code java.math.BigDecimal} value with full precision;
+     *         if the value is SQL {@code NULL}, the result is {@code null}
      * @throws SQLException if (1) the given column index is out of bounds,
-     * (2) the cursor is not on one of this rowset's rows or its
-     * insert row, or (3) the designated column does not store an
-     * SQL <code>TINYINT, SMALLINT, INTEGER, BIGINT, REAL,
-     * FLOAT, DOUBLE, <b>DECIMAL</b>, <b>NUMERIC</b>, BIT, CHAR, VARCHAR</code>
-     * or <code>LONGVARCHAR</code> value. The bold SQL type designates the
-     * recommended return types that this method is used to retrieve.
+     *         (2) the cursor is not on one of this rowset's rows or its
+     *         insert row, or (3) the designated column does not store an
+     *         SQL {@code TINYINT, SMALLINT, INTEGER, BIGINT, REAL,
+     *         FLOAT, DOUBLE,} <b>{@code DECIMAL, NUMERIC}</b>,
+     *         {@code BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the
+     *         recommended return types that this method is used to retrieve.
      * @see #getBigDecimal(String)
      */
     public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
@@ -2088,21 +2096,21 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>java.math.BigDecimal</code> object.
-     *
-     * @param columnName a <code>String</code> object that must match the
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code java.math.BigDecimal} object.
+     *
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @return a <code>java.math.BigDecimal</code> value with full precision;
-     *         if the value is SQL <code>NULL</code>, the result is <code>null</code>
+     * @return a {@code java.math.BigDecimal} value with full precision;
+     *         if the value is SQL {@code NULL}, the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
-     * a column in this rowset, (2) the cursor is not on one of
-     * this rowset's rows or its insert row, or (3) the designated
-     * column does not store an SQL <code>TINYINT, SMALLINT, INTEGER
-     * BIGINT, REAL, FLOAT, DOUBLE, <b>DECIMAL</b>, <b>NUMERIC</b>, BIT CHAR,
-     * VARCHAR</code> or <code>LONGVARCHAR</code> value. The bold SQL type
-     * designates the recommended return type that this method is used to
-     * retrieve
+     *         a column in this rowset, (2) the cursor is not on one of
+     *         this rowset's rows or its insert row, or (3) the designated
+     *         column does not store an SQL {@code TINYINT, SMALLINT, INTEGER,
+     *         BIGINT, REAL, FLOAT, DOUBLE,} <b>{@code DECIMAL, NUMERIC}</b>,
+     *         {@code BIT, CHAR, VARCHAR} or {@code LONGVARCHAR} value.
+     *         The bold SQL type designates the recommended return type
+     *         that this method is used to retrieve.
      * @see #getBigDecimal(int)
      */
     public BigDecimal getBigDecimal(String columnName) throws SQLException {
@@ -2114,7 +2122,7 @@
     //---------------------------------------------------------------------
 
     /**
-     * Returns the number of rows in this <code>CachedRowSetImpl</code> object.
+     * Returns the number of rows in this {@code CachedRowSetImpl} object.
      *
      * @return number of rows in the rowset
      */
@@ -2124,10 +2132,10 @@
 
     /**
      * Indicates whether the cursor is before the first row in this
-     * <code>CachedRowSetImpl</code> object.
-     *
-     * @return <code>true</code> if the cursor is before the first row;
-     *         <code>false</code> otherwise or if the rowset contains no rows
+     * {@code CachedRowSetImpl} object.
+     *
+     * @return {@code true} if the cursor is before the first row;
+     *         {@code false} otherwise or if the rowset contains no rows
      * @throws SQLException if an error occurs
      */
     public boolean isBeforeFirst() throws SQLException {
@@ -2136,10 +2144,10 @@
 
     /**
      * Indicates whether the cursor is after the last row in this
-     * <code>CachedRowSetImpl</code> object.
-     *
-     * @return <code>true</code> if the cursor is after the last row;
-     *         <code>false</code> otherwise or if the rowset contains no rows
+     * {@code CachedRowSetImpl} object.
+     *
+     * @return {@code true} if the cursor is after the last row;
+     *         {@code false} otherwise or if the rowset contains no rows
      * @throws SQLException if an error occurs
      */
     public boolean isAfterLast() throws SQLException {
@@ -2148,10 +2156,10 @@
 
     /**
      * Indicates whether the cursor is on the first row in this
-     * <code>CachedRowSetImpl</code> object.
-     *
-     * @return <code>true</code> if the cursor is on the first row;
-     *         <code>false</code> otherwise or if the rowset contains no rows
+     * {@code CachedRowSetImpl} object.
+     *
+     * @return {@code true} if the cursor is on the first row;
+     *         {@code false} otherwise or if the rowset contains no rows
      * @throws SQLException if an error occurs
      */
     public boolean isFirst() throws SQLException {
@@ -2160,14 +2168,14 @@
 
     /**
      * Indicates whether the cursor is on the last row in this
-     * <code>CachedRowSetImpl</code> object.
+     * {@code CachedRowSetImpl} object.
      * <P>
-     * Note: Calling the method <code>isLast</code> may be expensive
+     * Note: Calling the method {@code isLast} may be expensive
      * because the JDBC driver might need to fetch ahead one row in order
      * to determine whether the current row is the last row in this rowset.
      *
-     * @return <code>true</code> if the cursor is on the last row;
-     *         <code>false</code> otherwise or if this rowset contains no rows
+     * @return {@code true} if the cursor is on the last row;
+     *         {@code false} otherwise or if this rowset contains no rows
      * @throws SQLException if an error occurs
      */
     public boolean isLast() throws SQLException {
@@ -2175,19 +2183,19 @@
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the front of
+     * Moves this {@code CachedRowSetImpl} object's cursor to the front of
      * the rowset, just before the first row. This method has no effect if
      * this rowset contains no rows.
      *
      * @throws SQLException if an error occurs or the type of this rowset
-     *            is <code>ResultSet.TYPE_FORWARD_ONLY</code>
+     *            is {@code ResultSet.TYPE_FORWARD_ONLY}
      */
     public void beforeFirst() throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the end of
+     * Moves this {@code CachedRowSetImpl} object's cursor to the end of
      * the rowset, just after the last row. This method has no effect if
      * this rowset contains no rows.
      *
@@ -2198,34 +2206,34 @@
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the first row
-     * and returns <code>true</code> if the operation was successful.  This
+     * Moves this {@code CachedRowSetImpl} object's cursor to the first row
+     * and returns {@code true} if the operation was successful.  This
      * method also notifies registered listeners that the cursor has moved.
      *
-     * @return <code>true</code> if the cursor is on a valid row;
-     *         <code>false</code> otherwise or if there are no rows in this
-     *         <code>CachedRowSetImpl</code> object
+     * @return {@code true} if the cursor is on a valid row;
+     *         {@code false} otherwise or if there are no rows in this
+     *         {@code CachedRowSetImpl} object
      * @throws SQLException if the type of this rowset
-     *            is <code>ResultSet.TYPE_FORWARD_ONLY</code>
+     *            is {@code ResultSet.TYPE_FORWARD_ONLY}
      */
     public boolean first() throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the first
-     * row and returns <code>true</code> if the operation is successful.
+     * Moves this {@code CachedRowSetImpl} object's cursor to the first
+     * row and returns {@code true} if the operation is successful.
      * <P>
-     * This method is called internally by the methods <code>first</code>,
-     * <code>isFirst</code>, and <code>absolute</code>.
-     * It in turn calls the method <code>internalNext</code> in order to
+     * This method is called internally by the methods {@code first},
+     * {@code isFirst}, and {@code absolute}.
+     * It in turn calls the method {@code internalNext} in order to
      * handle the case where the first row is a deleted row that is not visible.
      * <p>
      * This is a implementation only method and is not required as a standard
-     * implementation of the <code>CachedRowSet</code> interface.
-     *
-     * @return <code>true</code> if the cursor moved to the first row;
-     *         <code>false</code> otherwise
+     * implementation of the {@code CachedRowSet} interface.
+     *
+     * @return {@code true} if the cursor moved to the first row;
+     *         {@code false} otherwise
      * @throws SQLException if an error occurs
      */
     protected boolean internalFirst() throws SQLException {
@@ -2233,35 +2241,35 @@
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the last row
-     * and returns <code>true</code> if the operation was successful.  This
+     * Moves this {@code CachedRowSetImpl} object's cursor to the last row
+     * and returns {@code true} if the operation was successful.  This
      * method also notifies registered listeners that the cursor has moved.
      *
-     * @return <code>true</code> if the cursor is on a valid row;
-     *         <code>false</code> otherwise or if there are no rows in this
-     *         <code>CachedRowSetImpl</code> object
+     * @return {@code true} if the cursor is on a valid row;
+     *         {@code false} otherwise or if there are no rows in this
+     *         {@code CachedRowSetImpl} object
      * @throws SQLException if the type of this rowset
-     *            is <code>ResultSet.TYPE_FORWARD_ONLY</code>
+     *            is {@code ResultSet.TYPE_FORWARD_ONLY}
      */
     public boolean last() throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the last
-     * row and returns <code>true</code> if the operation is successful.
+     * Moves this {@code CachedRowSetImpl} object's cursor to the last
+     * row and returns {@code true} if the operation is successful.
      * <P>
-     * This method is called internally by the method <code>last</code>
+     * This method is called internally by the method {@code last}
      * when rows have been deleted and the deletions are not visible.
-     * The method <code>internalLast</code> handles the case where the
+     * The method {@code internalLast} handles the case where the
      * last row is a deleted row that is not visible by in turn calling
-     * the method <code>internalPrevious</code>.
+     * the method {@code internalPrevious}.
      * <p>
      * This is a implementation only method and is not required as a standard
-     * implementation of the <code>CachedRowSet</code> interface.
-     *
-     * @return <code>true</code> if the cursor moved to the last row;
-     *         <code>false</code> otherwise
+     * implementation of the {@code CachedRowSet} interface.
+     *
+     * @return {@code true} if the cursor moved to the last row;
+     *         {@code false} otherwise
      * @throws SQLException if an error occurs
      */
     protected boolean internalLast() throws SQLException {
@@ -2269,12 +2277,12 @@
     }
 
     /**
-     * Returns the number of the current row in this <code>CachedRowSetImpl</code>
+     * Returns the number of the current row in this {@code CachedRowSetImpl}
      * object. The first row is number 1, the second number 2, and so on.
      *
-     * @return the number of the current row;  <code>0</code> if there is no
+     * @return the number of the current row;  {@code 0} if there is no
      *         current row
-     * @throws SQLException if an error occurs; or if the <code>CacheRowSetImpl</code>
+     * @throws SQLException if an error occurs; or if the {@code CacheRowSetImpl}
      *         is empty
      */
     public int getRow() throws SQLException {
@@ -2282,51 +2290,51 @@
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the row number
+     * Moves this {@code CachedRowSetImpl} object's cursor to the row number
      * specified.
      *
      * <p>If the number is positive, the cursor moves to an absolute row with
      * respect to the beginning of the rowset.  The first row is row 1, the second
      * is row 2, and so on.  For example, the following command, in which
-     * <code>crs</code> is a <code>CachedRowSetImpl</code> object, moves the cursor
+     * {@code crs} is a {@code CachedRowSetImpl} object, moves the cursor
      * to the fourth row, starting from the beginning of the rowset.
-     * <PRE><code>
+     * <PRE>{@code
      *
      *    crs.absolute(4);
      *
-     * </code> </PRE>
+     * }</PRE>
      * <P>
      * If the number is negative, the cursor moves to an absolute row position
      * with respect to the end of the rowset.  For example, calling
-     * <code>absolute(-1)</code> positions the cursor on the last row,
-     * <code>absolute(-2)</code> moves it on the next-to-last row, and so on.
-     * If the <code>CachedRowSetImpl</code> object <code>crs</code> has five rows,
+     * {@code absolute(-1)} positions the cursor on the last row,
+     * {@code absolute(-2)} moves it on the next-to-last row, and so on.
+     * If the {@code CachedRowSetImpl} object {@code crs} has five rows,
      * the following command moves the cursor to the fourth-to-last row, which
      * in the case of a  rowset with five rows, is also the second row, counting
      * from the beginning.
-     * <PRE><code>
+     * <PRE>{@code
      *
      *    crs.absolute(-4);
      *
-     * </code> </PRE>
+     * }</PRE>
      *
      * If the number specified is larger than the number of rows, the cursor
      * will move to the position after the last row. If the number specified
      * would move the cursor one or more rows before the first row, the cursor
      * moves to the position before the first row.
      * <P>
-     * Note: Calling <code>absolute(1)</code> is the same as calling the
-     * method <code>first()</code>.  Calling <code>absolute(-1)</code> is the
-     * same as calling <code>last()</code>.
+     * Note: Calling {@code absolute(1)} is the same as calling the
+     * method {@code first()}.  Calling {@code absolute(-1)} is the
+     * same as calling {@code last()}.
      *
      * @param row a positive number to indicate the row, starting row numbering from
-     *        the first row, which is <code>1</code>; a negative number to indicate
+     *        the first row, which is {@code 1}; a negative number to indicate
      *        the row, starting row numbering from the last row, which is
-     *        <code>-1</code>; it must not be <code>0</code>
-     * @return <code>true</code> if the cursor is on the rowset; <code>false</code>
+     *        {@code -1}; it must not be {@code 0}
+     * @return {@code true} if the cursor is on the rowset; {@code false}
      *         otherwise
-     * @throws SQLException if the given cursor position is <code>0</code> or the
-     *            type of this rowset is <code>ResultSet.TYPE_FORWARD_ONLY</code>
+     * @throws SQLException if the given cursor position is {@code 0} or the
+     *            type of this rowset is {@code ResultSet.TYPE_FORWARD_ONLY}
      */
     public boolean absolute( int row ) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2340,80 +2348,80 @@
      * If the number is positive, the cursor moves the specified number of
      * rows toward the end of the rowset, starting at the current row.
      * For example, the following command, in which
-     * <code>crs</code> is a <code>CachedRowSetImpl</code> object with 100 rows,
+     * {@code crs} is a {@code CachedRowSetImpl} object with 100 rows,
      * moves the cursor forward four rows from the current row.  If the
      * current row is 50, the cursor would move to row 54.
-     * <PRE><code>
+     * <PRE>{@code
      *
      *    crs.relative(4);
      *
-     * </code> </PRE>
+     * }</PRE>
      * <P>
      * If the number is negative, the cursor moves back toward the beginning
      * the specified number of rows, starting at the current row.
      * For example, calling the method
-     * <code>absolute(-1)</code> positions the cursor on the last row,
-     * <code>absolute(-2)</code> moves it on the next-to-last row, and so on.
-     * If the <code>CachedRowSetImpl</code> object <code>crs</code> has five rows,
+     * {@code absolute(-1)} positions the cursor on the last row,
+     * {@code absolute(-2)} moves it on the next-to-last row, and so on.
+     * If the {@code CachedRowSetImpl} object {@code crs} has five rows,
      * the following command moves the cursor to the fourth-to-last row, which
      * in the case of a  rowset with five rows, is also the second row
      * from the beginning.
-     * <PRE><code>
+     * <PRE>{@code
      *
      *    crs.absolute(-4);
      *
-     * </code> </PRE>
+     * }</PRE>
      *
      * If the number specified is larger than the number of rows, the cursor
      * will move to the position after the last row. If the number specified
      * would move the cursor one or more rows before the first row, the cursor
      * moves to the position before the first row. In both cases, this method
-     * throws an <code>SQLException</code>.
+     * throws an {@code SQLException}.
      * <P>
-     * Note: Calling <code>absolute(1)</code> is the same as calling the
-     * method <code>first()</code>.  Calling <code>absolute(-1)</code> is the
-     * same as calling <code>last()</code>.  Calling <code>relative(0)</code>
+     * Note: Calling {@code absolute(1)} is the same as calling the
+     * method {@code first()}.  Calling {@code absolute(-1)} is the
+     * same as calling {@code last()}.  Calling {@code relative(0)}
      * is valid, but it does not change the cursor position.
      *
-     * @param rows an <code>int</code> indicating the number of rows to move
+     * @param rows an {@code int} indicating the number of rows to move
      *             the cursor, starting at the current row; a positive number
      *             moves the cursor forward; a negative number moves the cursor
      *             backward; must not move the cursor past the valid
      *             rows
-     * @return <code>true</code> if the cursor is on a row in this
-     *         <code>CachedRowSetImpl</code> object; <code>false</code>
+     * @return {@code true} if the cursor is on a row in this
+     *         {@code CachedRowSetImpl} object; {@code false}
      *         otherwise
      * @throws SQLException if there are no rows in this rowset, the cursor is
      *         positioned either before the first row or after the last row, or
-     *         the rowset is type <code>ResultSet.TYPE_FORWARD_ONLY</code>
+     *         the rowset is type {@code ResultSet.TYPE_FORWARD_ONLY}
      */
     public boolean relative(int rows) throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Moves this <code>CachedRowSetImpl</code> object's cursor to the
-     * previous row and returns <code>true</code> if the cursor is on
-     * a valid row or <code>false</code> if it is not.
+     * Moves this {@code CachedRowSetImpl} object's cursor to the
+     * previous row and returns {@code true} if the cursor is on
+     * a valid row or {@code false} if it is not.
      * This method also notifies all listeners registered with this
-     * <code>CachedRowSetImpl</code> object that its cursor has moved.
+     * {@code CachedRowSetImpl} object that its cursor has moved.
      * <P>
-     * Note: calling the method <code>previous()</code> is not the same
-     * as calling the method <code>relative(-1)</code>.  This is true
-     * because it is possible to call <code>previous()</code> from the insert
+     * Note: calling the method {@code previous()} is not the same
+     * as calling the method {@code relative(-1)}.  This is true
+     * because it is possible to call {@code previous()} from the insert
      * row, from after the last row, or from the current row, whereas
-     * <code>relative</code> may only be called from the current row.
+     * {@code relative} may only be called from the current row.
      * <P>
-     * The method <code>previous</code> may used in a <code>while</code>
+     * The method {@code previous} may used in a {@code while}
      * loop to iterate through a rowset starting after the last row
-     * and moving toward the beginning. The loop ends when <code>previous</code>
-     * returns <code>false</code>, meaning that there are no more rows.
+     * and moving toward the beginning. The loop ends when {@code previous}
+     * returns {@code false}, meaning that there are no more rows.
      * For example, the following code fragment retrieves all the data in
-     * the <code>CachedRowSetImpl</code> object <code>crs</code>, which has
+     * the {@code CachedRowSetImpl} object {@code crs}, which has
      * three columns.  Note that the cursor must initially be positioned
      * after the last row so that the first call to the method
-     * <code>previous</code> places the cursor on the last line.
-     * <PRE> <code>
+     * {@code previous} places the cursor on the last line.
+     * <PRE>{@code
      *
      *     crs.afterLast();
      *     while (previous()) {
@@ -2423,33 +2431,33 @@
      *         System.out.println(name + "   " + age + "   " + ssn);
      *     }
      *
-     * </code> </PRE>
-     * This method throws an <code>SQLException</code> if the cursor is not
+     * }</PRE>
+     * This method throws an {@code SQLException} if the cursor is not
      * on a row in the rowset, before the first row, or after the last row.
      *
-     * @return <code>true</code> if the cursor is on a valid row;
-     *         <code>false</code> if it is before the first row or after the
+     * @return {@code true} if the cursor is on a valid row;
+     *         {@code false} if it is before the first row or after the
      *         last row
      * @throws SQLException if the cursor is not on a valid position or the
-     *           type of this rowset is <code>ResultSet.TYPE_FORWARD_ONLY</code>
+     *           type of this rowset is {@code ResultSet.TYPE_FORWARD_ONLY}
      */
     public boolean previous() throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Moves the cursor to the previous row in this <code>CachedRowSetImpl</code>
+     * Moves the cursor to the previous row in this {@code CachedRowSetImpl}
      * object, skipping past deleted rows that are not visible; returns
-     * <code>true</code> if the cursor is on a row in this rowset and
-     * <code>false</code> when the cursor goes before the first row.
+     * {@code true} if the cursor is on a row in this rowset and
+     * {@code false} when the cursor goes before the first row.
      * <P>
-     * This method is called internally by the method <code>previous</code>.
+     * This method is called internally by the method {@code previous}.
      * <P>
      * This is a implementation only method and is not required as a standard
-     * implementation of the <code>CachedRowSet</code> interface.
-     *
-     * @return <code>true</code> if the cursor is on a row in this rowset;
-     *         <code>false</code> when the cursor reaches the position before
+     * implementation of the {@code CachedRowSet} interface.
+     *
+     * @return {@code true} if the cursor is on a row in this rowset;
+     *         {@code false} when the cursor reaches the position before
      *         the first row
      * @throws SQLException if an error occurs
      */
@@ -2463,14 +2471,14 @@
     //---------------------------------------------------------------------
 
     /**
-     * Indicates whether the current row of this <code>CachedRowSetImpl</code>
+     * Indicates whether the current row of this {@code CachedRowSetImpl}
      * object has been updated.  The value returned
-     * depends on whether this rowset can detect updates: <code>false</code>
+     * depends on whether this rowset can detect updates: {@code false}
      * will always be returned if it does not detect updates.
      *
-     * @return <code>true</code> if the row has been visibly updated
+     * @return {@code true} if the row has been visibly updated
      *         by the owner or another and updates are detected;
-     *         <code>false</code> otherwise
+     *         {@code false} otherwise
      * @throws SQLException if the cursor is on the insert row or not
      *            not on a valid row
      *
@@ -2482,13 +2490,13 @@
 
     /**
      * Indicates whether the designated column of the current row of
-     * this <code>CachedRowSetImpl</code> object has been updated. The
+     * this {@code CachedRowSetImpl} object has been updated. The
      * value returned depends on whether this rowset can detcted updates:
-     * <code>false</code> will always be returned if it does not detect updates.
+     * {@code false} will always be returned if it does not detect updates.
      *
      * @param idx the index identifier of the column that may be have been updated.
-     * @return <code>true</code> is the designated column has been updated
-     * and the rowset detects updates; <code>false</code> if the rowset has not
+     * @return {@code true} is the designated column has been updated
+     * and the rowset detects updates; {@code false} if the rowset has not
      * been updated or the rowset does not detect updates
      * @throws SQLException if the cursor is on the insert row or not
      *          on a valid row
@@ -2500,14 +2508,14 @@
 
     /**
      * Indicates whether the designated column of the current row of
-     * this <code>CachedRowSetImpl</code> object has been updated. The
+     * this {@code CachedRowSetImpl} object has been updated. The
      * value returned depends on whether this rowset can detcted updates:
-     * <code>false</code> will always be returned if it does not detect updates.
-     *
-     * @param columnName the <code>String</code> column name column that may be have
+     * {@code false} will always be returned if it does not detect updates.
+     *
+     * @param columnName the {@code String} column name column that may be have
      * been updated.
-     * @return <code>true</code> is the designated column has been updated
-     * and the rowset detects updates; <code>false</code> if the rowset has not
+     * @return {@code true} is the designated column has been updated
+     * and the rowset detects updates; {@code false} if the rowset has not
      * been updated or the rowset does not detect updates
      * @throws SQLException if the cursor is on the insert row or not
      *          on a valid row
@@ -2521,8 +2529,8 @@
      * Indicates whether the current row has been inserted.  The value returned
      * depends on whether or not the rowset can detect visible inserts.
      *
-     * @return <code>true</code> if a row has been inserted and inserts are detected;
-     *         <code>false</code> otherwise
+     * @return {@code true} if a row has been inserted and inserts are detected;
+     *         {@code false} otherwise
      * @throws SQLException if the cursor is on the insert row or not
      *            not on a valid row
      *
@@ -2536,12 +2544,12 @@
      * Indicates whether the current row has been deleted.  A deleted row
      * may leave a visible "hole" in a rowset.  This method can be used to
      * detect such holes if the rowset can detect deletions. This method
-     * will always return <code>false</code> if this rowset cannot detect
+     * will always return {@code false} if this rowset cannot detect
      * deletions.
      *
-     * @return <code>true</code> if (1)the current row is blank, indicating that
+     * @return {@code true} if (1)the current row is blank, indicating that
      *         the row has been deleted, and (2)deletions are detected;
-     *         <code>false</code> otherwise
+     *         {@code false} otherwise
      * @throws SQLException if the cursor is on a valid row in this rowset
      * @see DatabaseMetaData#deletesAreDetected
      */
@@ -2551,8 +2559,8 @@
 
     /**
      * Sets the designated nullable column in the current row or the
-     * insert row of this <code>CachedRowSetImpl</code> object with
-     * <code>null</code> value.
+     * insert row of this {@code CachedRowSetImpl} object with
+     * {@code null} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset; however, another method must be called to complete
@@ -2565,15 +2573,15 @@
      * <P>
      * In order to propagate updates in this rowset to the underlying
      * data source, an application must call the method {@link #acceptChanges}
-     * after it calls either <code>updateRow</code> or <code>insertRow</code>.
-     *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * after it calls either {@code updateRow} or {@code insertRow}.
+     *
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateNull(int columnIndex) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2581,8 +2589,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>boolean</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code boolean} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -2593,14 +2601,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBoolean(int columnIndex, boolean x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2608,8 +2616,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>byte</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code byte} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -2620,14 +2628,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateByte(int columnIndex, byte x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2635,8 +2643,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>short</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code short} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -2647,14 +2655,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateShort(int columnIndex, short x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2662,8 +2670,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>int</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code int} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -2674,14 +2682,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateInt(int columnIndex, int x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2689,8 +2697,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>long</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code long} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -2701,14 +2709,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateLong(int columnIndex, long x) throws SQLException {
        throw new UnsupportedOperationException();
@@ -2717,8 +2725,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>float</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code float} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -2729,14 +2737,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateFloat(int columnIndex, float x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2744,8 +2752,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -2756,14 +2764,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateDouble(int columnIndex, double x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2771,8 +2779,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.math.BigDecimal</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.math.BigDecimal} object.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -2783,14 +2791,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2798,8 +2806,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>String</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code String} object.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -2810,17 +2818,17 @@
      * as inserted. Both of these methods must be called before the
      * cursor moves to another row.
      * <P>
-     * The method <code>acceptChanges</code> must be called if the
+     * The method {@code acceptChanges} must be called if the
      * updated values are to be written back to the underlying database.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateString(int columnIndex, String x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2828,8 +2836,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>byte</code> array.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code byte} array.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -2840,14 +2848,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBytes(int columnIndex, byte x[]) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2855,8 +2863,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Date</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Date} object.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -2867,15 +2875,15 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, (3) the type of the designated column is not
-     *            an SQL <code>DATE</code> or <code>TIMESTAMP</code>, or
-     *            (4) this rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            an SQL {@code DATE} or {@code TIMESTAMP}, or
+     *            (4) this rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateDate(int columnIndex, java.sql.Date x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2883,8 +2891,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Time</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Time} object.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -2895,15 +2903,15 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, (3) the type of the designated column is not
-     *            an SQL <code>TIME</code> or <code>TIMESTAMP</code>, or
-     *            (4) this rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            an SQL {@code TIME} or {@code TIMESTAMP}, or
+     *            (4) this rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateTime(int columnIndex, java.sql.Time x) throws SQLException {
        throw new UnsupportedOperationException();
@@ -2911,8 +2919,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Timestamp</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Timestamp} object.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -2923,16 +2931,16 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, (3) the type of the designated column is not
-     *            an SQL <code>DATE</code>, <code>TIME</code>, or
-     *            <code>TIMESTAMP</code>, or (4) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            an SQL {@code DATE}, {@code TIME}, or
+     *            {@code TIMESTAMP}, or (4) this rowset is
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateTimestamp(int columnIndex, java.sql.Timestamp x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2940,7 +2948,7 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
+     * row of this {@code CachedRowSetImpl} object with the given
      * ASCII stream value.
      * <P>
      * This method updates a column value in either the current row or
@@ -2952,8 +2960,8 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @param length the number of one-byte ASCII characters in the stream
@@ -2965,8 +2973,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.io.InputStream</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.io.InputStream} object.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -2977,17 +2985,17 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param x the new column value; must be a <code>java.io.InputStream</code>
-     *          containing <code>BINARY</code>, <code>VARBINARY</code>, or
-     *          <code>LONGVARBINARY</code> data
+     * @param x the new column value; must be a {@code java.io.InputStream}
+     *          containing {@code BINARY}, {@code VARBINARY}, or
+     *          {@code LONGVARBINARY} data
      * @param length the length of the stream in bytes
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, (3) the data in the stream is not binary, or
-     *            (4) this rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            (4) this rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBinaryStream(int columnIndex, java.io.InputStream x,int length) throws SQLException {
         throw new UnsupportedOperationException();
@@ -2995,8 +3003,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.io.Reader</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.io.Reader} object.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3007,19 +3015,19 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param x the new column value; must be a <code>java.io.Reader</code>
-     *          containing <code>BINARY</code>, <code>VARBINARY</code>,
-     *          <code>LONGVARBINARY</code>, <code>CHAR</code>, <code>VARCHAR</code>,
-     *          or <code>LONGVARCHAR</code> data
+     * @param x the new column value; must be a {@code java.io.Reader}
+     *          containing {@code BINARY}, {@code VARBINARY},
+     *          {@code LONGVARBINARY}, {@code CHAR}, {@code VARCHAR},
+     *          or {@code LONGVARCHAR} data
      * @param length the length of the stream in characters
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, (3) the data in the stream is not a binary or
      *            character type, or (4) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3027,11 +3035,11 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Object</code> value.  The <code>scale</code> parameter indicates
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Object} value.  The {@code scale} parameter indicates
      * the number of digits to the right of the decimal point and is ignored
      * if the new column value is not a type that will be mapped to an SQL
-     * <code>DECIMAL</code> or <code>NUMERIC</code> value.
+     * {@code DECIMAL} or {@code NUMERIC} value.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3042,16 +3050,16 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @param scale the number of digits to the right of the decimal point (for
-     *              <code>DECIMAL</code> and <code>NUMERIC</code> types only)
+     *              {@code DECIMAL} and {@code NUMERIC} types only)
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateObject(int columnIndex, Object x, int scale) throws SQLException {
        throw new UnsupportedOperationException();
@@ -3059,8 +3067,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Object</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Object} value.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3071,14 +3079,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
      * @param x the new column value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateObject(int columnIndex, Object x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3087,8 +3095,8 @@
 
     /**
      * Sets the designated nullable column in the current row or the
-     * insert row of this <code>CachedRowSetImpl</code> object with
-     * <code>null</code> value.
+     * insert row of this {@code CachedRowSetImpl} object with
+     * {@code null} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -3098,12 +3106,12 @@
      * must be called, which will insert the new row into both this rowset
      * and the database.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateNull(String columnName) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3111,8 +3119,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>boolean</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code boolean} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -3123,13 +3131,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBoolean(String columnName, boolean x) throws SQLException {
        throw new UnsupportedOperationException();
@@ -3137,8 +3145,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>byte</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code byte} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -3149,13 +3157,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateByte(String columnName, byte x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3163,8 +3171,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>short</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code short} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -3175,13 +3183,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateShort(String columnName, short x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3189,8 +3197,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>int</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code int} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -3201,13 +3209,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateInt(String columnName, int x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3215,8 +3223,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>long</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code long} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -3227,13 +3235,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateLong(String columnName, long x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3241,8 +3249,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>float</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code float} value.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -3253,13 +3261,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateFloat(String columnName, float x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3267,8 +3275,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3279,13 +3287,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateDouble(String columnName, double x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3293,8 +3301,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.math.BigDecimal</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.math.BigDecimal} object.
      * <P>
      * This method updates a column value in the current row or the insert
      * row of this rowset, but it does not update the database.
@@ -3305,13 +3313,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3319,8 +3327,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>String</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code String} object.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3331,13 +3339,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateString(String columnName, String x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3345,8 +3353,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>byte</code> array.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code byte} array.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3357,13 +3365,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBytes(String columnName, byte x[]) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3371,8 +3379,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Date</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Date} object.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3383,15 +3391,15 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, (3) the type
-     *            of the designated column is not an SQL <code>DATE</code> or
-     *            <code>TIMESTAMP</code>, or (4) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            of the designated column is not an SQL {@code DATE} or
+     *            {@code TIMESTAMP}, or (4) this rowset is
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateDate(String columnName, java.sql.Date x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3399,8 +3407,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Time</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Time} object.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3411,15 +3419,15 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, (3) the type
-     *            of the designated column is not an SQL <code>TIME</code> or
-     *            <code>TIMESTAMP</code>, or (4) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            of the designated column is not an SQL {@code TIME} or
+     *            {@code TIMESTAMP}, or (4) this rowset is
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateTime(String columnName, java.sql.Time x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3427,8 +3435,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Timestamp</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Timestamp} object.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3439,7 +3447,7 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if the given column index is out of bounds or
@@ -3448,9 +3456,9 @@
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, (3) the type
-     *            of the designated column is not an SQL <code>DATE</code>,
-     *            <code>TIME</code>, or <code>TIMESTAMP</code>, or (4) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            of the designated column is not an SQL {@code DATE},
+     *            {@code TIME}, or {@code TIMESTAMP}, or (4) this
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateTimestamp(String columnName, java.sql.Timestamp x) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3458,7 +3466,7 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
+     * row of this {@code CachedRowSetImpl} object with the given
      * ASCII stream value.
      * <P>
      * This method updates a column value in either the current row or
@@ -3470,7 +3478,7 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @param length the number of one-byte ASCII characters in the stream
@@ -3483,8 +3491,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.io.InputStream</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.io.InputStream} object.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3495,17 +3503,17 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param x the new column value; must be a <code>java.io.InputStream</code>
-     *          containing <code>BINARY</code>, <code>VARBINARY</code>, or
-     *          <code>LONGVARBINARY</code> data
+     * @param x the new column value; must be a {@code java.io.InputStream}
+     *          containing {@code BINARY}, {@code VARBINARY}, or
+     *          {@code LONGVARBINARY} data
      * @param length the length of the stream in bytes
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, (3) the data
      *            in the stream is not binary, or (4) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBinaryStream(String columnName, java.io.InputStream x, int length) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3513,8 +3521,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.io.Reader</code> object.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.io.Reader} object.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3525,18 +3533,18 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param reader the new column value; must be a
-     * <code>java.io.Reader</code> containing <code>BINARY</code>,
-     * <code>VARBINARY</code>, <code>LONGVARBINARY</code>, <code>CHAR</code>,
-     * <code>VARCHAR</code>, or <code>LONGVARCHAR</code> data
+     * {@code java.io.Reader} containing {@code BINARY},
+     * {@code VARBINARY}, {@code LONGVARBINARY}, {@code CHAR},
+     * {@code VARCHAR}, or {@code LONGVARCHAR} data
      * @param length the length of the stream in characters
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, (3) the data
      *            in the stream is not a binary or character type, or (4) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateCharacterStream(String columnName,
     java.io.Reader reader,
@@ -3546,11 +3554,11 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Object</code> value.  The <code>scale</code> parameter
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Object} value.  The {@code scale} parameter
      * indicates the number of digits to the right of the decimal point
      * and is ignored if the new column value is not a type that will be
-     *  mapped to an SQL <code>DECIMAL</code> or <code>NUMERIC</code> value.
+     *  mapped to an SQL {@code DECIMAL} or {@code NUMERIC} value.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3561,15 +3569,15 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @param scale the number of digits to the right of the decimal point (for
-     *              <code>DECIMAL</code> and <code>NUMERIC</code> types only)
+     *              {@code DECIMAL} and {@code NUMERIC} types only)
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateObject(String columnName, Object x, int scale) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3577,8 +3585,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>Object</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code Object} value.
      * <P>
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -3589,20 +3597,20 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
      * @param x the new column value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateObject(String columnName, Object x) throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Inserts the contents of this <code>CachedRowSetImpl</code> object's insert
+     * Inserts the contents of this {@code CachedRowSetImpl} object's insert
      * row into this rowset immediately following the current row.
      * If the current row is the
      * position after the last row or before the first row, the new row will
@@ -3614,14 +3622,14 @@
      * @throws SQLException if (1) the cursor is not on the insert row,
      *            (2) one or more of the non-nullable columns in the insert
      *            row has not been given a value, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void insertRow() throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Marks the current row of this <code>CachedRowSetImpl</code> object as
+     * Marks the current row of this {@code CachedRowSetImpl} object as
      * updated and notifies listeners registered with this rowset that the
      * row has changed.
      * <P>
@@ -3631,26 +3639,26 @@
      * and the updates made before the cursor moved will be lost.
      *
      * @throws SQLException if the cursor is on the insert row or this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateRow() throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Deletes the current row from this <code>CachedRowSetImpl</code> object and
+     * Deletes the current row from this {@code CachedRowSetImpl} object and
      * notifies listeners registered with this rowset that a row has changed.
      * This method cannot be called when the cursor is on the insert row.
      * <P>
      * This method marks the current row as deleted, but it does not delete
      * the row from the underlying data source.  The method
-     * <code>acceptChanges</code> must be called to delete the row in
+     * {@code acceptChanges} must be called to delete the row in
      * the data source.
      *
      * @throws SQLException if (1) this method is called when the cursor
      *            is on the insert row, before the first row, or after the
      *            last row or (2) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void deleteRow() throws SQLException {
         throw new UnsupportedOperationException();
@@ -3659,7 +3667,7 @@
     /**
      * Sets the current row with its original value and marks the row as
      * not updated, thus undoing any changes made to the row since the
-     * last call to the methods <code>updateRow</code> or <code>deleteRow</code>.
+     * last call to the methods {@code updateRow} or {@code deleteRow}.
      * This method should be called only when the cursor is on a row in
      * this rowset.
      *
@@ -3672,11 +3680,11 @@
 
     /**
      * Rolls back any updates made to the current row of this
-     * <code>CachedRowSetImpl</code> object and notifies listeners that
+     * {@code CachedRowSetImpl} object and notifies listeners that
      * a row has changed.  To have an effect, this method
-     * must be called after an <code>updateXXX</code> method has been
-     * called and before the method <code>updateRow</code> has been called.
-     * If no updates have been made or the method <code>updateRow</code>
+     * must be called after an {@code updateXXX} method has been
+     * called and before the method {@code updateRow} has been called.
+     * If no updates have been made or the method {@code updateRow}
      * has already been called, this method has no effect.
      *
      * @throws SQLException if the cursor is on the insert row, before the
@@ -3687,39 +3695,39 @@
     }
 
     /**
-     * Moves the cursor for this <code>CachedRowSetImpl</code> object
+     * Moves the cursor for this {@code CachedRowSetImpl} object
      * to the insert row.  The current row in the rowset is remembered
      * while the cursor is on the insert row.
      * <P>
      * The insert row is a special row associated with an updatable
      * rowset.  It is essentially a buffer where a new row may
-     * be constructed by calling the appropriate <code>updateXXX</code>
+     * be constructed by calling the appropriate {@code updateXXX}
      * methods to assign a value to each column in the row.  A complete
      * row must be constructed; that is, every column that is not nullable
      * must be assigned a value.  In order for the new row to become part
-     * of this rowset, the method <code>insertRow</code> must be called
+     * of this rowset, the method {@code insertRow} must be called
      * before the cursor is moved back to the rowset.
      * <P>
      * Only certain methods may be invoked while the cursor is on the insert
      * row; many methods throw an exception if they are called while the
-     * cursor is there.  In addition to the <code>updateXXX</code>
-     * and <code>insertRow</code> methods, only the <code>getXXX</code> methods
-     * may be called when the cursor is on the insert row.  A <code>getXXX</code>
-     * method should be called on a column only after an <code>updateXXX</code>
+     * cursor is there.  In addition to the {@code updateXXX}
+     * and {@code insertRow} methods, only the {@code getXXX} methods
+     * may be called when the cursor is on the insert row.  A {@code getXXX}
+     * method should be called on a column only after an {@code updateXXX}
      * method has been called on that column; otherwise, the value returned is
      * undetermined.
      *
-     * @throws SQLException if this <code>CachedRowSetImpl</code> object is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     * @throws SQLException if this {@code CachedRowSetImpl} object is
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void moveToInsertRow() throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Moves the cursor for this <code>CachedRowSetImpl</code> object to
+     * Moves the cursor for this {@code CachedRowSetImpl} object to
      * the current row.  The current row is the row the cursor was on
-     * when the method <code>moveToInsertRow</code> was called.
+     * when the method {@code moveToInsertRow} was called.
      * <P>
      * Calling this method has no effect unless it is called while the
      * cursor is on the insert row.
@@ -3731,9 +3739,9 @@
     }
 
     /**
-     * Returns <code>null</code>.
-     *
-     * @return <code>null</code>
+     * Returns {@code null}.
+     *
+     * @return {@code null}
      * @throws SQLException if an error occurs
      */
     public Statement getStatement() throws SQLException {
@@ -3742,18 +3750,18 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as an <code>Object</code> in
+     * {@code CachedRowSetImpl} object as an {@code Object} in
      * the Java programming language, using the given
-     * <code>java.util.Map</code> object to custom map the value if
+     * {@code java.util.Map} object to custom map the value if
      * appropriate.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param map a <code>java.util.Map</code> object showing the mapping
+     * @param map a {@code java.util.Map} object showing the mapping
      *            from SQL type names to classes in the Java programming
      *            language
-     * @return an <code>Object</code> representing the SQL value
+     * @return an {@code Object} representing the SQL value
      * @throws SQLException if the given column index is out of bounds or
      *            the cursor is not on one of this rowset's rows or its
      *            insert row
@@ -3767,17 +3775,17 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as a <code>Ref</code> object
+     * {@code CachedRowSetImpl} object as a {@code Ref} object
      * in the Java programming language.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @return a <code>Ref</code> object representing an SQL<code> REF</code> value
+     * @return a {@code Ref} object representing an SQL{@code  REF} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) the designated column does not store an
-     *            SQL <code>REF</code> value
+     *            SQL {@code REF} value
      * @see #getRef(String)
      */
     public Ref getRef(int columnIndex) throws SQLException {
@@ -3786,17 +3794,17 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as a <code>Blob</code> object
+     * {@code CachedRowSetImpl} object as a {@code Blob} object
      * in the Java programming language.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @return a <code>Blob</code> object representing an SQL <code>BLOB</code> value
+     * @return a {@code Blob} object representing an SQL {@code BLOB} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) the designated column does not store an
-     *            SQL <code>BLOB</code> value
+     *            SQL {@code BLOB} value
      * @see #getBlob(String)
      */
     public Blob getBlob(int columnIndex) throws SQLException {
@@ -3805,17 +3813,17 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as a <code>Clob</code> object
+     * {@code CachedRowSetImpl} object as a {@code Clob} object
      * in the Java programming language.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @return a <code>Clob</code> object representing an SQL <code>CLOB</code> value
+     * @return a {@code Clob} object representing an SQL {@code CLOB} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) the designated column does not store an
-     *            SQL <code>CLOB</code> value
+     *            SQL {@code CLOB} value
      * @see #getClob(String)
      */
     public Clob getClob(int columnIndex) throws SQLException {
@@ -3824,18 +3832,18 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as an <code>Array</code> object
+     * {@code CachedRowSetImpl} object as an {@code Array} object
      * in the Java programming language.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @return an <code>Array</code> object representing an SQL
-     *         <code>ARRAY</code> value
+     * @return an {@code Array} object representing an SQL
+     *         {@code ARRAY} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) the designated column does not store an
-     *            SQL <code>ARRAY</code> value
+     *            SQL {@code ARRAY} value
      * @see #getArray(String)
      */
     public Array getArray(int columnIndex) throws SQLException {
@@ -3844,17 +3852,17 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as an <code>Object</code> in
+     * {@code CachedRowSetImpl} object as an {@code Object} in
      * the Java programming language, using the given
-     * <code>java.util.Map</code> object to custom map the value if
+     * {@code java.util.Map} object to custom map the value if
      * appropriate.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param map a <code>java.util.Map</code> object showing the mapping
+     * @param map a {@code java.util.Map} object showing the mapping
      *        from SQL type names to classes in the Java programming
      *        language
-     * @return an <code>Object</code> representing the SQL value
+     * @return an {@code Object} representing the SQL value
      * @throws SQLException if the given column name is not the name of
      *         a column in this rowset or the cursor is not on one of
      *         this rowset's rows or its insert row
@@ -3867,16 +3875,16 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as a <code>Ref</code> object
+     * {@code CachedRowSetImpl} object as a {@code Ref} object
      * in the Java programming language.
      *
-     * @param colName a <code>String</code> object that must match the
+     * @param colName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @return a <code>Ref</code> object representing an SQL<code> REF</code> value
+     * @return a {@code Ref} object representing an SQL{@code  REF} value
      * @throws SQLException  if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the column value
-     *            is not an SQL <code>REF</code> value
+     *            is not an SQL {@code REF} value
      * @see #getRef(int)
      */
     public Ref getRef(String colName) throws SQLException {
@@ -3885,16 +3893,16 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as a <code>Blob</code> object
+     * {@code CachedRowSetImpl} object as a {@code Blob} object
      * in the Java programming language.
      *
-     * @param colName a <code>String</code> object that must match the
+     * @param colName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @return a <code>Blob</code> object representing an SQL <code>BLOB</code> value
+     * @return a {@code Blob} object representing an SQL {@code BLOB} value
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>BLOB</code> value
+     *            column does not store an SQL {@code BLOB} value
      * @see #getBlob(int)
      */
     public Blob getBlob(String colName) throws SQLException {
@@ -3903,17 +3911,17 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as a <code>Clob</code> object
+     * {@code CachedRowSetImpl} object as a {@code Clob} object
      * in the Java programming language.
      *
-     * @param colName a <code>String</code> object that must match the
+     * @param colName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @return a <code>Clob</code> object representing an SQL
-     *         <code>CLOB</code> value
+     * @return a {@code Clob} object representing an SQL
+     *         {@code CLOB} value
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>CLOB</code> value
+     *            column does not store an SQL {@code CLOB} value
      * @see #getClob(int)
      */
     public Clob getClob(String colName) throws SQLException {
@@ -3922,17 +3930,17 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as an <code>Array</code> object
+     * {@code CachedRowSetImpl} object as an {@code Array} object
      * in the Java programming langugage.
      *
-     * @param colName a <code>String</code> object that must match the
+     * @param colName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @return an <code>Array</code> object representing an SQL
-     *         <code>ARRAY</code> value
+     * @return an {@code Array} object representing an SQL
+     *         {@code ARRAY} value
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>ARRAY</code> value
+     *            column does not store an SQL {@code ARRAY} value
      * @see #getArray(int)
      */
     public Array getArray(String colName) throws SQLException {
@@ -3941,22 +3949,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a <code>java.sql.Date</code>
-     * object, using the given <code>Calendar</code> object to construct an
+     * of this {@code CachedRowSetImpl} object as a {@code java.sql.Date}
+     * object, using the given {@code Calendar} object to construct an
      * appropriate millisecond value for the date.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @param cal the <code>java.util.Calendar</code> object to use in
+     * @param cal the {@code java.util.Calendar} object to use in
      *            constructing the date
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>DATE</code> or
-     *            <code>TIMESTAMP</code> value
+     *            column does not store an SQL {@code DATE} or
+     *            {@code TIMESTAMP} value
      */
     public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3964,21 +3972,21 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a <code>java.sql.Date</code>
-     * object, using the given <code>Calendar</code> object to construct an
+     * of this {@code CachedRowSetImpl} object as a {@code java.sql.Date}
+     * object, using the given {@code Calendar} object to construct an
      * appropriate millisecond value for the date.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param cal the <code>java.util.Calendar</code> object to use in
+     * @param cal the {@code java.util.Calendar} object to use in
      *            constructing the date
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>DATE</code> or
-     *            <code>TIMESTAMP</code> value
+     *            column does not store an SQL {@code DATE} or
+     *            {@code TIMESTAMP} value
      */
     public java.sql.Date getDate(String columnName, Calendar cal) throws SQLException {
         throw new UnsupportedOperationException();
@@ -3986,22 +3994,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a <code>java.sql.Time</code>
-     * object, using the given <code>Calendar</code> object to construct an
+     * of this {@code CachedRowSetImpl} object as a {@code java.sql.Time}
+     * object, using the given {@code Calendar} object to construct an
      * appropriate millisecond value for the date.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @param cal the <code>java.util.Calendar</code> object to use in
+     * @param cal the {@code java.util.Calendar} object to use in
      *            constructing the date
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>TIME</code> or
-     *            <code>TIMESTAMP</code> value
+     *            column does not store an SQL {@code TIME} or
+     *            {@code TIMESTAMP} value
      */
     public java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4009,21 +4017,21 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a <code>java.sql.Time</code>
-     * object, using the given <code>Calendar</code> object to construct an
+     * of this {@code CachedRowSetImpl} object as a {@code java.sql.Time}
+     * object, using the given {@code Calendar} object to construct an
      * appropriate millisecond value for the date.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param cal the <code>java.util.Calendar</code> object to use in
+     * @param cal the {@code java.util.Calendar} object to use in
      *            constructing the date
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>TIME</code> or
-     *            <code>TIMESTAMP</code> value
+     *            column does not store an SQL {@code TIME} or
+     *            {@code TIMESTAMP} value
      */
     public java.sql.Time getTime(String columnName, Calendar cal) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4031,22 +4039,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a <code>java.sql.Timestamp</code>
-     * object, using the given <code>Calendar</code> object to construct an
+     * of this {@code CachedRowSetImpl} object as a {@code java.sql.Timestamp}
+     * object, using the given {@code Calendar} object to construct an
      * appropriate millisecond value for the date.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in the rowset
-     * @param cal the <code>java.util.Calendar</code> object to use in
+     * @param cal the {@code java.util.Calendar} object to use in
      *            constructing the date
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>TIME</code> or
-     *            <code>TIMESTAMP</code> value
+     *            column does not store an SQL {@code TIME} or
+     *            {@code TIMESTAMP} value
      */
     public java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4054,22 +4062,22 @@
 
     /**
      * Retrieves the value of the designated column in the current row
-     * of this <code>CachedRowSetImpl</code> object as a
-     * <code>java.sql.Timestamp</code> object, using the given
-     * <code>Calendar</code> object to construct an appropriate
+     * of this {@code CachedRowSetImpl} object as a
+     * {@code java.sql.Timestamp} object, using the given
+     * {@code Calendar} object to construct an appropriate
      * millisecond value for the date.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param cal the <code>java.util.Calendar</code> object to use in
+     * @param cal the {@code java.util.Calendar} object to use in
      *            constructing the date
-     * @return the column value; if the value is SQL <code>NULL</code>,
-     *         the result is <code>null</code>
+     * @return the column value; if the value is SQL {@code NULL},
+     *         the result is {@code null}
      * @throws SQLException if (1) the given column name is not the name of
      *            a column in this rowset, (2) the cursor is not on one of
      *            this rowset's rows or its insert row, or (3) the designated
-     *            column does not store an SQL <code>DATE</code>,
-     *            <code>TIME</code>, or <code>TIMESTAMP</code> value
+     *            column does not store an SQL {@code DATE},
+     *            {@code TIME}, or {@code TIMESTAMP} value
      */
     public java.sql.Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4080,13 +4088,13 @@
      */
 
     /**
-     * Retrieves the <code>Connection</code> object passed to this
-     * <code>CachedRowSetImpl</code> object.  This connection may be
+     * Retrieves the {@code Connection} object passed to this
+     * {@code CachedRowSetImpl} object.  This connection may be
      * used to populate this rowset with data or to write data back
      * to its underlying data source.
      *
-     * @return the <code>Connection</code> object passed to this rowset;
-     *         may be <code>null</code> if there is no connection
+     * @return the {@code Connection} object passed to this rowset;
+     *         may be {@code null} if there is no connection
      * @throws SQLException if an error occurs
      */
     public Connection getConnection() throws SQLException{
@@ -4094,10 +4102,10 @@
     }
 
     /**
-     * Sets the metadata for this <code>CachedRowSetImpl</code> object
-     * with the given <code>RowSetMetaData</code> object.
-     *
-     * @param md a <code>RowSetMetaData</code> object instance containing
+     * Sets the metadata for this {@code CachedRowSetImpl} object
+     * with the given {@code RowSetMetaData} object.
+     *
+     * @param md a {@code RowSetMetaData} object instance containing
      *            metadata about the columsn in the rowset
      * @throws SQLException if invalid meta data is supplied to the
      *            rowset
@@ -4108,17 +4116,17 @@
 
     /**
      * Returns a result set containing the original value of the rowset. The
-     * original value is the state of the <code>CachedRowSetImpl</code> after the
+     * original value is the state of the {@code CachedRowSetImpl} after the
      * last population or synchronization (whichever occurred most recently) with
      * the data source.
      * <p>
      * The cursor is positioned before the first row in the result set.
-     * Only rows contained in the result set returned by <code>getOriginal()</code>
+     * Only rows contained in the result set returned by {@code getOriginal()}
      * are said to have an original value.
      *
      * @return the original result set of the rowset
      * @throws SQLException if an error occurs produce the
-     *           <code>ResultSet</code> object
+     *           {@code ResultSet} object
      */
     public ResultSet getOriginal() throws SQLException {
        throw new UnsupportedOperationException();
@@ -4127,7 +4135,7 @@
     /**
      * Returns a result set containing the original value of the current
      * row only.
-     * The original value is the state of the <code>CachedRowSetImpl</code> after
+     * The original value is the state of the {@code CachedRowSetImpl} after
      * the last population or synchronization (whichever occurred most recently)
      * with the data source.
      *
@@ -4153,7 +4161,7 @@
     /**
      * Marks all rows in this rowset as being original rows. Any updates
      * made to the rows become the original values for the rowset.
-     * Calls to the method <code>setOriginal</code> connot be reversed.
+     * Calls to the method {@code setOriginal} connot be reversed.
      *
      * @throws SQLException if an error occurs
      */
@@ -4165,8 +4173,8 @@
      * Returns an identifier for the object (table) that was used to create this
      * rowset.
      *
-     * @return a <code>String</code> object that identifies the table from
-     *         which this <code>CachedRowSetImpl</code> object was derived
+     * @return a {@code String} object that identifies the table from
+     *         which this {@code CachedRowSetImpl} object was derived
      * @throws SQLException if an error occurs
      */
     public String getTableName() throws SQLException {
@@ -4177,8 +4185,8 @@
      * Sets the identifier for the table from which this rowset was derived
      * to the given table name.
      *
-     * @param tabName a <code>String</code> object that identifies the
-     *          table from which this <code>CachedRowSetImpl</code> object
+     * @param tabName a {@code String} object that identifies the
+     *          table from which this {@code CachedRowSetImpl} object
      *          was derived
      * @throws SQLException if an error occurs
      */
@@ -4188,7 +4196,7 @@
 
     /**
      * Returns the columns that make a key to uniquely identify a
-     * row in this <code>CachedRowSetImpl</code> object.
+     * row in this {@code CachedRowSetImpl} object.
      *
      * @return an array of column numbers that constitutes a primary
      *           key for this rowset. This array should be empty
@@ -4203,16 +4211,16 @@
 
 
     /**
-     * Sets this <code>CachedRowSetImpl</code> object's
-     * <code>keyCols</code> field with the given array of column
+     * Sets this {@code CachedRowSetImpl} object's
+     * {@code keyCols} field with the given array of column
      * numbers, which forms a key for uniquely identifying a row
      * in this rowset.
      *
-     * @param keys an array of <code>int</code> indicating the
+     * @param keys an array of {@code int} indicating the
      *        columns that form a primary key for this
-     *        <code>CachedRowSetImpl</code> object; every
+     *        {@code CachedRowSetImpl} object; every
      *        element in the array must be greater than
-     *        <code>0</code> and less than or equal to the number
+     *        {@code 0} and less than or equal to the number
      *        of columns in this rowset
      * @throws SQLException if any of the numbers in the
      *            given array is not valid for this rowset
@@ -4224,8 +4232,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -4236,14 +4244,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param ref the new column <code>java.sql.Ref</code> value
+     * @param ref the new column {@code java.sql.Ref} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *        (2) the cursor is not on one of this rowset's rows or its
      *        insert row, or (3) this rowset is
-     *        <code>ResultSet.CONCUR_READ_ONLY</code>
+     *        {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateRef(int columnIndex, java.sql.Ref ref) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4251,8 +4259,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -4263,13 +4271,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param ref the new column <code>java.sql.Ref</code> value
+     * @param ref the new column {@code java.sql.Ref} value
      * @throws SQLException if (1) the given column name does not match the
      *        name of a column in this rowset, (2) the cursor is not on
      *        one of this rowset's rows or its insert row, or (3) this
-     *        rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *        rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateRef(String columnName, java.sql.Ref ref) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4277,8 +4285,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -4289,14 +4297,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param c the new column <code>Clob value
+     * @param c the new column {@code Clob} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *        (2) the cursor is not on one of this rowset's rows or its
      *        insert row, or (3) this rowset is
-     *        <code>ResultSet.CONCUR_READ_ONLY</code>
+     *        {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateClob(int columnIndex, Clob c) throws SQLException {
        throw new UnsupportedOperationException();
@@ -4304,8 +4312,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>double</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code double} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -4316,13 +4324,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param c the new column <code>Clob</code>value
+     * @param c the new column {@code Clob}value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateClob(String columnName, Clob c) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4330,8 +4338,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.sql.Blob</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.sql.Blob} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -4342,14 +4350,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param b the new column <code>Blob</code> value
+     * @param b the new column {@code Blob} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBlob(int columnIndex, Blob b) throws SQLException {
        throw new UnsupportedOperationException();
@@ -4357,8 +4365,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.sql.Blob </code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.sql.Blob } value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -4369,13 +4377,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param b the new column <code>Blob</code> value
+     * @param b the new column {@code Blob} value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateBlob(String columnName, Blob b) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4383,8 +4391,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.sql.Array</code> values.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.sql.Array} values.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -4395,14 +4403,14 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnIndex the first column is <code>1</code>, the second
-     *        is <code>2</code>, and so on; must be <code>1</code> or larger
+     * @param columnIndex the first column is {@code 1}, the second
+     *        is {@code 2}, and so on; must be {@code 1} or larger
      *        and equal to or less than the number of columns in this rowset
-     * @param a the new column <code>Array</code> value
+     * @param a the new column {@code Array} value
      * @throws SQLException if (1) the given column index is out of bounds,
      *            (2) the cursor is not on one of this rowset's rows or its
      *            insert row, or (3) this rowset is
-     *            <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateArray(int columnIndex, Array a) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4410,8 +4418,8 @@
 
     /**
      * Sets the designated column in either the current row or the insert
-     * row of this <code>CachedRowSetImpl</code> object with the given
-     * <code>java.sql.Array</code> value.
+     * row of this {@code CachedRowSetImpl} object with the given
+     * {@code java.sql.Array} value.
      *
      * This method updates a column value in either the current row or
      * the insert row of this rowset, but it does not update the
@@ -4422,13 +4430,13 @@
      * and the database. Both of these methods must be called before the
      * cursor moves to another row.
      *
-     * @param columnName a <code>String</code> object that must match the
+     * @param columnName a {@code String} object that must match the
      *        SQL name of a column in this rowset, ignoring case
-     * @param a the new column <code>Array</code> value
+     * @param a the new column {@code Array} value
      * @throws SQLException if (1) the given column name does not match the
      *            name of a column in this rowset, (2) the cursor is not on
      *            one of this rowset's rows or its insert row, or (3) this
-     *            rowset is <code>ResultSet.CONCUR_READ_ONLY</code>
+     *            rowset is {@code ResultSet.CONCUR_READ_ONLY}
      */
     public void updateArray(String columnName, Array a) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4437,7 +4445,7 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as a <code>java.net.URL</code> object
+     * {@code CachedRowSetImpl} object as a {@code java.net.URL} object
      * in the Java programming language.
      *
      * @return a java.net.URL object containing the resource reference described by
@@ -4445,7 +4453,7 @@
      * @throws SQLException if (1) the given column index is out of bounds,
      * (2) the cursor is not on one of this rowset's rows or its
      * insert row, or (3) the designated column does not store an
-     * SQL <code>DATALINK</code> value.
+     * SQL {@code DATALINK} value.
      * @see #getURL(String)
      */
     public java.net.URL getURL(int columnIndex) throws SQLException {
@@ -4454,7 +4462,7 @@
 
     /**
      * Retrieves the value of the designated column in this
-     * <code>CachedRowSetImpl</code> object as a <code>java.net.URL</code> object
+     * {@code CachedRowSetImpl} object as a {@code java.net.URL} object
      * in the Java programming language.
      *
      * @return a java.net.URL object containing the resource reference described by
@@ -4463,7 +4471,7 @@
      * in this rowset, or
      * (2) the cursor is not on one of this rowset's rows or its
      * insert row, or (3) the designated column does not store an
-     * SQL <code>DATALINK</code> value.
+     * SQL {@code DATALINK} value.
      * @see #getURL(int)
      */
     public java.net.URL getURL(String columnName) throws SQLException {
@@ -4472,20 +4480,20 @@
     }
 
     /**
-     * The first warning reported by calls on this <code>CachedRowSetImpl</code>
-     * object is returned. Subsequent <code>CachedRowSetImpl</code> warnings will
-     * be chained to this <code>SQLWarning</code>. All <code>RowSetWarnings</code>
+     * The first warning reported by calls on this {@code CachedRowSetImpl}
+     * object is returned. Subsequent {@code CachedRowSetImpl} warnings will
+     * be chained to this {@code SQLWarning}. All {@code RowSetWarnings}
      * warnings are generated in the disconnected environment and remain a
-     * seperate warning chain to that provided by the <code>getWarnings</code>
+     * seperate warning chain to that provided by the {@code getWarnings}
      * method.
      *
      * <P>The warning chain is automatically cleared each time a new
      * row is read.
      *
      * <P><B>Note:</B> This warning chain only covers warnings caused
-     * by <code>CachedRowSet</code> (and their child interface)
-     * methods. All <code>SQLWarnings</code> can be obtained using the
-     * <code>getWarnings</code> method which tracks warnings generated
+     * by {@code CachedRowSet} (and their child interface)
+     * methods. All {@code SQLWarnings} can be obtained using the
+     * {@code getWarnings} method which tracks warnings generated
      * by the underlying JDBC driver.
      * @return the first SQLWarning or null
      *
@@ -4495,7 +4503,7 @@
     }
 
      /**
-     * Commits all changes performed by the <code>acceptChanges()</code>
+     * Commits all changes performed by the {@code acceptChanges()}
      * methods
      *
      * @see java.sql.Connection#commit
@@ -4505,7 +4513,7 @@
     }
 
     /**
-     * Rolls back all changes performed by the <code>acceptChanges()</code>
+     * Rolls back all changes performed by the {@code acceptChanges()}
      * methods
      *
      * @see java.sql.Connection#rollback
@@ -4515,8 +4523,8 @@
     }
 
     /**
-     * Rolls back all changes performed by the <code>acceptChanges()</code>
-     * to the last <code>Savepoint</code> transaction marker.
+     * Rolls back all changes performed by the {@code acceptChanges()}
+     * to the last {@code Savepoint} transaction marker.
      *
      * @see java.sql.Connection#rollback(Savepoint)
      */
@@ -4526,7 +4534,7 @@
 
     /**
      * Unsets the designated parameter to the given int array.
-     * This was set using <code>setMatchColumn</code>
+     * This was set using {@code setMatchColumn}
      * as the column which will form the basis of the join.
      * <P>
      * The parameter value unset by this method should be same
@@ -4536,7 +4544,7 @@
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
      *  parameter index is out of bounds or if the columnIdx is
-     *  not the same as set using <code>setMatchColumn(int [])</code>
+     *  not the same as set using {@code setMatchColumn(int [])}
      */
     public void unsetMatchColumn(int[] columnIdxes) throws SQLException {
          throw new UnsupportedOperationException();
@@ -4544,7 +4552,7 @@
 
    /**
      * Unsets the designated parameter to the given String array.
-     * This was set using <code>setMatchColumn</code>
+     * This was set using {@code setMatchColumn}
      * as the column which will form the basis of the join.
      * <P>
      * The parameter value unset by this method should be same
@@ -4554,18 +4562,18 @@
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
      *  parameter index is out of bounds or if the columnName is
-     *  not the same as set using <code>setMatchColumn(String [])</code>
+     *  not the same as set using {@code setMatchColumn(String [])}
      */
     public void unsetMatchColumn(String[] columnIdxes) throws SQLException {
        throw new UnsupportedOperationException();
     }
 
     /**
-     * Retrieves the column name as <code>String</code> array
-     * that was set using <code>setMatchColumn(String [])</code>
+     * Retrieves the column name as {@code String} array
+     * that was set using {@code setMatchColumn(String [])}
      * for this rowset.
      *
-     * @return a <code>String</code> array object that contains the column names
+     * @return a {@code String} array object that contains the column names
      *         for the rowset which has this the match columns
      *
      * @throws SQLException if an error occurs or column name is not set
@@ -4575,10 +4583,10 @@
     }
 
     /**
-     * Retrieves the column id as <code>int</code> array that was set using
-     * <code>setMatchColumn(int [])</code> for this rowset.
-     *
-     * @return a <code>int</code> array object that contains the column ids
+     * Retrieves the column id as {@code int} array that was set using
+     * {@code setMatchColumn(int [])} for this rowset.
+     *
+     * @return a {@code int} array object that contains the column ids
      *         for the rowset which has this as the match columns.
      *
      * @throws SQLException if an error occurs or column index is not set
@@ -4590,17 +4598,17 @@
     /**
      * Sets the designated parameter to the given int array.
      * This forms the basis of the join for the
-     * <code>JoinRowSet</code> as the column which will form the basis of the
+     * {@code JoinRowSet} as the column which will form the basis of the
      * join.
      * <P>
      * The parameter value set by this method is stored internally and
      * will be supplied as the appropriate parameter in this rowset's
-     * command when the method <code>getMatchColumnIndexes</code> is called.
+     * command when the method {@code getMatchColumnIndexes} is called.
      *
      * @param columnIdxes the indexes into this rowset
      *        object's internal representation of parameter values; the
      *        first parameter is 0, the second is 1, and so on; must be
-     *        <code>0</code> or greater
+     *        {@code 0} or greater
      * @throws SQLException if an error occurs or the
      *                         parameter index is out of bounds
      */
@@ -4611,12 +4619,12 @@
     /**
      * Sets the designated parameter to the given String array.
      *  This forms the basis of the join for the
-     * <code>JoinRowSet</code> as the column which will form the basis of the
+     * {@code JoinRowSet} as the column which will form the basis of the
      * join.
      * <P>
      * The parameter value set by this method is stored internally and
      * will be supplied as the appropriate parameter in this rowset's
-     * command when the method <code>getMatchColumn</code> is called.
+     * command when the method {@code getMatchColumn} is called.
      *
      * @param columnNames the name of the column into this rowset
      *        object's internal representation of parameter values
@@ -4629,19 +4637,19 @@
 
 
     /**
-     * Sets the designated parameter to the given <code>int</code>
+     * Sets the designated parameter to the given {@code int}
      * object.  This forms the basis of the join for the
-     * <code>JoinRowSet</code> as the column which will form the basis of the
+     * {@code JoinRowSet} as the column which will form the basis of the
      * join.
      * <P>
      * The parameter value set by this method is stored internally and
      * will be supplied as the appropriate parameter in this rowset's
-     * command when the method <code>getMatchColumn</code> is called.
+     * command when the method {@code getMatchColumn} is called.
      *
      * @param columnIdx the index into this rowset
      *        object's internal representation of parameter values; the
      *        first parameter is 0, the second is 1, and so on; must be
-     *        <code>0</code> or greater
+     *        {@code 0} or greater
      * @throws SQLException if an error occurs or the
      *                         parameter index is out of bounds
      */
@@ -4650,14 +4658,14 @@
     }
 
     /**
-     * Sets the designated parameter to the given <code>String</code>
+     * Sets the designated parameter to the given {@code String}
      * object.  This forms the basis of the join for the
-     * <code>JoinRowSet</code> as the column which will form the basis of the
+     * {@code JoinRowSet} as the column which will form the basis of the
      * join.
      * <P>
      * The parameter value set by this method is stored internally and
      * will be supplied as the appropriate parameter in this rowset's
-     * command when the method <code>getMatchColumn</code> is called.
+     * command when the method {@code getMatchColumn} is called.
      *
      * @param columnName the name of the column into this rowset
      *        object's internal representation of parameter values
@@ -4669,8 +4677,8 @@
     }
 
     /**
-     * Unsets the designated parameter to the given <code>int</code>
-     * object.  This was set using <code>setMatchColumn</code>
+     * Unsets the designated parameter to the given {@code int}
+     * object.  This was set using {@code setMatchColumn}
      * as the column which will form the basis of the join.
      * <P>
      * The parameter value unset by this method should be same
@@ -4680,15 +4688,15 @@
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
      *  parameter index is out of bounds or if the columnIdx is
-     *  not the same as set using <code>setMatchColumn(int)</code>
+     *  not the same as set using {@code setMatchColumn(int)}
      */
     public void unsetMatchColumn(int columnIdx) throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Unsets the designated parameter to the given <code>String</code>
-     * object.  This was set using <code>setMatchColumn</code>
+     * Unsets the designated parameter to the given {@code String}
+     * object.  This was set using {@code setMatchColumn}
      * as the column which will form the basis of the join.
      * <P>
      * The parameter value unset by this method should be same
@@ -4698,7 +4706,7 @@
      *        object's internal representation of parameter values
      * @throws SQLException if an error occurs or the
      *  parameter index is out of bounds or if the columnName is
-     *  not the same as set using <code>setMatchColumn(String)</code>
+     *  not the same as set using {@code setMatchColumn(String)}
      */
     public void unsetMatchColumn(String columnName) throws SQLException {
         throw new UnsupportedOperationException();
@@ -4706,48 +4714,48 @@
 
     /**
      * Notifies registered listeners that a RowSet object in the given RowSetEvent
-     * object has populated a number of additional rows. The <code>numRows</code> parameter
-     * ensures that this event will only be fired every <code>numRow</code>.
+     * object has populated a number of additional rows. The {@code numRows} parameter
+     * ensures that this event will only be fired every {@code numRow}.
      * <p>
      * The source of the event can be retrieved with the method event.getSource.
      *
-     * @param event a <code>RowSetEvent</code> object that contains the
-     *     <code>RowSet</code> object that is the source of the events
+     * @param event a {@code RowSetEvent} object that contains the
+     *     {@code RowSet} object that is the source of the events
      * @param numRows when populating, the number of rows interval on which the
-     *     <code>CachedRowSet</code> populated should fire; the default value
-     *     is zero; cannot be less than <code>fetchSize</code> or zero
+     *     {@code CachedRowSet} populated should fire; the default value
+     *     is zero; cannot be less than {@code fetchSize} or zero
      */
     public void rowSetPopulated(RowSetEvent event, int numRows) throws SQLException {
         throw new UnsupportedOperationException();
     }
 
     /**
-     * Populates this <code>CachedRowSet</code> object with data from
-     * the given <code>ResultSet</code> object. While related to the <code>populate(ResultSet)</code>
+     * Populates this {@code CachedRowSet} object with data from
+     * the given {@code ResultSet} object. While related to the {@code populate(ResultSet)}
      * method, an additional parameter is provided to allow starting position within
-     * the <code>ResultSet</code> from where to populate the CachedRowSet
+     * the {@code ResultSet} from where to populate the CachedRowSet
      * instance.
      *
-     * This method is an alternative to the method <code>execute</code>
-     * for filling the rowset with data.  The method <code>populate</code>
+     * This method is an alternative to the method {@code execute}
+     * for filling the rowset with data.  The method {@code populate}
      * does not require that the properties needed by the method
-     * <code>execute</code>, such as the <code>command</code> property,
-     * be set. This is true because the method <code>populate</code>
-     * is given the <code>ResultSet</code> object from
+     * {@code execute}, such as the {@code command} property,
+     * be set. This is true because the method {@code populate}
+     * is given the {@code ResultSet} object from
      * which to get data and thus does not need to use the properties
      * required for setting up a connection and executing this
-     * <code>CachedRowSetImpl</code> object's command.
+     * {@code CachedRowSetImpl} object's command.
      * <P>
      * After populating this rowset with data, the method
-     * <code>populate</code> sets the rowset's metadata and
-     * then sends a <code>RowSetChangedEvent</code> object
+     * {@code populate} sets the rowset's metadata and
+     * then sends a {@code RowSetChangedEvent} object
      * to all registered listeners prior to returning.
      *
-     * @param data the <code>ResultSet</code> object containing the data
-     *             to be read into this <code>CachedRowSetImpl</code> object
+     * @param data the {@code ResultSet} object containing the data
+     *             to be read into this {@code CachedRowSetImpl} object
      * @param start the integer specifing the position in the
-     *        <code>ResultSet</code> object to popultate the
-     *        <code>CachedRowSetImpl</code> object.
+     *        {@code ResultSet} object to popultate the
+     *        {@code CachedRowSetImpl} object.
      * @throws SQLException if an error occurs; or the max row setting is
      *          violated while populating the RowSet.Also id the start position
      *          is negative.
@@ -4759,7 +4767,7 @@
      }
 
     /**
-     * The nextPage gets the next page, that is a <code>CachedRowSetImpl</code> object
+     * The nextPage gets the next page, that is a {@code CachedRowSetImpl} object
      * containing the number of rows specified by page size.
      * @return boolean value true indicating whether there are more pages to come and
      *         false indicating that this is the last page.
@@ -4796,7 +4804,7 @@
      * @return boolean value true if it retrieves the previous page, flase if it
      *         is on the first page.
      * @throws SQLException if it is called before populate is called or ResultSet
-     *         is of type <code>ResultSet.TYPE_FORWARD_ONLY</code> or if an error
+     *         is of type {@code ResultSet.TYPE_FORWARD_ONLY} or if an error
      *         occurs.
      */
     public boolean previousPage() throws SQLException {
@@ -4807,7 +4815,7 @@
        * Updates the designated column with a character stream value, which will
        * have the specified number of bytes. The driver does the necessary conversion
        * from Java character format to the national character set in the database.
-       * It is intended for use when updating NCHAR,NVARCHAR and LONGNVARCHAR columns.
+       * It is intended for use when updating NCHAR, NVARCHAR and LONGNVARCHAR columns.
        * The updater methods are used to update column values in the current row or
        * the insert row. The updater methods do not update the underlying database;
        * instead the updateRow or insertRow methods are called to update the database.
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/internal/WebRowSetXmlWriter.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/internal/WebRowSetXmlWriter.java	Mon Jun 08 11:31:09 2015 -0700
@@ -36,24 +36,24 @@
 import javax.sql.rowset.spi.*;
 
 /**
- * An implementation of the <code>XmlWriter</code> interface, which writes a
- * <code>WebRowSet</code> object to an output stream as an XML document.
+ * An implementation of the {@code XmlWriter}  interface, which writes a
+ * {@code WebRowSet}  object to an output stream as an XML document.
  */
 
 public class WebRowSetXmlWriter implements XmlWriter, Serializable {
 
     /**
-     * The <code>java.io.Writer</code> object to which this <code>WebRowSetXmlWriter</code>
-     * object will write when its <code>writeXML</code> method is called. The value
-     * for this field is set with the <code>java.io.Writer</code> object given
-     * as the second argument to the <code>writeXML</code> method.
+     * The {@code java.io.Writer}  object to which this {@code WebRowSetXmlWriter}
+     * object will write when its {@code writeXML}  method is called. The value
+     * for this field is set with the {@code java.io.Writer}  object given
+     * as the second argument to the {@code writeXML}  method.
      */
     private transient java.io.Writer writer;
 
     /**
-     * The <code>java.util.Stack</code> object that this <code>WebRowSetXmlWriter</code>
+     * The {@code java.util.Stack}  object that this {@code WebRowSetXmlWriter}
      * object will use for storing the tags to be used for writing the calling
-     * <code>WebRowSet</code> object as an XML document.
+     * {@code WebRowSet}  object as an XML document.
      */
     private java.util.Stack<String> stack;
 
@@ -69,24 +69,24 @@
     }
 
     /**
-     * Writes the given <code>WebRowSet</code> object as an XML document
-     * using the given <code>java.io.Writer</code> object. The XML document
-     * will include the <code>WebRowSet</code> object's data, metadata, and
+     * Writes the given {@code WebRowSet}  object as an XML document
+     * using the given {@code java.io.Writer}  object. The XML document
+     * will include the {@code WebRowSet}  object's data, metadata, and
      * properties.  If a data value has been updated, that information is also
      * included.
      * <P>
-     * This method is called by the <code>XmlWriter</code> object that is
-     * referenced in the calling <code>WebRowSet</code> object's
-     * <code>xmlWriter</code> field.  The <code>XmlWriter.writeXML</code>
+     * This method is called by the {@code XmlWriter}  object that is
+     * referenced in the calling {@code WebRowSet}  object's
+     * {@code xmlWriter}  field.  The {@code XmlWriter.writeXML}
      * method passes to this method the arguments that were supplied to it.
      *
-     * @param caller the <code>WebRowSet</code> object to be written; must
-     *        be a rowset for which this <code>WebRowSetXmlWriter</code> object
+     * @param caller the {@code WebRowSet}  object to be written; must
+     *        be a rowset for which this {@code WebRowSetXmlWriter}  object
      *        is the writer
-     * @param wrt the <code>java.io.Writer</code> object to which
-     *        <code>caller</code> will be written
+     * @param wrt the {@code java.io.Writer}  object to which
+     *        {@code caller}  will be written
      * @exception SQLException if a database access error occurs or
-     *            this <code>WebRowSetXmlWriter</code> object is not the writer
+     *            this {@code WebRowSetXmlWriter}  object is not the writer
      *            for the given rowset
      * @see XmlWriter#writeXML
      */
@@ -100,26 +100,26 @@
     }
 
     /**
-     * Writes the given <code>WebRowSet</code> object as an XML document
-     * using the given <code>java.io.OutputStream</code> object. The XML document
-     * will include the <code>WebRowSet</code> object's data, metadata, and
+     * Writes the given {@code WebRowSet}  object as an XML document
+     * using the given {@code java.io.OutputStream}  object. The XML document
+     * will include the {@code WebRowSet}  object's data, metadata, and
      * properties.  If a data value has been updated, that information is also
      * included.
      * <P>
-     * Using stream is a faster way than using <code>java.io.Writer<code/>
+     * Using stream is a faster way than using {@code java.io.Writer}
      *
-     * This method is called by the <code>XmlWriter</code> object that is
-     * referenced in the calling <code>WebRowSet</code> object's
-     * <code>xmlWriter</code> field.  The <code>XmlWriter.writeXML</code>
+     * This method is called by the {@code XmlWriter}  object that is
+     * referenced in the calling {@code WebRowSet}  object's
+     * {@code xmlWriter}  field.  The {@code XmlWriter.writeXML}
      * method passes to this method the arguments that were supplied to it.
      *
-     * @param caller the <code>WebRowSet</code> object to be written; must
-     *        be a rowset for which this <code>WebRowSetXmlWriter</code> object
+     * @param caller the {@code WebRowSet}  object to be written; must
+     *        be a rowset for which this {@code WebRowSetXmlWriter}  object
      *        is the writer
-     * @param oStream the <code>java.io.OutputStream</code> object to which
-     *        <code>caller</code> will be written
+     * @param oStream the {@code java.io.OutputStream}  object to which
+     *        {@code caller}  will be written
      * @throws SQLException if a database access error occurs or
-     *            this <code>WebRowSetXmlWriter</code> object is not the writer
+     *            this {@code WebRowSetXmlWriter}  object is not the writer
      *            for the given rowset
      * @see XmlWriter#writeXML
      */
--- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -76,7 +76,7 @@
      * the <code>RowSet</code> object for which this <code>RowSetMetaDataImpl</code>
      * was created. To be valid, a column number must be greater than
      * <code>0</code> and less than or equal to the number of columns in a row.
-     * @throws <code>SQLException</code> with the message "Invalid column index"
+     * @throws SQLException with the message "Invalid column index"
      *        if the given column number is out of the range of valid column
      *        numbers for the <code>RowSet</code> object
      */
--- a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,9 +35,11 @@
  *
  * @since 1.5
  * @author Vincent Ryan
+ * @deprecated This package has been deprecated.
  */
 
 @jdk.Exported
+@Deprecated
 public abstract class ContentSigner {
 
     /**
--- a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,10 @@
  *
  * @since 1.5
  * @author Vincent Ryan
+ * @deprecated This package has been deprecated.
  */
 @jdk.Exported
+@Deprecated
 public interface ContentSignerParameters {
 
     /**
--- a/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,10 @@
  * Clients may override the default signing mechanism of the <tt>jarsigner</tt>
  * tool by supplying an alternative implementation of
  * {@link com.sun.jarsigner.ContentSigner}.
+ *
+ * This package has been deprecated.
  */
 
 @jdk.Exported
+@Deprecated
 package com.sun.jarsigner;
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@
  * @author Roland Schemers
  * @author Jan Luehe
  */
-
+@SuppressWarnings("deprecation")
 public class Main {
 
     // for i18n
@@ -396,9 +396,15 @@
             } else if (collator.compare(flags, "-altsigner") ==0) {
                 if (++n == args.length) usageNoArg();
                 altSignerClass = args[n];
+                System.err.println(
+                        rb.getString("This.option.is.deprecated") +
+                                "-altsigner");
             } else if (collator.compare(flags, "-altsignerpath") ==0) {
                 if (++n == args.length) usageNoArg();
                 altSignerClasspath = args[n];
+                System.err.println(
+                        rb.getString("This.option.is.deprecated") +
+                                "-altsignerpath");
             } else if (collator.compare(flags, "-sectionsonly") ==0) {
                 signManifest = false;
             } else if (collator.compare(flags, "-internalsf") ==0) {
@@ -2306,6 +2312,7 @@
      * @param args The command-line arguments to jarsigner.
      * @param zipFile The original source Zip file.
      */
+    @SuppressWarnings("deprecation")
     public Block generateBlock(PrivateKey privateKey,
                                String sigalg,
                                X509Certificate[] certChain,
@@ -2331,6 +2338,7 @@
         /*
          * Construct a new signature block.
          */
+        @SuppressWarnings("deprecation")
         Block(SignatureFile sfg, PrivateKey privateKey, String sigalg,
             X509Certificate[] certChain, boolean externalSF, String tsaUrl,
             X509Certificate tsaCert, String tSAPolicyID, String tSADigestAlg,
@@ -2451,6 +2459,7 @@
 /*
  * This object encapsulates the parameters used to perform content signing.
  */
+@SuppressWarnings("deprecation")
 class JarSignerParameters implements ContentSignerParameters {
 
     private String[] args;
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java	Mon Jun 08 11:31:09 2015 -0700
@@ -44,6 +44,7 @@
         {"signerClass.is.not.a.signing.mechanism", "{0} is not a signing mechanism"},
         {"jarsigner.error.", "jarsigner error: "},
         {"Illegal.option.", "Illegal option: "},
+        {"This.option.is.deprecated", "This option is deprecated: "},
         {".keystore.must.be.NONE.if.storetype.is.{0}",
                 "-keystore must be NONE if -storetype is {0}"},
         {".keypass.can.not.be.specified.if.storetype.is.{0}",
@@ -91,9 +92,11 @@
         {".tsadigestalg.algorithm.of.digest.data.in.timestamping.request",
                 "[-tsadigestalg <algorithm>] algorithm of digest data in timestamping request"},
         {".altsigner.class.class.name.of.an.alternative.signing.mechanism",
-                "[-altsigner <class>]        class name of an alternative signing mechanism"},
+                "[-altsigner <class>]        class name of an alternative signing mechanism\n" +
+                "                            (This option has been deprecated.)"},
         {".altsignerpath.pathlist.location.of.an.alternative.signing.mechanism",
-                "[-altsignerpath <pathlist>] location of an alternative signing mechanism"},
+                "[-altsignerpath <pathlist>] location of an alternative signing mechanism\n" +
+                "                            (This option has been deprecated.)"},
         {".internalsf.include.the.SF.file.inside.the.signature.block",
                 "[-internalsf]               include the .SF file inside the signature block"},
         {".sectionsonly.don.t.compute.hash.of.entire.manifest",
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,7 +45,7 @@
  *
  * @author Vincent Ryan
  */
-
+@SuppressWarnings("deprecation")
 public final class TimestampedSigner extends ContentSigner {
 
     /*
--- a/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerService.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineManagerService.java	Mon Jun 08 11:31:09 2015 -0700
@@ -37,7 +37,6 @@
     /**
      * Replaces the default connector.
      *
-     * @return the default {@link LaunchingConnector}
      * @throws java.lang.IllegalArgumentException if the given
      * connector is not a member of the list returned by
      * {@link #launchingConnectors}
--- a/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/HostIdentifier.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/HostIdentifier.java	Mon Jun 08 11:31:09 2015 -0700
@@ -81,16 +81,15 @@
  * valid HostIdentifier strings:
  *
  * <ul>
- *   <li><p>&lt null &gt - transformed into "//localhost"</p></li>
- *   <li><p>localhost - transformed into "//localhost"</p></li>
- *   <li><p>hostname - transformed into "//hostname"</p></li>
- *   <li><p>hostname:port - transformed into "//hostname:port"</p></li>
- *   <li><p>proto:hostname - transformed into "proto://hostname"</p></li>
- *   <li><p>proto:hostname:port - transformed into
- *          "proto://hostname:port"</p></li>
- *   <li><p>proto://hostname:port</p></li>
+ *   <li>{@code <null>} - transformed into "//localhost"</li>
+ *   <li>localhost - transformed into "//localhost"</li>
+ *   <li>hostname - transformed into "//hostname"</li>
+ *   <li>hostname:port - transformed into "//hostname:port"</li>
+ *   <li>proto:hostname - transformed into "proto://hostname"</li>
+ *   <li>proto:hostname:port - transformed into
+ *          "proto://hostname:port"</li>
+ *   <li>proto://hostname:port</li>
  * </ul>
- * </p>
  *
  * @see URI
  * @see VmIdentifier
--- a/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/MonitoredVm.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/MonitoredVm.java	Mon Jun 08 11:31:09 2015 -0700
@@ -74,9 +74,10 @@
      *
      * @param patternString a string containing a pattern as described in
      *                      {@link java.util.regex.Pattern}.
-     * @return List<Monitor> - a List of {@link Monitor} objects that can be used to
+     * @return {@code List<Monitor>} - a List of {@link Monitor}
+     *                objects that can be used to
      *                monitor the instrumentation objects whose names match
-     *                the given pattern. If no instrumentation objects have`
+     *                the given pattern. If no instrumentation objects have
      *                names matching the given pattern, then an empty List
      *                is returned.
      * @throws MonitorException Thrown if an error occurs while communicating
--- a/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/VmIdentifier.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/VmIdentifier.java	Mon Jun 08 11:31:09 2015 -0700
@@ -39,86 +39,85 @@
  *      [<I>protocol</I>:][<I>//</I>]<I><B>lvmid</B></I>[<I>@hostname</I>][<I>:port</I>][<I>/servername</I>]
  * </pre>
  * The only required component of this string is the Local Virtual Machine
- * Identifier, or <tt>lvmid</tt>, which uniquely identifies the target
+ * Identifier, or {@code lvmid}, which uniquely identifies the target
  * Java Virtual Machine on a host. The optional components of the VmIdentifier
  * include:
  * <ul>
- *   <li><p><tt>protocol</tt> - The communications protocol. A VmIdentifier
- *          omitting the protocol must be resolved against a HostIdentifier
- *          using {@link HostIdentifier#resolve}.
- *       </p></li>
- *   <li><p><tt>hostname</tt> - A hostname or IP address indicating the target
- *          host. A VmIdentifier omitting the protocol must be resolved
- *          against a HostIdentifier using {@link HostIdentifier#resolve}.
- *       </p></li>
- *   <li><p><tt>port</tt> - The port for the communications protocol.
- *          Treatment of the <tt>port</tt> parameter is implementation
- *          (protocol) specific. A VmIdentifier omitting the protocol should
- *          be resolved against a HostIdentifier using
- *          {@link HostIdentifier#resolve}.
- *       </p></li>
- *   <li><p><tt>servername</tt> - The treatment of the Path, Query, and
- *          Fragment components of the VmIdentifier are implementation
- *          (protocol) dependent. A VmIdentifier omitting the protocol should
- *          be resolved against a HostIdentifier using
- *          {@link HostIdentifier#resolve}.
- *       </p></li>
+ *   <li>{@code protocol} - The communications protocol. A VmIdentifier
+ *       omitting the protocol must be resolved against a HostIdentifier
+ *       using {@link HostIdentifier#resolve}.
+ *       </li>
+ *   <li>{@code hostname} - A hostname or IP address indicating the target
+ *       host. A VmIdentifier omitting the protocol must be resolved
+ *       against a HostIdentifier using {@link HostIdentifier#resolve}.
+ *       </li>
+ *   <li>{@code port} - The port for the communications protocol.
+ *       Treatment of the {@code port} parameter is implementation
+ *       (protocol) specific. A VmIdentifier omitting the protocol should
+ *       be resolved against a HostIdentifier using
+ *       {@link HostIdentifier#resolve}.
+ *       </li>
+ *   <li>{@code servername} - The treatment of the Path, Query, and
+ *       Fragment components of the VmIdentifier are implementation
+ *       (protocol) dependent. A VmIdentifier omitting the protocol should
+ *       be resolved against a HostIdentifier using
+ *       {@link HostIdentifier#resolve}.
+ *       </li>
  * </ul>
  * <p>
  * All VmIdentifier instances are constructed as absolute, hierarchical URIs.
  * The constructors will accept relative (and even some malformed,
  * though convenient) URI strings. Such strings are transformed into
  * legitimate, absolute URI strings.
- * </p>
  * <p>
  * With the exception of <em>file:</em> based VmIdentifier strings, all
- * VmIdentifier strings must include a <tt>lvmid</tt>. Attempting to construct
- * a non-file based VmIdentifier that doesn't include a <tt>lvmid</tt>
- * component will result in a <tt>MonitorException</tt>.
- * </p>
+ * VmIdentifier strings must include a {@code lvmid}. Attempting to construct
+ * a non-file based VmIdentifier that doesn't include a {@code lvmid}
+ * component will result in a {@code MonitorException}.
  * <p>
  * Here are some examples of VmIdentifier strings.
  * <ul>
- *    <li><p>Relative URIs</p></li>
+ *    <li>Relative URIs
  *      <ul>
- *         <li><p><em>1234</em> - Specifies the Java Virtual Machine
- *                identified by lvmid <em>1234</em> on an unnamed host.
- *                This string is transformed into the absolute form
- *                <em>//1234</em>, which must be resolved against a
- *                HostIdentifier.
- *         </p></li>
- *         <li><p><em>1234@hostname</em> - Specifies the Java Virtual
- *                Machine identified by lvmid <em>1234</em> on host
- *                <em>hostname</em> with an unnamed protocol.
- *                This string is transformed into the absolute form
- *                <em>//1234@hostname</em>, which must be resolved against
- *                a HostIdentifier.
- *         </p></li>
- *         <li><p><em>1234@hostname:2099</em> - Specifies the Java Virtual
- *                Machine identified by lvmid <em>1234</em> on host
- *                <em>hostname</em> with an unnamed protocol, but with
- *                port <em>2099</em>. This string is transformed into
- *                the absolute form <em>//1234@hostname:2099</em>, which
- *                must be resolved against a HostIdentifier.
- *         </p></li>
+ *         <li><em>1234</em> - Specifies the Java Virtual Machine
+ *             identified by lvmid <em>1234</em> on an unnamed host.
+ *             This string is transformed into the absolute form
+ *             <em>//1234</em>, which must be resolved against a
+ *             HostIdentifier.
+ *         </li>
+ *         <li><em>1234@hostname</em> - Specifies the Java Virtual
+ *             Machine identified by lvmid <em>1234</em> on host
+ *             <em>hostname</em> with an unnamed protocol.
+ *             This string is transformed into the absolute form
+ *             <em>//1234@hostname</em>, which must be resolved against
+ *             a HostIdentifier.
+ *         </li>
+ *         <li><em>1234@hostname:2099</em> - Specifies the Java Virtual
+ *             Machine identified by lvmid <em>1234</em> on host
+ *             <em>hostname</em> with an unnamed protocol, but with
+ *             port <em>2099</em>. This string is transformed into
+ *             the absolute form <em>//1234@hostname:2099</em>, which
+ *             must be resolved against a HostIdentifier.
+ *         </li>
  *      </ul>
- *    <li><p>Absolute URIs</p></li>
+ *    </li>
+ *    <li>Absolute URIs
  *      <ul>
- *         <li><p><em>rmi://1234@hostname:2099/remoteobjectname</em> -
- *                Specifies the Java Virtual Machine identified by lvmid
- *                <em>1234</em> on host <em>hostname</em> accessed
- *                using the <em>rmi:</em> protocol through the rmi remote
- *                object named <em>remoteobjectname</em> as registered with
- *                the <em>rmiserver</em> on port <em>2099</em> on host
- *                <em>hostname</em>.
- *         </p></li>
- *         <li><p><em>file:/path/file</em> - Identifies a Java Virtual Machine
- *                through accessing a special file based protocol to use as
- *                the communications mechanism.
- *         </p></li>
+ *         <li><em>rmi://1234@hostname:2099/remoteobjectname</em> -
+ *             Specifies the Java Virtual Machine identified by lvmid
+ *             <em>1234</em> on host <em>hostname</em> accessed
+ *             using the <em>rmi:</em> protocol through the rmi remote
+ *             object named <em>remoteobjectname</em> as registered with
+ *             the <em>rmiserver</em> on port <em>2099</em> on host
+ *             <em>hostname</em>.
+ *         </li>
+ *         <li><em>file:/path/file</em> - Identifies a Java Virtual Machine
+ *             through accessing a special file based protocol to use as
+ *             the communications mechanism.
+ *         </li>
  *      </ul>
+ *    </li>
  * </ul>
- * </p>
  *
  * @see URI
  * @see HostIdentifier
@@ -236,16 +235,14 @@
      * missing components will have result in the HostIdentifier assigning
      * assumed defaults that allow the VmIdentifier to be resolved according
      * to those defaults.
-     * </p>
      * <p>
-     * For example, a VmIdentifier that specifies only a <tt>lvmid</tt>
+     * For example, a VmIdentifier that specifies only a {@code lvmid}
      * will result in a HostIdentifier for <em>localhost</em> utilizing
      * the default local protocol, <em>local:</em>. A VmIdentifier that
-     * specifies both a <tt>vmid</tt> and a <tt>hostname</tt> will result
+     * specifies both a {@code vmid} and a {@code hostname} will result
      * in a HostIdentifier for the specified host with the default remote
      * protocol, <em>rmi:</em>, using the protocol defaults for the
-     * <tt>port</tt> and <tt>servername</tt> components.
-     * </p>
+     * {@code port} and {@code servername} components.
      *
      * @return HostIdentifier - the host identifier for the host containing
      *                          the Java Virtual Machine represented by this
--- a/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/AbstractPerfDataBuffer.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/AbstractPerfDataBuffer.java	Mon Jun 08 11:31:09 2015 -0700
@@ -108,7 +108,8 @@
      *
      * @param patternString  a string containing a pattern as described in
      *                       {@link java.util.regex.Pattern}.
-     * @return List<Monitor> - a List of {@link Monitor} objects that can be used to
+     * @return {@code List<Monitor>} - a List of {@link Monitor}
+     *                objects that can be used to
      *                monitor the instrumentation objects whose names match
      *                the given pattern. If no instrumentation objects have`
      *                names matching the given pattern, then an empty List
--- a/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -266,7 +266,8 @@
      *
      * @param patternString a string containing a pattern as described in
      *                      {@link java.util.regex.Pattern}.
-     * @return List<Monitor> - a List of {@link Monitor} objects that can be used to
+     * @return {@code List<Monitor>} - a List of {@link Monitor}
+     *                objects that can be used to
      *                monitor the instrumentation objects whose names match
      *                the given pattern. If no instrumentation objects have`
      *                names matching the given pattern, then an empty List
--- a/jdk/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsName.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsName.java	Mon Jun 08 11:31:09 2015 -0700
@@ -580,7 +580,7 @@
      * Serializes only the domain name string, for compactness and to avoid
      * any implementation dependency.
      *
-     * @serialdata      The domain name string.
+     * @serialData      The domain name string.
      */
     private void writeObject(java.io.ObjectOutputStream s)
             throws java.io.IOException {
--- a/jdk/test/com/sun/jdi/AllLineLocations.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/AllLineLocations.java	Mon Jun 08 11:31:09 2015 -0700
@@ -27,7 +27,6 @@
  *  @summary Test ReferenceType.allLineLocations
  *  @author Gordon Hirsch
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g RefTypes.java
--- a/jdk/test/com/sun/jdi/ClassesByName.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/ClassesByName.java	Mon Jun 08 11:31:09 2015 -0700
@@ -26,7 +26,6 @@
  *  @bug 4287992
  *  @author Robert Field
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g HelloWorld.java
--- a/jdk/test/com/sun/jdi/ExceptionEvents.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/ExceptionEvents.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,7 +28,6 @@
  *
  *  @author Robert Field
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build TestScaffold VMConnection
  *  @run compile -g ExceptionEvents.java
--- a/jdk/test/com/sun/jdi/FilterMatch.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/FilterMatch.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,7 +28,6 @@
  *
  *  @author Robert Field/Jim Holmlund
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g HelloWorld.java
--- a/jdk/test/com/sun/jdi/FilterNoMatch.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/FilterNoMatch.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,7 +28,6 @@
  *
  *  @author Robert Field/Jim Holmlund
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g HelloWorld.java
--- a/jdk/test/com/sun/jdi/LaunchCommandLine.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/LaunchCommandLine.java	Mon Jun 08 11:31:09 2015 -0700
@@ -27,7 +27,6 @@
  *  @summary Test launcher command line construction
  *  @author Gordon Hirsch
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g HelloWorld.java
--- a/jdk/test/com/sun/jdi/ModificationWatchpoints.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/ModificationWatchpoints.java	Mon Jun 08 11:31:09 2015 -0700
@@ -29,7 +29,6 @@
  *  @author Daniel Prusa (or someone in the FFJ group)
  *  @author Robert Field (modified to JDIScaffold)
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g ModificationWatchpoints.java
--- a/jdk/test/com/sun/jdi/NativeInstanceFilter.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/NativeInstanceFilter.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,7 +28,6 @@
  *
  *  @author Keith McGuigan
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @compile -XDignore.symbol.file NativeInstanceFilterTarg.java
--- a/jdk/test/com/sun/jdi/UnpreparedByName.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/UnpreparedByName.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,7 +28,6 @@
  *  won't be returned by classesByName.
  *  @author Robert Field
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g InnerTarg.java
--- a/jdk/test/com/sun/jdi/UnpreparedClasses.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/UnpreparedClasses.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,7 +28,6 @@
  *  loaded class list are prepared classes.
  *  @author Robert Field
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g InnerTarg.java
--- a/jdk/test/com/sun/jdi/Vars.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/com/sun/jdi/Vars.java	Mon Jun 08 11:31:09 2015 -0700
@@ -27,7 +27,6 @@
  *
  *  @author Robert Field
  *
- *  @library scaffold
  *  @modules jdk.jdi
  *  @run build JDIScaffold VMConnection
  *  @run compile -g Vars.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/InputStream/ReadAllBytes.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Random;
+import jdk.testlibrary.RandomFactory;
+
+/*
+ * @test
+ * @bug 8080835
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
+ * @run main ReadAllBytes
+ * @summary Basic test for InputStream.readAllBytes
+ * @key randomness
+ */
+
+public class ReadAllBytes {
+
+    private static Random generator = RandomFactory.getRandom();
+
+    public static void main(String[] args) throws IOException {
+        test(new byte[]{});
+        test(new byte[]{1, 2, 3});
+        test(createRandomBytes(1024));
+        test(createRandomBytes((1 << 13) - 1));
+        test(createRandomBytes((1 << 13)));
+        test(createRandomBytes((1 << 13) + 1));
+        test(createRandomBytes((1 << 15) - 1));
+        test(createRandomBytes((1 << 15)));
+        test(createRandomBytes((1 << 15) + 1));
+        test(createRandomBytes((1 << 17) - 1));
+        test(createRandomBytes((1 << 17)));
+        test(createRandomBytes((1 << 17) + 1));
+    }
+
+    static void test(byte[] expectedBytes) throws IOException {
+        int expectedLength = expectedBytes.length;
+        WrapperInputStream in = new WrapperInputStream(new ByteArrayInputStream(expectedBytes));
+        byte[] readBytes = in.readAllBytes();
+
+        int x;
+        byte[] tmp = new byte[10];
+        check((x = in.read()) == -1,
+              "Expected end of stream from read(), got " + x);
+        check((x = in.read(tmp)) == -1,
+              "Expected end of stream from read(byte[]), got " + x);
+        check((x = in.read(tmp, 0, tmp.length)) == -1,
+              "Expected end of stream from read(byte[], int, int), got " + x);
+        check(in.readAllBytes().length == 0,
+              "Expected readAllBytes to return empty byte array");
+        check(expectedLength == readBytes.length,
+              "Expected length " + expectedLength + ", got " + readBytes.length);
+        check(Arrays.equals(expectedBytes, readBytes),
+              "Expected[" + expectedBytes + "], got:[" + readBytes + "]");
+        check(!in.isClosed(), "Stream unexpectedly closed");
+    }
+
+    static byte[] createRandomBytes(int size) {
+        byte[] bytes = new byte[size];
+        generator.nextBytes(bytes);
+        return bytes;
+    }
+
+    static void check(boolean cond, Object ... failedArgs) {
+        if (cond)
+            return;
+        StringBuilder sb = new StringBuilder();
+        for (Object o : failedArgs)
+            sb.append(o);
+        throw new RuntimeException(sb.toString());
+    }
+
+    static class WrapperInputStream extends FilterInputStream {
+        private boolean closed;
+        WrapperInputStream(InputStream in) { super(in); }
+        @Override public void close() throws IOException { closed = true; in.close(); }
+        boolean isClosed() { return closed; }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/InputStream/ReadNBytes.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Random;
+import jdk.testlibrary.RandomFactory;
+
+/*
+ * @test
+ * @bug 8080835
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
+ * @run main ReadNBytes
+ * @summary Basic test for InputStream.readNBytes
+ * @key randomness
+ */
+
+public class ReadNBytes {
+
+    private static Random generator = RandomFactory.getRandom();
+
+    public static void main(String[] args) throws IOException {
+        test(new byte[]{1, 2, 3});
+        test(createRandomBytes(1024));
+        test(createRandomBytes((1 << 13) - 1));
+        test(createRandomBytes((1 << 13)));
+        test(createRandomBytes((1 << 13) + 1));
+        test(createRandomBytes((1 << 15) - 1));
+        test(createRandomBytes((1 << 15)));
+        test(createRandomBytes((1 << 15) + 1));
+        test(createRandomBytes((1 << 17) - 1));
+        test(createRandomBytes((1 << 17)));
+        test(createRandomBytes((1 << 17) + 1));
+    }
+
+    static void test(byte[] inputBytes) throws IOException {
+        int length = inputBytes.length;
+        WrapperInputStream in = new WrapperInputStream(new ByteArrayInputStream(inputBytes));
+        byte[] readBytes = new byte[(length / 2) + 1];
+        int nread = in.readNBytes(readBytes, 0, readBytes.length);
+
+        int x;
+        byte[] tmp;
+        check(nread == readBytes.length,
+              "Expected number of bytes read: " + readBytes.length + ", got: " + nread);
+        check(Arrays.equals((tmp = Arrays.copyOf(inputBytes, nread)), readBytes),
+              "Expected[" + tmp + "], got:[" + readBytes + "]");
+        check(!in.isClosed(), "Stream unexpectedly closed");
+
+        // Read again
+        nread = in.readNBytes(readBytes, 0, readBytes.length);
+
+        check(nread == length - readBytes.length,
+              "Expected number of bytes read: " + (length - readBytes.length) + ", got: " + nread);
+        check(Arrays.equals((tmp = Arrays.copyOfRange(inputBytes, readBytes.length, length)),
+                            Arrays.copyOf(readBytes, nread)),
+              "Expected[" + tmp + "], got:[" + readBytes + "]");
+        // Expect end of stream
+        check((x = in.read()) == -1,
+              "Expected end of stream from read(), got " + x);
+        check((x = in.read(tmp)) == -1,
+              "Expected end of stream from read(byte[]), got " + x);
+        check((x = in.read(tmp, 0, tmp.length)) == -1,
+              "Expected end of stream from read(byte[], int, int), got " + x);
+        check((x = in.readNBytes(tmp, 0, tmp.length)) == 0,
+              "Expected end of stream, 0, from readNBytes(byte[], int, int), got " + x);
+        check(!in.isClosed(), "Stream unexpectedly closed");
+    }
+
+    static byte[] createRandomBytes(int size) {
+        byte[] bytes = new byte[size];
+        generator.nextBytes(bytes);
+        return bytes;
+    }
+
+    static void check(boolean cond, Object ... failedArgs) {
+        if (cond)
+            return;
+        StringBuilder sb = new StringBuilder();
+        for (Object o : failedArgs)
+            sb.append(o);
+        throw new RuntimeException(sb.toString());
+    }
+
+
+    static class WrapperInputStream extends FilterInputStream {
+        private boolean closed;
+        WrapperInputStream(InputStream in) { super(in); }
+        @Override public void close() throws IOException { closed = true; in.close(); }
+        boolean isClosed() { return closed; }
+    }
+}
--- a/jdk/test/java/lang/ProcessBuilder/Basic.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/java/lang/ProcessBuilder/Basic.java	Mon Jun 08 11:31:09 2015 -0700
@@ -36,6 +36,7 @@
  */
 
 import java.lang.ProcessBuilder.Redirect;
+import java.lang.ProcessHandle;
 import static java.lang.ProcessBuilder.Redirect.*;
 
 import java.io.*;
@@ -47,7 +48,6 @@
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.security.*;
-import sun.misc.Unsafe;
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
 import static java.lang.System.getenv;
@@ -309,6 +309,8 @@
             String action = args[0];
             if (action.equals("sleep")) {
                 Thread.sleep(10 * 60 * 1000L);
+            } else if (action.equals("pid")) {
+                System.out.println(ProcessHandle.current().getPid());
             } else if (action.equals("testIO")) {
                 String expected = "standard input";
                 char[] buf = new char[expected.length()+1];
@@ -1139,40 +1141,20 @@
     }
 
     static void checkProcessPid() {
-        long actualPid = 0;
-        long expectedPid = -1;
-        if (Windows.is()) {
-            String[] argsTasklist = {"tasklist.exe",  "/NH", "/FI",  "\"IMAGENAME eq tasklist.exe\""};
-            ProcessBuilder pb = new ProcessBuilder(argsTasklist);
-            try {
-                Process proc = pb.start();
-                expectedPid = proc.getPid();
-
-                String output = commandOutput(proc);
-                String[] splits = output.split("\\s+");
-                actualPid = Integer.valueOf(splits[2]);
-            } catch (Throwable t) {
-                unexpected(t);
-            }
-        } else if (Unix.is() || MacOSX.is()) {
-            String[]  shArgs = {"sh", "-c", "echo $$"};
-            ProcessBuilder pb = new ProcessBuilder(shArgs);
-            try {
-                Process proc = pb.start();
-                expectedPid = proc.getPid();
-
-                String output = commandOutput(proc);
-                String[] splits = output.split("\\s+");
-                actualPid = Integer.valueOf(splits[0]);
-            } catch (Throwable t) {
-                unexpected(t);
-            }
-        } else {
-            fail("No test for checkProcessPid on platform: " + System.getProperty("os.name"));
-            return;
+        ProcessBuilder pb = new ProcessBuilder();
+        List<String> list = new ArrayList<String>(javaChildArgs);
+        list.add("pid");
+        pb.command(list);
+        try {
+            Process p = pb.start();
+            String s = commandOutput(p);
+            long actualPid = Long.valueOf(s.trim());
+            long expectedPid = p.getPid();
+            equal(actualPid, expectedPid);
+        } catch (Throwable t) {
+            unexpected(t);
         }
 
-        equal(actualPid, expectedPid);
 
         // Test the default implementation of Process.getPid
         DelegatingProcess p = new DelegatingProcess(null);
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -24,10 +24,12 @@
 import java.io.File;
 import java.io.BufferedReader;
 import java.io.IOException;
+import java.io.UncheckedIOException;
 import java.lang.ProcessBuilder;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.nio.file.attribute.UserPrincipal;
 import java.time.Duration;
 import java.time.Instant;
 import java.time.temporal.ChronoUnit;
@@ -58,17 +60,16 @@
     static String whoami;
 
     static {
-        ProcessBuilder pb = new ProcessBuilder("whoami");
-        String fullName;
         try {
-            fullName = new Scanner(pb.start().getInputStream()).nextLine();
-            StringTokenizer st = new StringTokenizer(fullName, "\\");
-            while (st.hasMoreTokens()) {
-                whoami = st.nextToken();
-            }
-            System.out.printf("whoami: %s, user.name: %s%n", whoami, System.getProperty("user.name"));
+            // Create a file and take the username from the file
+            Path p = Paths.get("OwnerName.tmp");
+            Files.createFile(p);
+            UserPrincipal owner = Files.getOwner(p);
+            whoami = owner.getName();
+            Files.delete(p);
         } catch (IOException ex) {
-            throw new RuntimeException(ex);
+            ex.printStackTrace();
+            throw new UncheckedIOException("tmp file", ex);
         }
     }
 
--- a/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
 /*
  * @test LFGarbageCollectedTest
  * @bug 8046703
+ * @ignore 8078602
  * @summary Test verifies that lambda forms are garbage collected
  * @author kshefov
  * @library /lib/testlibrary/jsr292 /lib/testlibrary
--- a/jdk/test/java/net/SocketOption/OptionsTest.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/java/net/SocketOption/OptionsTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -23,8 +23,9 @@
 
 /*
  * @test
- * @bug 8036979
+ * @bug 8036979 8072384
  * @run main/othervm -Xcheck:jni OptionsTest
+ * @run main/othervm -Xcheck:jni -Djava.net.preferIPv4Stack=true OptionsTest
  */
 
 import java.net.*;
@@ -59,7 +60,8 @@
 
     static Test[] serverSocketTests = new Test[] {
         Test.create(StandardSocketOptions.SO_RCVBUF, Integer.valueOf(8 * 100)),
-        Test.create(StandardSocketOptions.SO_REUSEADDR, Boolean.FALSE)
+        Test.create(StandardSocketOptions.SO_REUSEADDR, Boolean.FALSE),
+        Test.create(StandardSocketOptions.IP_TOS, Integer.valueOf(100))
     };
 
     static Test[] dgSocketTests = new Test[] {
@@ -193,6 +195,9 @@
                 return Integer.valueOf(socket.getReceiveBufferSize());
             } else if (option.equals(StandardSocketOptions.SO_REUSEADDR)) {
                 return Boolean.valueOf(socket.getReuseAddress());
+            } else if (option.equals(StandardSocketOptions.IP_TOS)) {
+                return Integer.valueOf(jdk.net.Sockets.getOption(
+                    socket, StandardSocketOptions.IP_TOS));
             } else {
                 throw new RuntimeException("unexecpted socket option");
             }
--- a/jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java	Mon Jun 08 11:31:09 2015 -0700
@@ -34,6 +34,7 @@
  *          java.rmi/sun.rmi.transport.tcp
  * @build TestLibrary RMID ActivationLibrary
  * @run main/othervm/timeout=240 RmidViaInheritedChannel
+ * @key intermittent
  */
 
 import java.io.IOException;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/text/Format/DateFormat/LocaleDateFormats.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8080774
+ * @run testng/othervm -Djava.locale.providers=JRE,CLDR LocaleDateFormats
+ * @summary This file contains tests for JRE locales date formats
+ */
+
+import java.text.DateFormat;
+import java.util.Calendar;
+import java.util.Locale;
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class LocaleDateFormats {
+
+    @Test(dataProvider = "dateFormats")
+    public void testDateFormat(Locale loc, int style, int year, int month, int date, String expectedString) {
+        Calendar cal = Calendar.getInstance(loc);
+        cal.set(year, month-1, date);
+        // Create date formatter based on requested style and test locale
+        DateFormat df = DateFormat.getDateInstance(style, loc);
+        // Test the date format
+        assertEquals(df.format(cal.getTime()), expectedString);
+    }
+
+    @DataProvider(name = "dateFormats" )
+    private Object[][] dateFormats() {
+        return new Object[][] {
+            //8080774
+            //Locale, Format type, year, month, date, expected result
+            {localeEnSG, DateFormat.SHORT, 2015, 5, 6, "6/5/15"},
+            {localeEnSG, DateFormat.MEDIUM, 2015, 5, 6, "6 May, 2015"},
+            {localeEnSG, DateFormat.LONG, 2015, 5, 6, "6 May, 2015"},
+            {localeEnSG, DateFormat.FULL, 2015, 5, 6, "Wednesday, 6 May, 2015"}
+        };
+    }
+    // en_SG Locale instance
+    private static final Locale localeEnSG = new Locale("en", "SG");
+}
--- a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -156,6 +156,13 @@
                 OFFSET_0200, OFFSET_0200, OFFSET_0300);
     }
 
+    @Test(expectedExceptions=IllegalArgumentException.class)
+    public void test_factory_nonZeroTimeNanos() {
+        ZoneOffsetTransitionRule.of(
+            Month.MARCH, 20, DayOfWeek.SUNDAY, LocalTime.of(1, 2, 3, 400_000_000),
+            false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
+    }
+
     //-----------------------------------------------------------------------
     // getters
     //-----------------------------------------------------------------------
--- a/jdk/test/java/util/Arrays/ParallelPrefix.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/java/util/Arrays/ParallelPrefix.java	Mon Jun 08 11:31:09 2015 -0700
@@ -51,7 +51,7 @@
     private final static int MEDIUM_ARRAY_SIZE = 1 << 8;
 
     //Array size much greater than MIN_PARTITION
-    private final static int LARGE_ARRAY_SIZE = 1 << 12;
+    private final static int LARGE_ARRAY_SIZE = 1 << 14;
 
     private final static int[] ARRAY_SIZE_COLLECTION  = new int[]{
         SMALL_ARRAY_SIZE,
@@ -60,7 +60,7 @@
         LARGE_ARRAY_SIZE
     };
 
-    @DataProvider
+    @DataProvider(name = "intSet")
     public static Object[][] intSet(){
         return genericData(size -> IntStream.range(0, size).toArray(),
                 new IntBinaryOperator[]{
@@ -68,7 +68,7 @@
                     Integer::min});
     }
 
-    @DataProvider
+    @DataProvider(name = "longSet")
     public static Object[][] longSet(){
         return genericData(size -> LongStream.range(0, size).toArray(),
                 new LongBinaryOperator[]{
@@ -76,7 +76,7 @@
                     Long::min});
     }
 
-    @DataProvider
+    @DataProvider(name = "doubleSet")
     public static Object[][] doubleSet(){
         return genericData(size -> IntStream.range(0, size).mapToDouble(i -> (double)i).toArray(),
                 new DoubleBinaryOperator[]{
@@ -84,7 +84,7 @@
                     Double::min});
     }
 
-    @DataProvider
+    @DataProvider(name = "stringSet")
     public static Object[][] stringSet(){
         Function<Integer, String[]> stringsFunc = size ->
                 IntStream.range(0, size).mapToObj(Integer::toString).toArray(String[]::new);
@@ -121,11 +121,11 @@
 
         int[] parallelResult = data.clone();
         Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
-        assertEquals(parallelResult, sequentialResult);
+        assertArraysEqual(parallelResult, sequentialResult);
 
         int[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
         Arrays.parallelPrefix(parallelRangeResult, op);
-        assertEquals(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
+        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
     }
 
     @Test(dataProvider="longSet")
@@ -137,11 +137,11 @@
 
         long[] parallelResult = data.clone();
         Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
-        assertEquals(parallelResult, sequentialResult);
+        assertArraysEqual(parallelResult, sequentialResult);
 
         long[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
         Arrays.parallelPrefix(parallelRangeResult, op);
-        assertEquals(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
+        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
     }
 
     @Test(dataProvider="doubleSet")
@@ -153,11 +153,11 @@
 
         double[] parallelResult = data.clone();
         Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
-        assertEquals(parallelResult, sequentialResult);
+        assertArraysEqual(parallelResult, sequentialResult);
 
         double[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
         Arrays.parallelPrefix(parallelRangeResult, op);
-        assertEquals(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
+        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
     }
 
     @Test(dataProvider="stringSet")
@@ -169,11 +169,11 @@
 
         String[] parallelResult = data.clone();
         Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
-        assertEquals(parallelResult, sequentialResult);
+        assertArraysEqual(parallelResult, sequentialResult);
 
         String[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
         Arrays.parallelPrefix(parallelRangeResult, op);
-        assertEquals(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
+        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
     }
 
     @Test
@@ -293,5 +293,41 @@
     public static void assertInstance(Object actual, Class<?> expected, String message) {
         assertTrue(expected.isInstance(actual), message);
     }
+
+    static void assertArraysEqual(int[] actual, int[] expected) {
+        try {
+            assertEquals(actual, expected, "");
+        } catch (AssertionError x) {
+            throw new AssertionError(String.format("Expected:%s, actual:%s",
+                    Arrays.toString(expected), Arrays.toString(actual)), x);
+        }
+    }
+
+    static void assertArraysEqual(long[] actual, long[] expected) {
+        try {
+            assertEquals(actual, expected, "");
+        } catch (AssertionError x) {
+            throw new AssertionError(String.format("Expected:%s, actual:%s",
+                    Arrays.toString(expected), Arrays.toString(actual)), x);
+        }
+    }
+
+    static void assertArraysEqual(double[] actual, double[] expected) {
+        try {
+            assertEquals(actual, expected, "");
+        } catch (AssertionError x) {
+            throw new AssertionError(String.format("Expected:%s, actual:%s",
+                    Arrays.toString(expected), Arrays.toString(actual)), x);
+        }
+    }
+
+    static void assertArraysEqual(String[] actual, String[] expected) {
+        try {
+            assertEquals(actual, expected, "");
+        } catch (AssertionError x) {
+            throw new AssertionError(String.format("Expected:%s, actual:%s",
+                    Arrays.toString(expected), Arrays.toString(actual)), x);
+        }
+    }
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Collections/EnumerationAsIterator.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8072726
+ * @summary Tests for Enumeration-to-Iterator conversion.
+ * @run testng EnumerationAsIterator
+ */
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Supplier;
+
+import static org.testng.Assert.*;
+
+@Test
+public class EnumerationAsIterator {
+    static Object[] of(String description, Supplier<Enumeration<?>> s, Collection<?> exp) {
+        return new Object[]{description, s, exp};
+    }
+
+    static Object[] of(String description, Collection<?> c, Collection<?> exp) {
+        return of(description, () -> Collections.enumeration(c), exp);
+    }
+
+    /**
+     * A wrapper Enumeration that doesn't override the
+     * default method on Enumeration.
+     */
+    static <T> Enumeration<T> wrapInDefault(Enumeration<T> e) {
+        return new Enumeration<>() {
+            @Override
+            public boolean hasMoreElements() {
+                return e.hasMoreElements();
+            }
+
+            @Override
+            public T nextElement() {
+                return e.nextElement();
+            }
+        };
+    }
+
+    @DataProvider
+    public static Iterator<Object[]> unmodifiable() {
+        return Arrays.asList(
+            of("Default-wrapped ArrayList",
+               () -> wrapInDefault(
+                   Collections.enumeration(new ArrayList<>(Arrays.asList("a")))),
+               Arrays.asList("a")),
+
+            of("Unmodifiable ArrayList",
+               Collections.unmodifiableList(new ArrayList<>(Arrays.asList("a"))),
+               Arrays.asList("a")),
+
+            of("Modifiable ArrayList",
+               new ArrayList<>(Arrays.asList("a")),
+               Arrays.asList("a"))
+        ).iterator();
+    }
+
+    @DataProvider
+    public static Iterator<Object[]> others() {
+        return Arrays.asList(
+            of("Default Collections.emptyEnumeration()",
+               () -> wrapInDefault(Collections.emptyEnumeration()),
+               Collections.emptyList()),
+
+            of("Collections.emptyEnumeration()",
+               Collections::emptyEnumeration,
+               Collections.emptyList()),
+
+            of("Collections.emptyList()",
+               Collections.emptyList(),
+               Collections.emptyList()),
+
+            of("Collections.singletonList()",
+               Collections.singletonList("a"),
+               Collections.singletonList("a")),
+
+            of("Arrays.asList(...)",
+               Arrays.asList("a", "b", "c"),
+               Arrays.asList("a", "b", "c"))
+        ).iterator();
+    }
+
+    @DataProvider
+    public static Iterator<Object[]> all() {
+        List<Object[]> all = new ArrayList<>();
+        unmodifiable().forEachRemaining(all::add);
+        others().forEachRemaining(all::add);
+        return all.iterator();
+    }
+
+    @Test(dataProvider = "all")
+    public void consumeByNext(String description, Supplier<Enumeration<?>> s, Collection<?> exp) {
+        Iterator<?> i = s.get().asIterator();
+        int count = 0;
+        while (i.hasNext()) {
+            assertTrue(i.hasNext());
+
+            i.next();
+            count++;
+        }
+        assertEquals(count, exp.size());
+
+        assertFalse(i.hasNext());
+
+        try {
+            i.next();
+            fail();
+        } catch (NoSuchElementException e) {
+        }
+    }
+
+    @Test(dataProvider = "all")
+    public void consumeByForEachRemaining(String description,
+                                          Supplier<Enumeration<?>> s,
+                                          Collection<?> exp) {
+        Iterator<?> i = s.get().asIterator();
+        AtomicInteger ai = new AtomicInteger();
+        i.forEachRemaining(e -> ai.getAndIncrement());
+        assertEquals(ai.get(), exp.size());
+        i.forEachRemaining(e -> ai.getAndIncrement());
+        assertEquals(ai.get(), exp.size());
+
+        assertFalse(i.hasNext());
+
+        try {
+            i.next();
+            fail();
+        } catch (NoSuchElementException e) {
+        }
+    }
+
+    @Test(dataProvider = "all")
+    public void consumeByNextThenForEachRemaining(String description,
+                                                  Supplier<Enumeration<?>> s,
+                                                  Collection<?> exp) {
+        Iterator<?> i = s.get().asIterator();
+        AtomicInteger ai = new AtomicInteger();
+        if (i.hasNext()) {
+            i.next();
+            ai.getAndIncrement();
+        }
+        i.forEachRemaining(e -> ai.getAndIncrement());
+        assertEquals(ai.get(), exp.size());
+        i.forEachRemaining(e -> ai.getAndIncrement());
+        assertEquals(ai.get(), exp.size());
+
+        assertFalse(i.hasNext());
+
+        try {
+            i.next();
+            fail();
+        } catch (NoSuchElementException e) {
+        }
+    }
+
+    @Test(dataProvider = "all")
+    public void contents(String description, Supplier<Enumeration<?>> s, Collection<?> exp) {
+        assertEquals(copy(s.get()), exp);
+    }
+
+    private List<?> copy(Enumeration<?> input) {
+        List<Object> output = new ArrayList<>();
+        input.asIterator().forEachRemaining(output::add);
+        return output;
+    }
+
+    @Test(dataProvider = "unmodifiable",
+          expectedExceptions=UnsupportedOperationException.class)
+    public void removeThrowsAfterAdvancingE(String description,
+                                            Supplier<Enumeration<?>> s,
+                                            Collection<?> exp) {
+        Enumeration<?> e = s.get();
+        e.nextElement();
+        e.asIterator().remove();
+    }
+
+    @Test(dataProvider = "unmodifiable",
+          expectedExceptions=UnsupportedOperationException.class)
+    public void removeThrowsAfterAdvancingI(String description,
+                                            Supplier<Enumeration<?>> s,
+                                            Collection<?> exp) {
+        Iterator<?> i = s.get().asIterator();
+        i.next();
+        i.remove();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSBufferOverflowUnderflowTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS buffer overflow and underflow status when dealing with
+ *          application data.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSBufferOverflowUnderflowTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSBufferOverflowUnderflowTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSBufferOverflowUnderflowTest
+ */
+
+/**
+ * Testing DTLS incorrect app data packages unwrapping.
+ */
+public class DTLSBufferOverflowUnderflowTest {
+    public static void main(String[] args) {
+        BufferOverflowUnderflowTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSDataExchangeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS application data exchange using each of the supported
+ *          cipher suites.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSDataExchangeTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSDataExchangeTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSDataExchangeTest
+ */
+
+/**
+ * Testing DTLS application data exchange using each of the supported cipher
+ * suites.
+ */
+public class DTLSDataExchangeTest {
+    public static void main(String[] args) {
+        DataExchangeTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSEnginesClosureTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines closing using each of the supported
+ *          cipher suites.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSEnginesClosureTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSEnginesClosureTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSEnginesClosureTest
+ */
+
+/**
+ * Testing DTLS engines closing using each of the supported cipher suites.
+ */
+public class DTLSEnginesClosureTest {
+    public static void main(String[] args) {
+        EnginesClosureTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines handshake using each of the supported
+ *          cipher suites.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSHandshakeTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSHandshakeTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSHandshakeTest
+ */
+
+/**
+ * Testing DTLS engines handshake using each of the supported cipher suites.
+ */
+public class DTLSHandshakeTest {
+    public static void main(String[] args) {
+        HandshakeTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSHandshakeWithReplicatedPacketsTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines handshake using each of the supported
+ *          cipher suites with replicated packets check.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSHandshakeWithReplicatedPacketsTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSHandshakeWithReplicatedPacketsTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSHandshakeWithReplicatedPacketsTest
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+
+/**
+ * Testing DTLS engines handshake using each of the supported cipher suites with
+ * replicated packets check.
+ */
+public class DTLSHandshakeWithReplicatedPacketsTest extends SSLEngineTestCase {
+
+    private static String testMode;
+
+    public static void main(String[] args) {
+        DTLSHandshakeWithReplicatedPacketsTest test
+                = new DTLSHandshakeWithReplicatedPacketsTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE, true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS incorrect app data packages unwrapping.
+ * @key randomness
+ * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSIncorrectAppDataTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSIncorrectAppDataTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSIncorrectAppDataTest
+ */
+
+import java.nio.ByteBuffer;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLEngineResult;
+import javax.net.ssl.SSLException;
+import java.util.Random;
+import jdk.testlibrary.RandomFactory;
+
+/**
+ * Testing DTLS incorrect app data packages unwrapping. Incorrect application
+ * data packages should be ignored by DTLS SSLEngine.
+ */
+public class DTLSIncorrectAppDataTest extends SSLEngineTestCase {
+
+    private final String MESSAGE = "Hello peer!";
+
+    public static void main(String[] s) {
+        DTLSIncorrectAppDataTest test = new DTLSIncorrectAppDataTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        try {
+            doHandshake(clientEngine, serverEngine, maxPacketSize,
+                    HandshakeMode.INITIAL_HANDSHAKE);
+            checkIncorrectAppDataUnwrap(clientEngine, serverEngine);
+            checkIncorrectAppDataUnwrap(serverEngine, clientEngine);
+        } catch (SSLException ssle) {
+            throw new AssertionError("Error during handshake or sending app data",
+                    ssle);
+        }
+    }
+
+    private void checkIncorrectAppDataUnwrap(SSLEngine sendEngine,
+            SSLEngine recvEngine) throws SSLException {
+        String direction = sendEngine.getUseClientMode() ? "client"
+                : "server";
+        System.out.println("================================================="
+                + "===========");
+        System.out.println("Testing DTLS incorrect app data packages unwrapping"
+                + " by sending data from " + direction);
+        ByteBuffer app = ByteBuffer.wrap(MESSAGE.getBytes());
+        ByteBuffer net = doWrap(sendEngine, direction, 0, app);
+        final Random RNG = RandomFactory.getRandom();
+        int randomPlace = RNG.nextInt(net.remaining());
+        net.array()[randomPlace] += 1;
+        app = ByteBuffer.allocate(recvEngine.getSession()
+                .getApplicationBufferSize());
+        recvEngine.unwrap(net, app);
+        app.flip();
+        int length = app.remaining();
+        System.out.println("Unwrapped " + length + " bytes.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSMFLNTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines handshake using each of the supported
+ *          cipher suites with different maximum fragment length. Testing of
+ *          MFLN extension.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSMFLNTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSMFLNTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSMFLNTest
+ */
+
+/**
+ * Testing DTLS engines handshake using each of the supported cipher suites with
+ * different maximum fragment length. Testing of MFLN extension.
+ */
+public class DTLSMFLNTest {
+    public static void main(String[] args) {
+        MFLNTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSNotEnabledRC4Test.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines do not enable RC4 ciphers by default.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS DTLSNotEnabledRC4Test
+ */
+
+/**
+ * Testing DTLS engines do not enable RC4 ciphers by default.
+ */
+public class DTLSNotEnabledRC4Test {
+    public static void main(String[] args) throws Exception {
+        NotEnabledRC4Test.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines re-handshaking using each of the supported
+ *          cipher suites.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSRehandshakeTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSRehandshakeTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSRehandshakeTest
+ */
+
+/**
+ * Testing DTLS engines re-handshaking using each of the supported cipher
+ * suites.
+ */
+public class DTLSRehandshakeTest {
+    public static void main(String[] args) {
+        RehandshakeTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines re-handshaking with cipher change. New cipher
+ *          is taken randomly from the supporetd ciphers list.
+ * @key randomness
+ * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      DTLSRehandshakeWithCipherChangeTest
+ */
+
+/**
+ * Testing DTLS engines re-handshaking with cipher change. New cipher is taken
+ * randomly from the supported ciphers list.
+ */
+public class DTLSRehandshakeWithCipherChangeTest {
+    public static void main(String[] args) {
+        RehandshakeWithCipherChangeTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithDataExTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines re-handshaking using each of the supported
+ *          cipher suites with application data exchange before and after
+ *          re-handshake and closing of the engines.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSRehandshakeWithDataExTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSRehandshakeWithDataExTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSRehandshakeWithDataExTest
+ */
+
+/**
+ * Testing DTLS engines re-handshaking using each of the supported cipher suites
+ * with application data exchange before and after re-handshake and closing of
+ * the engines.
+ */
+public class DTLSRehandshakeWithDataExTest {
+    public static void main(String[] args) {
+        RehandshakeWithDataExTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS records sequence number property support in application
+ *          data exchange.
+ * @key randomness
+ * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm DTLSSequenceNumberTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=norm_sni DTLSSequenceNumberTest
+ * @run main/othervm -Dtest.security.protocol=DTLS
+ *      -Dtest.mode=krb DTLSSequenceNumberTest
+ */
+
+import java.nio.ByteBuffer;
+import java.util.TreeMap;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLEngineResult;
+import javax.net.ssl.SSLException;
+import java.util.Random;
+import jdk.testlibrary.RandomFactory;
+
+/**
+ * Testing DTLS records sequence number property support in application data
+ * exchange.
+ */
+public class DTLSSequenceNumberTest extends SSLEngineTestCase {
+
+    private final String BIG_MESSAGE = "Very very big message. One two three"
+            + " four five six seven eight nine ten eleven twelve thirteen"
+            + " fourteen fifteen sixteen seventeen eighteen nineteen twenty.";
+    private final byte[] BIG_MESSAGE_BYTES = BIG_MESSAGE.getBytes();
+    private final int PIECES_NUMBER = 15;
+
+    public static void main(String[] args) {
+        DTLSSequenceNumberTest test = new DTLSSequenceNumberTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+        checkSeqNumPropertyWithAppDataSend(clientEngine, serverEngine);
+        checkSeqNumPropertyWithAppDataSend(serverEngine, clientEngine);
+    }
+
+    private void checkSeqNumPropertyWithAppDataSend(SSLEngine sendEngine,
+            SSLEngine recvEngine) throws SSLException {
+        String sender, reciever;
+        if (sendEngine.getUseClientMode() && !recvEngine.getUseClientMode()) {
+            sender = "Client";
+            reciever = "Server";
+        } else if (recvEngine.getUseClientMode() && !sendEngine.getUseClientMode()) {
+            sender = "Server";
+            reciever = "Client";
+        } else {
+            throw new Error("Both engines are in the same mode");
+        }
+        System.out.println("================================================="
+                + "===========");
+        System.out.println("Checking DTLS sequence number support"
+                + " by sending data from " + sender + " to " + reciever);
+        ByteBuffer[] sentMessages = new ByteBuffer[PIECES_NUMBER];
+        ByteBuffer[] netBuffers = new ByteBuffer[PIECES_NUMBER];
+        TreeMap<Long, ByteBuffer> recvMap = new TreeMap<>(Long::compareUnsigned);
+        int symbolsInAMessage;
+        int symbolsInTheLastMessage;
+        int[] recievingSequence = new int[PIECES_NUMBER];
+        for (int i = 0; i < PIECES_NUMBER; i++) {
+            recievingSequence[i] = i;
+        }
+        shuffleArray(recievingSequence);
+        if (BIG_MESSAGE.length() % PIECES_NUMBER == 0) {
+            symbolsInAMessage = BIG_MESSAGE.length() / PIECES_NUMBER;
+            symbolsInTheLastMessage = symbolsInAMessage;
+        } else {
+            symbolsInAMessage = BIG_MESSAGE.length() / (PIECES_NUMBER - 1);
+            symbolsInTheLastMessage = BIG_MESSAGE.length() % (PIECES_NUMBER - 1);
+        }
+        for (int i = 0; i < PIECES_NUMBER - 1; i++) {
+            sentMessages[i] = ByteBuffer.wrap(BIG_MESSAGE_BYTES,
+                    i * symbolsInAMessage, symbolsInAMessage);
+        }
+        sentMessages[PIECES_NUMBER - 1] = ByteBuffer.wrap(BIG_MESSAGE_BYTES,
+                (PIECES_NUMBER - 1) * symbolsInAMessage, symbolsInTheLastMessage);
+        long prevSeqNum = 0L;
+        //Wrapping massages in direct order
+        for (int i = 0; i < PIECES_NUMBER; i++) {
+            netBuffers[i] = ByteBuffer.allocate(sendEngine.getSession()
+                    .getPacketBufferSize());
+            SSLEngineResult[] r = new SSLEngineResult[1];
+            netBuffers[i] = doWrap(sendEngine, sender, 0, sentMessages[i], r);
+            long seqNum = r[0].sequenceNumber();
+            if (Long.compareUnsigned(seqNum, prevSeqNum) <= 0) {
+                throw new AssertionError("Sequence number of the wrapped "
+                        + "message is less or equal than that of the"
+                        + " previous one! "
+                        + "Was " + prevSeqNum + ", now " + seqNum + ".");
+            }
+            prevSeqNum = seqNum;
+        }
+        //Unwrapping messages in random order and trying to reconstruct order
+        //from sequence number.
+        for (int i = 0; i < PIECES_NUMBER; i++) {
+            int recvNow = recievingSequence[i];
+            SSLEngineResult[] r = new SSLEngineResult[1];
+            ByteBuffer recvMassage = doUnWrap(recvEngine, reciever,
+                    netBuffers[recvNow], r);
+            long seqNum = r[0].sequenceNumber();
+            recvMap.put(seqNum, recvMassage);
+        }
+        int mapSize = recvMap.size();
+        if (mapSize != PIECES_NUMBER) {
+            throw new AssertionError("The number of received massages "
+                    + mapSize + " is not equal to the number of sent messages "
+                    + PIECES_NUMBER + "!");
+        }
+        byte[] recvBigMsgBytes = new byte[BIG_MESSAGE_BYTES.length];
+        int counter = 0;
+        for (ByteBuffer msg : recvMap.values()) {
+            System.arraycopy(msg.array(), 0, recvBigMsgBytes,
+                    counter * symbolsInAMessage, msg.remaining());
+            counter++;
+        }
+        String recvBigMsg = new String(recvBigMsgBytes);
+        if (!recvBigMsg.equals(BIG_MESSAGE)) {
+            throw new AssertionError("Received big message is not equal to"
+                    + " one that was sent! Received message is: " + recvBigMsg);
+        }
+    }
+
+    private static void shuffleArray(int[] ar) {
+        final Random RNG = RandomFactory.getRandom();
+        for (int i = ar.length - 1; i > 0; i--) {
+            int index = RNG.nextInt(i + 1);
+            int a = ar[index];
+            ar[index] = ar[i];
+            ar[i] = a;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSUnSupportedCiphersTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing that try to enable unsupported ciphers
+ *          causes IllegalArgumentException.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLS DTLSUnSupportedCiphersTest
+ */
+
+/**
+ * Testing that a try to enable unsupported ciphers causes IllegalArgumentException.
+ */
+public class DTLSUnSupportedCiphersTest {
+    public static void main(String[] args) {
+        UnSupportedCiphersTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLS/TEST.properties	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,1 @@
+modules=java.base java.security.jgss
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10BufferOverflowUnderflowTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS buffer overflow and underflow status when dealing with
+ *          application data.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10BufferOverflowUnderflowTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10BufferOverflowUnderflowTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10BufferOverflowUnderflowTest
+ */
+
+/**
+ * Testing DTLS incorrect app data packages unwrapping.
+ */
+public class DTLSv10BufferOverflowUnderflowTest {
+    public static void main(String[] args) {
+        BufferOverflowUnderflowTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10DataExchangeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS application data exchange using each of the supported
+ *          cipher suites.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10DataExchangeTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10DataExchangeTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10DataExchangeTest
+ */
+
+/**
+ * Testing DTLS application data exchange using each of the supported cipher
+ * suites.
+ */
+public class DTLSv10DataExchangeTest {
+    public static void main(String[] args) {
+        DataExchangeTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10EnginesClosureTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines closing using each of the supported
+ *          cipher suites.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10EnginesClosureTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10EnginesClosureTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10EnginesClosureTest
+ */
+
+/**
+ * Testing DTLS engines closing using each of the supported cipher suites.
+ */
+public class DTLSv10EnginesClosureTest {
+    public static void main(String[] args) {
+        EnginesClosureTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines handshake using each of the supported
+ *          cipher suites.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10HandshakeTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10HandshakeTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10HandshakeTest
+ */
+
+/**
+ * Testing DTLS engines handshake using each of the supported cipher suites.
+ */
+public class DTLSv10HandshakeTest {
+    public static void main(String[] args) {
+        HandshakeTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10HandshakeWithReplicatedPacketsTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines handshake using each of the supported
+ *          cipher suites with replicated packets check.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon /javax/net/ssl/DTLS
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10HandshakeWithReplicatedPacketsTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10HandshakeWithReplicatedPacketsTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10HandshakeWithReplicatedPacketsTest
+ */
+
+/**
+ * Testing DTLS engines handshake using each of the supported cipher suites with
+ * replicated packets check.
+ */
+public class DTLSv10HandshakeWithReplicatedPacketsTest {
+    public static void main(String[] args) {
+        DTLSHandshakeWithReplicatedPacketsTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10IncorrectAppDataTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS incorrect app data packages unwrapping.
+ * @key randomness
+ * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon /javax/net/ssl/DTLS
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSIncorrectAppDataTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSIncorrectAppDataTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSIncorrectAppDataTest
+ */
+
+/**
+ * Testing DTLS incorrect app data packages unwrapping. Incorrect application
+ * data packages should be ignored by DTLS SSLEngine.
+ */
+public class DTLSv10IncorrectAppDataTest {
+    public static void main(String[] args) {
+        DTLSIncorrectAppDataTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10MFLNTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines handshake using each of the supported
+ *          cipher suites with different maximum fragment length. Testing of
+ *          MFLN extension.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10MFLNTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10MFLNTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10MFLNTest
+ */
+
+/**
+ * Testing DTLS engines handshake using each of the supported cipher suites with
+ * different maximum fragment length. Testing of MFLN extension.
+ */
+public class DTLSv10MFLNTest {
+    public static void main(String[] args) {
+        MFLNTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10NotEnabledRC4Test.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines do not enable RC4 ciphers by default.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0 DTLSv10NotEnabledRC4Test
+ */
+
+/**
+ * Testing DTLS engines do not enable RC4 ciphers by default.
+ */
+public class DTLSv10NotEnabledRC4Test {
+    public static void main(String[] args) throws Exception {
+        NotEnabledRC4Test.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines re-handshaking using each of the supported
+ *          cipher suites.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10RehandshakeTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10RehandshakeTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10RehandshakeTest
+ */
+
+/**
+ * Testing DTLS engines re-handshaking using each of the supported cipher
+ * suites.
+ */
+public class DTLSv10RehandshakeTest {
+    public static void main(String[] args) {
+        RehandshakeTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines re-handshaking with cipher change. New cipher
+ *          is taken randomly from the supporetd ciphers list.
+ * @key randomness
+ * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      DTLSv10RehandshakeWithCipherChangeTest
+ */
+
+/**
+ * Testing DTLS engines re-handshaking with cipher change. New cipher is taken
+ * randomly from the supported ciphers list.
+ */
+public class DTLSv10RehandshakeWithCipherChangeTest {
+    public static void main(String[] args) {
+        RehandshakeWithCipherChangeTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithDataExTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS engines re-handshaking using each of the supported
+ *          cipher suites with application data exchange before and after
+ *          re-handshake and closing of the engines.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10RehandshakeWithDataExTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10RehandshakeWithDataExTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10RehandshakeWithDataExTest
+ */
+
+/**
+ * Testing DTLS engines re-handshaking using each of the supported cipher suites
+ * with application data exchange before and after re-handshake and closing of
+ * the engines.
+ */
+public class DTLSv10RehandshakeWithDataExTest {
+    public static void main(String[] args) {
+        RehandshakeWithDataExTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10SequenceNumberTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing DTLS records sequence number property support in application
+ *          data exchange.
+ * @key randomness
+ * @library /sun/security/krb5/auto /lib/testlibrary /javax/net/ssl/TLSCommon /javax/net/ssl/DTLS
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm DTLSv10SequenceNumberTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=norm_sni DTLSv10SequenceNumberTest
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      -Dtest.mode=krb DTLSv10SequenceNumberTest
+ */
+
+/**
+ * Testing DTLS records sequence number property support in application data
+ * exchange.
+ */
+public class DTLSv10SequenceNumberTest {
+    public static void main(String[] args) {
+        DTLSHandshakeWithReplicatedPacketsTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10UnSupportedCiphersTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8043758
+ * @summary Testing that try to enable unsupported ciphers
+ *          causes IllegalArgumentException.
+ * @library /sun/security/krb5/auto /javax/net/ssl/TLSCommon
+ * @run main/othervm -Dtest.security.protocol=DTLSv1.0
+ *      DTLSv10UnSupportedCiphersTest
+ */
+
+/**
+ * Testing that a try to enable unsupported ciphers causes IllegalArgumentException.
+ */
+public class DTLSv10UnSupportedCiphersTest {
+    public static void main(String[] args) {
+        UnSupportedCiphersTest.main(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/DTLSv10/TEST.properties	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,1 @@
+modules=java.base java.security.jgss
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/BufferOverflowUnderflowTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.nio.ByteBuffer;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLEngineResult;
+import javax.net.ssl.SSLException;
+
+/**
+ * Testing SSLEngine incorrect app data packages unwrapping.
+ */
+public class BufferOverflowUnderflowTest extends SSLEngineTestCase {
+
+    private final String MESSAGE = "Hello peer!";
+
+    public static void main(String[] args) {
+        BufferOverflowUnderflowTest test = new BufferOverflowUnderflowTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+        checkBufferOverflowOnWrap(clientEngine);
+        checkBufferOverflowOnWrap(serverEngine);
+        checkBufferOverflowOnUnWrap(clientEngine, serverEngine);
+        checkBufferOverflowOnUnWrap(serverEngine, clientEngine);
+        checkBufferUnderflowOnUnWrap(serverEngine, clientEngine);
+        checkBufferUnderflowOnUnWrap(clientEngine, serverEngine);
+    }
+
+    private void checkBufferOverflowOnWrap(SSLEngine engine)
+            throws SSLException {
+        String mode = engine.getUseClientMode() ? "client"
+                : "server";
+        System.out.println("================================================="
+                + "===========");
+        System.out.println("Testing SSLEngine buffer overflow"
+                + " on wrap by " + mode);
+        ByteBuffer app = ByteBuffer.wrap(MESSAGE.getBytes());
+        //Making net buffer size less than required by 1 byte.
+        ByteBuffer net = ByteBuffer
+                .allocate(engine.getSession().getPacketBufferSize() - 1);
+        SSLEngineResult r = engine.wrap(app, net);
+        checkResult(r, SSLEngineResult.Status.BUFFER_OVERFLOW);
+        System.out.println("Passed");
+    }
+
+    private void checkBufferOverflowOnUnWrap(SSLEngine wrappingEngine,
+            SSLEngine unwrappingEngine)
+            throws SSLException {
+        String wrapperMode = wrappingEngine.getUseClientMode() ? "client"
+                : "server";
+        String unwrapperMode = unwrappingEngine.getUseClientMode() ? "client"
+                : "server";
+        if (wrapperMode.equals(unwrapperMode)) {
+            throw new Error("Test error: both engines are in the same mode!");
+        }
+        System.out.println("================================================="
+                + "===========");
+        System.out.println("Testing SSLEngine buffer overflow"
+                + " on unwrap by " + unwrapperMode);
+        ByteBuffer app = ByteBuffer.wrap(MESSAGE.getBytes());
+        ByteBuffer net = ByteBuffer
+                .allocate(wrappingEngine.getSession().getPacketBufferSize());
+        SSLEngineResult r = wrappingEngine.wrap(app, net);
+        checkResult(r, SSLEngineResult.Status.OK);
+        //Making app buffer size less than required by 1 byte.
+        app = ByteBuffer.allocate(MESSAGE.length() - 1);
+        net.flip();
+        r = unwrappingEngine.unwrap(net, app);
+        checkResult(r, SSLEngineResult.Status.BUFFER_OVERFLOW);
+        System.out.println("Passed");
+    }
+
+    private void checkBufferUnderflowOnUnWrap(SSLEngine wrappingEngine,
+            SSLEngine unwrappingEngine)
+            throws SSLException {
+        String wrapperMode = wrappingEngine.getUseClientMode() ? "client"
+                : "server";
+        String unwrapperMode = unwrappingEngine.getUseClientMode() ? "client"
+                : "server";
+        if (wrapperMode.equals(unwrapperMode)) {
+            throw new Error("Test error: both engines are in the same mode!");
+        }
+        System.out.println("================================================="
+                + "===========");
+        System.out.println("Testing SSLEngine buffer underflow"
+                + " on unwrap by " + unwrapperMode);
+        ByteBuffer app = ByteBuffer.wrap(MESSAGE.getBytes());
+        ByteBuffer net = ByteBuffer
+                .allocate(wrappingEngine.getSession().getPacketBufferSize());
+        SSLEngineResult r = wrappingEngine.wrap(app, net);
+        checkResult(r, SSLEngineResult.Status.OK);
+        app = ByteBuffer.allocate(unwrappingEngine.getSession()
+                .getApplicationBufferSize());
+        net.flip();
+        //Making net buffer size less than size of dtls message.
+        net.limit(net.limit() - 1);
+        r = unwrappingEngine.unwrap(net, app);
+        checkResult(r, SSLEngineResult.Status.BUFFER_UNDERFLOW);
+        System.out.println("Passed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/DataExchangeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+
+/**
+ * Testing SSLEngine application data exchange using each of the supported cipher
+ * suites.
+ */
+public class DataExchangeTest extends SSLEngineTestCase {
+
+    public static void main(String[] args) {
+        DataExchangeTest test = new DataExchangeTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+        sendApplicationData(clientEngine, serverEngine);
+        sendApplicationData(serverEngine, clientEngine);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/EnginesClosureTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+
+/**
+ * Testing SSLEngines closing using each of the supported cipher suites.
+ */
+public class EnginesClosureTest extends SSLEngineTestCase {
+
+    public static void main(String[] args) {
+        EnginesClosureTest test = new EnginesClosureTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        closingTest(cipher, true);
+        closingTest(cipher, false);
+    }
+
+    private void closingTest(String cipher, boolean clientCloses)
+            throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+        if (clientCloses) {
+            closeEngines(clientEngine, serverEngine);
+        } else {
+            closeEngines(serverEngine, clientEngine);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/HandshakeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+
+/**
+ * Testing SSLEngines handshake using each of the supported cipher suites.
+ */
+public class HandshakeTest extends SSLEngineTestCase {
+
+    public static void main(String[] args) {
+        HandshakeTest test = new HandshakeTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/MFLNTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+
+/**
+ * Testing SSLEngines handshake using each of the supported cipher suites with
+ * different maximum fragment length. Testing of MFLN extension.
+ */
+public class MFLNTest extends SSLEngineTestCase {
+
+    public static void main(String[] args) {
+        setUpAndStartKDCIfNeeded();
+        System.setProperty("jsse.enableMFLNExtension", "true");
+        for (int mfl = 4096; mfl >= 256; mfl /= 2) {
+            System.out.println("=============================================="
+                    + "==============");
+            System.out.printf("Testsing DTLS handshake with MFL = %d%n", mfl);
+            MFLNTest test = new MFLNTest(mfl);
+            test.runTests();
+        }
+    }
+
+    protected MFLNTest(int maxPacketSize) {
+        super(maxPacketSize);
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/NotEnabledRC4Test.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+
+/**
+ * Testing SSLEngines do not enable RC4 ciphers by default.
+ */
+public class NotEnabledRC4Test {
+
+    public static void main(String[] s) throws Exception {
+        SSLContext context = SSLEngineTestCase.getContext();
+        SSLEngine clientEngine = context.createSSLEngine();
+        clientEngine.setUseClientMode(true);
+        SSLEngine serverEngine = context.createSSLEngine();
+        serverEngine.setUseClientMode(false);
+        String[] cliEnabledCiphers = clientEngine.getEnabledCipherSuites();
+        rc4Test(cliEnabledCiphers, true);
+        String[] srvEnabledCiphers = serverEngine.getEnabledCipherSuites();
+        rc4Test(srvEnabledCiphers, false);
+    }
+
+    private static void rc4Test(String[] ciphers, boolean isClient) {
+        String mode = isClient ? "client" : "server";
+        for (String cipher : ciphers) {
+            if (cipher.contains("RC4")) {
+                throw new AssertionError("RC4 cipher " + cipher + " is enabled"
+                        + " by default on " + mode + " SSLEngine,"
+                        + " but it should not!");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/RehandshakeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+
+/**
+ * Testing SSLEngines re-handshaking using each of the supported cipher
+ * suites.
+ */
+public class RehandshakeTest extends SSLEngineTestCase {
+
+    public static void main(String[] args) {
+        RehandshakeTest test = new RehandshakeTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.REHANDSHAKE_BEGIN_CLIENT);
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.REHANDSHAKE_BEGIN_SERVER);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/RehandshakeWithCipherChangeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLEngineResult;
+import javax.net.ssl.SSLException;
+import java.util.Random;
+import jdk.testlibrary.RandomFactory;
+
+/**
+ * Testing SSLEngines re-handshaking with cipher change. New cipher is taken
+ * randomly from the supported ciphers list.
+ */
+public class RehandshakeWithCipherChangeTest extends SSLEngineTestCase {
+
+    public static void main(String[] s) {
+        RehandshakeWithCipherChangeTest test
+                = new RehandshakeWithCipherChangeTest();
+        test.runTests(Ciphers.ENABLED_NON_KRB_NOT_ANON_CIPHERS);
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        SSLEngine clientEngine = context.createSSLEngine();
+        clientEngine.setUseClientMode(true);
+        SSLEngine serverEngine = context.createSSLEngine();
+        serverEngine.setUseClientMode(false);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(
+                Ciphers.ENABLED_NON_KRB_NOT_ANON_CIPHERS.ciphers);
+        String randomCipher;
+        serverEngine.setNeedClientAuth(true);
+        long initialEpoch = 0;
+        long secondEpoch = 0;
+        SSLEngineResult r;
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+        sendApplicationData(clientEngine, serverEngine);
+        r = sendApplicationData(serverEngine, clientEngine);
+        if (TESTED_SECURITY_PROTOCOL.contains("DTLS")) {
+            initialEpoch = r.sequenceNumber() >> 48;
+        }
+        final Random RNG = RandomFactory.getRandom();
+        randomCipher = Ciphers.ENABLED_NON_KRB_NOT_ANON_CIPHERS.ciphers[RNG
+                .nextInt(Ciphers.ENABLED_NON_KRB_NOT_ANON_CIPHERS.ciphers.length)];
+        clientEngine.setEnabledCipherSuites(new String[]{randomCipher});
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.REHANDSHAKE_BEGIN_CLIENT);
+        sendApplicationData(clientEngine, serverEngine);
+        r = sendApplicationData(serverEngine, clientEngine);
+        if (TESTED_SECURITY_PROTOCOL.contains("DTLS")) {
+            secondEpoch = r.sequenceNumber() >> 48;
+            AssertionError epochError = new AssertionError("Epoch number"
+                    + " did not grow after re-handshake! "
+                    + " Was " + initialEpoch + ", now " + secondEpoch + ".");
+            if (Long.compareUnsigned(secondEpoch, initialEpoch) <= 0) {
+                throw epochError;
+            }
+        }
+        closeEngines(clientEngine, serverEngine);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/RehandshakeWithDataExTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLEngineResult;
+import javax.net.ssl.SSLException;
+
+/**
+ * Testing SSLEngines re-handshaking using each of the supported cipher suites
+ * with application data exchange before and after re-handshake and closing of
+ * the engines.
+ */
+public class RehandshakeWithDataExTest extends SSLEngineTestCase {
+
+    public static void main(String[] args) {
+        RehandshakeWithDataExTest test = new RehandshakeWithDataExTest();
+        setUpAndStartKDCIfNeeded();
+        test.runTests();
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) throws SSLException {
+        SSLContext context = getContext();
+        int maxPacketSize = getMaxPacketSize();
+        boolean useSNI = !TEST_MODE.equals("norm");
+        SSLEngine clientEngine = getClientSSLEngine(context, useSNI);
+        SSLEngine serverEngine = getServerSSLEngine(context, useSNI);
+        clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        serverEngine.setNeedClientAuth(!cipher.contains("anon"));
+        long initialEpoch = 0;
+        long secondEpoch = 0;
+        long thirdEpoch = 0;
+        SSLEngineResult r;
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.INITIAL_HANDSHAKE);
+        sendApplicationData(clientEngine, serverEngine);
+        r = sendApplicationData(serverEngine, clientEngine);
+        if (TESTED_SECURITY_PROTOCOL.contains("DTLS")) {
+            initialEpoch = r.sequenceNumber() >> 48;
+        }
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.REHANDSHAKE_BEGIN_CLIENT);
+        sendApplicationData(clientEngine, serverEngine);
+        r = sendApplicationData(serverEngine, clientEngine);
+        AssertionError epochError = new AssertionError("Epoch number"
+                + " did not grow after re-handshake! "
+                + " Was " + initialEpoch + ", now " + secondEpoch + ".");
+        if (TESTED_SECURITY_PROTOCOL.contains("DTLS")) {
+            secondEpoch = r.sequenceNumber() >> 48;
+            if (Long.compareUnsigned(secondEpoch, initialEpoch) <= 0) {
+                throw epochError;
+            }
+        }
+        doHandshake(clientEngine, serverEngine, maxPacketSize,
+                HandshakeMode.REHANDSHAKE_BEGIN_SERVER);
+        sendApplicationData(clientEngine, serverEngine);
+        r = sendApplicationData(serverEngine, clientEngine);
+        if (TESTED_SECURITY_PROTOCOL.contains("DTLS")) {
+        thirdEpoch = r.sequenceNumber() >> 48;
+            if (Long.compareUnsigned(thirdEpoch, secondEpoch) <= 0) {
+                throw epochError;
+            }
+        }
+        closeEngines(clientEngine, serverEngine);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/SSLEngineTestCase.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,1081 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SNIHostName;
+import javax.net.ssl.SNIMatcher;
+import javax.net.ssl.SNIServerName;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLEngineResult;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLParameters;
+import javax.net.ssl.TrustManagerFactory;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.security.KeyManagementException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Basic class to inherit SSLEngine test cases from it. Tests apply for
+ * the TLS or DTLS security protocols and their versions.
+ */
+abstract public class SSLEngineTestCase {
+
+    public enum Ciphers {
+
+        /**
+         * Ciphers supported by the tested SSLEngine without those with kerberos
+         * authentication.
+         */
+        SUPPORTED_NON_KRB_CIPHERS(SSLEngineTestCase.SUPPORTED_NON_KRB_CIPHERS,
+                "Supported non kerberos"),
+        /**
+         * Ciphers supported by the tested SSLEngine without those with kerberos
+         * authentication and without those with SHA256 ans SHA384.
+         */
+        SUPPORTED_NON_KRB_NON_SHA_CIPHERS(SSLEngineTestCase.SUPPORTED_NON_KRB_NON_SHA_CIPHERS,
+                "Supported non kerberos non SHA256 and SHA384"),
+        /**
+         * Ciphers supported by the tested SSLEngine with kerberos authentication.
+         */
+        SUPPORTED_KRB_CIPHERS(SSLEngineTestCase.SUPPORTED_KRB_CIPHERS,
+                "Supported kerberos"),
+        /**
+         * Ciphers enabled by default for the tested SSLEngine without kerberos
+         * and anon.
+         */
+        ENABLED_NON_KRB_NOT_ANON_CIPHERS(
+                SSLEngineTestCase.ENABLED_NON_KRB_NOT_ANON_CIPHERS,
+                "Enabled by default non kerberos not anonymous"),
+        /**
+         * Ciphers unsupported by the tested SSLEngine.
+         */
+        UNSUPPORTED_CIPHERS(SSLEngineTestCase.UNSUPPORTED_CIPHERS,
+                "Unsupported");
+
+        Ciphers(String[] ciphers, String description) {
+            this.ciphers = ciphers;
+            this.description = description;
+        }
+
+        final String[] ciphers;
+        final String description;
+    }
+
+    /**
+     * Enumeration used to distinguish handshake mode in
+     * {@link SSLEngineTestCase#doHandshake(javax.net.ssl.SSLEngine,
+     * javax.net.ssl.SSLEngine, int, SSLEngineTestCase.HandshakeMode, boolean)
+     * SSLEngineTestCase.doHandshake} method.
+     */
+    public enum HandshakeMode {
+
+        /**
+         * Initial handshake done for the first time: both engines call
+         * {@link SSLEngine#beginHandshake()} method.
+         */
+        INITIAL_HANDSHAKE,
+        /**
+         * Repeated handshake done by client: client engine calls
+         * {@link SSLEngine#beginHandshake()} method.
+         */
+        REHANDSHAKE_BEGIN_CLIENT,
+        /**
+         * Repeated handshake done by server: server engine calls
+         * {@link SSLEngine#beginHandshake()} method.
+         */
+        REHANDSHAKE_BEGIN_SERVER;
+    }
+    /**
+     * Security protocol to be tested: "TLS" or "DTLS" or their versions,
+     * e.g. "TLSv1", "TLSv1.1", "TLSv1.2", "DTLSv1.0", "DTLSv1.2".
+     */
+    public static final String TESTED_SECURITY_PROTOCOL
+            = System.getProperty("test.security.protocol", "TLS");
+    /**
+     * Test mode: "norm", "norm_sni" or "krb".
+     * Modes "norm" and "norm_sni" are used to run
+     * with all supported non-kerberos ciphers.
+     * Mode "krb" is used to run with kerberos ciphers.
+     */
+    public static final String TEST_MODE
+            = System.getProperty("test.mode", "norm");
+
+    private static final String FS = System.getProperty("file.separator", "/");
+    private static final String PATH_TO_STORES = ".." + FS + "etc";
+    private static final String KEY_STORE_FILE = "keystore";
+    private static final String TRUST_STORE_FILE = "truststore";
+    private static final String PASSWD = "passphrase";
+
+    private static final String KEY_FILE_NAME
+            = System.getProperty("test.src", ".") + FS + PATH_TO_STORES
+            + FS + KEY_STORE_FILE;
+    private static final String TRUST_FILE_NAME
+            = System.getProperty("test.src", ".") + FS + PATH_TO_STORES
+            + FS + TRUST_STORE_FILE;
+
+    private static ByteBuffer net;
+    private static ByteBuffer netReplicatedClient;
+    private static ByteBuffer netReplicatedServer;
+    private static final int MAX_HANDSHAKE_LOOPS = 100;
+    private static final String EXCHANGE_MSG_SENT = "Hello, peer!";
+    private static boolean doUnwrapForNotHandshakingStatus;
+    private static boolean endHandshakeLoop = false;
+    private static final String TEST_SRC = System.getProperty("test.src", ".");
+    private static final String KTAB_FILENAME = "krb5.keytab.data";
+    private static final String KRB_REALM = "TEST.REALM";
+    private static final String KRBTGT_PRINCIPAL = "krbtgt/" + KRB_REALM;
+    private static final String KRB_USER = "USER";
+    private static final String KRB_USER_PASSWORD = "password";
+    private static final String KRB_USER_PRINCIPAL = KRB_USER + "@" + KRB_REALM;
+    private static final String KRB5_CONF_FILENAME = "krb5.conf";
+    private static final String PATH_TO_COMMON = ".." + FS + "TLSCommon";
+    private static final String JAAS_CONF_FILE = PATH_TO_COMMON
+            + FS + "jaas.conf";
+    private static final int DELAY = 1000;
+    private static final String HOST = "localhost";
+    private static final String SERVER_NAME = "service.localhost";
+    private static final String SNI_PATTERN = ".*";
+
+    private static final String[] SUPPORTED_NON_KRB_CIPHERS;
+
+    static {
+        try {
+            String[] allSupportedCiphers = getContext()
+                    .createSSLEngine().getSupportedCipherSuites();
+            List<String> supportedCiphersList = new LinkedList<>();
+            for (String cipher : allSupportedCiphers) {
+                if (!cipher.contains("KRB5")
+                        && !cipher.contains("TLS_EMPTY_RENEGOTIATION_INFO_SCSV")) {
+                    supportedCiphersList.add(cipher);
+                }
+            }
+            SUPPORTED_NON_KRB_CIPHERS = supportedCiphersList.toArray(new String[0]);
+        } catch (Exception ex) {
+            throw new Error("Unexpected issue", ex);
+        }
+    }
+
+    private static final String[] SUPPORTED_NON_KRB_NON_SHA_CIPHERS;
+
+    static {
+        try {
+            String[] allSupportedCiphers = getContext()
+                    .createSSLEngine().getSupportedCipherSuites();
+            List<String> supportedCiphersList = new LinkedList<>();
+            for (String cipher : allSupportedCiphers) {
+                if (!cipher.contains("KRB5")
+                        && !cipher.contains("TLS_EMPTY_RENEGOTIATION_INFO_SCSV")
+                        && !cipher.endsWith("_SHA256")
+                        && !cipher.endsWith("_SHA384")) {
+                    supportedCiphersList.add(cipher);
+                }
+            }
+            SUPPORTED_NON_KRB_NON_SHA_CIPHERS
+                    = supportedCiphersList.toArray(new String[0]);
+        } catch (Exception ex) {
+            throw new Error("Unexpected issue", ex);
+        }
+    }
+
+    private static final String[] SUPPORTED_KRB_CIPHERS;
+
+    static {
+        try {
+            String[] allSupportedCiphers = getContext()
+                    .createSSLEngine().getSupportedCipherSuites();
+            List<String> supportedCiphersList = new LinkedList<>();
+            for (String cipher : allSupportedCiphers) {
+                if (cipher.contains("KRB5")
+                        && !cipher.contains("TLS_EMPTY_RENEGOTIATION_INFO_SCSV")) {
+                    supportedCiphersList.add(cipher);
+                }
+            }
+            SUPPORTED_KRB_CIPHERS = supportedCiphersList.toArray(new String[0]);
+        } catch (Exception ex) {
+            throw new Error("Unexpected issue", ex);
+        }
+    }
+
+    private static final String[] ENABLED_NON_KRB_NOT_ANON_CIPHERS;
+
+    static {
+        try {
+            SSLEngine temporary = getContext().createSSLEngine();
+            temporary.setUseClientMode(true);
+            String[] enabledCiphers = temporary.getEnabledCipherSuites();
+            List<String> enabledCiphersList = new LinkedList<>();
+            for (String cipher : enabledCiphers) {
+                if (!cipher.contains("anon") && !cipher.contains("KRB5")
+                        && !cipher.contains("TLS_EMPTY_RENEGOTIATION_INFO_SCSV")) {
+                    enabledCiphersList.add(cipher);
+                }
+            }
+            ENABLED_NON_KRB_NOT_ANON_CIPHERS = enabledCiphersList.toArray(new String[0]);
+        } catch (Exception ex) {
+            throw new Error("Unexpected issue", ex);
+        }
+    }
+
+    private static final String[] UNSUPPORTED_CIPHERS = {
+            "SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA",
+            "SSL_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA",
+            "SSL_DHE_DSS_WITH_RC4_128_SHA",
+            "SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA",
+            "SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA",
+            "SSL_DH_DSS_WITH_DES_CBC_SHA",
+            "SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA",
+            "SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA",
+            "SSL_DH_RSA_WITH_DES_CBC_SHA",
+            "SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA",
+            "SSL_FORTEZZA_DMS_WITH_NULL_SHA",
+            "SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA",
+            "SSL_RSA_EXPORT1024_WITH_RC4_56_SHA",
+            "SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5",
+            "SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA",
+            "SSL_RSA_FIPS_WITH_DES_CBC_SHA",
+            "TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5",
+            "TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA",
+            "TLS_KRB5_WITH_IDEA_CBC_MD5",
+            "TLS_KRB5_WITH_IDEA_CBC_SHA",
+            "SSL_RSA_WITH_IDEA_CBC_SHA",
+            "TLS_DH_RSA_WITH_AES_128_GCM_SHA256",
+            "TLS_DH_RSA_WITH_AES_256_GCM_SHA384",
+            "TLS_DH_DSS_WITH_AES_128_GCM_SHA256",
+            "TLS_DH_DSS_WITH_AES_256_GCM_SHA384"
+    };
+
+    private final int maxPacketSize;
+
+    /**
+     * Constructs test case with the given MFLN maxMacketSize.
+     *
+     * @param maxPacketSize - MLFN extension max packet size.
+     */
+    public SSLEngineTestCase(int maxPacketSize) {
+        this.maxPacketSize = maxPacketSize;
+    }
+
+    /**
+     * Constructs test case with {@code maxPacketSize = 0}.
+     */
+    public SSLEngineTestCase() {
+        this.maxPacketSize = 0;
+    }
+
+    /**
+     * Wraps data with the specified engine.
+     *
+     * @param engine        - SSLEngine that wraps data.
+     * @param wrapper       - Set wrapper id, e.g. "server" of "client". Used for
+     *                      logging only.
+     * @param maxPacketSize - Max packet size to check that MFLN extension works
+     *                      or zero for no check.
+     * @param app           - Buffer with data to wrap.
+     * @return - Buffer with wrapped data.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static ByteBuffer doWrap(SSLEngine engine, String wrapper,
+                                    int maxPacketSize, ByteBuffer app)
+            throws SSLException {
+        return doWrap(engine, wrapper, maxPacketSize,
+                app, SSLEngineResult.Status.OK, null);
+    }
+
+    /**
+     * Wraps data with the specified engine.
+     *
+     * @param engine        - SSLEngine that wraps data.
+     * @param wrapper       - Set wrapper id, e.g. "server" of "client". Used for
+     *                      logging only.
+     * @param maxPacketSize - Max packet size to check that MFLN extension works
+     *                      or zero for no check.
+     * @param app           - Buffer with data to wrap.
+     * @param result        - Array which first element will be used to output wrap
+     *                      result object.
+     * @return - Buffer with wrapped data.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static ByteBuffer doWrap(SSLEngine engine, String wrapper,
+                                    int maxPacketSize, ByteBuffer app,
+                                    SSLEngineResult[] result)
+            throws SSLException {
+        return doWrap(engine, wrapper, maxPacketSize,
+                app, SSLEngineResult.Status.OK, result);
+    }
+
+    /**
+     * Wraps data with the specified engine.
+     *
+     * @param engine        - SSLEngine that wraps data.
+     * @param wrapper       - Set wrapper id, e.g. "server" of "client". Used for
+     *                      logging only.
+     * @param maxPacketSize - Max packet size to check that MFLN extension works
+     *                      or zero for no check.
+     * @param app           - Buffer with data to wrap.
+     * @param wantedStatus  - Specifies expected result status of wrapping.
+     * @return - Buffer with wrapped data.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static ByteBuffer doWrap(SSLEngine engine, String wrapper,
+                                    int maxPacketSize, ByteBuffer app,
+                                    SSLEngineResult.Status wantedStatus)
+            throws SSLException {
+        return doWrap(engine, wrapper, maxPacketSize,
+                app, wantedStatus, null);
+    }
+
+    /**
+     * Wraps data with the specified engine.
+     *
+     * @param engine        - SSLEngine that wraps data.
+     * @param wrapper       - Set wrapper id, e.g. "server" of "client". Used for
+     *                      logging only.
+     * @param maxPacketSize - Max packet size to check that MFLN extension works
+     *                      or zero for no check.
+     * @param app           - Buffer with data to wrap.
+     * @param wantedStatus  - Specifies expected result status of wrapping.
+     * @param result        - Array which first element will be used to output wrap
+     *                      result object.
+     * @return - Buffer with wrapped data.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static ByteBuffer doWrap(SSLEngine engine, String wrapper,
+                                    int maxPacketSize, ByteBuffer app,
+                                    SSLEngineResult.Status wantedStatus,
+                                    SSLEngineResult[] result)
+            throws SSLException {
+        ByteBuffer net = ByteBuffer.allocate(engine.getSession()
+                .getPacketBufferSize());
+        SSLEngineResult r = engine.wrap(app, net);
+        net.flip();
+        int length = net.remaining();
+        System.out.println(wrapper + " wrapped " + length + " bytes.");
+        System.out.println(wrapper + " handshake status is "
+                + engine.getHandshakeStatus());
+        if (maxPacketSize < length && maxPacketSize != 0) {
+            throw new AssertionError("Handshake wrapped net buffer length "
+                    + length + " exceeds maximum packet size "
+                    + maxPacketSize);
+        }
+        checkResult(r, wantedStatus);
+        if (result != null && result.length > 0) {
+            result[0] = r;
+        }
+        return net;
+    }
+
+    /**
+     * Unwraps data with the specified engine.
+     *
+     * @param engine    - SSLEngine that unwraps data.
+     * @param unwrapper - Set unwrapper id, e.g. "server" of "client". Used for
+     *                  logging only.
+     * @param net       - Buffer with data to unwrap.
+     * @return - Buffer with unwrapped data.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static ByteBuffer doUnWrap(SSLEngine engine, String unwrapper,
+                                      ByteBuffer net)
+            throws SSLException {
+        return doUnWrap(engine, unwrapper, net, SSLEngineResult.Status.OK, null);
+    }
+
+    /**
+     * Unwraps data with the specified engine.
+     *
+     * @param engine    - SSLEngine that unwraps data.
+     * @param unwrapper - Set unwrapper id, e.g. "server" of "client". Used for
+     *                  logging only.
+     * @param net       - Buffer with data to unwrap.
+     * @param result    - Array which first element will be used to output wrap
+     *                  result object.
+     * @return - Buffer with unwrapped data.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static ByteBuffer doUnWrap(SSLEngine engine, String unwrapper,
+                                      ByteBuffer net, SSLEngineResult[] result)
+            throws SSLException {
+        return doUnWrap(engine, unwrapper, net, SSLEngineResult.Status.OK, result);
+    }
+
+    /**
+     * Unwraps data with the specified engine.
+     *
+     * @param engine       - SSLEngine that unwraps data.
+     * @param unwrapper    - Set unwrapper id, e.g. "server" of "client". Used for
+     *                     logging only.
+     * @param net          - Buffer with data to unwrap.
+     * @param wantedStatus - Specifies expected result status of wrapping.
+     * @return - Buffer with unwrapped data.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static ByteBuffer doUnWrap(SSLEngine engine, String unwrapper,
+                                      ByteBuffer net,
+                                      SSLEngineResult.Status wantedStatus)
+            throws SSLException {
+        return doUnWrap(engine, unwrapper, net, wantedStatus, null);
+    }
+
+    /**
+     * Unwraps data with the specified engine.
+     *
+     * @param engine       - SSLEngine that unwraps data.
+     * @param unwrapper    - Set unwrapper id, e.g. "server" of "client". Used for
+     *                     logging only.
+     * @param net          - Buffer with data to unwrap.
+     * @param wantedStatus - Specifies expected result status of wrapping.
+     * @param result       - Array which first element will be used to output wrap
+     *                     result object.
+     * @return - Buffer with unwrapped data.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static ByteBuffer doUnWrap(SSLEngine engine, String unwrapper,
+                                      ByteBuffer net,
+                                      SSLEngineResult.Status wantedStatus,
+                                      SSLEngineResult[] result)
+            throws SSLException {
+        ByteBuffer app = ByteBuffer.allocate(engine.getSession()
+                .getApplicationBufferSize());
+        int length = net.remaining();
+        System.out.println(unwrapper + " unwrapping "
+                + length + " bytes...");
+        SSLEngineResult r = engine.unwrap(net, app);
+        app.flip();
+        System.out.println(unwrapper + " handshake status is "
+                + engine.getHandshakeStatus());
+        checkResult(r, wantedStatus);
+        if (result != null && result.length > 0) {
+            result[0] = r;
+        }
+        return app;
+    }
+
+    /**
+     * Does the handshake of the two specified engines according to the
+     * {@code mode} specified.
+     *
+     * @param clientEngine  - Client SSLEngine.
+     * @param serverEngine  - Server SSLEngine.
+     * @param maxPacketSize - Maximum packet size for MFLN of zero for no limit.
+     * @param mode          - Handshake mode according to {@link HandshakeMode} enum.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static void doHandshake(SSLEngine clientEngine,
+                                   SSLEngine serverEngine,
+                                   int maxPacketSize, HandshakeMode mode)
+            throws SSLException {
+        doHandshake(clientEngine, serverEngine, maxPacketSize, mode, false);
+    }
+
+    /**
+     * Does the handshake of the two specified engines according to the
+     * {@code mode} specified.
+     *
+     * @param clientEngine          - Client SSLEngine.
+     * @param serverEngine          - Server SSLEngine.
+     * @param maxPacketSize         - Maximum packet size for MFLN of zero for no limit.
+     * @param mode                  - Handshake mode according to {@link HandshakeMode} enum.
+     * @param enableReplicatedPacks - Set {@code true} to enable replicated
+     *                              packet sending.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static void doHandshake(SSLEngine clientEngine,
+                                   SSLEngine serverEngine, int maxPacketSize,
+                                   HandshakeMode mode,
+                                   boolean enableReplicatedPacks)
+            throws SSLException {
+        System.out.println("================================================="
+                + "===========");
+        System.out.println("Starting handshake " + mode.name());
+        int loop = 0;
+        if (maxPacketSize < 0) {
+            throw new Error("Test issue: maxPacketSize is less than zero!");
+        }
+        SSLParameters params = clientEngine.getSSLParameters();
+        params.setMaximumPacketSize(maxPacketSize);
+        clientEngine.setSSLParameters(params);
+        params = serverEngine.getSSLParameters();
+        params.setMaximumPacketSize(maxPacketSize);
+        serverEngine.setSSLParameters(params);
+        SSLEngine firstEngine;
+        SSLEngine secondEngine;
+        switch (mode) {
+            case INITIAL_HANDSHAKE:
+                firstEngine = clientEngine;
+                secondEngine = serverEngine;
+                doUnwrapForNotHandshakingStatus = false;
+                clientEngine.beginHandshake();
+                serverEngine.beginHandshake();
+                break;
+            case REHANDSHAKE_BEGIN_CLIENT:
+                firstEngine = clientEngine;
+                secondEngine = serverEngine;
+                doUnwrapForNotHandshakingStatus = true;
+                clientEngine.beginHandshake();
+                break;
+            case REHANDSHAKE_BEGIN_SERVER:
+                firstEngine = serverEngine;
+                secondEngine = clientEngine;
+                doUnwrapForNotHandshakingStatus = true;
+                serverEngine.beginHandshake();
+                break;
+            default:
+                throw new Error("Test issue: unknown handshake mode");
+        }
+        endHandshakeLoop = false;
+        while (!endHandshakeLoop) {
+            if (++loop > MAX_HANDSHAKE_LOOPS) {
+                throw new Error("Too much loops for handshaking");
+            }
+            System.out.println("==============================================");
+            System.out.println("Handshake loop " + loop);
+            SSLEngineResult.HandshakeStatus clientHSStatus
+                    = clientEngine.getHandshakeStatus();
+            SSLEngineResult.HandshakeStatus serverHSStatus
+                    = serverEngine.getHandshakeStatus();
+            System.out.println("Client handshake status "
+                    + clientHSStatus.name());
+            System.out.println("Server handshake status "
+                    + serverHSStatus.name());
+            handshakeProcess(firstEngine, secondEngine, maxPacketSize,
+                    enableReplicatedPacks);
+            handshakeProcess(secondEngine, firstEngine, maxPacketSize,
+                    enableReplicatedPacks);
+        }
+    }
+
+    /**
+     * Routine to send application data from one SSLEngine to another.
+     *
+     * @param fromEngine - Sending engine.
+     * @param toEngine   - Receiving engine.
+     * @return - Result of unwrap method of the receiving engine.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static SSLEngineResult sendApplicationData(SSLEngine fromEngine,
+                                                      SSLEngine toEngine)
+            throws SSLException {
+        String sender = null;
+        String reciever = null;
+        String excMsgSent = EXCHANGE_MSG_SENT;
+        if (fromEngine.getUseClientMode() && !toEngine.getUseClientMode()) {
+            sender = "Client";
+            reciever = "Server";
+            excMsgSent += " Client.";
+        } else if (toEngine.getUseClientMode() && !fromEngine.getUseClientMode()) {
+            sender = "Server";
+            reciever = "Client";
+            excMsgSent += " Server.";
+        } else {
+            throw new Error("Test issue: both engines are in the same mode");
+        }
+        System.out.println("================================================="
+                + "===========");
+        System.out.println("Trying to send application data from " + sender
+                + " to " + reciever);
+        ByteBuffer clientAppSent
+                = ByteBuffer.wrap(excMsgSent.getBytes());
+        net = doWrap(fromEngine, sender, 0, clientAppSent);
+        SSLEngineResult[] r = new SSLEngineResult[1];
+        ByteBuffer serverAppRecv = doUnWrap(toEngine, reciever, net, r);
+        byte[] serverAppRecvTrunc = Arrays.copyOf(serverAppRecv.array(),
+                serverAppRecv.limit());
+        String msgRecv = new String(serverAppRecvTrunc);
+        if (!msgRecv.equals(excMsgSent)) {
+            throw new AssertionError(sender + " to " + reciever
+                    + ": application data"
+                    + " has been altered while sending."
+                    + " Message sent: " + "\"" + excMsgSent + "\"."
+                    + " Message recieved: " + "\"" + msgRecv + "\".");
+        }
+        System.out.println("Successful sending application data from " + sender
+                + " to " + reciever);
+        return r[0];
+    }
+
+    /**
+     * Close engines by sending "close outbound" message from one SSLEngine to
+     * another.
+     *
+     * @param fromEngine - Sending engine.
+     * @param toEngine   - Receiving engine.
+     * @throws SSLException - thrown on engine errors.
+     */
+    public static void closeEngines(SSLEngine fromEngine,
+                                    SSLEngine toEngine) throws SSLException {
+        String from = null;
+        String to = null;
+        ByteBuffer app;
+        if (fromEngine.getUseClientMode() && !toEngine.getUseClientMode()) {
+            from = "Client";
+            to = "Server";
+        } else if (toEngine.getUseClientMode() && !fromEngine.getUseClientMode()) {
+            from = "Server";
+            to = "Client";
+        } else {
+            throw new Error("Both engines are in the same mode");
+        }
+        System.out.println("=========================================================");
+        System.out.println("Trying to close engines from " + from + " to " + to);
+        // Sending close outbound request to peer
+        fromEngine.closeOutbound();
+        app = ByteBuffer.allocate(fromEngine.getSession().getApplicationBufferSize());
+        net = doWrap(fromEngine, from, 0, app, SSLEngineResult.Status.CLOSED);
+        doUnWrap(toEngine, to, net, SSLEngineResult.Status.CLOSED);
+        app = ByteBuffer.allocate(fromEngine.getSession().getApplicationBufferSize());
+        net = doWrap(toEngine, to, 0, app, SSLEngineResult.Status.CLOSED);
+        doUnWrap(fromEngine, from, net, SSLEngineResult.Status.CLOSED);
+        if (!toEngine.isInboundDone()) {
+            throw new AssertionError(from + " sent close request to " + to
+                    + ", but " + to + "did not close inbound.");
+        }
+        // Executing close inbound
+        fromEngine.closeInbound();
+        app = ByteBuffer.allocate(fromEngine.getSession().getApplicationBufferSize());
+        net = doWrap(fromEngine, from, 0, app, SSLEngineResult.Status.CLOSED);
+        doUnWrap(toEngine, to, net, SSLEngineResult.Status.CLOSED);
+        if (!toEngine.isOutboundDone()) {
+            throw new AssertionError(from + "sent close request to " + to
+                    + ", but " + to + "did not close outbound.");
+        }
+        System.out.println("Successful closing from " + from + " to " + to);
+    }
+
+    /**
+     * Runs the same test case for all given {@code ciphers}. Method counts all
+     * failures and throws {@code AssertionError} if one or more tests fail.
+     *
+     * @param ciphers - Ciphers that should be tested.
+     */
+    public void runTests(Ciphers ciphers) {
+        int total = ciphers.ciphers.length;
+        int failed = testSomeCiphers(ciphers);
+        if (failed > 0) {
+            throw new AssertionError("" + failed + " of " + total
+                    + " tests failed!");
+        }
+        System.out.println("All tests passed!");
+    }
+
+    /**
+     * Runs test cases for ciphers defined by the test mode.
+     */
+    public void runTests() {
+        switch (TEST_MODE) {
+            case "norm":
+            case "norm_sni":
+                switch (TESTED_SECURITY_PROTOCOL) {
+                    case "DTLSv1.0":
+                    case "TLSv1":
+                    case "TLSv1.1":
+                        runTests(Ciphers.SUPPORTED_NON_KRB_NON_SHA_CIPHERS);
+                        break;
+                    default:
+                        runTests(Ciphers.SUPPORTED_NON_KRB_CIPHERS);
+                }
+                break;
+            case "krb":
+                runTests(Ciphers.SUPPORTED_KRB_CIPHERS);
+                break;
+            default:
+                throw new Error("Test error: unexpected test mode: " + TEST_MODE);
+        }
+    }
+
+    /**
+     * Returns maxPacketSize value used for MFLN extension testing
+     *
+     * @return - MLFN extension max packet size.
+     */
+    public int getMaxPacketSize() {
+        return maxPacketSize;
+    }
+
+    /**
+     * Checks that status of result {@code r} is {@code wantedStatus}.
+     *
+     * @param r            - Result.
+     * @param wantedStatus - Wanted status of the result.
+     * @throws AssertionError - if status or {@code r} is not
+     *                        {@code wantedStatus}.
+     */
+    public static void checkResult(SSLEngineResult r,
+                                   SSLEngineResult.Status wantedStatus) {
+        SSLEngineResult.Status rs = r.getStatus();
+        if (!rs.equals(wantedStatus)) {
+            throw new AssertionError("Unexpected status " + rs.name()
+                    + ", should be " + wantedStatus.name());
+        }
+    }
+
+    /**
+     * Returns SSLContext with TESTED_SECURITY_PROTOCOL protocol and sets up keys.
+     *
+     * @return - SSLContext with a protocol specified by TESTED_SECURITY_PROTOCOL.
+     */
+    public static SSLContext getContext() {
+        try {
+            KeyStore ks = KeyStore.getInstance("JKS");
+            KeyStore ts = KeyStore.getInstance("JKS");
+            char[] passphrase = PASSWD.toCharArray();
+            try (FileInputStream keyFileStream = new FileInputStream(KEY_FILE_NAME)) {
+                ks.load(keyFileStream, passphrase);
+            }
+            try (FileInputStream trustFileStream = new FileInputStream(TRUST_FILE_NAME)) {
+                ts.load(trustFileStream, passphrase);
+            }
+            KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+            kmf.init(ks, passphrase);
+            TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
+            tmf.init(ts);
+            SSLContext sslCtx = SSLContext.getInstance(TESTED_SECURITY_PROTOCOL);
+            sslCtx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+            return sslCtx;
+        } catch (KeyStoreException | IOException | NoSuchAlgorithmException |
+                CertificateException | UnrecoverableKeyException |
+                KeyManagementException ex) {
+            throw new Error("Unexpected exception", ex);
+        }
+    }
+
+    /**
+     * Sets up and starts kerberos KDC server.
+     */
+    public static void setUpAndStartKDC() {
+        String servicePrincipal = "host/" + SERVER_NAME + "@" + KRB_REALM;
+        Map<String, String> principals = new HashMap<>();
+        principals.put(KRB_USER_PRINCIPAL, KRB_USER_PASSWORD);
+        principals.put(KRBTGT_PRINCIPAL, null);
+        principals.put(servicePrincipal, null);
+        System.setProperty("java.security.krb5.conf", KRB5_CONF_FILENAME);
+        startKDC(KRB_REALM, principals, KTAB_FILENAME);
+        System.setProperty("java.security.auth.login.config",
+                TEST_SRC + FS + JAAS_CONF_FILE);
+        System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
+    }
+
+    /**
+     * Sets up and starts kerberos KDC server if SSLEngineTestCase.TEST_MODE is "krb".
+     */
+    public static void setUpAndStartKDCIfNeeded() {
+        if (TEST_MODE.equals("krb")) {
+            setUpAndStartKDC();
+        }
+    }
+
+    /**
+     * Returns client ssl engine.
+     *
+     * @param context - SSLContext to get SSLEngine from.
+     * @param useSNI  - flag used to enable or disable using SNI extension.
+     *                Needed for Kerberos.
+     */
+    public static SSLEngine getClientSSLEngine(SSLContext context, boolean useSNI) {
+        SSLEngine clientEngine = context.createSSLEngine(HOST, 80);
+        clientEngine.setUseClientMode(true);
+        if (useSNI) {
+            SNIHostName serverName = new SNIHostName(SERVER_NAME);
+            List<SNIServerName> serverNames = new ArrayList<>();
+            serverNames.add(serverName);
+            SSLParameters params = clientEngine.getSSLParameters();
+            params.setServerNames(serverNames);
+            clientEngine.setSSLParameters(params);
+        }
+        return clientEngine;
+    }
+
+    /**
+     * Returns server ssl engine.
+     *
+     * @param context - SSLContext to get SSLEngine from.
+     * @param useSNI  - flag used to enable or disable using SNI extension.
+     *                Needed for Kerberos.
+     */
+    public static SSLEngine getServerSSLEngine(SSLContext context, boolean useSNI) {
+        SSLEngine serverEngine = context.createSSLEngine();
+        serverEngine.setUseClientMode(false);
+        if (useSNI) {
+            SNIMatcher matcher = SNIHostName.createSNIMatcher(SNI_PATTERN);
+            List<SNIMatcher> matchers = new ArrayList<>();
+            matchers.add(matcher);
+            SSLParameters params = serverEngine.getSSLParameters();
+            params.setSNIMatchers(matchers);
+            serverEngine.setSSLParameters(params);
+        }
+        return serverEngine;
+    }
+
+    /**
+     * Runs the test case for one cipher suite.
+     *
+     * @param cipher - Cipher suite name.
+     * @throws SSLException - If tests fails.
+     */
+    abstract protected void testOneCipher(String cipher)
+            throws SSLException;
+
+    /**
+     * Iterates through an array of ciphers and runs the same test case for
+     * every entry.
+     *
+     * @param ciphers - Array of cipher names.
+     * @return - Number of tests failed.
+     */
+    protected int testSomeCiphers(Ciphers ciphers) {
+        int failedNum = 0;
+        String description = ciphers.description;
+        System.out.println("==================================================="
+                + "=========");
+        System.out.println(description + " ciphers testing");
+        System.out.println("==================================================="
+                + "=========");
+        for (String cs : ciphers.ciphers) {
+            System.out.println("-----------------------------------------------"
+                    + "-------------");
+            System.out.println("Testing cipher suite " + cs);
+            System.out.println("-----------------------------------------------"
+                    + "-------------");
+            Throwable error = null;
+            try {
+                testOneCipher(cs);
+            } catch (Throwable t) {
+                error = t;
+            }
+            switch (ciphers) {
+                case SUPPORTED_NON_KRB_CIPHERS:
+                case SUPPORTED_NON_KRB_NON_SHA_CIPHERS:
+                case SUPPORTED_KRB_CIPHERS:
+                case ENABLED_NON_KRB_NOT_ANON_CIPHERS:
+                    if (error != null) {
+                        System.out.println("Test Failed: " + cs);
+                        System.err.println("Test Exception for " + cs);
+                        error.printStackTrace();
+                        failedNum++;
+                    } else {
+                        System.out.println("Test Passed: " + cs);
+                    }
+                    break;
+                case UNSUPPORTED_CIPHERS:
+                    if (error == null) {
+                        System.out.println("Test Failed: " + cs);
+                        System.err.println("Test for " + cs + " should have thrown"
+                                + " IllegalArgumentException, but it has not!");
+                        failedNum++;
+                    } else if (!(error instanceof IllegalArgumentException)) {
+                        System.out.println("Test Failed: " + cs);
+                        System.err.println("Test Exception for " + cs);
+                        error.printStackTrace();
+                        failedNum++;
+                    } else {
+                        System.out.println("Test Passed: " + cs);
+                    }
+                    break;
+                default:
+                    throw new Error("Test issue: unexpected ciphers: "
+                            + ciphers.name());
+            }
+        }
+        return failedNum;
+    }
+
+    /**
+     * Method used for the handshake routine.
+     *
+     * @param wrapingEngine         - Engine that is expected to wrap data.
+     * @param unwrapingEngine       - Engine that is expected to unwrap data.
+     * @param maxPacketSize         - Maximum packet size for MFLN of zero for no limit.
+     * @param enableReplicatedPacks - Set {@code true} to enable replicated
+     *                              packet sending.
+     * @throws SSLException - thrown on engine errors.
+     */
+    private static void handshakeProcess(SSLEngine wrapingEngine,
+                                         SSLEngine unwrapingEngine,
+                                         int maxPacketSize,
+                                         boolean enableReplicatedPacks)
+            throws SSLException {
+        SSLEngineResult.HandshakeStatus wrapingHSStatus = wrapingEngine
+                .getHandshakeStatus();
+        SSLEngineResult.HandshakeStatus unwrapingHSStatus = unwrapingEngine
+                .getHandshakeStatus();
+        SSLEngineResult r;
+        String wrapper, unwrapper;
+        if (wrapingEngine.getUseClientMode()
+                && !unwrapingEngine.getUseClientMode()) {
+            wrapper = "Client";
+            unwrapper = "Server";
+        } else if (unwrapingEngine.getUseClientMode()
+                && !wrapingEngine.getUseClientMode()) {
+            wrapper = "Server";
+            unwrapper = "Client";
+        } else {
+            throw new Error("Both engines are in the same mode");
+        }
+        switch (wrapingHSStatus) {
+            case NEED_WRAP:
+                if (enableReplicatedPacks) {
+                    if (net != null) {
+                        net.flip();
+                        if (net.remaining() != 0) {
+                            if (wrapingEngine.getUseClientMode()) {
+                                netReplicatedServer = net;
+                            } else {
+                                netReplicatedClient = net;
+                            }
+                        }
+                    }
+                }
+                ByteBuffer app = ByteBuffer.allocate(wrapingEngine.getSession()
+                        .getApplicationBufferSize());
+                net = doWrap(wrapingEngine, wrapper, maxPacketSize, app);
+            case NOT_HANDSHAKING:
+                switch (unwrapingHSStatus) {
+                    case NEED_TASK:
+                        runDelegatedTasks(unwrapingEngine);
+                    case NEED_UNWRAP:
+                        doUnWrap(unwrapingEngine, unwrapper, net);
+                        if (enableReplicatedPacks) {
+                            System.out.println("Unwrapping replicated packet...");
+                            if (unwrapingEngine.getHandshakeStatus()
+                                    .equals(SSLEngineResult.HandshakeStatus.NEED_TASK)) {
+                                runDelegatedTasks(unwrapingEngine);
+                            }
+                            runDelegatedTasks(unwrapingEngine);
+                            ByteBuffer netReplicated;
+                            if (unwrapingEngine.getUseClientMode()) {
+                                netReplicated = netReplicatedClient;
+                            } else {
+                                netReplicated = netReplicatedServer;
+                            }
+                            if (netReplicated != null) {
+                                doUnWrap(unwrapingEngine, unwrapper, netReplicated);
+                            } else {
+                                net.flip();
+                                doUnWrap(unwrapingEngine, unwrapper, net);
+                            }
+                        }
+                        break;
+                    case NEED_UNWRAP_AGAIN:
+                        break;
+                    case NOT_HANDSHAKING:
+                        if (doUnwrapForNotHandshakingStatus) {
+                            doUnWrap(unwrapingEngine, unwrapper, net);
+                            doUnwrapForNotHandshakingStatus = false;
+                            break;
+                        } else {
+                            endHandshakeLoop = true;
+                        }
+                        break;
+                    default:
+                        throw new Error("Unexpected unwraping engine handshake status "
+                                + unwrapingHSStatus.name());
+                }
+                break;
+            case NEED_UNWRAP:
+                break;
+            case NEED_UNWRAP_AGAIN:
+                net.flip();
+                doUnWrap(wrapingEngine, wrapper, net);
+                break;
+            case NEED_TASK:
+                runDelegatedTasks(wrapingEngine);
+                break;
+            default:
+                throw new Error("Unexpected wraping engine handshake status "
+                        + wrapingHSStatus.name());
+        }
+    }
+
+    private static void runDelegatedTasks(SSLEngine engine) {
+        Runnable runnable;
+        System.out.println("Running delegated tasks...");
+        while ((runnable = engine.getDelegatedTask()) != null) {
+            runnable.run();
+        }
+        SSLEngineResult.HandshakeStatus hs = engine.getHandshakeStatus();
+        if (hs == SSLEngineResult.HandshakeStatus.NEED_TASK) {
+            throw new Error("Handshake shouldn't need additional tasks.");
+        }
+    }
+
+    /**
+     * Start a KDC server:
+     * - create a KDC instance
+     * - create Kerberos principals
+     * - save Kerberos configuration
+     * - save keys to keytab file
+     * - no pre-auth is required
+     */
+    private static void startKDC(String realm, Map<String, String> principals,
+                                 String ktab) {
+        try {
+            KDC kdc = KDC.create(realm, HOST, 0, true);
+            kdc.setOption(KDC.Option.PREAUTH_REQUIRED, Boolean.FALSE);
+            if (principals != null) {
+                principals.entrySet().stream().forEach((entry) -> {
+                    String name = entry.getKey();
+                    String password = entry.getValue();
+                    if (password == null || password.isEmpty()) {
+                        System.out.println("KDC: add a principal '" + name
+                                + "' with a random password");
+                        kdc.addPrincipalRandKey(name);
+                    } else {
+                        System.out.println("KDC: add a principal '" + name
+                                + "' with '" + password + "' password");
+                        kdc.addPrincipal(name, password.toCharArray());
+                    }
+                });
+            }
+            KDC.saveConfig(KRB5_CONF_FILENAME, kdc);
+            if (ktab != null) {
+                File ktabFile = new File(ktab);
+                if (ktabFile.exists()) {
+                    System.out.println("KDC: append keys to an exising "
+                            + "keytab file " + ktab);
+                    kdc.appendKtab(ktab);
+                } else {
+                    System.out.println("KDC: create a new keytab file "
+                            + ktab);
+                    kdc.writeKtab(ktab);
+                }
+            }
+            System.out.println("KDC: started on " + HOST + ":" + kdc.getPort()
+                    + " with '" + realm + "' realm");
+        } catch (Exception e) {
+            throw new RuntimeException("KDC: unexpected exception", e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/UnSupportedCiphersTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+
+/**
+ * Testing that try to enable unsupported ciphers causes IllegalArgumentException.
+ */
+public class UnSupportedCiphersTest extends SSLEngineTestCase {
+
+    public static void main(String[] s) {
+        UnSupportedCiphersTest test = new UnSupportedCiphersTest();
+        test.runTests(Ciphers.UNSUPPORTED_CIPHERS);
+    }
+
+    @Override
+    protected void testOneCipher(String cipher) {
+        unsupTest(cipher, true);
+        unsupTest(cipher, false);
+    }
+
+    private void unsupTest(String cipher, boolean clientTest) {
+        SSLContext context = getContext();
+        SSLEngine clientEngine = context.createSSLEngine();
+        clientEngine.setUseClientMode(true);
+        SSLEngine serverEngine = context.createSSLEngine();
+        serverEngine.setUseClientMode(false);
+        if (clientTest) {
+            clientEngine.setEnabledCipherSuites(new String[]{cipher});
+        } else {
+            serverEngine.setEnabledCipherSuites(new String[]{cipher});
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSCommon/jaas.conf	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,17 @@
+com.sun.net.ssl.client {
+    com.sun.security.auth.module.Krb5LoginModule required
+    principal="USER@TEST.REALM"
+    doNotPrompt=true
+    useKeyTab=true
+    keyTab="krb5.keytab.data";
+};
+
+com.sun.net.ssl.server {
+    com.sun.security.auth.module.Krb5LoginModule required
+    principal="host/service.localhost@TEST.REALM"
+    isInitiator=false
+    useKeyTab=true
+    keyTab="krb5.keytab.data"
+    storeKey=true;
+};
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/auto/Addresses.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8031111
+ * @summary fix krb5 caddr
+ * @compile -XDignore.symbol.file Addresses.java
+ * @run main/othervm Addresses
+ */
+
+import sun.security.krb5.Config;
+
+import javax.security.auth.kerberos.KerberosTicket;
+import java.net.Inet4Address;
+import java.net.InetAddress;
+
+public class Addresses {
+
+    public static void main(String[] args) throws Exception {
+
+        KDC.saveConfig(OneKDC.KRB5_CONF, new OneKDC(null),
+                "noaddresses = false",
+                "extra_addresses = 10.0.0.10, 10.0.0.11 10.0.0.12");
+        Config.refresh();
+
+        KerberosTicket ticket =
+                Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false)
+                        .s().getPrivateCredentials(KerberosTicket.class)
+                        .iterator().next();
+
+        InetAddress loopback = InetAddress.getLoopbackAddress();
+        InetAddress extra1 = InetAddress.getByName("10.0.0.10");
+        InetAddress extra2 = InetAddress.getByName("10.0.0.11");
+        InetAddress extra3 = InetAddress.getByName("10.0.0.12");
+
+        boolean loopbackFound = false;
+        boolean extra1Found = false;
+        boolean extra2Found = false;
+        boolean extra3Found = false;
+        boolean networkFound = false;
+
+        for (InetAddress ia: ticket.getClientAddresses()) {
+            System.out.println(ia);
+            if (ia.equals(loopback)) {
+                loopbackFound = true;
+                System.out.println("  loopback found");
+            } else if (ia.equals(extra1)) {
+                extra1Found = true;
+                System.out.println("  extra1 found");
+            } else if (ia.equals(extra2)) {
+                extra2Found = true;
+                System.out.println("  extra2 found");
+            } else if (ia.equals(extra3)) {
+                extra3Found = true;
+                System.out.println("  extra3 found");
+            } else if (ia instanceof Inet4Address) {
+                networkFound = true;
+                System.out.println("  another address (" + ia +
+                        "), assumed real network");
+            }
+        }
+
+        if (!loopbackFound || !networkFound
+                || !extra1Found || !extra2Found || !extra3Found ) {
+            throw new Exception();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/auto/Forwarded.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8031111
+ * @summary fix krb5 caddr
+ * @compile -XDignore.symbol.file Forwarded.java
+ * @run main/othervm Forwarded
+ */
+
+import sun.security.jgss.GSSUtil;
+import sun.security.krb5.internal.KDCOptions;
+import sun.security.krb5.internal.KDCReqBody;
+import sun.security.krb5.internal.TGSReq;
+
+public class Forwarded {
+
+    public static void main(String[] args) throws Exception {
+
+        new OneKDC(null).setOption(KDC.Option.CHECK_ADDRESSES, true);
+
+        Context c;
+        c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false);
+
+        c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID);
+        c.x().requestCredDeleg(true);
+
+        c.take(new byte[0]);
+    }
+}
--- a/jdk/test/sun/security/krb5/auto/KDC.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/sun/security/krb5/auto/KDC.java	Mon Jun 08 11:31:09 2015 -0700
@@ -205,6 +205,10 @@
          * Sensitive accounts can never be delegated.
          */
         SENSITIVE_ACCOUNTS,
+        /**
+         * If true, will check if TGS-REQ contains a non-null addresses field.
+         */
+        CHECK_ADDRESSES,
     };
 
     static {
@@ -734,6 +738,11 @@
                     bFlags[Krb5.TKT_OPTS_FORWARDABLE] = true;
                 }
             }
+            if (options.containsKey(Option.CHECK_ADDRESSES)
+                    && body.kdcOptions.get(KDCOptions.FORWARDED)
+                    && body.addresses == null) {
+                throw new KrbException(Krb5.KDC_ERR_BADOPTION);
+            }
             if (body.kdcOptions.get(KDCOptions.FORWARDED) ||
                     etp.flags.get(Krb5.TKT_OPTS_FORWARDED)) {
                 bFlags[Krb5.TKT_OPTS_FORWARDED] = true;
@@ -800,10 +809,8 @@
                     new KerberosTime(new Date()),
                     body.from,
                     till, body.rtime,
-                    body.addresses != null  // always set caddr
-                            ? body.addresses
-                            : new HostAddresses(
-                                new InetAddress[]{InetAddress.getLocalHost()}),
+                    body.addresses != null ? body.addresses
+                            : etp.caddr,
                     null);
             EncryptionKey skey = keyForUser(service, e3, true);
             if (skey == null) {
@@ -826,10 +833,7 @@
                     body.from,
                     till, body.rtime,
                     service,
-                    body.addresses != null  // always set caddr
-                            ? body.addresses
-                            : new HostAddresses(
-                                new InetAddress[]{InetAddress.getLocalHost()})
+                    body.addresses
                     );
             EncryptedData edata = new EncryptedData(ckey, enc_part.asn1Encode(), KeyUsage.KU_ENC_TGS_REP_PART_SESSKEY);
             TGSRep tgsRep = new TGSRep(null,
--- a/jdk/test/sun/security/krb5/auto/MSOID2.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/sun/security/krb5/auto/MSOID2.java	Mon Jun 08 11:31:09 2015 -0700
@@ -68,7 +68,14 @@
                 nt[0x1d] = (byte)0x82;  // change the 1st to MS OID
                 // Length bytes to be tweaked
                 for (int pos: new int[] {3, 0xf, 0x13, 0x15, 0x17}) {
-                    nt[pos] = (byte)(nt[pos] + 11);
+                    int newLen = (nt[pos]&0xff) + 11;
+                    // The length byte at nt[pos] might overflow. It's
+                    // unlikely for nt[pos-1] to overflow, which means the size
+                    // of token is bigger than 65535.
+                    if (newLen >= 256) {
+                        nt[pos-1] = (byte)(nt[pos-1] + 1);
+                    }
+                    nt[pos] = (byte)newLen;
                 }
                 t = nt;
                 new sun.misc.HexDumpEncoder().encodeBuffer(t, System.out);
--- a/jdk/test/sun/text/resources/LocaleData	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/sun/text/resources/LocaleData	Mon Jun 08 11:31:09 2015 -0700
@@ -5414,11 +5414,13 @@
 FormatData/en_SG/TimePatterns/1=h:mm:ss a z
 FormatData/en_SG/TimePatterns/2=h:mm:ss a
 FormatData/en_SG/TimePatterns/3=h:mm a
-FormatData/en_SG/DatePatterns/0=EEEE, MMMM d, yyyy
-FormatData/en_SG/DatePatterns/1=MMMM d, yyyy
-FormatData/en_SG/DatePatterns/2=MMM d, yyyy
-FormatData/en_SG/DatePatterns/3=M/d/yy
 FormatData/en_SG/DateTimePatterns/0={1} {0}
+# bug# 8080774
+# Day should precede month for all date formats in en_SG - CLDR 27.0.0
+FormatData/en_SG/DatePatterns/0=EEEE, d MMMM, yyyy
+FormatData/en_SG/DatePatterns/1=d MMMM, yyyy
+FormatData/en_SG/DatePatterns/2=d MMM, yyyy
+FormatData/en_SG/DatePatterns/3=d/M/yy
 # Use approved data
 FormatData/ms/Eras/0=BCE
 FormatData/ms/Eras/1=CE
--- a/jdk/test/sun/text/resources/LocaleDataTest.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/jdk/test/sun/text/resources/LocaleDataTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -36,7 +36,7 @@
  *      6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
  *      7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
  *      7114053 7074882 7040556 8013836 8021121 6192407 6931564 8027695 8017142
- *      8037343 8055222 8042126 8074791 8075173
+ *      8037343 8055222 8042126 8074791 8075173 8080774
  * @summary Verify locale data
  *
  */
--- a/langtools/.hgtags	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/.hgtags	Mon Jun 08 11:31:09 2015 -0700
@@ -309,3 +309,4 @@
 809d66512998789b620d08c335d7c31211a0cf29 jdk9-b64
 4fcf722b811406a7db8f206d88446c82cda1b5f4 jdk9-b65
 fd6bda430d96fc5ab421161de016412f2ddd9082 jdk9-b66
+fd782cd69b0497299269952d30a6b88cad960fcf jdk9-b67
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -407,12 +407,11 @@
             }
         }
 
-        /** Remove symbol from this scope.  Used when an inner class
-         *  attribute tells us that the class isn't a package member.
+        /** Remove symbol from this scope.
          */
         public void remove(Symbol sym) {
             Assert.check(shared == 0);
-            Entry e = lookup(sym.name);
+            Entry e = lookup(sym.name, candidate -> candidate == sym);
             if (e.scope == null) return;
 
             // remove e from table and shadowed list;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Mon Jun 08 11:31:09 2015 -0700
@@ -2659,73 +2659,92 @@
     // </editor-fold>
 
     // <editor-fold defaultstate="collapsed" desc="compute transitive closure of all members in given site">
-    class MembersClosureCache extends SimpleVisitor<CompoundScope, Boolean> {
-
-        private WeakHashMap<TypeSymbol, Entry> _map = new WeakHashMap<>();
-
-        class Entry {
-            final boolean skipInterfaces;
-            final CompoundScope compoundScope;
-
-            public Entry(boolean skipInterfaces, CompoundScope compoundScope) {
-                this.skipInterfaces = skipInterfaces;
-                this.compoundScope = compoundScope;
+    class MembersClosureCache extends SimpleVisitor<Scope.CompoundScope, Void> {
+
+        private Map<TypeSymbol, CompoundScope> _map = new HashMap<>();
+
+        Set<TypeSymbol> seenTypes = new HashSet<>();
+
+        class MembersScope extends CompoundScope {
+
+            CompoundScope scope;
+
+            public MembersScope(CompoundScope scope) {
+                super(scope.owner);
+                this.scope = scope;
             }
 
-            boolean matches(boolean skipInterfaces) {
-                return this.skipInterfaces == skipInterfaces;
+            Filter<Symbol> combine(Filter<Symbol> sf) {
+                return s -> !s.owner.isInterface() && (sf == null || sf.accepts(s));
+            }
+
+            @Override
+            public Iterable<Symbol> getSymbols(Filter<Symbol> sf, LookupKind lookupKind) {
+                return scope.getSymbols(combine(sf), lookupKind);
+            }
+
+            @Override
+            public Iterable<Symbol> getSymbolsByName(Name name, Filter<Symbol> sf, LookupKind lookupKind) {
+                return scope.getSymbolsByName(name, combine(sf), lookupKind);
+            }
+
+            @Override
+            public int getMark() {
+                return scope.getMark();
             }
         }
 
-        List<TypeSymbol> seenTypes = List.nil();
+        CompoundScope nilScope;
 
         /** members closure visitor methods **/
 
-        public CompoundScope visitType(Type t, Boolean skipInterface) {
-            return null;
+        public CompoundScope visitType(Type t, Void _unused) {
+            if (nilScope == null) {
+                nilScope = new CompoundScope(syms.noSymbol);
+            }
+            return nilScope;
         }
 
         @Override
-        public CompoundScope visitClassType(ClassType t, Boolean skipInterface) {
-            if (seenTypes.contains(t.tsym)) {
+        public CompoundScope visitClassType(ClassType t, Void _unused) {
+            if (!seenTypes.add(t.tsym)) {
                 //this is possible when an interface is implemented in multiple
-                //superclasses, or when a classs hierarchy is circular - in such
+                //superclasses, or when a class hierarchy is circular - in such
                 //cases we don't need to recurse (empty scope is returned)
                 return new CompoundScope(t.tsym);
             }
             try {
-                seenTypes = seenTypes.prepend(t.tsym);
+                seenTypes.add(t.tsym);
                 ClassSymbol csym = (ClassSymbol)t.tsym;
-                Entry e = _map.get(csym);
-                if (e == null || !e.matches(skipInterface)) {
-                    CompoundScope membersClosure = new CompoundScope(csym);
-                    if (!skipInterface) {
-                        for (Type i : interfaces(t)) {
-                            membersClosure.prependSubScope(visit(i, skipInterface));
-                        }
+                CompoundScope membersClosure = _map.get(csym);
+                if (membersClosure == null) {
+                    membersClosure = new CompoundScope(csym);
+                    for (Type i : interfaces(t)) {
+                        membersClosure.prependSubScope(visit(i, null));
                     }
-                    membersClosure.prependSubScope(visit(supertype(t), skipInterface));
+                    membersClosure.prependSubScope(visit(supertype(t), null));
                     membersClosure.prependSubScope(csym.members());
-                    e = new Entry(skipInterface, membersClosure);
-                    _map.put(csym, e);
+                    _map.put(csym, membersClosure);
                 }
-                return e.compoundScope;
+                return membersClosure;
             }
             finally {
-                seenTypes = seenTypes.tail;
+                seenTypes.remove(t.tsym);
             }
         }
 
         @Override
-        public CompoundScope visitTypeVar(TypeVar t, Boolean skipInterface) {
-            return visit(t.getUpperBound(), skipInterface);
+        public CompoundScope visitTypeVar(TypeVar t, Void _unused) {
+            return visit(t.getUpperBound(), null);
         }
     }
 
     private MembersClosureCache membersCache = new MembersClosureCache();
 
     public CompoundScope membersClosure(Type site, boolean skipInterface) {
-        return membersCache.visit(site, skipInterface);
+        CompoundScope cs = membersCache.visit(site, null);
+        Assert.checkNonNull(cs, () -> "type " + site);
+        return skipInterface ? membersCache.new MembersScope(cs) : cs;
     }
     // </editor-fold>
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Mon Jun 08 11:31:09 2015 -0700
@@ -2270,6 +2270,7 @@
             final Bits prevUninits = new Bits(uninits);
             final Bits prevInits = new Bits(inits);
             int returnadrPrev = returnadr;
+            int nextadrPrev = nextadr;
             ListBuffer<AssignPendingExit> prevPending = pendingExits;
             try {
                 returnadr = nextadr;
@@ -2291,6 +2292,7 @@
                 uninits.assign(prevUninits);
                 inits.assign(prevInits);
                 pendingExits = prevPending;
+                nextadr = nextadrPrev;
             }
         }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Jun 08 11:31:09 2015 -0700
@@ -3185,10 +3185,8 @@
                 findDiamond(env, site, argtypes, typeargtypes, phase.isBoxingRequired(), phase.isVarargsRequired()) :
                 findMethod(env, site, name, argtypes, typeargtypes,
                         phase.isBoxingRequired(), phase.isVarargsRequired());
-            return (sym.kind != MTH ||
-                    site.getEnclosingType().hasTag(NONE) ||
-                    hasEnclosingInstance(env, site)) ?
-                    sym : new BadConstructorReferenceError(sym);
+            return site.getEnclosingType().hasTag(CLASS) && !hasEnclosingInstance(env, site) ?
+                        new BadConstructorReferenceError(sym) : sym;
         }
 
         @Override
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Mon Jun 08 11:31:09 2015 -0700
@@ -470,6 +470,10 @@
                         clinitTAs.addAll(getAndRemoveNonFieldTAs(sym));
                     } else {
                         checkStringConstant(vdef.init.pos(), sym.getConstValue());
+                        /* if the init contains a reference to an external class, add it to the
+                         * constant's pool
+                         */
+                        vdef.init.accept(classReferenceVisitor);
                     }
                 }
                 break;
@@ -2337,9 +2341,11 @@
             ClassSymbol c = cdef.sym;
             this.toplevel = env.toplevel;
             this.endPosTable = toplevel.endPositions;
-            cdef.defs = normalizeDefs(cdef.defs, c);
             c.pool = pool;
             pool.reset();
+            /* method normalizeDefs() can add references to external classes into the constant pool
+             */
+            cdef.defs = normalizeDefs(cdef.defs, c);
             generateReferencesToPrunedTree(c, pool);
             Env<GenContext> localEnv = new Env<>(cdef, new GenContext());
             localEnv.toplevel = env.toplevel;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/ProblemList.txt	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,26 @@
+###########################################################################
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# 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.
+#
+###########################################################################
+
+# No langtools tests are on the problem list.
--- a/langtools/test/TEST.ROOT	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/test/TEST.ROOT	Mon Jun 08 11:31:09 2015 -0700
@@ -1,6 +1,18 @@
 # This file identifies the root of the test-suite hierarchy.
 # It also contains test-suite configuration information.
-# DO NOT EDIT without first contacting jdk-regtest@sun.com.
 
-# The list of keywords supported in the entire test suite
-keys=2d dnd i18n
+# The list of keywords supported in the entire test suite.  The
+# "intermittent" keyword marks tests known to fail intermittently.
+# The "randomness" keyword marks tests using randomness with test
+# cases differing from run to run. (A test using a fixed random seed
+# would not count as "randomness" by this definition.) Extra care
+# should be taken to handle test failures of intermittent or
+# randomness tests.
+
+keys=intermittent randomness
+
+# Group definitions
+groups=TEST.groups
+
+# Tests using jtreg 4.1 b11 features
+requiredVersion=4.1 b11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/TEST.groups	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,32 @@
+#  Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+#  This code is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License version 2 only, as
+#  published by the Free Software Foundation.
+#
+#  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.
+#
+
+# Tiered testing definitions
+
+# All langtools tests are tier 1
+tier1 = \
+    tools \
+    com \
+    lib
+
+# No langtools tests are tier 2
+tier2 = 
--- a/langtools/test/tools/javac/4846262/CheckEBCDICLocaleTest.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/test/tools/javac/4846262/CheckEBCDICLocaleTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -34,9 +34,12 @@
  */
 
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintStream;
+import java.io.PrintWriter;
 import java.nio.charset.Charset;
 import java.nio.file.Files;
-import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.List;
@@ -68,16 +71,19 @@
         tb.writeFile("Test.java", TestSrc);
         tb.createDirectories("output");
 
-        Native2Ascii n2a = new Native2Ascii(Charset.forName("IBM1047"));
+        Charset ebcdic = Charset.forName("IBM1047");
+        Native2Ascii n2a = new Native2Ascii(ebcdic);
         n2a.asciiToNative(Paths.get("Test.java"), Paths.get("output", "Test.java"));
 
-        tb.new JavacTask(ToolBox.Mode.EXEC)
-                .redirect(ToolBox.OutputKind.STDERR, "Test.tmp")
-                .options("-J-Duser.language=en",
-                        "-J-Duser.region=US",
-                        "-J-Dfile.encoding=IBM1047")
-                .files("output/Test.java")
-                .run(ToolBox.Expect.FAIL);
+        // Use -encoding to specify the encoding with which to read source files
+        // Use a suitable configured output stream for javac diagnostics
+        int rc;
+        try (PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream("Test.tmp"), ebcdic))) {
+            String[] args = { "-encoding", ebcdic.name(), "output/Test.java" };
+            rc = com.sun.tools.javac.Main.compile(args, out);
+            if (rc != 1)
+                throw new Exception("unexpected exit from javac: " + rc);
+        }
 
         n2a.nativeToAscii(Paths.get("Test.tmp"), Paths.get("Test.out"));
 
@@ -87,16 +93,21 @@
         try {
             tb.checkEqual(expectLines, actualLines);
         } catch (Throwable tt) {
-            System.err.println("current ouput don't have the expected number of lines. See output below");
+            PrintStream out = tb.out;
+            out.println("Output mismatch:");
 
-            System.err.println("Expected output:");
-            System.err.println(TestOutTemplate);
-            System.err.println();
-            System.err.println("Actual output:");
+            out.println("Expected output:");
+            for (String s: expectLines) {
+                out.println(s);
+            }
+            out.println();
+
+            out.println("Actual output:");
             for (String s : actualLines) {
-                System.err.println(s);
+                out.println(s);
             }
-            System.err.println();
+            out.println();
+
             throw tt;
         }
     }
--- a/langtools/test/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/test/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java	Mon Jun 08 11:31:09 2015 -0700
@@ -25,10 +25,10 @@
 
 /*
  * @test
- * @bug 7153958
+ * @bug 7153958 8073372
  * @summary add constant pool reference to class containing inlined constants
  * @modules jdk.jdeps/com.sun.tools.classfile
- * @compile pkg/ClassToBeStaticallyImported.java CPoolRefClassContainingInlinedCts.java
+ * @compile pkg/ClassToBeStaticallyImportedA.java pkg/ClassToBeStaticallyImportedB.java CPoolRefClassContainingInlinedCts.java
  * @run main CPoolRefClassContainingInlinedCts
  */
 
@@ -39,7 +39,8 @@
 import java.io.File;
 import java.io.IOException;
 
-import static pkg.ClassToBeStaticallyImported.staticField;
+import static pkg.ClassToBeStaticallyImportedA.staticFieldA;
+import static pkg.ClassToBeStaticallyImportedB.staticFieldB;
 
 public class CPoolRefClassContainingInlinedCts {
 
@@ -55,10 +56,14 @@
 
     void checkClassName(String className) {
         switch (className) {
-            case "SimpleAssignClass" : case "BinaryExpClass":
-            case "UnaryExpClass" : case "CastClass":
-            case "ParensClass" : case "CondClass":
-            case "IfClass" : case "pkg/ClassToBeStaticallyImported":
+            case "SimpleAssignClassA" : case "BinaryExpClassA":
+            case "UnaryExpClassA" : case "CastClassA":
+            case "ParensClassA" : case "CondClassA":
+            case "IfClassA" : case "pkg/ClassToBeStaticallyImportedA":
+            case "SimpleAssignClassB" : case "BinaryExpClassB":
+            case "UnaryExpClassB" : case "CastClassB":
+            case "ParensClassB" : case "CondClassB":
+            case "IfClassB" : case "pkg/ClassToBeStaticallyImportedB":
                 numberOfReferencedClassesToBeChecked++;
         }
     }
@@ -77,59 +82,111 @@
             }
             i += cpInfo.size();
         }
-        if (numberOfReferencedClassesToBeChecked != 8) {
+        if (numberOfReferencedClassesToBeChecked != 16) {
             throw new AssertionError("Class reference missing in the constant pool");
         }
     }
 
-    private int assign = SimpleAssignClass.x;
-    private int binary = BinaryExpClass.x + 1;
-    private int unary = -UnaryExpClass.x;
-    private int cast = (int)CastClass.x;
-    private int parens = (ParensClass.x);
-    private int cond = (CondClass.x == 1) ? 1 : 2;
-    private static int ifConstant;
-    private static int importStatic;
+    private int assignA = SimpleAssignClassA.x;
+    private int binaryA = BinaryExpClassA.x + 1;
+    private int unaryA = -UnaryExpClassA.x;
+    private int castA = (int)CastClassA.x;
+    private int parensA = (ParensClassA.x);
+    private int condA = (CondClassA.x == 1) ? 1 : 2;
+    private static int ifConstantA;
+    private static int importStaticA;
     static {
-        if (IfClass.x == 1) {
-            ifConstant = 1;
+        if (IfClassA.x == 1) {
+            ifConstantA = 1;
         } else {
-            ifConstant = 2;
+            ifConstantA = 2;
         }
     }
     static {
-        if (staticField == 1) {
-            importStatic = 1;
+        if (staticFieldA == 1) {
+            importStaticA = 1;
         } else {
-            importStatic = 2;
+            importStaticA = 2;
+        }
+    }
+
+    // now as final constants
+    private static final int assignB = SimpleAssignClassB.x;
+    private static final int binaryB = BinaryExpClassB.x + 1;
+    private static final int unaryB = -UnaryExpClassB.x;
+    private static final int castB = (int)CastClassB.x;
+    private static final int parensB = (ParensClassB.x);
+    private static final int condB = (CondClassB.x == 1) ? 1 : 2;
+    private static final int ifConstantB;
+    private static final int importStaticB;
+    static {
+        if (IfClassB.x == 1) {
+            ifConstantB = 1;
+        } else {
+            ifConstantB = 2;
+        }
+    }
+    static {
+        if (staticFieldB == 1) {
+            importStaticB = 1;
+        } else {
+            importStaticB = 2;
         }
     }
 }
 
-class SimpleAssignClass {
+class SimpleAssignClassA {
+    public static final int x = 1;
+}
+
+class SimpleAssignClassB {
+    public static final int x = 1;
+}
+
+class BinaryExpClassA {
     public static final int x = 1;
 }
 
-class BinaryExpClass {
+class BinaryExpClassB {
     public static final int x = 1;
 }
 
-class UnaryExpClass {
+class UnaryExpClassA {
+    public static final int x = 1;
+}
+
+class UnaryExpClassB {
+    public static final int x = 1;
+}
+
+class CastClassA {
     public static final int x = 1;
 }
 
-class CastClass {
+class CastClassB {
     public static final int x = 1;
 }
 
-class ParensClass {
+class ParensClassA {
+    public static final int x = 1;
+}
+
+class ParensClassB {
     public static final int x = 1;
 }
 
-class CondClass {
+class CondClassA {
+    public static final int x = 1;
+}
+
+class CondClassB {
     public static final int x = 1;
 }
 
-class IfClass {
+class IfClassA {
     public static final int x = 1;
 }
+
+class IfClassB {
+    public static final int x = 1;
+}
--- a/langtools/test/tools/javac/7153958/pkg/ClassToBeStaticallyImported.java	Mon Jun 08 16:47:23 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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 pkg;
-
-public class ClassToBeStaticallyImported {
-    public static final int staticField = 1;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/7153958/pkg/ClassToBeStaticallyImportedA.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package pkg;
+
+public class ClassToBeStaticallyImportedA {
+    public static final int staticFieldA = 1;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/7153958/pkg/ClassToBeStaticallyImportedB.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package pkg;
+
+public class ClassToBeStaticallyImportedB {
+    public static final int staticFieldB = 1;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/LambdaParameterNeedsNoInitTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8077667
+ * @summary Eliminate bogus error about lambda parameter not being initialized.
+ * @compile LambdaParameterNeedsNoInitTest.java
+ */
+import java.util.function.Predicate;
+
+public class LambdaParameterNeedsNoInitTest {
+
+    public static void main(String[] args) {
+        new Inner();
+    }
+
+    private static class Inner {
+        Predicate<String> synonymComparator = a -> a.isEmpty();
+        Inner() {
+            if (true) {
+                return;
+            }
+            synonymComparator.test("");
+        }
+    }
+}
--- a/langtools/test/tools/javac/lambda/MethodReference23.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/test/tools/javac/lambda/MethodReference23.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8003280 8075184
+ * @bug 8003280 8075184 8081271
  * @summary Add lambda tests
  *  check that pair of bound/non-bound constructor references is flagged as ambiguous
  * @author  Maurizio Cimadamore
@@ -49,8 +49,8 @@
     static void call3(SAM22 s) {   }
 
     static void test11() {
-        SAM11 s = MethodReference23.Inner1::new; //ok
-        call11(MethodReference23.Inner1::new); //ok
+        SAM11 s = MethodReference23.Inner1::new; // fail.
+        call11(MethodReference23.Inner1::new); // fail.
     }
 
     static void test12() {
--- a/langtools/test/tools/javac/lambda/MethodReference23.out	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/test/tools/javac/lambda/MethodReference23.out	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 MethodReference23.java:52:19: compiler.err.invalid.mref: kindname.constructor, (compiler.misc.cant.access.inner.cls.constr: Inner1, MethodReference23, MethodReference23)
-MethodReference23.java:53:16: compiler.err.invalid.mref: kindname.constructor, (compiler.misc.cant.access.inner.cls.constr: Inner1, MethodReference23, MethodReference23)
+MethodReference23.java:53:16: compiler.err.invalid.mref: kindname.constructor, (compiler.misc.cant.access.inner.cls.constr: Inner1, , MethodReference23)
 MethodReference23.java:57:19: compiler.err.invalid.mref: kindname.constructor, (compiler.misc.cant.access.inner.cls.constr: Inner1, , MethodReference23)
 MethodReference23.java:58:16: compiler.err.invalid.mref: kindname.constructor, (compiler.misc.cant.access.inner.cls.constr: Inner1, , MethodReference23)
 MethodReference23.java:72:9: compiler.err.ref.ambiguous: call3, kindname.method, call3(MethodReference23.SAM21), MethodReference23, kindname.method, call3(MethodReference23.SAM22), MethodReference23
--- a/langtools/test/tools/javac/lambda/MethodReference37.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/test/tools/javac/lambda/MethodReference37.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,6 +1,6 @@
 /*
  * @test /nodynamiccopyright/
- * @bug 8003280
+ * @bug 8003280 8081271
  * @summary Add lambda tests
  *  spurious exceptions when checking references to inner constructors where
  *          the enclosing class is not defined in any outer context
@@ -20,7 +20,7 @@
     static class Outer {
         class Inner { }
 
-        static void test1() {
+        void test1() {
             SAM2<Inner, Outer> sam = Inner::new;
         }
 
--- a/langtools/test/tools/javac/lambda/MethodReference37.out	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/test/tools/javac/lambda/MethodReference37.out	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 MethodReference37.java:24:38: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Inner, compiler.misc.no.args, MethodReference37.Outer, kindname.class, MethodReference37.Outer.Inner, (compiler.misc.arg.length.mismatch)))
 MethodReference37.java:29:39: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Inner, compiler.misc.no.args, MethodReference37.Outer, kindname.class, MethodReference37.Outer.Inner, (compiler.misc.arg.length.mismatch)))
-MethodReference37.java:34:40: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Inner, compiler.misc.no.args, MethodReference37.Outer, kindname.class, MethodReference37.Outer.Inner, (compiler.misc.arg.length.mismatch)))
-MethodReference37.java:38:41: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.constructor, (compiler.misc.cant.apply.symbol: kindname.constructor, Inner, compiler.misc.no.args, MethodReference37.Outer, kindname.class, MethodReference37.Outer.Inner, (compiler.misc.arg.length.mismatch)))
+MethodReference37.java:34:40: compiler.err.invalid.mref: kindname.constructor, (compiler.misc.cant.access.inner.cls.constr: Inner, MethodReference37.Outer, MethodReference37.Outer)
+MethodReference37.java:38:41: compiler.err.invalid.mref: kindname.constructor, (compiler.misc.cant.access.inner.cls.constr: Inner, MethodReference37.Outer, MethodReference37.Outer)
 4 errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/methodReference/MethodRefToInnerWithoutOuter.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,24 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8081271
+ * @summary NPE while compiling a program with erroneous use of constructor reference expressions.
+ * @compile/fail/ref=MethodRefToInnerWithoutOuter.out -XDrawDiagnostics MethodRefToInnerWithoutOuter.java
+*/
+
+import java.util.List;
+import java.util.ArrayList;
+
+class MethodRefToInnerBase {
+    class TestString {
+        String str;
+        TestString(String strin) {
+            str = strin;
+        }
+    }
+}
+public class MethodRefToInnerWithoutOuter extends MethodRefToInnerBase {
+    public static void main(String[] args) {
+        List<String> list = new ArrayList<>();
+        list.stream().forEach(TestString::new);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/methodReference/MethodRefToInnerWithoutOuter.out	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,2 @@
+MethodRefToInnerWithoutOuter.java:22:31: compiler.err.invalid.mref: kindname.constructor, (compiler.misc.cant.access.inner.cls.constr: TestString, , MethodRefToInnerBase)
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/scope/RemoveSymbolTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8080842
+ * @summary Ensure Scope impl can cope with remove() when a field and method share the name.
+ * @run main RemoveSymbolTest
+ */
+
+import java.util.Iterator;
+import java.util.LinkedList;
+
+public class RemoveSymbolTest<W> implements Iterable<W> {
+    static class Widget {
+        private String name;
+        Widget(String s) { name = s; }
+        @Override public String toString() { return name; }
+    }
+
+    private LinkedList<W> data;
+    // Instantiate an Iterable instance using a Lambda expression.
+    // Causes ClassFormatError if a local variable of type Widget is named after one of the methods.
+    private final Iterable<W> myIterator1 = () -> new Iterator<W>() {
+        private W hasNext = null;
+        private int index = 0;
+        @Override public boolean hasNext() { return index < data.size(); }
+        @Override public W next() { return data.get(index++); }
+    };
+
+    // Instantiate an Iterable instance using an anonymous class.
+    // Always works fine regardless of the name of the local variable.
+    private final Iterable<W> myIterator2 =
+        new Iterable<W>() {
+        @Override
+        public Iterator<W> iterator() {
+            return new Iterator<W>() {
+                private W hasNext = null;
+                private int index = 0;
+                @Override public boolean hasNext() { return index < data.size(); }
+                @Override public W next() { return data.get(index++); }
+            };
+        }
+    };
+    public RemoveSymbolTest() { data = new LinkedList<>(); }
+    public void add(W e) { data.add(e); }
+    @Override public String toString() { return data.toString(); }
+    @Override public Iterator<W> iterator() { return myIterator1.iterator(); }
+    public static void main(String[] args) {
+        RemoveSymbolTest<Widget> widgets = new RemoveSymbolTest<>();
+        widgets.add(new Widget("W1"));
+        widgets.add(new Widget("W2"));
+        widgets.add(new Widget("W3"));
+        System.out.println(".foreach() call: ");
+        widgets.forEach(w -> System.out.println(w + " "));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/scope/RemoveSymbolUnitTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8080842
+ * @summary Ensure Scope impl can cope with remove() when a field and method share the name.
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.file
+ *          jdk.compiler/com.sun.tools.javac.util
+ */
+
+import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.code.*;
+import com.sun.tools.javac.code.Scope.*;
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.file.JavacFileManager;
+
+public class RemoveSymbolUnitTest {
+
+    Context context;
+    Names names;
+    Symtab symtab;
+
+    public static void main(String... args) throws Exception {
+        new RemoveSymbolUnitTest().run();
+    }
+
+    public void run() {
+        context = new Context();
+        JavacFileManager.preRegister(context); // required by ClassReader which is required by Symtab
+        names = Names.instance(context);
+        symtab = Symtab.instance(context);
+
+        Name hasNext =  names.fromString("hasNext");
+        ClassSymbol clazz = new ClassSymbol(0,
+                                            names.fromString("X"),
+                                            Type.noType,
+                                            symtab.unnamedPackage);
+
+        VarSymbol v = new VarSymbol(0, hasNext, Type.noType, clazz);
+        MethodSymbol m = new MethodSymbol(0, hasNext, Type.noType, clazz);
+
+        // Try enter and remove in different shuffled combinations.
+        // working with fresh scope each time.
+        WriteableScope cs = WriteableScope.create(clazz);
+        cs.enter(v);
+        cs.enter(m);
+        cs.remove(v);
+        Symbol s = cs.findFirst(hasNext);
+        if (s != m)
+            throw new AssertionError("Wrong symbol");
+
+        cs = WriteableScope.create(clazz);
+        cs.enter(m);
+        cs.enter(v);
+        cs.remove(v);
+        s = cs.findFirst(hasNext);
+        if (s != m)
+            throw new AssertionError("Wrong symbol");
+
+        cs = WriteableScope.create(clazz);
+        cs.enter(v);
+        cs.enter(m);
+        cs.remove(m);
+        s = cs.findFirst(hasNext);
+        if (s != v)
+            throw new AssertionError("Wrong symbol");
+
+        cs = WriteableScope.create(clazz);
+        cs.enter(m);
+        cs.enter(v);
+        cs.remove(m);
+        s = cs.findFirst(hasNext);
+        if (s != v)
+            throw new AssertionError("Wrong symbol");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/types/ScopeListenerTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 8039262
+ * @summary Ensure that using Types.membersClosure does not increase the number of listeners on the
+ *          class's members Scope.
+ */
+
+import com.sun.tools.javac.code.Scope;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.code.Types;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Names;
+import java.lang.reflect.Field;
+import java.util.Collection;
+
+public class ScopeListenerTest {
+
+    public static void main(String[] args) throws Exception {
+        new ScopeListenerTest().run();
+    }
+
+    void run() throws Exception {
+        Context context = new Context();
+        JavacFileManager.preRegister(context);
+        Types types = Types.instance(context);
+        Symtab syms = Symtab.instance(context);
+        Names names = Names.instance(context);
+        types.membersClosure(syms.stringType, true);
+        types.membersClosure(syms.stringType, false);
+
+        Field listenersField = Scope.class.getDeclaredField("listeners");
+
+        listenersField.setAccessible(true);
+
+        int listenerCount =
+                ((Collection) listenersField.get(syms.stringType.tsym.members())).size();
+
+        for (int i = 0; i < 100; i++) {
+            types.membersClosure(syms.stringType, true);
+            types.membersClosure(syms.stringType, false);
+        }
+
+        int newListenerCount
+                = ((Collection) listenersField.get(syms.stringType.tsym.members())).size();
+
+        if (listenerCount != newListenerCount) {
+            throw new AssertionError("Orig listener count: " + listenerCount +
+                                     "; new listener count: " + newListenerCount);
+        }
+
+        for (Symbol s : types.membersClosure(syms.stringType, true).getSymbols())
+            ;
+        for (Symbol s : types.membersClosure(syms.stringType, false).getSymbolsByName(names.fromString("substring")))
+            ;
+    }
+
+}
--- a/langtools/test/tools/javadoc/api/basic/GetTask_DocletClassTest.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/langtools/test/tools/javadoc/api/basic/GetTask_DocletClassTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -28,6 +28,7 @@
  * @modules jdk.javadoc
  * @build APITest
  * @run main GetTask_DocletClassTest
+ * @key randomness
  */
 
 import com.sun.javadoc.DocErrorReporter;
--- a/make/StripBinaries.gmk	Mon Jun 08 16:47:23 2015 +0100
+++ b/make/StripBinaries.gmk	Mon Jun 08 11:31:09 2015 -0700
@@ -61,9 +61,12 @@
 COPY_LIBS_SRC := \
     $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \
         \( ! -name '*$(SHARED_LIBRARY_SUFFIX)' -type f \) -o -type l)
+# OS X stores symbol information in a .dylib file inside a .dSYM directory -
+# that file should not be stripped, so we prune the tree at the .dSYM directory.
+# Example: support/modules_libs/java.base/libjsig.dylib.dSYM/Contents/Resources/DWARF/libjsig.dylib
 STRIP_LIBS_SRC := \
     $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \
-        -name '*$(SHARED_LIBRARY_SUFFIX)' -type f)
+        -name '*$(SHARED_LIBRARY_SUFFIX)' -type f -print -o -name "*.dSYM" -prune)
 
 $(eval $(call SetupCopyFiles,STRIP_MODULES_CMDS, \
     SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds, \
--- a/nashorn/.hgtags	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/.hgtags	Mon Jun 08 11:31:09 2015 -0700
@@ -300,3 +300,4 @@
 00df6e4fc75a83bdd958f9ef86d80e008c9ba967 jdk9-b64
 2054d01ae32649d3179e93d14108fdd6259c1c0d jdk9-b65
 9dd95cff9dae897e8dee712f1f0303c460262288 jdk9-b66
+f822b749821e364cae0b7bd7c8f667d9437e6d83 jdk9-b67
--- a/nashorn/README	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/README	Mon Jun 08 11:31:09 2015 -0700
@@ -72,14 +72,11 @@
 - Running tests
 
 Nashorn tests are TestNG based. Running tests requires downloading the
-TestNG library and placing its jar file into the lib subdirectory:
+TestNG library and placing its jar file into the test/lib subdirectory. This is
+done automatically when executing the "ant externals" command to get external
+test suites (see below).
 
-    # download and install TestNG
-    wget http://testng.org/testng-x.y.z.zip
-    unzip testng-x.y.z.zip
-    cp testng-x.y.z/testng-x.y.z.jar test/lib/testng.jar
-    
-After that, you can run the tests using:
+Once TestNG is properly installed, you can run the tests using:
     cd make
     ant clean test
     
--- a/nashorn/make/build.xml	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/make/build.xml	Mon Jun 08 11:31:09 2015 -0700
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!--
- Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -396,7 +396,7 @@
   </target>
 
   <target name="check-testng" unless="testng.available">
-    <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under test/lib directory."/>
+    <echo message="WARNING: TestNG not available, will not run tests. Please copy testng.jar under ${test.lib} directory."/>
   </target>
 
   <!-- only to be invoked as dependency of "test" target -->
@@ -469,7 +469,7 @@
     </testng>
   </target>
 
-  <target name="test" depends="javadoc, test-pessimistic, test-optimistic"/>
+  <target name="test" depends="get-testng, javadoc, test-pessimistic, test-optimistic"/>
 
   <target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
     <echo message="Running test suite in OPTIMISTIC mode..."/>
@@ -499,7 +499,7 @@
     <echo message="WARNING: Jemmy or JavaFX or TestNG not available, will not run tests. Please copy testng.jar, JemmyCore.jar, JemmyFX.jar, JemmyAWTInput.jar under test${file.separator}lib directory. And make sure you have jfxrt.jar in ${java.home}${file.separator}lib${file.separator}ext dir."/>
   </target>
 
-  <target name="testjfx" depends="jar, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
+  <target name="testjfx" depends="jar, get-testng, check-jemmy.jfx.testng, compile-test" if="jemmy.jfx.testng.available">
     <fileset id="test.classes" dir="${build.test.classes.dir}">
        <include name="**/framework/*Test.class"/>
     </fileset>
@@ -527,7 +527,7 @@
     </testng>
   </target>
 
-  <target name="testmarkdown" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="testmarkdown" depends="jar, get-testng, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
     <fileset id="test.classes" dir="${build.test.classes.dir}">
        <include name="**/framework/*Test.class"/>
     </fileset>
@@ -546,7 +546,7 @@
     </testng>
   </target>
 
-  <target name="test262" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="test262" depends="jar, get-testng, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
     <fileset id="test.classes" dir="${build.test.classes.dir}">
        <include name="**/framework/*Test.class"/>
     </fileset>
@@ -570,7 +570,7 @@
 
   <target name="test262parallel" depends="test262-parallel"/>
 
-  <target name="test262-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="test262-parallel" depends="jar, get-testng, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
     <!-- use just build.test.classes.dir to avoid referring to TestNG -->
     <java classname="${parallel.test.runner}" dir="${basedir}" fork="true">
       <jvmarg line="${boot.class.path}"/>
@@ -589,7 +589,7 @@
 
   <target name="testparallel" depends="test-parallel"/>
 
-  <target name="test-parallel" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
+  <target name="test-parallel" depends="jar, get-testng, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
       <!-- use just build.test.classes.dir to avoid referring to TestNG -->
       <java classname="${parallel.test.runner}" dir="${basedir}"
         failonerror="true"
@@ -694,7 +694,7 @@
   </target>
 
   <!-- get all external test scripts -->
-  <target name="externals" depends="init, check-external-tests, get-test262, get-octane, get-sunspider">
+  <target name="externals" depends="init, check-external-tests, get-test262, get-octane, get-sunspider, get-testng">
     <!-- make external test dir -->
     <mkdir dir="${test.external.dir}"/>
 
@@ -719,8 +719,8 @@
 
     <!-- showdown -->
     <mkdir dir="${test.external.dir}/showdown"/>
-    <get src="https://raw.github.com/coreyti/showdown/master/src/showdown.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/>
-    <get src="https://raw.github.com/coreyti/showdown/master/src/extensions/table.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/>
+    <get src="https://raw.githubusercontent.com/showdownjs/showdown/0.5.4/src/showdown.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/>
+    <get src="https://raw.githubusercontent.com/showdownjs/showdown/0.5.4/src/extensions/table.js" dest="${test.external.dir}/showdown" skipexisting="true" ignoreerrors="true"/>
 
   </target>
 
@@ -730,12 +730,20 @@
   <!-- run all perf tests -->
   <target name="perf" depends="externals, update-externals, sunspider, octane"/>
 
-  <!-- run all tests -->
-  <target name="exit-if-no-testng" depends="init, check-testng" unless="${testng.available}">
-     <fail message="Exiting.."/>
+  <!-- download and install testng.jar -->
+  <target name="get-testng" depends="prepare" unless="testng.available">
+    <get src="http://testng.org/testng-6.8.zip" dest="${test.lib}" skipexisting="true" ignoreerrors="true"/>
+    <unzip src="${test.lib}${file.separator}testng-6.8.zip" dest="${test.lib}">
+      <patternset>
+        <include name="testng-6.8/testng-6.8.jar"/>
+      </patternset>
+    </unzip>
+    <move file="${test.lib}${file.separator}testng-6.8${file.separator}testng-6.8.jar" tofile="${test.lib}${file.separator}testng.jar"/>
+    <delete dir="${test.lib}${file.separator}testng-6.8"/>
   </target>
 
-  <target name="alltests" depends="exit-if-no-testng, externals, update-externals, test, test262parallel, perf"/>
+  <!-- run all tests -->
+  <target name="alltests" depends="get-testng, externals, update-externals, test, test262parallel, testmarkdown, perf"/>
 
   <import file="build-benchmark.xml"/>
 
--- a/nashorn/make/project.properties	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/make/project.properties	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -77,8 +77,11 @@
 # configuration for java flight recorder
 run.test.jvmargs.jfr=-XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=${build.dir},stackdepth=128
 
+# test library location
+test.lib=${basedir}${file.separator}test${file.separator}lib
+
 # jars refererred
-file.reference.testng.jar=test/lib/testng.jar
+file.reference.testng.jar=${test.lib}${file.separator}testng.jar
 
 # Set testng verbose level
 # From TestNG docs: "the verbosity level (0 to 10 where 10 is most detailed)
@@ -243,9 +246,9 @@
     -fx \
     ${test.script.dir}${file.separator}jfx.js
 
-file.reference.jemmyfx.jar=test${file.separator}lib${file.separator}JemmyFX.jar
-file.reference.jemmycore.jar=test${file.separator}lib${file.separator}JemmyCore.jar
-file.reference.jemmyawtinput.jar=test${file.separator}lib${file.separator}JemmyAWTInput.jar
+file.reference.jemmyfx.jar=${test.lib}${file.separator}JemmyFX.jar
+file.reference.jemmycore.jar=${test.lib}${file.separator}JemmyCore.jar
+file.reference.jemmyawtinput.jar=${test.lib}${file.separator}JemmyAWTInput.jar
 file.reference.jfxrt.jar=${java.home}${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar
 testjfx.run.test.classpath=\
     ${file.reference.jemmyfx.jar}${path.separator}\
--- a/nashorn/samples/find_nonfinals.js	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/samples/find_nonfinals.js	Mon Jun 08 11:31:09 2015 -0700
@@ -39,6 +39,7 @@
 
 var Class = Java.type("java.lang.Class");
 var System = Java.type("java.lang.System");
+var Thread = Java.type("java.lang.Thread");
 var File = Java.type("java.io.File");
 var JarFile = Java.type("java.util.jar.JarFile");
 var Modifier = Java.type("java.lang.reflect.Modifier");
@@ -58,6 +59,10 @@
 function analyzeClass(cls) {
     var methods = cls.getDeclaredMethods();
     for each (var method in methods) {
+        var methodModifiers = method.modifiers;
+        if (Modifier.isAbstract(methodModifiers) || Modifier.isNative(methodModifiers)) {
+            continue;
+        }
         // this requires -parameters option when compiling java sources
         var params = method.parameters;
         for each (var p in params) {
@@ -73,6 +78,8 @@
 }
 
 var jarFile = findNashorn();
+var ctxtLoader = Thread.currentThread().contextClassLoader;
+
 // load each class and use reflection to analyze each Class
 new JarFile(jarFile).stream().forEach(
     function(entry) {
@@ -80,8 +87,15 @@
         if (name.endsWith(".class")) {
             var clsName = name.substring(0, name.lastIndexOf('.class'));
             clsName = clsName.replace(/\//g, '.');
-            var cls = Class.forName(clsName);
-            analyzeClass(cls);
+            try {
+                // don't initialize to avoid for possible initialization errors 
+                var cls = Class.forName(clsName, false, ctxtLoader);
+                analyzeClass(cls);
+            } catch (e) {
+                // print exception and continue analysis for other classes
+                print("Failed to analyze " + clsName);
+                e.printStackTrace();
+            }
         }
     }
 )
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/NashornScriptEngine.java	Mon Jun 08 11:31:09 2015 -0700
@@ -354,8 +354,7 @@
             }
         }, CREATE_GLOBAL_ACC_CTXT);
 
-        nashornContext.initGlobal(newGlobal, this);
-        newGlobal.setScriptContext(ctxt);
+        nashornContext.initGlobal(newGlobal, this, ctxt);
 
         return newGlobal;
     }
@@ -404,7 +403,7 @@
         return evalImpl(script, ctxt, getNashornGlobalFrom(ctxt));
     }
 
-    private static Object evalImpl(final Context.MultiGlobalCompiledScript mgcs, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
+    private Object evalImpl(final Context.MultiGlobalCompiledScript mgcs, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
         final Global oldGlobal = Context.getGlobal();
         final boolean globalChanged = (oldGlobal != ctxtGlobal);
         try {
@@ -413,8 +412,13 @@
             }
 
             final ScriptFunction script = mgcs.getFunction(ctxtGlobal);
+            final ScriptContext oldCtxt = ctxtGlobal.getScriptContext();
             ctxtGlobal.setScriptContext(ctxt);
-            return ScriptObjectMirror.translateUndefined(ScriptObjectMirror.wrap(ScriptRuntime.apply(script, ctxtGlobal), ctxtGlobal));
+            try {
+                return ScriptObjectMirror.translateUndefined(ScriptObjectMirror.wrap(ScriptRuntime.apply(script, ctxtGlobal), ctxtGlobal));
+            } finally {
+                ctxtGlobal.setScriptContext(oldCtxt);
+            }
         } catch (final Exception e) {
             throwAsScriptException(e, ctxtGlobal);
             throw new AssertionError("should not reach here");
@@ -425,7 +429,7 @@
         }
     }
 
-    private static Object evalImpl(final ScriptFunction script, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
+    private Object evalImpl(final ScriptFunction script, final ScriptContext ctxt, final Global ctxtGlobal) throws ScriptException {
         if (script == null) {
             return null;
         }
@@ -436,8 +440,13 @@
                 Context.setGlobal(ctxtGlobal);
             }
 
+            final ScriptContext oldCtxt = ctxtGlobal.getScriptContext();
             ctxtGlobal.setScriptContext(ctxt);
-            return ScriptObjectMirror.translateUndefined(ScriptObjectMirror.wrap(ScriptRuntime.apply(script, ctxtGlobal), ctxtGlobal));
+            try {
+                return ScriptObjectMirror.translateUndefined(ScriptObjectMirror.wrap(ScriptRuntime.apply(script, ctxtGlobal), ctxtGlobal));
+            } finally {
+                ctxtGlobal.setScriptContext(oldCtxt);
+            }
         } catch (final Exception e) {
             throwAsScriptException(e, ctxtGlobal);
             throw new AssertionError("should not reach here");
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ScriptObjectMirror.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ScriptObjectMirror.java	Mon Jun 08 11:31:09 2015 -0700
@@ -47,6 +47,7 @@
 import jdk.nashorn.internal.runtime.ConsString;
 import jdk.nashorn.internal.runtime.Context;
 import jdk.nashorn.internal.runtime.ECMAException;
+import jdk.nashorn.internal.runtime.JSONListAdapter;
 import jdk.nashorn.internal.runtime.JSType;
 import jdk.nashorn.internal.runtime.ScriptFunction;
 import jdk.nashorn.internal.runtime.ScriptObject;
@@ -72,6 +73,7 @@
     private final ScriptObject sobj;
     private final Global  global;
     private final boolean strict;
+    private final boolean jsonCompatible;
 
     @Override
     public boolean equals(final Object other) {
@@ -110,9 +112,9 @@
             }
 
             if (sobj instanceof ScriptFunction) {
-                final Object[] modArgs = globalChanged? wrapArray(args, oldGlobal) : args;
-                final Object self = globalChanged? wrap(thiz, oldGlobal) : thiz;
-                return wrap(ScriptRuntime.apply((ScriptFunction)sobj, unwrap(self, global), unwrapArray(modArgs, global)), global);
+                final Object[] modArgs = globalChanged? wrapArrayLikeMe(args, oldGlobal) : args;
+                final Object self = globalChanged? wrapLikeMe(thiz, oldGlobal) : thiz;
+                return wrapLikeMe(ScriptRuntime.apply((ScriptFunction)sobj, unwrap(self, global), unwrapArray(modArgs, global)));
             }
 
             throw new RuntimeException("not a function: " + toString());
@@ -140,8 +142,8 @@
             }
 
             if (sobj instanceof ScriptFunction) {
-                final Object[] modArgs = globalChanged? wrapArray(args, oldGlobal) : args;
-                return wrap(ScriptRuntime.construct((ScriptFunction)sobj, unwrapArray(modArgs, global)), global);
+                final Object[] modArgs = globalChanged? wrapArrayLikeMe(args, oldGlobal) : args;
+                return wrapLikeMe(ScriptRuntime.construct((ScriptFunction)sobj, unwrapArray(modArgs, global)));
             }
 
             throw new RuntimeException("not a constructor: " + toString());
@@ -170,7 +172,7 @@
                                 return Context.getContext();
                             }
                         }, GET_CONTEXT_ACC_CTXT);
-                return wrap(context.eval(global, s, sobj, null, false), global);
+                return wrapLikeMe(context.eval(global, s, sobj, null, false));
             }
         });
     }
@@ -193,8 +195,8 @@
 
             final Object val = sobj.get(functionName);
             if (val instanceof ScriptFunction) {
-                final Object[] modArgs = globalChanged? wrapArray(args, oldGlobal) : args;
-                return wrap(ScriptRuntime.apply((ScriptFunction)val, sobj, unwrapArray(modArgs, global)), global);
+                final Object[] modArgs = globalChanged? wrapArrayLikeMe(args, oldGlobal) : args;
+                return wrapLikeMe(ScriptRuntime.apply((ScriptFunction)val, sobj, unwrapArray(modArgs, global)));
             } else if (val instanceof JSObject && ((JSObject)val).isFunction()) {
                 return ((JSObject)val).call(sobj, args);
             }
@@ -218,7 +220,7 @@
         Objects.requireNonNull(name);
         return inGlobal(new Callable<Object>() {
             @Override public Object call() {
-                return wrap(sobj.get(name), global);
+                return wrapLikeMe(sobj.get(name));
             }
         });
     }
@@ -227,7 +229,7 @@
     public Object getSlot(final int index) {
         return inGlobal(new Callable<Object>() {
             @Override public Object call() {
-                return wrap(sobj.get(index), global);
+                return wrapLikeMe(sobj.get(index));
             }
         });
     }
@@ -368,7 +370,7 @@
 
                 while (iter.hasNext()) {
                     final String key   = iter.next();
-                    final Object value = translateUndefined(wrap(sobj.get(key), global));
+                    final Object value = translateUndefined(wrapLikeMe(sobj.get(key)));
                     entries.add(new AbstractMap.SimpleImmutableEntry<>(key, value));
                 }
 
@@ -382,7 +384,7 @@
         checkKey(key);
         return inGlobal(new Callable<Object>() {
             @Override public Object call() {
-                return translateUndefined(wrap(sobj.get(key), global));
+                return translateUndefined(wrapLikeMe(sobj.get(key)));
             }
         });
     }
@@ -419,8 +421,8 @@
         final boolean globalChanged = (oldGlobal != global);
         return inGlobal(new Callable<Object>() {
             @Override public Object call() {
-                final Object modValue = globalChanged? wrap(value, oldGlobal) : value;
-                return translateUndefined(wrap(sobj.put(key, unwrap(modValue, global), strict), global));
+                final Object modValue = globalChanged? wrapLikeMe(value, oldGlobal) : value;
+                return translateUndefined(wrapLikeMe(sobj.put(key, unwrap(modValue, global), strict)));
             }
         });
     }
@@ -434,7 +436,7 @@
             @Override public Object call() {
                 for (final Map.Entry<? extends String, ? extends Object> entry : map.entrySet()) {
                     final Object value = entry.getValue();
-                    final Object modValue = globalChanged? wrap(value, oldGlobal) : value;
+                    final Object modValue = globalChanged? wrapLikeMe(value, oldGlobal) : value;
                     final String key = entry.getKey();
                     checkKey(key);
                     sobj.set(key, unwrap(modValue, global), getCallSiteFlags());
@@ -449,7 +451,7 @@
         checkKey(key);
         return inGlobal(new Callable<Object>() {
             @Override public Object call() {
-                return translateUndefined(wrap(sobj.remove(key, strict), global));
+                return translateUndefined(wrapLikeMe(sobj.remove(key, strict)));
             }
         });
     }
@@ -486,7 +488,7 @@
                 final Iterator<Object> iter   = sobj.valueIterator();
 
                 while (iter.hasNext()) {
-                    values.add(translateUndefined(wrap(iter.next(), global)));
+                    values.add(translateUndefined(wrapLikeMe(iter.next())));
                 }
 
                 return Collections.unmodifiableList(values);
@@ -503,7 +505,7 @@
     public Object getProto() {
         return inGlobal(new Callable<Object>() {
             @Override public Object call() {
-                return wrap(sobj.getProto(), global);
+                return wrapLikeMe(sobj.getProto());
             }
         });
     }
@@ -532,7 +534,7 @@
     public Object getOwnPropertyDescriptor(final String key) {
         return inGlobal(new Callable<Object>() {
             @Override public Object call() {
-                return wrap(sobj.getOwnPropertyDescriptor(key), global);
+                return wrapLikeMe(sobj.getOwnPropertyDescriptor(key));
             }
         });
     }
@@ -661,16 +663,76 @@
      * @return wrapped/converted object
      */
     public static Object wrap(final Object obj, final Object homeGlobal) {
+        return wrap(obj, homeGlobal, false);
+    }
+
+    /**
+     * Make a script object mirror on given object if needed. Also converts ConsString instances to Strings. The
+     * created wrapper will implement the Java {@code List} interface if {@code obj} is a JavaScript
+     * {@code Array} object; this is compatible with Java JSON libraries expectations. Arrays retrieved through its
+     * properties (transitively) will also implement the list interface.
+     *
+     * @param obj object to be wrapped/converted
+     * @param homeGlobal global to which this object belongs. Not used for ConsStrings.
+     * @return wrapped/converted object
+     */
+    public static Object wrapAsJSONCompatible(final Object obj, final Object homeGlobal) {
+        return wrap(obj, homeGlobal, true);
+    }
+
+    /**
+     * Make a script object mirror on given object if needed. Also converts ConsString instances to Strings.
+     *
+     * @param obj object to be wrapped/converted
+     * @param homeGlobal global to which this object belongs. Not used for ConsStrings.
+     * @param jsonCompatible if true, the created wrapper will implement the Java {@code List} interface if
+     * {@code obj} is a JavaScript {@code Array} object. Arrays retrieved through its properties (transitively)
+     * will also implement the list interface.
+     * @return wrapped/converted object
+     */
+    private static Object wrap(final Object obj, final Object homeGlobal, final boolean jsonCompatible) {
         if(obj instanceof ScriptObject) {
-            return homeGlobal instanceof Global ? new ScriptObjectMirror((ScriptObject)obj, (Global)homeGlobal) : obj;
-        }
-        if(obj instanceof ConsString) {
+            if (!(homeGlobal instanceof Global)) {
+                return obj;
+            }
+            final ScriptObject sobj = (ScriptObject)obj;
+            final Global global = (Global)homeGlobal;
+            final ScriptObjectMirror mirror = new ScriptObjectMirror(sobj, global, jsonCompatible);
+            if (jsonCompatible && sobj.isArray()) {
+                return new JSONListAdapter(mirror, global);
+            }
+            return mirror;
+        } else if(obj instanceof ConsString) {
             return obj.toString();
+        } else if (jsonCompatible && obj instanceof ScriptObjectMirror) {
+            // Since choosing JSON compatible representation is an explicit decision on user's part, if we're asked to
+            // wrap a mirror that was not JSON compatible, explicitly create its compatible counterpart following the
+            // principle of least surprise.
+            return ((ScriptObjectMirror)obj).asJSONCompatible();
         }
         return obj;
     }
 
     /**
+     * Wraps the passed object with the same jsonCompatible flag as this mirror.
+     * @param obj the object
+     * @param homeGlobal the object's home global.
+     * @return a wrapper for the object.
+     */
+    private Object wrapLikeMe(final Object obj, final Object homeGlobal) {
+        return wrap(obj, homeGlobal, jsonCompatible);
+    }
+
+    /**
+     * Wraps the passed object with the same home global and jsonCompatible flag as this mirror.
+     * @param obj the object
+     * @return a wrapper for the object.
+     */
+    private Object wrapLikeMe(final Object obj) {
+        return wrapLikeMe(obj, global);
+    }
+
+    /**
      * Unwrap a script object mirror if needed.
      *
      * @param obj object to be unwrapped
@@ -681,6 +743,8 @@
         if (obj instanceof ScriptObjectMirror) {
             final ScriptObjectMirror mirror = (ScriptObjectMirror)obj;
             return (mirror.global == homeGlobal)? mirror.sobj : obj;
+        } else if (obj instanceof JSONListAdapter) {
+            return ((JSONListAdapter)obj).unwrap(homeGlobal);
         }
 
         return obj;
@@ -694,6 +758,10 @@
      * @return wrapped array
      */
     public static Object[] wrapArray(final Object[] args, final Object homeGlobal) {
+        return wrapArray(args, homeGlobal, false);
+    }
+
+    private static Object[] wrapArray(final Object[] args, final Object homeGlobal, final boolean jsonCompatible) {
         if (args == null || args.length == 0) {
             return args;
         }
@@ -701,12 +769,16 @@
         final Object[] newArgs = new Object[args.length];
         int index = 0;
         for (final Object obj : args) {
-            newArgs[index] = wrap(obj, homeGlobal);
+            newArgs[index] = wrap(obj, homeGlobal, jsonCompatible);
             index++;
         }
         return newArgs;
     }
 
+    private Object[] wrapArrayLikeMe(final Object[] args, final Object homeGlobal) {
+        return wrapArray(args, homeGlobal, jsonCompatible);
+    }
+
     /**
      * Unwrap an array of script object mirrors if needed.
      *
@@ -748,12 +820,17 @@
     // package-privates below this.
 
     ScriptObjectMirror(final ScriptObject sobj, final Global global) {
+        this(sobj, global, false);
+    }
+
+    private ScriptObjectMirror(final ScriptObject sobj, final Global global, final boolean jsonCompatible) {
         assert sobj != null : "ScriptObjectMirror on null!";
         assert global != null : "home Global is null";
 
         this.sobj = sobj;
         this.global = global;
         this.strict = global.isStrictContext();
+        this.jsonCompatible = jsonCompatible;
     }
 
     // accessors for script engine
@@ -838,4 +915,11 @@
             }
         });
     }
+
+    private ScriptObjectMirror asJSONCompatible() {
+        if (this.jsonCompatible) {
+            return this;
+        }
+        return new ScriptObjectMirror(sobj, global, true);
+    }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ArrayAccessTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ArrayAccessTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitArrayAccess(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ArrayLiteralTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ArrayLiteralTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitArrayLiteral(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/AssignmentTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/AssignmentTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -55,7 +55,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitAssignment(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BinaryTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BinaryTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -55,7 +55,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitBinary(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BlockTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BlockTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitBlock(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/BreakTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitBreak(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CaseTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CaseTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -56,7 +56,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitCase(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CatchTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CatchTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitCatch(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CompilationUnitTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CompilationUnitTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -67,7 +67,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitCompilationUnit(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CompoundAssignmentTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/CompoundAssignmentTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -57,7 +57,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitCompoundAssignment(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ConditionalExpressionTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ConditionalExpressionTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -61,7 +61,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitConditionalExpression(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ContinueTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitContinue(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DebuggerTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DebuggerTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -38,7 +38,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitDebugger(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DoWhileLoopTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/DoWhileLoopTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitDoWhileLoop(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/EmptyStatementTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/EmptyStatementTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -38,7 +38,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitEmptyStatement(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ErroneousTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ErroneousTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -38,7 +38,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitErroneous(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ExpressionStatementTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ExpressionStatementTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitExpressionStatement(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForInLoopTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForInLoopTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -71,7 +71,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitForInLoop(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ForLoopTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -72,7 +72,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitForLoop(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionCallTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionCallTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -55,7 +55,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitFunctionCall(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionDeclarationTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionDeclarationTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -74,7 +74,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitFunctionDeclaration(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionExpressionTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/FunctionExpressionTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -79,7 +79,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitFunctionExpression(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IdentifierTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IdentifierTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitIdentifier(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IfTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/IfTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitIf(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/InstanceOfTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/InstanceOfTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -52,7 +52,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitInstanceOf(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LabeledStatementTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LabeledStatementTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitLabeledStatement(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LineMapImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LineMapImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -35,12 +35,12 @@
     }
 
     @Override
-    public long getLineNumber(long pos) {
+    public long getLineNumber(final long pos) {
         return source.getLine((int)pos);
     }
 
     @Override
-    public long getColumnNumber(long pos) {
+    public long getColumnNumber(final long pos) {
         return source.getColumn((int)pos);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LiteralTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/LiteralTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -61,7 +61,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitLiteral(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/MemberSelectTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/MemberSelectTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitMemberSelect(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/NewTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/NewTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R, D> R accept(TreeVisitor<R, D> visitor, D data) {
+    public <R, D> R accept(final TreeVisitor<R, D> visitor, final D data) {
         return visitor.visitNew(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ObjectLiteralTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ObjectLiteralTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitObjectLiteral(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/PropertyTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/PropertyTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -70,7 +70,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitProperty(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/RegExpLiteralTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/RegExpLiteralTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -56,7 +56,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitRegExpLiteral(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ReturnTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ReturnTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitReturn(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SimpleTreeVisitorES5_1.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SimpleTreeVisitorES5_1.java	Mon Jun 08 11:31:09 2015 -0700
@@ -48,28 +48,28 @@
  */
 public class SimpleTreeVisitorES5_1<R, P> implements TreeVisitor<R, P> {
     @Override
-    public R visitAssignment(AssignmentTree node, P r) {
+    public R visitAssignment(final AssignmentTree node, final P r) {
         node.getVariable().accept(this, r);
         node.getExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitCompoundAssignment(CompoundAssignmentTree node, P r) {
+    public R visitCompoundAssignment(final CompoundAssignmentTree node, final P r) {
         node.getVariable().accept(this, r);
         node.getExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitBinary(BinaryTree node, P r) {
+    public R visitBinary(final BinaryTree node, final P r) {
         node.getLeftOperand().accept(this, r);
         node.getRightOperand().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitBlock(BlockTree node, P r) {
+    public R visitBlock(final BlockTree node, final P r) {
         node.getStatements().forEach((tree) -> {
             tree.accept(this, r);
         });
@@ -77,12 +77,12 @@
     }
 
     @Override
-    public R visitBreak(BreakTree node, P r) {
+    public R visitBreak(final BreakTree node, final P r) {
         return null;
     }
 
     @Override
-    public R visitCase(CaseTree node, P r) {
+    public R visitCase(final CaseTree node, final P r) {
         final Tree caseVal = node.getExpression();
         if (caseVal != null) {
             caseVal.accept(this, r);
@@ -95,7 +95,7 @@
     }
 
     @Override
-    public R visitCatch(CatchTree node, P r) {
+    public R visitCatch(final CatchTree node, final P r) {
         final Tree cond = node.getCondition();
         if (cond != null) {
             cond.accept(this, r);
@@ -106,7 +106,7 @@
     }
 
     @Override
-    public R visitConditionalExpression(ConditionalExpressionTree node, P r) {
+    public R visitConditionalExpression(final ConditionalExpressionTree node, final P r) {
         node.getCondition().accept(this, r);
         node.getTrueExpression().accept(this, r);
         node.getFalseExpression().accept(this, r);
@@ -114,35 +114,35 @@
     }
 
     @Override
-    public R visitContinue(ContinueTree node, P r) {
+    public R visitContinue(final ContinueTree node, final P r) {
         return null;
     }
 
     @Override
-    public R visitDebugger(DebuggerTree node, P r) {
+    public R visitDebugger(final DebuggerTree node, final P r) {
         return null;
     }
 
     @Override
-    public R visitDoWhileLoop(DoWhileLoopTree node, P r) {
+    public R visitDoWhileLoop(final DoWhileLoopTree node, final P r) {
         node.getStatement().accept(this, r);
         node.getCondition().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitErroneous(ErroneousTree node, P r) {
+    public R visitErroneous(final ErroneousTree node, final P r) {
         return null;
     }
 
     @Override
-    public R visitExpressionStatement(ExpressionStatementTree node, P r) {
+    public R visitExpressionStatement(final ExpressionStatementTree node, final P r) {
         node.getExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitForLoop(ForLoopTree node, P r) {
+    public R visitForLoop(final ForLoopTree node, final P r) {
         final Tree init = node.getInitializer();
         if (init != null) {
             init.accept(this, r);
@@ -163,7 +163,7 @@
     }
 
     @Override
-    public R visitForInLoop(ForInLoopTree node, P r) {
+    public R visitForInLoop(final ForInLoopTree node, final P r) {
         node.getVariable().accept(this, r);
         node.getExpression().accept(this, r);
         final StatementTree stat = node.getStatement();
@@ -174,7 +174,7 @@
     }
 
     @Override
-    public R visitFunctionCall(FunctionCallTree node, P r) {
+    public R visitFunctionCall(final FunctionCallTree node, final P r) {
         node.getFunctionSelect().accept(this, r);
         node.getArguments().forEach((tree) -> {
             tree.accept(this, r);
@@ -183,7 +183,7 @@
     }
 
     @Override
-    public R visitFunctionDeclaration(FunctionDeclarationTree node, P r) {
+    public R visitFunctionDeclaration(final FunctionDeclarationTree node, final P r) {
         node.getParameters().forEach((tree) -> {
             tree.accept(this, r);
         });
@@ -192,7 +192,7 @@
     }
 
     @Override
-    public R visitFunctionExpression(FunctionExpressionTree node, P r) {
+    public R visitFunctionExpression(final FunctionExpressionTree node, final P r) {
         node.getParameters().forEach((tree) -> {
             tree.accept(this, r);
         });
@@ -201,12 +201,12 @@
     }
 
     @Override
-    public R visitIdentifier(IdentifierTree node, P r) {
+    public R visitIdentifier(final IdentifierTree node, final P r) {
         return null;
     }
 
     @Override
-    public R visitIf(IfTree node, P r) {
+    public R visitIf(final IfTree node, final P r) {
         node.getCondition().accept(this, r);
         node.getThenStatement().accept(this, r);
         final Tree elseStat = node.getElseStatement();
@@ -217,14 +217,14 @@
     }
 
     @Override
-    public R visitArrayAccess(ArrayAccessTree node, P r) {
+    public R visitArrayAccess(final ArrayAccessTree node, final P r) {
         node.getExpression().accept(this, r);
         node.getIndex().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitArrayLiteral(ArrayLiteralTree node, P r) {
+    public R visitArrayLiteral(final ArrayLiteralTree node, final P r) {
         node.getElements().stream().filter((tree) -> (tree != null)).forEach((tree) -> {
             tree.accept(this, r);
         });
@@ -232,24 +232,24 @@
     }
 
     @Override
-    public R visitLabeledStatement(LabeledStatementTree node, P r) {
+    public R visitLabeledStatement(final LabeledStatementTree node, final P r) {
         node.getStatement().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitLiteral(LiteralTree node, P r) {
+    public R visitLiteral(final LiteralTree node, final P r) {
         return null;
     }
 
     @Override
-    public R visitParenthesized(ParenthesizedTree node, P r) {
+    public R visitParenthesized(final ParenthesizedTree node, final P r) {
         node.getExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitReturn(ReturnTree node, P r) {
+    public R visitReturn(final ReturnTree node, final P r) {
         final Tree retExpr = node.getExpression();
         if (retExpr != null) {
             retExpr.accept(this, r);
@@ -258,19 +258,19 @@
     }
 
     @Override
-    public R visitMemberSelect(MemberSelectTree node, P r) {
+    public R visitMemberSelect(final MemberSelectTree node, final P r) {
         node.getExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitNew(NewTree node, P r) {
+    public R visitNew(final NewTree node, final P r) {
         node.getConstructorExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitObjectLiteral(ObjectLiteralTree node, P r) {
+    public R visitObjectLiteral(final ObjectLiteralTree node, final P r) {
         node.getProperties().forEach((tree) -> {
             tree.accept(this, r);
         });
@@ -278,7 +278,7 @@
     }
 
     @Override
-    public R visitProperty(PropertyTree node, P r) {
+    public R visitProperty(final PropertyTree node, final P r) {
         FunctionExpressionTree getter = node.getGetter();
         if (getter != null) {
             getter.accept(this, r);
@@ -301,17 +301,17 @@
     }
 
     @Override
-    public R visitRegExpLiteral(RegExpLiteralTree node, P r) {
+    public R visitRegExpLiteral(final RegExpLiteralTree node, final P r) {
         return null;
     }
 
     @Override
-    public R visitEmptyStatement(EmptyStatementTree node, P r) {
+    public R visitEmptyStatement(final EmptyStatementTree node, final P r) {
         return null;
     }
 
     @Override
-    public R visitSwitch(SwitchTree node, P r) {
+    public R visitSwitch(final SwitchTree node, final P r) {
         node.getExpression().accept(this, r);
         node.getCases().forEach((tree) -> {
             tree.accept(this, r);
@@ -320,13 +320,13 @@
     }
 
     @Override
-    public R visitThrow(ThrowTree node, P r) {
+    public R visitThrow(final ThrowTree node, final P r) {
         node.getExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitCompilationUnit(CompilationUnitTree node, P r) {
+    public R visitCompilationUnit(final CompilationUnitTree node, final P r) {
         node.getSourceElements().forEach((tree) -> {
             tree.accept(this, r);
         });
@@ -334,7 +334,7 @@
     }
 
     @Override
-    public R visitTry(TryTree node, P r) {
+    public R visitTry(final TryTree node, final P r) {
         node.getBlock().accept(this, r);
         node.getCatches().forEach((tree) -> {
             tree.accept(this, r);
@@ -348,20 +348,20 @@
     }
 
     @Override
-    public R visitInstanceOf(InstanceOfTree node, P r) {
+    public R visitInstanceOf(final InstanceOfTree node, final P r) {
         node.getType().accept(this, r);
         node.getExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitUnary(UnaryTree node, P r) {
+    public R visitUnary(final UnaryTree node, final P r) {
         node.getExpression().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitVariable(VariableTree node, P r) {
+    public R visitVariable(final VariableTree node, final P r) {
         if (node.getInitializer() != null) {
             node.getInitializer().accept(this, r);
         }
@@ -369,21 +369,21 @@
     }
 
     @Override
-    public R visitWhileLoop(WhileLoopTree node, P r) {
+    public R visitWhileLoop(final WhileLoopTree node, final P r) {
         node.getCondition().accept(this, r);
         node.getStatement().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitWith(WithTree node, P r) {
+    public R visitWith(final WithTree node, final P r) {
         node.getScope().accept(this, r);
         node.getStatement().accept(this, r);
         return null;
     }
 
     @Override
-    public R visitUnknown(Tree node, P r) {
+    public R visitUnknown(final Tree node, final P r) {
         // unknown in ECMAScript 5.1 edition
         throw new UnknownTreeException(node, r);
     }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SwitchTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/SwitchTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -55,7 +55,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitSwitch(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ThrowTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/ThrowTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -45,7 +45,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitThrow(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitUnknown(this, data);
     }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TryTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/TryTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitTry(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/UnaryTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/UnaryTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -47,7 +47,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitUnary(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/VariableTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/VariableTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitVariable(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/WhileLoopTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/WhileLoopTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitWhileLoop(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/WithTreeImpl.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/tree/WithTreeImpl.java	Mon Jun 08 11:31:09 2015 -0700
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public <R,D> R accept(TreeVisitor<R,D> visitor, D data) {
+    public <R,D> R accept(final TreeVisitor<R,D> visitor, final D data) {
         return visitor.visitWith(this, data);
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java	Mon Jun 08 11:31:09 2015 -0700
@@ -363,7 +363,7 @@
             //partial code generation
             final FunctionNode newFunctionNode = transformFunction(fn, new ReplaceCompileUnits() {
                 @Override
-                CompileUnit getReplacement(CompileUnit original) {
+                CompileUnit getReplacement(final CompileUnit original) {
                     return map.get(original);
                 }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesPersistence.java	Mon Jun 08 11:31:09 2015 -0700
@@ -567,7 +567,7 @@
         final MessageDigest digest = MessageDigest.getInstance("SHA-1");
         Files.walk(nashorn).forEach(new Consumer<Path>() {
             @Override
-            public void accept(Path p) {
+            public void accept(final Path p) {
                 // take only the .class resources.
                 if (Files.isRegularFile(p) && p.toString().endsWith(".class")) {
                     try {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/SplitIntoFunctions.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/SplitIntoFunctions.java	Mon Jun 08 11:31:09 2015 -0700
@@ -102,7 +102,7 @@
     public SplitIntoFunctions(final Compiler compiler) {
         super(new BlockLexicalContext() {
             @Override
-            protected Block afterSetStatements(Block block) {
+            protected Block afterSetStatements(final Block block) {
                 for(Statement stmt: block.getStatements()) {
                     assert !(stmt instanceof SplitNode);
                 }
@@ -305,7 +305,7 @@
     }
 
     @Override
-    public boolean enterVarNode(VarNode varNode) {
+    public boolean enterVarNode(final VarNode varNode) {
         if (!inSplitNode()) {
             return super.enterVarNode(varNode);
         }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/SplitReturn.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/SplitReturn.java	Mon Jun 08 11:31:09 2015 -0700
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public void toString(StringBuilder sb, boolean printType) {
+    public void toString(final StringBuilder sb, final boolean printType) {
         sb.append(":splitreturn;");
     }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/TryNode.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/TryNode.java	Mon Jun 08 11:31:09 2015 -0700
@@ -122,7 +122,7 @@
      * @param visitor IR navigating visitor.
      */
     @Override
-    public Node accept(final LexicalContext lc, NodeVisitor<? extends LexicalContext> visitor) {
+    public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
         if (visitor.enterTryNode(this)) {
             // Need to do finallybody first for termination analysis. TODO still necessary?
             final Block newFinallyBody = finallyBody == null ? null : (Block)finallyBody.accept(visitor);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/NashornTextifier.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/NashornTextifier.java	Mon Jun 08 11:31:09 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1109,7 +1109,7 @@
                 }
                 final String ex = catches.get(node);
                 if (ex != null) {
-                    sb.append("*** CATCH: ").append(ex).append(" ***\n");
+                    sb.append("*** CATCH: ").append(ex).append(" ***\\l");
                 }
                 sb.append(c);
                 sb.append("\"]\n");
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java	Mon Jun 08 11:31:09 2015 -0700
@@ -928,9 +928,11 @@
     private final Context context;
 
     // current ScriptContext to use - can be null.
-    private ScriptContext scontext;
+    private ThreadLocal<ScriptContext> scontext;
     // current ScriptEngine associated - can be null.
     private ScriptEngine engine;
+    // initial ScriptContext - can be null
+    private volatile ScriptContext initscontext;
 
     // ES6 global lexical scope.
     private final LexicalScope lexicalScope;
@@ -940,10 +942,25 @@
 
     /**
      * Set the current script context
-     * @param scontext script context
+     * @param ctxt script context
      */
-    public void setScriptContext(final ScriptContext scontext) {
-        this.scontext = scontext;
+    public void setScriptContext(final ScriptContext ctxt) {
+        assert scontext != null;
+        scontext.set(ctxt);
+    }
+
+    /**
+     * Get the current script context
+     * @return current script context
+     */
+    public ScriptContext getScriptContext() {
+        assert scontext != null;
+        return scontext.get();
+    }
+
+    private ScriptContext currentContext() {
+        final ScriptContext sc = scontext != null? scontext.get() : null;
+        return sc == null? initscontext : sc;
     }
 
     @Override
@@ -1056,14 +1073,19 @@
      * of the global scope object.
      *
      * @param eng ScriptEngine to initialize
+     * @param ctxt ScriptContext to initialize
      */
-    public void initBuiltinObjects(final ScriptEngine eng) {
+    public void initBuiltinObjects(final ScriptEngine eng, final ScriptContext ctxt) {
         if (this.builtinObject != null) {
             // already initialized, just return
             return;
         }
 
         this.engine = eng;
+        this.initscontext = ctxt;
+        if (this.engine != null) {
+            this.scontext = new ThreadLocal<>();
+        }
         init(eng);
     }
 
@@ -1392,7 +1414,7 @@
      */
     public static Object __noSuchProperty__(final Object self, final Object name) {
         final Global global = Global.instance();
-        final ScriptContext sctxt = global.scontext;
+        final ScriptContext sctxt = global.currentContext();
         final String nameStr = name.toString();
 
         if (sctxt != null) {
@@ -2737,8 +2759,9 @@
     }
 
     private Object printImpl(final boolean newLine, final Object... objects) {
+        final ScriptContext sc = currentContext();
         @SuppressWarnings("resource")
-        final PrintWriter out = scontext != null? new PrintWriter(scontext.getWriter()) : getContext().getEnv().getOut();
+        final PrintWriter out = sc != null? new PrintWriter(sc.getWriter()) : getContext().getEnv().getOut();
         final StringBuilder sb = new StringBuilder();
 
         for (final Object obj : objects) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeJava.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeJava.java	Mon Jun 08 11:31:09 2015 -0700
@@ -33,10 +33,12 @@
 import java.util.Collection;
 import java.util.Deque;
 import java.util.List;
+import java.util.Map;
 import java.util.Queue;
 import jdk.internal.dynalink.beans.StaticClass;
 import jdk.internal.dynalink.support.TypeUtilities;
 import jdk.nashorn.api.scripting.JSObject;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
 import jdk.nashorn.internal.objects.annotations.Attribute;
 import jdk.nashorn.internal.objects.annotations.Function;
 import jdk.nashorn.internal.objects.annotations.ScriptClass;
@@ -656,4 +658,20 @@
     public static Object _super(final Object self, final Object adapter) {
         return Bootstrap.createSuperAdapter(adapter);
     }
+
+    /**
+     * Returns an object that is compatible with Java JSON libraries expectations; namely, that if it itself, or any
+     * object transitively reachable through it is a JavaScript array, then such objects will be exposed as
+     * {@link JSObject} that also implements the {@link List} interface for exposing the array elements. An explicit
+     * API is required as otherwise Nashorn exposes all objects externally as {@link JSObject}s that also implement the
+     * {@link Map} interface instead. By using this method, arrays will be exposed as {@link List}s and all other
+     * objects as {@link Map}s.
+     * @param self not used
+     * @param obj the object to be exposed in a Java JSON library compatible manner.
+     * @return a wrapper around the object that will enforce Java JSON library compatible exposure.
+     */
+    @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR)
+    public static Object asJSONCompatible(final Object self, final Object obj) {
+        return ScriptObjectMirror.wrapAsJSONCompatible(obj, Context.getGlobal());
+    }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CompiledFunction.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CompiledFunction.java	Mon Jun 08 11:31:09 2015 -0700
@@ -528,8 +528,9 @@
 
         final int fnParamCountNoCallee = fnParamCount - thisThisIndex;
         final int minParams = Math.min(csParamCount - 1, fnParamCountNoCallee); // callSiteType always has callee, so subtract 1
-        // We must match all incoming parameters, except "this". Starting from 1 to skip "this".
-        for(int i = 1; i < minParams; ++i) {
+        // We must match all incoming parameters, including "this". "this" will usually be Object, but there
+        // are exceptions, e.g. when calling functions with primitive "this" in strict mode or through call/apply.
+        for(int i = 0; i < minParams; ++i) {
             final Type fnType = Type.typeFor(type.parameterType(i + thisThisIndex));
             final Type csType = csIsVarArg ? Type.OBJECT : Type.typeFor(other.parameterType(i + 1));
             if(!fnType.isEquivalentTo(csType)) {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java	Mon Jun 08 11:31:09 2015 -0700
@@ -66,6 +66,7 @@
 import java.util.function.Consumer;
 import java.util.function.Supplier;
 import java.util.logging.Level;
+import javax.script.ScriptContext;
 import javax.script.ScriptEngine;
 import jdk.internal.org.objectweb.asm.ClassReader;
 import jdk.internal.org.objectweb.asm.util.CheckClassAdapter;
@@ -1095,16 +1096,17 @@
      *
      * @param global the global
      * @param engine the associated ScriptEngine instance, can be null
+     * @param ctxt the initial ScriptContext, can be null
      * @return the initialized global scope object.
      */
-    public Global initGlobal(final Global global, final ScriptEngine engine) {
+    public Global initGlobal(final Global global, final ScriptEngine engine, final ScriptContext ctxt) {
         // Need only minimal global object, if we are just compiling.
         if (!env._compile_only) {
             final Global oldGlobal = Context.getGlobal();
             try {
                 Context.setGlobal(global);
                 // initialize global scope with builtin global objects
-                global.initBuiltinObjects(engine);
+                global.initBuiltinObjects(engine, ctxt);
             } finally {
                 Context.setGlobal(oldGlobal);
             }
@@ -1120,7 +1122,7 @@
      * @return the initialized global scope object.
      */
     public Global initGlobal(final Global global) {
-        return initGlobal(global, null);
+        return initGlobal(global, null, null);
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/JSONListAdapter.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.nashorn.internal.runtime;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import jdk.nashorn.api.scripting.JSObject;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
+import jdk.nashorn.internal.objects.Global;
+
+/**
+ * A {@link ListAdapter} that also implements {@link JSObject}. Named {@code JSONListAdapter} as it is used as a
+ * {@code JSObject} implementing the {@link List} interface, which is the expected interface to be implemented by
+ * JSON-parsed arrays when they are handled in Java. We aren't implementing {@link JSObject} on {@link ListAdapter}
+ * directly since that'd have implications for other uses of list adapter (e.g. interferences of JSObject default
+ * value calculation vs. List's {@code toString()} etc.)
+ */
+public final class JSONListAdapter extends ListAdapter implements JSObject {
+    /**
+     * Creates a new JSON list adapter.
+     * @param obj the underlying object being exposed as a list.
+     * @param global the home global of the underlying object.
+     */
+    public JSONListAdapter(final JSObject obj, final Global global) {
+        super(obj, global);
+    }
+
+    /**
+     * Unwraps this adapter into its underlying non-JSObject representative.
+     * @param homeGlobal the home global for unwrapping
+     * @return either the unwrapped object or this if it should not be unwrapped in the specified global.
+     */
+    public Object unwrap(final Object homeGlobal) {
+        final Object unwrapped = ScriptObjectMirror.unwrap(obj, homeGlobal);
+        return unwrapped != obj ? unwrapped : this;
+    }
+
+    @Override
+    public Object call(final Object thiz, final Object... args) {
+        return obj.call(thiz, args);
+    }
+
+    @Override
+    public Object newObject(final Object... args) {
+        return obj.newObject(args);
+    }
+
+    @Override
+    public Object eval(final String s) {
+        return obj.eval(s);
+    }
+
+    @Override
+    public Object getMember(final String name) {
+        return obj.getMember(name);
+    }
+
+    @Override
+    public Object getSlot(final int index) {
+        return obj.getSlot(index);
+    }
+
+    @Override
+    public boolean hasMember(final String name) {
+        return obj.hasMember(name);
+    }
+
+    @Override
+    public boolean hasSlot(final int slot) {
+        return obj.hasSlot(slot);
+    }
+
+    @Override
+    public void removeMember(final String name) {
+        obj.removeMember(name);
+    }
+
+    @Override
+    public void setMember(final String name, final Object value) {
+        obj.setMember(name, value);
+    }
+
+    @Override
+    public void setSlot(final int index, final Object value) {
+        obj.setSlot(index, value);
+    }
+
+    @Override
+    public Set<String> keySet() {
+        return obj.keySet();
+    }
+
+    @Override
+    public Collection<Object> values() {
+        return obj.values();
+    }
+
+    @Override
+    public boolean isInstance(final Object instance) {
+        return obj.isInstance(instance);
+    }
+
+    @Override
+    public boolean isInstanceOf(final Object clazz) {
+        return obj.isInstanceOf(clazz);
+    }
+
+    @Override
+    public String getClassName() {
+        return obj.getClassName();
+    }
+
+    @Override
+    public boolean isFunction() {
+        return obj.isFunction();
+    }
+
+    @Override
+    public boolean isStrictFunction() {
+        return obj.isStrictFunction();
+    }
+
+    @Override
+    public boolean isArray() {
+        return obj.isArray();
+    }
+
+    @Override @Deprecated
+    public double toNumber() {
+        return obj.toNumber();
+    }
+
+    @Override
+    public Object getDefaultValue(Class<?> hint) throws UnsupportedOperationException {
+        return obj.getDefaultValue(hint);
+    }
+}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ListAdapter.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ListAdapter.java	Mon Jun 08 11:31:09 2015 -0700
@@ -52,7 +52,7 @@
  * operations respectively, while {@link #addLast(Object)} and {@link #removeLast()} will translate to {@code push} and
  * {@code pop}.
  */
-public final class ListAdapter extends AbstractList<Object> implements RandomAccess, Deque<Object> {
+public class ListAdapter extends AbstractList<Object> implements RandomAccess, Deque<Object> {
     // Invoker creator for methods that add to the start or end of the list: PUSH and UNSHIFT. Takes fn, this, and value, returns void.
     private static final Callable<MethodHandle> ADD_INVOKER_CREATOR = invokerCreator(void.class, Object.class, JSObject.class, Object.class);
 
@@ -78,21 +78,17 @@
     private static final Callable<MethodHandle> SPLICE_REMOVE_INVOKER_CREATOR = invokerCreator(void.class, Object.class, JSObject.class, int.class, int.class);
 
     /** wrapped object */
-    private final JSObject obj;
+    final JSObject obj;
     private final Global global;
 
     // allow subclasses only in this package
-    ListAdapter(final JSObject obj) {
-        this.obj = obj;
-        this.global = getGlobalNonNull();
-    }
+    ListAdapter(final JSObject obj, final Global global) {
+        if (global == null) {
+            throw new IllegalStateException(ECMAErrors.getMessage("list.adapter.null.global"));
+        }
 
-    private static Global getGlobalNonNull() {
-        final Global global = Context.getGlobal();
-        if (global != null) {
-            return global;
-        }
-        throw new IllegalStateException(ECMAErrors.getMessage("list.adapter.null.global"));
+        this.obj = obj;
+        this.global = global;
     }
 
     /**
@@ -102,12 +98,13 @@
      * @return A ListAdapter wrapper object
      */
     public static ListAdapter create(final Object obj) {
-        return new ListAdapter(getJSObject(obj));
+        final Global global = Context.getGlobal();
+        return new ListAdapter(getJSObject(obj, global), global);
     }
 
-    private static JSObject getJSObject(final Object obj) {
+    private static JSObject getJSObject(final Object obj, final Global global) {
         if (obj instanceof ScriptObject) {
-            return (JSObject)ScriptObjectMirror.wrap(obj, Context.getGlobal());
+            return (JSObject)ScriptObjectMirror.wrap(obj, global);
         } else if (obj instanceof JSObject) {
             return (JSObject)obj;
         }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptingFunctions.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptingFunctions.java	Mon Jun 08 11:31:09 2015 -0700
@@ -137,7 +137,7 @@
         final ScriptObject global = Context.getGlobal();
 
         // Set up initial process.
-        final ProcessBuilder processBuilder = new ProcessBuilder(tokenizeCommandLine(JSType.toString(string)));
+        final ProcessBuilder processBuilder = new ProcessBuilder(tokenizeString(JSType.toString(string)));
 
         // Current ENV property state.
         final Object env = global.get(ENV_NAME);
@@ -237,23 +237,22 @@
     }
 
     /**
-     * Break an exec string into tokens, honoring quoted arguments and escaped
-     * spaces.
+     * Break a string into tokens, honoring quoted arguments and escaped spaces.
      *
-     * @param execString a {@link String} with the command line to execute.
+     * @param str a {@link String} to tokenize.
      * @return a {@link List} of {@link String}s representing the tokens that
-     * constitute the command line.
+     * constitute the string.
      * @throws IOException in case {@link StreamTokenizer#nextToken()} raises it.
      */
-    public static List<String> tokenizeCommandLine(final String execString) throws IOException {
-        final StreamTokenizer tokenizer = new StreamTokenizer(new StringReader(execString));
+    public static List<String> tokenizeString(final String str) throws IOException {
+        final StreamTokenizer tokenizer = new StreamTokenizer(new StringReader(str));
         tokenizer.resetSyntax();
         tokenizer.wordChars(0, 255);
         tokenizer.whitespaceChars(0, ' ');
         tokenizer.commentChar('#');
         tokenizer.quoteChar('"');
         tokenizer.quoteChar('\'');
-        final List<String> cmdList = new ArrayList<>();
+        final List<String> tokenList = new ArrayList<>();
         final StringBuilder toAppend = new StringBuilder();
         while (tokenizer.nextToken() != StreamTokenizer.TT_EOF) {
             final String s = tokenizer.sval;
@@ -265,13 +264,13 @@
                 // omit trailing \, append space instead
                 toAppend.append(s.substring(0, s.length() - 1)).append(' ');
             } else {
-                cmdList.add(toAppend.append(s).toString());
+                tokenList.add(toAppend.append(s).toString());
                 toAppend.setLength(0);
             }
         }
         if (toAppend.length() != 0) {
-            cmdList.add(toAppend.toString());
+            tokenList.add(toAppend.toString());
         }
-        return cmdList;
+        return tokenList;
     }
 }
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Source.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Source.java	Mon Jun 08 11:31:09 2015 -0700
@@ -934,14 +934,16 @@
             start = 2;
             cs = StandardCharsets.UTF_16BE;
         } else if (bytes.length > 1 && bytes[0] == (byte) 0xFF && bytes[1] == (byte) 0xFE) {
-            start = 2;
-            cs = StandardCharsets.UTF_16LE;
+            if (bytes.length > 3 && bytes[2] == 0 && bytes[3] == 0) {
+                start = 4;
+                cs = Charset.forName("UTF-32LE");
+            } else {
+                start = 2;
+                cs = StandardCharsets.UTF_16LE;
+            }
         } else if (bytes.length > 2 && bytes[0] == (byte) 0xEF && bytes[1] == (byte) 0xBB && bytes[2] == (byte) 0xBF) {
             start = 3;
             cs = StandardCharsets.UTF_8;
-        } else if (bytes.length > 3 && bytes[0] == (byte) 0xFF && bytes[1] == (byte) 0xFE && bytes[2] == 0 && bytes[3] == 0) {
-            start = 4;
-            cs = Charset.forName("UTF-32LE");
         } else if (bytes.length > 3 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == (byte) 0xFE && bytes[3] == (byte) 0xFF) {
             start = 4;
             cs = Charset.forName("UTF-32BE");
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java	Mon Jun 08 11:31:09 2015 -0700
@@ -246,7 +246,7 @@
         }
 
         @Override
-        public MethodHandle filterInternalObjects(MethodHandle target) {
+        public MethodHandle filterInternalObjects(final MethodHandle target) {
             return linkerServices.filterInternalObjects(target);
         }
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/ProblemList.txt	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,26 @@
+###########################################################################
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# 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.
+#
+###########################################################################
+
+# No nashorn tests are on the problem list.
--- a/nashorn/test/TEST.ROOT	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/test/TEST.ROOT	Mon Jun 08 11:31:09 2015 -0700
@@ -1,6 +1,11 @@
 # This file identifies the root of the test-suite hierarchy.
 # It also contains test-suite configuration information.
-# DO NOT EDIT without first contacting jdk-regtest@sun.com.
 
 # The list of keywords supported in the entire test suite
-keys=2d dnd i18n
+keys=intermittent randomness
+
+# Group definitions
+groups=TEST.groups
+
+# Minimum jtreg version
+requiredVersion=4.1 b11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/TEST.groups	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,29 @@
+#  Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+#  This code is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License version 2 only, as
+#  published by the Free Software Foundation.
+#
+#  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.
+#
+
+# Tiered testing definitions
+
+# No nashorn tests are tier 1.
+tier1 =
+
+# All nashorn tests are tier 2.
+tier2 = src
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8066220.js	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * 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.
+ */
+
+/**
+ * JDK-8066220: Fuzzing bug: MethodHandle bug (Object,Object) != (boolean)Object
+ *
+ * @test
+ * @run
+ */
+
+
+function f() {}
+// Call f with primitive this first, then as constructor
+f.call(1);
+new f();
+
+// Same as above in strict mode
+eval('"use strict"; function e() { print(typeof this); } e.call(1); new e();');
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8066220.js.EXPECTED	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,2 @@
+number
+object
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/JSONCompatibleTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.nashorn.api.scripting;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class JSONCompatibleTest {
+
+    /**
+     * Wrap a top-level array as a list.
+     */
+    @Test
+    public void testWrapArray() throws ScriptException {
+        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+        final Object val = engine.eval("Java.asJSONCompatible([1, 2, 3])");
+        assertEquals(asList(val), Arrays.asList(1, 2, 3));
+    }
+
+    /**
+     * Wrap an embedded array as a list.
+     */
+    @Test
+    public void testWrapObjectWithArray() throws ScriptException {
+        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+        final Object val = engine.eval("Java.asJSONCompatible({x: [1, 2, 3]})");
+        assertEquals(asList(asMap(val).get("x")), Arrays.asList(1, 2, 3));
+    }
+
+    /**
+     * Check it all works transitively several more levels down.
+     */
+    @Test
+    public void testDeepWrapping() throws ScriptException {
+        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+        final Object val = engine.eval("Java.asJSONCompatible({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
+        final Map<String, Object> root = asMap(val);
+        final List<Object> x = asList(root.get("x"));
+        assertEquals(x.get(0), 1);
+        final Map<String, Object> x1 = asMap(x.get(1));
+        final List<Object> y = asList(x1.get("y"));
+        assertEquals(y.get(0), 2);
+        final Map<String, Object> y1 = asMap(y.get(1));
+        assertEquals(asList(y1.get("z")), Arrays.asList(3));
+        assertEquals(asList(x.get(2)), Arrays.asList(4, 5));
+    }
+
+    /**
+     * Ensure that the old behaviour (every object is a Map) is unchanged.
+     */
+    @Test
+    public void testNonWrapping() throws ScriptException {
+        final ScriptEngine engine = new NashornScriptEngineFactory().getScriptEngine();
+        final Object val = engine.eval("({x: [1, {y: [2, {z: [3]}]}, [4, 5]]})");
+        final Map<String, Object> root = asMap(val);
+        final Map<String, Object> x = asMap(root.get("x"));
+        assertEquals(x.get("0"), 1);
+        final Map<String, Object> x1 = asMap(x.get("1"));
+        final Map<String, Object> y = asMap(x1.get("y"));
+        assertEquals(y.get("0"), 2);
+        final Map<String, Object> y1 = asMap(y.get("1"));
+        final Map<String, Object> z = asMap(y1.get("z"));
+        assertEquals(z.get("0"), 3);
+        final Map<String, Object> x2 = asMap(x.get("2"));
+        assertEquals(x2.get("0"), 4);
+        assertEquals(x2.get("1"), 5);
+    }
+
+    private static List<Object> asList(final Object obj) {
+        assertJSObject(obj);
+        Assert.assertTrue(obj instanceof List);
+        return (List)obj;
+    }
+
+    private static Map<String, Object> asMap(final Object obj) {
+        assertJSObject(obj);
+        Assert.assertTrue(obj instanceof Map);
+        return (Map)obj;
+    }
+
+    private static void assertJSObject(final Object obj) {
+        assertTrue(obj instanceof JSObject);
+    }
+}
--- a/nashorn/test/src/jdk/nashorn/api/scripting/test/ScopeTest.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/test/ScopeTest.java	Mon Jun 08 11:31:09 2015 -0700
@@ -31,10 +31,12 @@
 import javax.script.Bindings;
 import javax.script.ScriptContext;
 import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
 import javax.script.ScriptEngineManager;
 import javax.script.ScriptException;
 import javax.script.SimpleBindings;
 import javax.script.SimpleScriptContext;
+import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
 import jdk.nashorn.api.scripting.ScriptObjectMirror;
 import jdk.nashorn.api.scripting.URLReader;
 import org.testng.Assert;
@@ -778,4 +780,44 @@
             throw new AssertionError("should have thrown NPE");
         } catch (NullPointerException npe5) {}
     }
+
+    public static class RecursiveEval {
+        private final ScriptEngineFactory factory = new NashornScriptEngineFactory();
+        private final ScriptEngine engine = factory.getScriptEngine();
+        private final Bindings engineBindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);
+
+        public void program() throws ScriptException {
+            ScriptContext sc = new SimpleScriptContext();
+            Bindings global = new SimpleBindings();
+            sc.setBindings(global, ScriptContext.GLOBAL_SCOPE);
+            sc.setBindings(engineBindings, ScriptContext.ENGINE_SCOPE);
+            global.put("text", "programText");
+            String value = engine.eval("text", sc).toString();
+            Assert.assertEquals(value, "programText");
+            engine.put("program", this);
+            engine.eval("program.method()");
+            // eval again from here!
+            value = engine.eval("text", sc).toString();
+            Assert.assertEquals(value, "programText");
+        }
+
+        public void method() throws ScriptException {
+            // a context with a new global bindings, same engine bindings
+            final ScriptContext sc = new SimpleScriptContext();
+            final Bindings global = new SimpleBindings();
+            sc.setBindings(global, ScriptContext.GLOBAL_SCOPE);
+            sc.setBindings(engineBindings, ScriptContext.ENGINE_SCOPE);
+            global.put("text", "methodText");
+            String value = engine.eval("text", sc).toString();
+            Assert.assertEquals(value, "methodText");
+        }
+    }
+
+    // @bug 8081609: engine.eval call from a java method which
+    // was called from a previous engine.eval results in wrong
+    // ScriptContext being used.
+    @Test
+    public void recursiveEvalCallScriptContextTest() throws ScriptException {
+        new RecursiveEval().program();
+    }
 }
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/TestFinder.java	Mon Jun 08 16:47:23 2015 +0100
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/TestFinder.java	Mon Jun 08 11:31:09 2015 -0700
@@ -225,7 +225,7 @@
         boolean explicitOptimistic = false;
 
         String allContent = new String(Files.readAllBytes(testFile));
-        Iterator<String> scanner = ScriptingFunctions.tokenizeCommandLine(allContent).iterator();
+        Iterator<String> scanner = ScriptingFunctions.tokenizeString(allContent).iterator();
         while (scanner.hasNext()) {
             // TODO: Scan for /ref=file qualifiers, etc, to determine run
             // behavior