Merge
authorduke
Wed, 05 Jul 2017 20:30:08 +0200
changeset 30018 dcb4db72550c
parent 30017 e36081ad2470 (current diff)
parent 30008 af6a00b61db7 (diff)
child 30019 e7dbbef69d12
Merge
jdk/src/java.base/share/classes/sun/security/provider/certpath/ReverseBuilder.java
jdk/src/java.base/share/classes/sun/security/provider/certpath/ReverseState.java
jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilderParameters.java
jdk/test/sun/security/provider/certpath/ReverseBuilder/BuildPath.java
jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java
jdk/test/sun/security/provider/certpath/ReverseBuilder/mgrM2leadMA
jdk/test/sun/security/provider/certpath/ReverseBuilder/mgrM2mgrM
jdk/test/sun/security/provider/certpath/ReverseBuilder/mgrM2prjM
jdk/test/sun/security/provider/certpath/ReverseBuilder/mgrMcrl
jdk/test/sun/security/provider/certpath/ReverseBuilder/prjM2divE
jdk/test/sun/security/provider/certpath/ReverseBuilder/prjM2mgrM
jdk/test/sun/security/provider/certpath/ReverseBuilder/prjMcrl
--- a/.hgtags-top-repo	Thu Apr 23 18:21:26 2015 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 20:30:08 2017 +0200
@@ -303,3 +303,4 @@
 6e78dd9b121037719a065fe8fb25b936babdfecb jdk9-b58
 39e8a131289e8386aa4c3e4b184faa812a7c0421 jdk9-b59
 9fa2185bee17462d1014538bff60af6e6f0b01e7 jdk9-b60
+ea38728b4f4bdd8fd0d7a89b18069f521cf05013 jdk9-b61
--- a/corba/.hgtags	Thu Apr 23 18:21:26 2015 -0700
+++ b/corba/.hgtags	Wed Jul 05 20:30:08 2017 +0200
@@ -303,3 +303,4 @@
 86dd5de1f5cb09073019bd629e22cfcd012d8b4b jdk9-b58
 cda6ae062f85fac5555f4e1318885b0ecd998bd1 jdk9-b59
 caa330b275f39282793466529f6864766b31d9fd jdk9-b60
+d690f489ca0bb95a6157d996da2fa72bcbcf02ea jdk9-b61
--- a/hotspot/.hgtags	Thu Apr 23 18:21:26 2015 -0700
+++ b/hotspot/.hgtags	Wed Jul 05 20:30:08 2017 +0200
@@ -463,3 +463,4 @@
 ee878f3d6732856f7725c590312bfbe2ffa52cc7 jdk9-b58
 96bcaec07cb165782bae1b9a1f28450b37a10e3a jdk9-b59
 9c916db4bf3bc164a47b5a9cefe5ffd71e111f6a jdk9-b60
+715d2da5801c410746e92f08066d53bde1496286 jdk9-b61
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad	Thu Apr 23 18:21:26 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad	Wed Jul 05 20:30:08 2017 +0200
@@ -793,38 +793,832 @@
   }
 };
 
-  bool preceded_by_ordered_load(const Node *barrier);
+  // graph traversal helpers
+  MemBarNode *has_parent_membar(const Node *n,
+				ProjNode *&ctl, ProjNode *&mem);
+  MemBarNode *has_child_membar(const MemBarNode *n,
+			       ProjNode *&ctl, ProjNode *&mem);
+
+  // predicates controlling emit of ldr<x>/ldar<x> and associated dmb
+  bool unnecessary_acquire(const Node *barrier);
+  bool needs_acquiring_load(const Node *load);
+
+  // predicates controlling emit of str<x>/stlr<x> and associated dmbs
+  bool unnecessary_release(const Node *barrier);
+  bool unnecessary_volatile(const Node *barrier);
+  bool needs_releasing_store(const Node *store);
 
   // Use barrier instructions rather than load acquire / store
   // release.
-  const bool UseBarriersForVolatile = true;
+  const bool UseBarriersForVolatile = false;
+  // Use barrier instructions for unsafe volatile gets rather than
+  // trying to identify an exact signature for them
+  const bool UseBarriersForUnsafeVolatileGet = false;
 %}
 
 source %{
 
-  // AArch64 has load acquire and store release instructions which we
-  // use for ordered memory accesses, e.g. for volatiles.  The ideal
-  // graph generator also inserts memory barriers around volatile
-  // accesses, and we don't want to generate both barriers and acq/rel
-  // instructions.  So, when we emit a MemBarAcquire we look back in
-  // the ideal graph for an ordered load and only emit the barrier if
-  // we don't find one.
-
-bool preceded_by_ordered_load(const Node *barrier) {
+  // AArch64 has ldar<x> and stlr<x> instructions which we can safely
+  // use to implement volatile reads and writes. For a volatile read
+  // we simply need
+  //
+  //   ldar<x>
+  //
+  // and for a volatile write we need
+  //
+  //   stlr<x>
+  // 
+  // Alternatively, we can implement them by pairing a normal
+  // load/store with a memory barrier. For a volatile read we need
+  // 
+  //   ldr<x>
+  //   dmb ishld
+  //
+  // for a volatile write
+  //
+  //   dmb ish
+  //   str<x>
+  //   dmb ish
+  //
+  // In order to generate the desired instruction sequence we need to
+  // be able to identify specific 'signature' ideal graph node
+  // sequences which i) occur as a translation of a volatile reads or
+  // writes and ii) do not occur through any other translation or
+  // graph transformation. We can then provide alternative aldc
+  // matching rules which translate these node sequences to the
+  // desired machine code sequences. Selection of the alternative
+  // rules can be implemented by predicates which identify the
+  // relevant node sequences.
+  //
+  // The ideal graph generator translates a volatile read to the node
+  // sequence
+  //
+  //   LoadX[mo_acquire]
+  //   MemBarAcquire
+  //
+  // As a special case when using the compressed oops optimization we
+  // may also see this variant
+  //
+  //   LoadN[mo_acquire]
+  //   DecodeN
+  //   MemBarAcquire
+  //
+  // A volatile write is translated to the node sequence
+  //
+  //   MemBarRelease
+  //   StoreX[mo_release]
+  //   MemBarVolatile
+  //
+  // n.b. the above node patterns are generated with a strict
+  // 'signature' configuration of input and output dependencies (see
+  // the predicates below for exact details). The two signatures are
+  // unique to translated volatile reads/stores -- they will not
+  // appear as a result of any other bytecode translation or inlining
+  // nor as a consequence of optimizing transforms.
+  //
+  // We also want to catch inlined unsafe volatile gets and puts and
+  // be able to implement them using either ldar<x>/stlr<x> or some
+  // combination of ldr<x>/stlr<x> and dmb instructions.
+  //
+  // Inlined unsafe volatiles puts manifest as a minor variant of the
+  // normal volatile put node sequence containing an extra cpuorder
+  // membar
+  //
+  //   MemBarRelease
+  //   MemBarCPUOrder
+  //   StoreX[mo_release]
+  //   MemBarVolatile
+  //
+  // n.b. as an aside, the cpuorder membar is not itself subject to
+  // matching and translation by adlc rules.  However, the rule
+  // predicates need to detect its presence in order to correctly
+  // select the desired adlc rules.
+  //
+  // Inlined unsafe volatiles gets manifest as a somewhat different
+  // node sequence to a normal volatile get
+  //
+  //   MemBarCPUOrder
+  //        ||       \\
+  //   MemBarAcquire LoadX[mo_acquire]
+  //        ||
+  //   MemBarCPUOrder
+  //
+  // In this case the acquire membar does not directly depend on the
+  // load. However, we can be sure that the load is generated from an
+  // inlined unsafe volatile get if we see it dependent on this unique
+  // sequence of membar nodes. Similarly, given an acquire membar we
+  // can know that it was added because of an inlined unsafe volatile
+  // get if it is fed and feeds a cpuorder membar and if its feed
+  // membar also feeds an acquiring load.
+  //
+  // So, where we can identify these volatile read and write
+  // signatures we can choose to plant either of the above two code
+  // sequences. For a volatile read we can simply plant a normal
+  // ldr<x> and translate the MemBarAcquire to a dmb. However, we can
+  // also choose to inhibit translation of the MemBarAcquire and
+  // inhibit planting of the ldr<x>, instead planting an ldar<x>.
+  //
+  // When we recognise a volatile store signature we can choose to
+  // plant at a dmb ish as a translation for the MemBarRelease, a
+  // normal str<x> and then a dmb ish for the MemBarVolatile.
+  // Alternatively, we can inhibit translation of the MemBarRelease
+  // and MemBarVolatile and instead plant a simple stlr<x>
+  // instruction.
+  //
+  // Of course, the above only applies when we see these signature
+  // configurations. We still want to plant dmb instructions in any
+  // other cases where we may see a MemBarAcquire, MemBarRelease or
+  // MemBarVolatile. For example, at the end of a constructor which
+  // writes final/volatile fields we will see a MemBarRelease
+  // instruction and this needs a 'dmb ish' lest we risk the
+  // constructed object being visible without making the
+  // final/volatile field writes visible.
+  //
+  // n.b. the translation rules below which rely on detection of the
+  // volatile signatures and insert ldar<x> or stlr<x> are failsafe.
+  // If we see anything other than the signature configurations we
+  // always just translate the loads and stors to ldr<x> and str<x>
+  // and translate acquire, release and volatile membars to the
+  // relevant dmb instructions.
+  //
+  // n.b.b as a case in point for the above comment, the current
+  // predicates don't detect the precise signature for certain types
+  // of volatile object stores (where the heap_base input type is not
+  // known at compile-time to be non-NULL). In those cases the
+  // MemBarRelease and MemBarVolatile bracket an if-then-else sequence
+  // with a store in each branch (we need a different store depending
+  // on whether heap_base is actually NULL). In such a case we will
+  // just plant a dmb both before and after the branch/merge. The
+  // predicate could (and probably should) be fixed later to also
+  // detect this case.
+
+  // graph traversal helpers
+
+  // if node n is linked to a parent MemBarNode by an intervening
+  // Control or Memory ProjNode return the MemBarNode otherwise return
+  // NULL.
+  //
+  // n may only be a Load or a MemBar.
+  //
+  // The ProjNode* references c and m are used to return the relevant
+  // nodes.
+
+  MemBarNode *has_parent_membar(const Node *n, ProjNode *&c, ProjNode *&m)
+  {
+    Node *ctl = NULL;
+    Node *mem = NULL;
+    Node *membar = NULL;
+
+    if (n->is_Load()) {
+      ctl = n->lookup(LoadNode::Control);
+      mem = n->lookup(LoadNode::Memory);
+    } else if (n->is_MemBar()) {
+      ctl = n->lookup(TypeFunc::Control);
+      mem = n->lookup(TypeFunc::Memory);
+    } else {
+	return NULL;
+    }
+
+    if (!ctl || !mem || !ctl->is_Proj() || !mem->is_Proj())
+      return NULL;
+
+    c = ctl->as_Proj();
+
+    membar = ctl->lookup(0);
+
+    if (!membar || !membar->is_MemBar())
+      return NULL;
+
+    m = mem->as_Proj();
+
+    if (mem->lookup(0) != membar)
+      return NULL;
+
+    return membar->as_MemBar();
+  }
+
+  // if n is linked to a child MemBarNode by intervening Control and
+  // Memory ProjNodes return the MemBarNode otherwise return NULL.
+  //
+  // The ProjNode** arguments c and m are used to return pointers to
+  // the relevant nodes. A null argument means don't don't return a
+  // value.
+
+  MemBarNode *has_child_membar(const MemBarNode *n, ProjNode *&c, ProjNode *&m)
+  {
+    ProjNode *ctl = n->proj_out(TypeFunc::Control);
+    ProjNode *mem = n->proj_out(TypeFunc::Memory);
+
+    // MemBar needs to have both a Ctl and Mem projection
+    if (! ctl || ! mem)
+      return NULL;
+
+    c = ctl;
+    m = mem;
+
+    MemBarNode *child = NULL;
+    Node *x;
+
+    for (DUIterator_Fast imax, i = ctl->fast_outs(imax); i < imax; i++) {
+      x = ctl->fast_out(i);
+      // if we see a membar we keep hold of it. we may also see a new
+      // arena copy of the original but it will appear later
+      if (x->is_MemBar()) {
+	  child = x->as_MemBar();
+	  break;
+      }
+    }
+
+    if (child == NULL)
+      return NULL;
+
+    for (DUIterator_Fast imax, i = mem->fast_outs(imax); i < imax; i++) {
+      x = mem->fast_out(i);
+      // if we see a membar we keep hold of it. we may also see a new
+      // arena copy of the original but it will appear later
+      if (x == child) {
+	return child;
+      }
+    }
+    return NULL;
+  }
+
+  // predicates controlling emit of ldr<x>/ldar<x> and associated dmb
+
+bool unnecessary_acquire(const Node *barrier) {
+  // assert barrier->is_MemBar();
+  if (UseBarriersForVolatile)
+    // we need to plant a dmb
+    return false;
+
+  // a volatile read derived from bytecode (or also from an inlined
+  // SHA field read via LibraryCallKit::load_field_from_object)
+  // manifests as a LoadX[mo_acquire] followed by an acquire membar
+  // with a bogus read dependency on it's preceding load. so in those
+  // cases we will find the load node at the PARMS offset of the
+  // acquire membar.  n.b. there may be an intervening DecodeN node.
+  //
+  // a volatile load derived from an inlined unsafe field access
+  // manifests as a cpuorder membar with Ctl and Mem projections
+  // feeding both an acquire membar and a LoadX[mo_acquire]. The
+  // acquire then feeds another cpuorder membar via Ctl and Mem
+  // projections. The load has no output dependency on these trailing
+  // membars because subsequent nodes inserted into the graph take
+  // their control feed from the final membar cpuorder meaning they
+  // are all ordered after the load.
+
   Node *x = barrier->lookup(TypeFunc::Parms);
-
-  if (! x)
+  if (x) {
+    // we are starting from an acquire and it has a fake dependency
+    //
+    // need to check for
+    //
+    //   LoadX[mo_acquire]
+    //   {  |1   }
+    //   {DecodeN}
+    //      |Parms
+    //   MemBarAcquire*
+    //
+    // where * tags node we were passed
+    // and |k means input k
+    if (x->is_DecodeNarrowPtr())
+      x = x->in(1);
+
+    return (x->is_Load() && x->as_Load()->is_acquire());
+  }
+  
+  // only continue if we want to try to match unsafe volatile gets
+  if (UseBarriersForUnsafeVolatileGet)
+    return false;
+
+  // need to check for
+  //
+  //     MemBarCPUOrder
+  //        ||       \\
+  //   MemBarAcquire* LoadX[mo_acquire]
+  //        ||
+  //   MemBarCPUOrder
+  //
+  // where * tags node we were passed
+  // and || or \\ are Ctl+Mem feeds via intermediate Proj Nodes
+
+  // check for a parent MemBarCPUOrder
+  ProjNode *ctl;
+  ProjNode *mem;
+  MemBarNode *parent = has_parent_membar(barrier, ctl, mem);
+  if (!parent || parent->Opcode() != Op_MemBarCPUOrder)
+    return false;
+  // ensure the proj nodes both feed a LoadX[mo_acquire]
+  LoadNode *ld = NULL;
+  for (DUIterator_Fast imax, i = ctl->fast_outs(imax); i < imax; i++) {
+    x = ctl->fast_out(i);
+    // if we see a load we keep hold of it and stop searching
+    if (x->is_Load()) {
+      ld = x->as_Load();
+      break;
+    }
+  }
+  // it must be an acquiring load
+  if (! ld || ! ld->is_acquire())
+    return false;
+  for (DUIterator_Fast imax, i = mem->fast_outs(imax); i < imax; i++) {
+    x = mem->fast_out(i);
+    // if we see the same load we drop it and stop searching
+    if (x == ld) {
+      ld = NULL;
+      break;
+    }
+  }
+  // we must have dropped the load
+  if (ld)
+    return false;
+  // check for a child cpuorder membar
+  MemBarNode *child  = has_child_membar(barrier->as_MemBar(), ctl, mem);
+  if (!child || child->Opcode() != Op_MemBarCPUOrder)
+    return false;
+
+  return true;
+}
+
+bool needs_acquiring_load(const Node *n)
+{
+  // assert n->is_Load();
+  if (UseBarriersForVolatile)
+    // we use a normal load and a dmb
+    return false;
+
+  LoadNode *ld = n->as_Load();
+
+  if (!ld->is_acquire())
+    return false;
+
+  // check if this load is feeding an acquire membar
+  //
+  //   LoadX[mo_acquire]
+  //   {  |1   }
+  //   {DecodeN}
+  //      |Parms
+  //   MemBarAcquire*
+  //
+  // where * tags node we were passed
+  // and |k means input k
+
+  Node *start = ld;
+  Node *mbacq = NULL;
+
+  // if we hit a DecodeNarrowPtr we reset the start node and restart
+  // the search through the outputs
+ restart:
+
+  for (DUIterator_Fast imax, i = start->fast_outs(imax); i < imax; i++) {
+    Node *x = start->fast_out(i);
+    if (x->is_MemBar() && x->Opcode() == Op_MemBarAcquire) {
+      mbacq = x;
+    } else if (!mbacq &&
+	       (x->is_DecodeNarrowPtr() ||
+		(x->is_Mach() && x->Opcode() == Op_DecodeN))) {
+      start = x;
+      goto restart;
+    }
+  }
+
+  if (mbacq) {
+    return true;
+  }
+
+  // only continue if we want to try to match unsafe volatile gets
+  if (UseBarriersForUnsafeVolatileGet)
+    return false;
+
+  // check if Ctl and Proj feed comes from a MemBarCPUOrder
+  //
+  //     MemBarCPUOrder
+  //        ||       \\
+  //   MemBarAcquire* LoadX[mo_acquire]
+  //        ||
+  //   MemBarCPUOrder
+
+  MemBarNode *membar;
+  ProjNode *ctl;
+  ProjNode *mem;
+
+  membar = has_parent_membar(ld, ctl, mem);
+
+  if (!membar || !membar->Opcode() == Op_MemBarCPUOrder)
+    return false;
+
+  // ensure that there is a CPUOrder->Acquire->CPUOrder membar chain
+
+  membar = has_child_membar(membar, ctl, mem);
+
+  if (!membar || !membar->Opcode() == Op_MemBarAcquire)
+    return false;
+
+  membar = has_child_membar(membar, ctl, mem);
+  
+  if (!membar || !membar->Opcode() == Op_MemBarCPUOrder)
+    return false;
+
+  return true;
+}
+
+bool unnecessary_release(const Node *n) {
+  // assert n->is_MemBar();
+  if (UseBarriersForVolatile)
+    // we need to plant a dmb
+    return false;
+
+  // ok, so we can omit this release barrier if it has been inserted
+  // as part of a volatile store sequence
+  //
+  //   MemBarRelease
+  //  {      ||      }
+  //  {MemBarCPUOrder} -- optional
+  //         ||     \\
+  //         ||     StoreX[mo_release]
+  //         | \     /
+  //         | MergeMem
+  //         | /
+  //   MemBarVolatile
+  //
+  // where
+  //  || and \\ represent Ctl and Mem feeds via Proj nodes
+  //  | \ and / indicate further routing of the Ctl and Mem feeds
+  // 
+  // so we need to check that
+  //
+  // ia) the release membar (or its dependent cpuorder membar) feeds
+  // control to a store node (via a Control project node)
+  //
+  // ii) the store is ordered release
+  //
+  // iii) the release membar (or its dependent cpuorder membar) feeds
+  // control to a volatile membar (via the same Control project node)
+  //
+  // iv) the release membar feeds memory to a merge mem and to the
+  // same store (both via a single Memory proj node)
+  //
+  // v) the store outputs to the merge mem
+  //
+  // vi) the merge mem outputs to the same volatile membar
+  //
+  // n.b. if this is an inlined unsafe node then the release membar
+  // may feed its control and memory links via an intervening cpuorder
+  // membar. this case can be dealt with when we check the release
+  // membar projections. if they both feed a single cpuorder membar
+  // node continue to make the same checks as above but with the
+  // cpuorder membar substituted for the release membar. if they don't
+  // both feed a cpuorder membar then the check fails.
+  //
+  // n.b.b. for an inlined unsafe store of an object in the case where
+  // !TypePtr::NULL_PTR->higher_equal(type(heap_base_oop)) we may see
+  // an embedded if then else where we expect the store. this is
+  // needed to do the right type of store depending on whether
+  // heap_base is NULL. We could check for that but for now we can
+  // just take the hit of on inserting a redundant dmb for this
+  // redundant volatile membar
+
+  MemBarNode *barrier = n->as_MemBar();
+  ProjNode *ctl;
+  ProjNode *mem;
+  // check for an intervening cpuorder membar
+  MemBarNode *b = has_child_membar(barrier, ctl, mem);
+  if (b && b->Opcode() == Op_MemBarCPUOrder) {
+    // ok, so start form the dependent cpuorder barrier
+    barrier = b;
+  }
+  // check the ctl and mem flow
+  ctl = barrier->proj_out(TypeFunc::Control);
+  mem = barrier->proj_out(TypeFunc::Memory);
+
+  // the barrier needs to have both a Ctl and Mem projection
+  if (! ctl || ! mem)
+    return false;
+
+  Node *x = NULL;
+  Node *mbvol = NULL;
+  StoreNode * st = NULL;
+
+  // For a normal volatile write the Ctl ProjNode should have output
+  // to a MemBarVolatile and a Store marked as releasing
+  //
+  // n.b. for an inlined unsafe store of an object in the case where
+  // !TypePtr::NULL_PTR->higher_equal(type(heap_base_oop)) we may see
+  // an embedded if then else where we expect the store. this is
+  // needed to do the right type of store depending on whether
+  // heap_base is NULL. We could check for that case too but for now
+  // we can just take the hit of inserting a dmb and a non-volatile
+  // store to implement the volatile store
+
+  for (DUIterator_Fast imax, i = ctl->fast_outs(imax); i < imax; i++) {
+    x = ctl->fast_out(i);
+    if (x->is_MemBar() && x->Opcode() == Op_MemBarVolatile) {
+      if (mbvol) {
+	return false;
+      }
+      mbvol = x;
+    } else if (x->is_Store()) {
+      st = x->as_Store();
+      if (! st->is_release()) {
+	return false;
+      }
+    } else if (!x->is_Mach()) {
+      // we may see mach nodes added during matching but nothing else
+      return false;
+    }
+  }
+
+  if (!mbvol || !st)
     return false;
 
-  if (x->is_DecodeNarrowPtr())
-    x = x->in(1);
-
-  if (x->is_Load())
-    return ! x->as_Load()->is_unordered();
-
-  return false;
+  // the Mem ProjNode should output to a MergeMem and the same Store
+  Node *mm = NULL;
+  for (DUIterator_Fast imax, i = mem->fast_outs(imax); i < imax; i++) {
+    x = mem->fast_out(i);
+    if (!mm && x->is_MergeMem()) {
+      mm = x;
+    } else if (x != st && !x->is_Mach()) {
+      // we may see mach nodes added during matching but nothing else
+      return false;
+    }
+  }
+
+  if (!mm)
+    return false;
+
+  // the MergeMem should output to the MemBarVolatile
+  for (DUIterator_Fast imax, i = mm->fast_outs(imax); i < imax; i++) {
+    x = mm->fast_out(i);
+    if (x != mbvol && !x->is_Mach()) {
+      // we may see mach nodes added during matching but nothing else
+      return false;
+    }
+  }
+
+  return true;
 }
 
+bool unnecessary_volatile(const Node *n) {
+  // assert n->is_MemBar();
+  if (UseBarriersForVolatile)
+    // we need to plant a dmb
+    return false;
+
+  // ok, so we can omit this volatile barrier if it has been inserted
+  // as part of a volatile store sequence
+  //
+  //   MemBarRelease
+  //  {      ||      }
+  //  {MemBarCPUOrder} -- optional
+  //         ||     \\
+  //         ||     StoreX[mo_release]
+  //         | \     /
+  //         | MergeMem
+  //         | /
+  //   MemBarVolatile
+  //
+  // where
+  //  || and \\ represent Ctl and Mem feeds via Proj nodes
+  //  | \ and / indicate further routing of the Ctl and Mem feeds
+  // 
+  // we need to check that
+  //
+  // i) the volatile membar gets its control feed from a release
+  // membar (or its dependent cpuorder membar) via a Control project
+  // node
+  //
+  // ii) the release membar (or its dependent cpuorder membar) also
+  // feeds control to a store node via the same proj node
+  //
+  // iii) the store is ordered release
+  //
+  // iv) the release membar (or its dependent cpuorder membar) feeds
+  // memory to a merge mem and to the same store (both via a single
+  // Memory proj node)
+  //
+  // v) the store outputs to the merge mem
+  //
+  // vi) the merge mem outputs to the volatile membar
+  //
+  // n.b. for an inlined unsafe store of an object in the case where
+  // !TypePtr::NULL_PTR->higher_equal(type(heap_base_oop)) we may see
+  // an embedded if then else where we expect the store. this is
+  // needed to do the right type of store depending on whether
+  // heap_base is NULL. We could check for that but for now we can
+  // just take the hit of on inserting a redundant dmb for this
+  // redundant volatile membar
+
+  MemBarNode *mbvol = n->as_MemBar();
+  Node *x = n->lookup(TypeFunc::Control);
+
+  if (! x || !x->is_Proj())
+    return false;
+
+  ProjNode *proj = x->as_Proj();
+
+  x = proj->lookup(0);
+
+  if (!x || !x->is_MemBar())
+    return false;
+
+  MemBarNode *barrier = x->as_MemBar();
+
+  // if the barrier is a release membar we have what we want. if it is
+  // a cpuorder membar then we need to ensure that it is fed by a
+  // release membar in which case we proceed to check the graph below
+  // this cpuorder membar as the feed
+
+  if (x->Opcode() != Op_MemBarRelease) {
+    if (x->Opcode() != Op_MemBarCPUOrder)
+      return false;
+    ProjNode *ctl;
+    ProjNode *mem;
+    MemBarNode *b = has_parent_membar(x, ctl, mem);
+    if (!b || !b->Opcode() == Op_MemBarRelease)
+      return false;
+  }
+
+  ProjNode *ctl = barrier->proj_out(TypeFunc::Control);
+  ProjNode *mem = barrier->proj_out(TypeFunc::Memory);
+
+  // barrier needs to have both a Ctl and Mem projection
+  // and we need to have reached it via the Ctl projection
+  if (! ctl || ! mem || ctl != proj)
+    return false;
+
+  StoreNode * st = NULL;
+
+  // The Ctl ProjNode should have output to a MemBarVolatile and
+  // a Store marked as releasing
+  for (DUIterator_Fast imax, i = ctl->fast_outs(imax); i < imax; i++) {
+    x = ctl->fast_out(i);
+    if (x->is_MemBar() && x->Opcode() == Op_MemBarVolatile) {
+      if (x != mbvol) {
+	return false;
+      }
+    } else if (x->is_Store()) {
+      st = x->as_Store();
+      if (! st->is_release()) {
+	return false;
+      }
+    } else if (!x->is_Mach()){
+      // we may see mach nodes added during matching but nothing else
+      return false;
+    }
+  }
+
+  if (!st)
+    return false;
+
+  // the Mem ProjNode should output to a MergeMem and the same Store
+  Node *mm = NULL;
+  for (DUIterator_Fast imax, i = mem->fast_outs(imax); i < imax; i++) {
+    x = mem->fast_out(i);
+    if (!mm && x->is_MergeMem()) {
+      mm = x;
+    } else if (x != st && !x->is_Mach()) {
+      // we may see mach nodes added during matching but nothing else
+      return false;
+    }
+  }
+
+  if (!mm)
+    return false;
+
+  // the MergeMem should output to the MemBarVolatile
+  for (DUIterator_Fast imax, i = mm->fast_outs(imax); i < imax; i++) {
+    x = mm->fast_out(i);
+    if (x != mbvol && !x->is_Mach()) {
+      // we may see mach nodes added during matching but nothing else
+      return false;
+    }
+  }
+
+  return true;
+}
+
+
+
+bool needs_releasing_store(const Node *n)
+{
+  // assert n->is_Store();
+  if (UseBarriersForVolatile)
+    // we use a normal store and dmb combination
+    return false;
+
+  StoreNode *st = n->as_Store();
+
+  if (!st->is_release())
+    return false;
+
+  // check if this store is bracketed by a release (or its dependent
+  // cpuorder membar) and a volatile membar
+  //
+  //   MemBarRelease
+  //  {      ||      }
+  //  {MemBarCPUOrder} -- optional
+  //         ||     \\
+  //         ||     StoreX[mo_release]
+  //         | \     /
+  //         | MergeMem
+  //         | /
+  //   MemBarVolatile
+  //
+  // where
+  //  || and \\ represent Ctl and Mem feeds via Proj nodes
+  //  | \ and / indicate further routing of the Ctl and Mem feeds
+  // 
+
+
+  Node *x = st->lookup(TypeFunc::Control);
+
+  if (! x || !x->is_Proj())
+    return false;
+
+  ProjNode *proj = x->as_Proj();
+
+  x = proj->lookup(0);
+
+  if (!x || !x->is_MemBar())
+    return false;
+
+  MemBarNode *barrier = x->as_MemBar();
+
+  // if the barrier is a release membar we have what we want. if it is
+  // a cpuorder membar then we need to ensure that it is fed by a
+  // release membar in which case we proceed to check the graph below
+  // this cpuorder membar as the feed
+
+  if (x->Opcode() != Op_MemBarRelease) {
+    if (x->Opcode() != Op_MemBarCPUOrder)
+      return false;
+    Node *ctl = x->lookup(TypeFunc::Control);
+    Node *mem = x->lookup(TypeFunc::Memory);
+    if (!ctl || !ctl->is_Proj() || !mem || !mem->is_Proj())
+      return false;
+    x = ctl->lookup(0);
+    if (!x || !x->is_MemBar() || !x->Opcode() == Op_MemBarRelease)
+      return false;
+    Node *y = mem->lookup(0);
+    if (!y || y != x)
+      return false;
+  }
+
+  ProjNode *ctl = barrier->proj_out(TypeFunc::Control);
+  ProjNode *mem = barrier->proj_out(TypeFunc::Memory);
+
+  // MemBarRelease needs to have both a Ctl and Mem projection
+  // and we need to have reached it via the Ctl projection
+  if (! ctl || ! mem || ctl != proj)
+    return false;
+
+  MemBarNode *mbvol = NULL;
+
+  // The Ctl ProjNode should have output to a MemBarVolatile and
+  // a Store marked as releasing
+  for (DUIterator_Fast imax, i = ctl->fast_outs(imax); i < imax; i++) {
+    x = ctl->fast_out(i);
+    if (x->is_MemBar() && x->Opcode() == Op_MemBarVolatile) {
+      mbvol = x->as_MemBar();
+    } else if (x->is_Store()) {
+      if (x != st) {
+	return false;
+      }
+    } else if (!x->is_Mach()){
+      return false;
+    }
+  }
+
+  if (!mbvol)
+    return false;
+
+  // the Mem ProjNode should output to a MergeMem and the same Store
+  Node *mm = NULL;
+  for (DUIterator_Fast imax, i = mem->fast_outs(imax); i < imax; i++) {
+    x = mem->fast_out(i);
+    if (!mm && x->is_MergeMem()) {
+      mm = x;
+    } else if (x != st && !x->is_Mach()) {
+      return false;
+    }
+  }
+
+  if (!mm)
+    return false;
+
+  // the MergeMem should output to the MemBarVolatile
+  for (DUIterator_Fast imax, i = mm->fast_outs(imax); i < imax; i++) {
+    x = mm->fast_out(i);
+    if (x != mbvol && !x->is_Mach()) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+
+
 #define __ _masm.
 
 // advance declarations for helper functions to convert register
@@ -5151,7 +5945,7 @@
 instruct loadB(iRegINoSp dst, memory mem)
 %{
   match(Set dst (LoadB mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrsbw  $dst, $mem\t# byte" %}
@@ -5165,7 +5959,7 @@
 instruct loadB2L(iRegLNoSp dst, memory mem)
 %{
   match(Set dst (ConvI2L (LoadB mem)));
-  predicate(UseBarriersForVolatile || n->in(1)->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n->in(1)));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrsb  $dst, $mem\t# byte" %}
@@ -5179,7 +5973,7 @@
 instruct loadUB(iRegINoSp dst, memory mem)
 %{
   match(Set dst (LoadUB mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrbw  $dst, $mem\t# byte" %}
@@ -5193,7 +5987,7 @@
 instruct loadUB2L(iRegLNoSp dst, memory mem)
 %{
   match(Set dst (ConvI2L (LoadUB mem)));
-  predicate(UseBarriersForVolatile || n->in(1)->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n->in(1)));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrb  $dst, $mem\t# byte" %}
@@ -5207,7 +6001,7 @@
 instruct loadS(iRegINoSp dst, memory mem)
 %{
   match(Set dst (LoadS mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrshw  $dst, $mem\t# short" %}
@@ -5221,7 +6015,7 @@
 instruct loadS2L(iRegLNoSp dst, memory mem)
 %{
   match(Set dst (ConvI2L (LoadS mem)));
-  predicate(UseBarriersForVolatile || n->in(1)->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n->in(1)));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrsh  $dst, $mem\t# short" %}
@@ -5235,7 +6029,7 @@
 instruct loadUS(iRegINoSp dst, memory mem)
 %{
   match(Set dst (LoadUS mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrh  $dst, $mem\t# short" %}
@@ -5249,7 +6043,7 @@
 instruct loadUS2L(iRegLNoSp dst, memory mem)
 %{
   match(Set dst (ConvI2L (LoadUS mem)));
-  predicate(UseBarriersForVolatile || n->in(1)->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n->in(1)));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrh  $dst, $mem\t# short" %}
@@ -5263,7 +6057,7 @@
 instruct loadI(iRegINoSp dst, memory mem)
 %{
   match(Set dst (LoadI mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrw  $dst, $mem\t# int" %}
@@ -5277,7 +6071,7 @@
 instruct loadI2L(iRegLNoSp dst, memory mem)
 %{
   match(Set dst (ConvI2L (LoadI mem)));
-  predicate(UseBarriersForVolatile || n->in(1)->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n->in(1)));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrsw  $dst, $mem\t# int" %}
@@ -5291,7 +6085,7 @@
 instruct loadUI2L(iRegLNoSp dst, memory mem, immL_32bits mask)
 %{
   match(Set dst (AndL (ConvI2L (LoadI mem)) mask));
-  predicate(UseBarriersForVolatile || n->in(1)->in(1)->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n->in(1)->in(1)->as_Load()));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrw  $dst, $mem\t# int" %}
@@ -5305,7 +6099,7 @@
 instruct loadL(iRegLNoSp dst, memory mem)
 %{
   match(Set dst (LoadL mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldr  $dst, $mem\t# int" %}
@@ -5332,7 +6126,7 @@
 instruct loadP(iRegPNoSp dst, memory mem)
 %{
   match(Set dst (LoadP mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldr  $dst, $mem\t# ptr" %}
@@ -5346,7 +6140,7 @@
 instruct loadN(iRegNNoSp dst, memory mem)
 %{
   match(Set dst (LoadN mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrw  $dst, $mem\t# compressed ptr" %}
@@ -5360,7 +6154,7 @@
 instruct loadKlass(iRegPNoSp dst, memory mem)
 %{
   match(Set dst (LoadKlass mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldr  $dst, $mem\t# class" %}
@@ -5374,7 +6168,7 @@
 instruct loadNKlass(iRegNNoSp dst, memory mem)
 %{
   match(Set dst (LoadNKlass mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrw  $dst, $mem\t# compressed class ptr" %}
@@ -5388,7 +6182,7 @@
 instruct loadF(vRegF dst, memory mem)
 %{
   match(Set dst (LoadF mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrs  $dst, $mem\t# float" %}
@@ -5402,7 +6196,7 @@
 instruct loadD(vRegD dst, memory mem)
 %{
   match(Set dst (LoadD mem));
-  predicate(UseBarriersForVolatile || n->as_Load()->is_unordered());
+  predicate(!needs_acquiring_load(n));
 
   ins_cost(4 * INSN_COST);
   format %{ "ldrd  $dst, $mem\t# double" %}
@@ -5633,7 +6427,7 @@
 instruct storeB(iRegIorL2I src, memory mem)
 %{
   match(Set mem (StoreB mem src));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strb  $src, $mem\t# byte" %}
@@ -5647,7 +6441,7 @@
 instruct storeimmB0(immI0 zero, memory mem)
 %{
   match(Set mem (StoreB mem zero));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strb zr, $mem\t# byte" %}
@@ -5661,7 +6455,7 @@
 instruct storeC(iRegIorL2I src, memory mem)
 %{
   match(Set mem (StoreC mem src));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strh  $src, $mem\t# short" %}
@@ -5674,7 +6468,7 @@
 instruct storeimmC0(immI0 zero, memory mem)
 %{
   match(Set mem (StoreC mem zero));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strh  zr, $mem\t# short" %}
@@ -5689,7 +6483,7 @@
 instruct storeI(iRegIorL2I src, memory mem)
 %{
   match(Set mem(StoreI mem src));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strw  $src, $mem\t# int" %}
@@ -5702,7 +6496,7 @@
 instruct storeimmI0(immI0 zero, memory mem)
 %{
   match(Set mem(StoreI mem zero));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strw  zr, $mem\t# int" %}
@@ -5716,7 +6510,7 @@
 instruct storeL(iRegL src, memory mem)
 %{
   match(Set mem (StoreL mem src));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "str  $src, $mem\t# int" %}
@@ -5730,7 +6524,7 @@
 instruct storeimmL0(immL0 zero, memory mem)
 %{
   match(Set mem (StoreL mem zero));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "str  zr, $mem\t# int" %}
@@ -5744,7 +6538,7 @@
 instruct storeP(iRegP src, memory mem)
 %{
   match(Set mem (StoreP mem src));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "str  $src, $mem\t# ptr" %}
@@ -5758,7 +6552,7 @@
 instruct storeimmP0(immP0 zero, memory mem)
 %{
   match(Set mem (StoreP mem zero));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "str zr, $mem\t# ptr" %}
@@ -5772,7 +6566,7 @@
 instruct storeN(iRegN src, memory mem)
 %{
   match(Set mem (StoreN mem src));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strw  $src, $mem\t# compressed ptr" %}
@@ -5787,7 +6581,7 @@
   match(Set mem (StoreN mem zero));
   predicate(Universe::narrow_oop_base() == NULL &&
             Universe::narrow_klass_base() == NULL &&
-            (UseBarriersForVolatile || n->as_Store()->is_unordered()));
+            (!needs_releasing_store(n)));
 
   ins_cost(INSN_COST);
   format %{ "strw  rheapbase, $mem\t# compressed ptr (rheapbase==0)" %}
@@ -5801,7 +6595,7 @@
 instruct storeF(vRegF src, memory mem)
 %{
   match(Set mem (StoreF mem src));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strs  $src, $mem\t# float" %}
@@ -5818,7 +6612,7 @@
 instruct storeD(vRegD src, memory mem)
 %{
   match(Set mem (StoreD mem src));
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
 
   ins_cost(INSN_COST);
   format %{ "strd  $src, $mem\t# double" %}
@@ -5831,7 +6625,7 @@
 // Store Compressed Klass Pointer
 instruct storeNKlass(iRegN src, memory mem)
 %{
-  predicate(UseBarriersForVolatile || n->as_Store()->is_unordered());
+  predicate(!needs_releasing_store(n));
   match(Set mem (StoreNKlass mem src));
 
   ins_cost(INSN_COST);
@@ -6293,7 +7087,7 @@
 %}
 
 instruct unnecessary_membar_acquire() %{
-  predicate(! UseBarriersForVolatile && preceded_by_ordered_load(n));
+  predicate(unnecessary_acquire(n));
   match(MemBarAcquire);
   ins_cost(0);
 
@@ -6345,6 +7139,19 @@
   ins_pipe(pipe_serial);
 %}
 
+instruct unnecessary_membar_release() %{
+  predicate(unnecessary_release(n));
+  match(MemBarRelease);
+  ins_cost(0);
+
+  format %{ "membar_release (elided)" %}
+
+  ins_encode %{
+    __ block_comment("membar_release (elided)");
+  %}
+  ins_pipe(pipe_serial);
+%}
+
 instruct membar_release() %{
   match(MemBarRelease);
   ins_cost(VOLATILE_REF_COST);
@@ -6382,6 +7189,20 @@
   ins_pipe(pipe_serial);
 %}
 
+instruct unnecessary_membar_volatile() %{
+  predicate(unnecessary_volatile(n));
+  match(MemBarVolatile);
+  ins_cost(0);
+
+  format %{ "membar_volatile (elided)" %}
+
+  ins_encode %{
+    __ block_comment("membar_volatile (elided)");
+  %}
+
+  ins_pipe(pipe_serial);
+%}
+
 instruct membar_volatile() %{
   match(MemBarVolatile);
   ins_cost(VOLATILE_REF_COST*100);
--- a/jaxp/.hgtags	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/.hgtags	Wed Jul 05 20:30:08 2017 +0200
@@ -303,3 +303,4 @@
 270fb9a2dcb5ff3ef95da6d529fa35187026af0a jdk9-b58
 a1a9d943446911a4a0f74f0d082c32094af944ae jdk9-b59
 c12db18748dacfccd6581ead29228c2cb6e51b34 jdk9-b60
+f4a4a54620370f077c2e830a5561c8cfa811712b jdk9-b61
--- a/jaxp/src/java.xml/share/classes/javax/xml/XMLConstants.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/XMLConstants.java	Wed Jul 05 20:30:08 2017 +0200
@@ -26,7 +26,7 @@
 package javax.xml;
 
 /**
- * <p>Utility class to contain basic XML values as constants.</p>
+ * <p>Utility class to contain basic XML values as constants.
  *
  * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
  * @see <a href="http://www.w3.org/TR/xml11/">Extensible Markup Language (XML) 1.1</a>
@@ -42,15 +42,15 @@
 public final class XMLConstants {
 
     /**
-     * <p>Private constructor to prevent instantiation.</p>
+     * Private constructor to prevent instantiation.
      */
-        private XMLConstants() {
-        }
+    private XMLConstants() {
+    }
 
     /**
-     * <p>Namespace URI to use to represent that there is no Namespace.</p>
+     * Namespace URI to use to represent that there is no Namespace.
      *
-     * <p>Defined by the Namespace specification to be "".</p>
+     * <p>Defined by the Namespace specification to be "".
      *
      * @see <a href="http://www.w3.org/TR/REC-xml-names/#defaulting">
      * Namespaces in XML, 5.2 Namespace Defaulting</a>
@@ -58,9 +58,9 @@
     public static final String NULL_NS_URI = "";
 
     /**
-     * <p>Prefix to use to represent the default XML Namespace.</p>
+     * Prefix to use to represent the default XML Namespace.
      *
-     * <p>Defined by the XML specification to be "".</p>
+     * <p>Defined by the XML specification to be "".
      *
      * @see <a
      * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
@@ -69,10 +69,10 @@
     public static final String DEFAULT_NS_PREFIX = "";
 
     /**
-     * <p>The official XML Namespace name URI.</p>
+     * The official XML Namespace name URI.
      *
      * <p>Defined by the XML specification to be
-     * "{@code http://www.w3.org/XML/1998/namespace}".</p>
+     * "{@code http://www.w3.org/XML/1998/namespace}".
      *
      * @see <a
      * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
@@ -82,23 +82,23 @@
         "http://www.w3.org/XML/1998/namespace";
 
     /**
-     * <p>The official XML Namespace prefix.</p>
+     * The official XML Namespace prefix.
      *
-     * <p>Defined by the XML specification to be "{@code xml}".</p>
+     * <p>Defined by the XML specification to be "{@code xml}".
      *
      * @see <a
      * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
-     * Namespaces in XML, 3. Qualified Names<</a>
+     * Namespaces in XML, 3. Qualified Names</a>
      */
     public static final String XML_NS_PREFIX = "xml";
 
     /**
-     * <p>The official XML attribute used for specifying XML Namespace
+     * The official XML attribute used for specifying XML Namespace
      * declarations, {@link #XMLNS_ATTRIBUTE
-     * XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI.</p>
+     * XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI.
      *
      * <p>Defined by the XML specification to be
-     * "{@code http://www.w3.org/2000/xmlns/}".</p>
+     * "{@code http://www.w3.org/2000/xmlns/}".
      *
      * @see <a
      * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
@@ -111,12 +111,12 @@
         "http://www.w3.org/2000/xmlns/";
 
     /**
-     * <p>The official XML attribute used for specifying XML Namespace
-     * declarations.</p>
+     * The official XML attribute used for specifying XML Namespace
+     * declarations.
      *
      * <p>It is <strong><em>NOT</em></strong> valid to use as a
      * prefix.  Defined by the XML specification to be
-     * "{@code xmlns}".</p>
+     * "{@code xmlns}".
      *
      * @see <a
      * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
@@ -125,7 +125,7 @@
     public static final String XMLNS_ATTRIBUTE = "xmlns";
 
     /**
-     * <p>W3C XML Schema Namespace URI.</p>
+     * W3C XML Schema Namespace URI.
      *
      * <p>Defined to be "{@code http://www.w3.org/2001/XMLSchema}".
      *
@@ -138,9 +138,9 @@
         "http://www.w3.org/2001/XMLSchema";
 
     /**
-     * <p>W3C XML Schema Instance Namespace URI.</p>
+     * W3C XML Schema Instance Namespace URI.
      *
-     * <p>Defined to be "{@code http://www.w3.org/2001/XMLSchema-instance}".</p>
+     * <p>Defined to be "{@code http://www.w3.org/2001/XMLSchema-instance}".
      *
      * @see <a href=
      *  "http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
@@ -150,33 +150,33 @@
     public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI =
         "http://www.w3.org/2001/XMLSchema-instance";
 
-        /**
-         * <p>W3C XPath Datatype Namespace URI.</p>
-         *
-         * <p>Defined to be "{@code http://www.w3.org/2003/11/xpath-datatypes}".</p>
-         *
-         * @see <a href="http://www.w3.org/TR/xpath-datamodel">XQuery 1.0 and XPath 2.0 Data Model</a>
-         */
-        public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
+    /**
+     * W3C XPath Datatype Namespace URI.
+     *
+     * <p>Defined to be "{@code http://www.w3.org/2003/11/xpath-datatypes}".
+     *
+     * @see <a href="http://www.w3.org/TR/xpath-datamodel">XQuery 1.0 and XPath 2.0 Data Model</a>
+     */
+    public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
 
     /**
-     * <p>XML Document Type Declaration Namespace URI as an arbitrary value.</p>
+     * XML Document Type Declaration Namespace URI as an arbitrary value.
      *
      * <p>Since not formally defined by any existing standard, arbitrarily define to be "{@code http://www.w3.org/TR/REC-xml}".
      */
     public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
 
         /**
-         * <p>RELAX NG Namespace URI.</p>
+         * RELAX NG Namespace URI.
          *
-         * <p>Defined to be "{@code http://relaxng.org/ns/structure/1.0}".</p>
+         * <p>Defined to be "{@code http://relaxng.org/ns/structure/1.0}".
          *
          * @see <a href="http://relaxng.org/spec-20011203.html">RELAX NG Specification</a>
          */
         public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
 
         /**
-         * <p>Feature for secure processing.</p>
+         * Feature for secure processing.
          *
          * <ul>
          *   <li>
@@ -193,14 +193,13 @@
 
 
         /**
-         * <p>Property: accessExternalDTD</p>
+         * Property: accessExternalDTD
          *
          * <p>
          * Restrict access to external DTDs and external Entity References to the protocols specified.
          * If access is denied due to the restriction of this property, a runtime exception that
          * is specific to the context is thrown. In the case of {@link javax.xml.parsers.SAXParser}
          * for example, {@link org.xml.sax.SAXException} is thrown.
-         * </p>
          *
          * <p>
          * <b>Value: </b> a list of protocols separated by comma. A protocol is the scheme portion of a
@@ -221,7 +220,6 @@
          * Examples of protocols are file, http, jar:file.
          *
          * </blockquote>
-         *</p>
          *
          *<p>
          * <b>Default value:</b> The default value is implementation specific and therefore not specified.
@@ -231,20 +229,19 @@
          *     <LI>an empty string to deny all access to external references;</LI>
          *     <LI>a specific protocol, such as file, to give permission to only the protocol;</LI>
          *     <LI>the keyword "all" to grant  permission to all protocols.</LI>
-         *</UL><br>
+         * </UL><br>
          *      When FEATURE_SECURE_PROCESSING is enabled,  it is recommended that implementations
          *      restrict external connections by default, though this may cause problems for applications
          *      that process XML/XSD/XSL with external references.
          * </blockquote>
-         * </p>
          *
          * <p>
          * <b>Granting all access:</b>  the keyword "all" grants permission to all protocols.
-         * </p>
+         *
          * <p>
          * <b>System Property:</b> The value of this property can be set or overridden by
          * system property {@code javax.xml.accessExternalDTD}.
-         * </p>
+         *
          *
          * <p>
          * <b>jaxp.properties:</b> This configuration file is in standard
@@ -252,11 +249,8 @@
          * directory of the Java installation. If the file exists and the system
          * property is specified, its value will be used to override the default
          * of the property.
-         * </p>
          *
-         * <p>
          *
-         * </p>
          * @since 1.7
          */
         public static final String ACCESS_EXTERNAL_DTD = "http://javax.xml.XMLConstants/property/accessExternalDTD";
@@ -270,7 +264,7 @@
          * due to the restriction of this property, a runtime exception that is specific
          * to the context is thrown. In the case of {@link javax.xml.validation.SchemaFactory}
          * for example, org.xml.sax.SAXException is thrown.
-         * </p>
+         *
          * <p>
          * <b>Value:</b> a list of protocols separated by comma. A protocol is the scheme portion of a
          * {@link java.net.URI}, or in the case of the JAR protocol, "jar" plus the scheme portion
@@ -290,9 +284,8 @@
          * Examples of protocols are file, http, jar:file.
          *
          * </blockquote>
-         *</p>
          *
-         *<p>
+         * <p>
          * <b>Default value:</b> The default value is implementation specific and therefore not specified.
          * The following options are provided for consideration:
          * <blockquote>
@@ -300,20 +293,18 @@
          *     <LI>an empty string to deny all access to external references;</LI>
          *     <LI>a specific protocol, such as file, to give permission to only the protocol;</LI>
          *     <LI>the keyword "all" to grant  permission to all protocols.</LI>
-         *</UL><br>
+         * </UL><br>
          *      When FEATURE_SECURE_PROCESSING is enabled,  it is recommended that implementations
          *      restrict external connections by default, though this may cause problems for applications
          *      that process XML/XSD/XSL with external references.
          * </blockquote>
-         * </p>
+         *
          * <p>
          * <b>Granting all access:</b>  the keyword "all" grants permission to all protocols.
-         * </p>
          *
          * <p>
          * <b>System Property:</b> The value of this property can be set or overridden by
          * system property {@code javax.xml.accessExternalSchema}
-         * </p>
          *
          * <p>
          * <b>jaxp.properties:</b> This configuration file is in standard
@@ -323,12 +314,11 @@
          * of the property.
          *
          * @since 1.7
-         * </p>
          */
         public static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema";
 
         /**
-         * <p>Property: accessExternalStylesheet</p>
+         * Property: accessExternalStylesheet
          *
          * <p>
          * Restrict access to the protocols specified for external references set by the
@@ -338,7 +328,7 @@
          * {@link javax.xml.transform.Transformer} for example,
          * {@link javax.xml.transform.TransformerConfigurationException}
          * will be thrown by the {@link javax.xml.transform.TransformerFactory}.
-         * </p>
+         *
          * <p>
          * <b>Value:</b> a list of protocols separated by comma. A protocol is the scheme portion of a
          * {@link java.net.URI}, or in the case of the JAR protocol, "jar" plus the scheme portion
@@ -358,9 +348,8 @@
          * Examples of protocols are file, http, jar:file.
          *
          * </blockquote>
-         *</p>
          *
-         *<p>
+         * <p>
          * <b>Default value:</b> The default value is implementation specific and therefore not specified.
          * The following options are provided for consideration:
          * <blockquote>
@@ -368,20 +357,18 @@
          *     <LI>an empty string to deny all access to external references;</LI>
          *     <LI>a specific protocol, such as file, to give permission to only the protocol;</LI>
          *     <LI>the keyword "all" to grant  permission to all protocols.</LI>
-         *</UL><br>
+         * </UL><br>
          *      When FEATURE_SECURE_PROCESSING is enabled,  it is recommended that implementations
          *      restrict external connections by default, though this may cause problems for applications
          *      that process XML/XSD/XSL with external references.
          * </blockquote>
-         * </p>
+         *
          * <p>
          * <b>Granting all access:</b>  the keyword "all" grants permission to all protocols.
-         * </p>
          *
          * <p>
          * <b>System Property:</b> The value of this property can be set or overridden by
          * system property {@code javax.xml.accessExternalStylesheet}
-         * </p>
          *
          * <p>
          * <b>jaxp.properties:</b> This configuration file is in standard
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -32,11 +32,10 @@
 import java.util.regex.Pattern;
 
 /**
- * Factory that creates new <code>javax.xml.datatype</code> <code>Object</code>s that map XML to/from Java <code>Object</code>s.
+ * Factory that creates new {@code javax.xml.datatype} {@code Object}s that map XML to/from Java {@code Object}s.
  * <p>
  * A new instance of the {@code DatatypeFactory} is created through the {@link #newInstance()} method
  * that uses the following implementation resolution mechanisms to determine an implementation:
- * <p>
  * <ol>
  *    <li>
  *      If the system property specified by {@link #DATATYPEFACTORY_PROPERTY}, "{@code javax.xml.datatype.DatatypeFactory}",
@@ -89,9 +88,9 @@
 public abstract class DatatypeFactory {
 
     /**
-     * <p>Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.</p>
+     * Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
      *
-     * <p>Default value is {@code javax.xml.datatype.DatatypeFactory}.</p>
+     * <p>Default value is {@code javax.xml.datatype.DatatypeFactory}.
      */
     public static final String DATATYPEFACTORY_PROPERTY =
             // We use a String constant here, rather than calling
@@ -100,16 +99,15 @@
             "javax.xml.datatype.DatatypeFactory";
 
     /**
-     * <p>Default implementation class name as defined in
-     * <em>JSR 206: Java(TM) API for XML Processing (JAXP) 1.3</em>.</p>
+     * Default implementation class name as defined in
+     * <em>JSR 206: Java(TM) API for XML Processing (JAXP) 1.3</em>.
      *
      * <p>Implementers should specify the name of an appropriate class
      * to be instantiated if no other implementation resolution mechanism
-     * succeeds.</p>
+     * succeeds.
      *
      * <p>Users should not refer to this field; it is intended only to
      * document a factory implementation detail.
-     * </p>
      */
     public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS =
         // We use new String() here to prevent javadoc from generating
@@ -130,18 +128,18 @@
         Pattern.compile("[^YM]*[DT].*");
 
     /**
-     * <p>Protected constructor to prevent instantiation outside of package.</p>
+     * Protected constructor to prevent instantiation outside of package.
      *
-     * <p>Use {@link #newInstance()} to create a {@code DatatypeFactory}.</p>
+     * <p>Use {@link #newInstance()} to create a {@code DatatypeFactory}.
      */
     protected DatatypeFactory() {
     }
 
     /**
-     * <p>Obtain a new instance of a {@code DatatypeFactory}.</p>
+     * Obtain a new instance of a {@code DatatypeFactory}.
      *
      * <p>The implementation resolution mechanisms are <a href="#DatatypeFactory.newInstance">defined</a> in this
-     * <code>Class</code>'s documentation.</p>
+     * {@code Class}'s documentation.
      *
      * @return New instance of a {@code DatatypeFactory}
      *
@@ -161,33 +159,33 @@
     }
 
     /**
-     * <p>Obtain a new instance of a {@code DatatypeFactory} from class name.
+     * Obtain a new instance of a {@code DatatypeFactory} from class name.
      * This function is useful when there are multiple providers in the classpath.
      * It gives more control to the application as it can specify which provider
-     * should be loaded.</p>
+     * should be loaded.
      *
      * <p>Once an application has obtained a reference to a {@code DatatypeFactory}
-     * it can use the factory to configure and obtain datatype instances.</P>
+     * it can use the factory to configure and obtain datatype instances.
      *
      *
      * <h2>Tip for Trouble-shooting</h2>
-     * <p>Setting the <code>jaxp.debug</code> system property will cause
+     * <p>Setting the {@code jaxp.debug} system property will cause
      * this method to print a lot of debug messages
-     * to <code>System.err</code> about what it is doing and where it is looking at.</p>
+     * to {@code System.err} about what it is doing and where it is looking at.
      *
-     * <p> If you have problems try:</p>
+     * <p> If you have problems try:
      * <pre>
      * java -Djaxp.debug=1 YourProgram ....
      * </pre>
      *
      * @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.datatype.DatatypeFactory}.
      *
-     * @param classLoader <code>ClassLoader</code> used to load the factory class. If <code>null</code>
-     *                     current <code>Thread</code>'s context classLoader is used to load the factory class.
+     * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+     *                     current {@code Thread}'s context classLoader is used to load the factory class.
      *
      * @return New instance of a {@code DatatypeFactory}
      *
-     * @throws DatatypeConfigurationException if <code>factoryClassName</code> is <code>null</code>, or
+     * @throws DatatypeConfigurationException if {@code factoryClassName} is {@code null}, or
      *                                   the factory class cannot be loaded, instantiated.
      *
      * @see #newInstance()
@@ -201,11 +199,11 @@
      }
 
     /**
-     * <p>Obtain a new instance of a <code>Duration</code>
-     * specifying the <code>Duration</code> as its string representation, "PnYnMnDTnHnMnS",
-     * as defined in XML Schema 1.0 section 3.2.6.1.</p>
+     * Obtain a new instance of a {@code Duration}
+     * specifying the {@code Duration} as its string representation, "PnYnMnDTnHnMnS",
+     * as defined in XML Schema 1.0 section 3.2.6.1.
      *
-     * <p>XML Schema Part 2: Datatypes, 3.2.6 duration, defines <code>duration</code> as:</p>
+     * <p>XML Schema Part 2: Datatypes, 3.2.6 duration, defines {@code duration} as:
      * <blockquote>
      * duration represents a duration of time.
      * The value space of duration is a six-dimensional space where the coordinates designate the
@@ -213,28 +211,28 @@
      * These components are ordered in their significance by their order of appearance i.e. as
      * year, month, day, hour, minute, and second.
      * </blockquote>
-     * <p>All six values are set and available from the created {@link Duration}</p>
+     * <p>All six values are set and available from the created {@link Duration}
      *
      * <p>The XML Schema specification states that values can be of an arbitrary size.
      * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
      * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
-     * if implementation capacities are exceeded.</p>
+     * if implementation capacities are exceeded.
      *
-     * @param lexicalRepresentation <code>String</code> representation of a <code>Duration</code>.
+     * @param lexicalRepresentation {@code String} representation of a {@code Duration}.
      *
-     * @return New <code>Duration</code> created from parsing the <code>lexicalRepresentation</code>.
+     * @return New {@code Duration} created from parsing the {@code lexicalRepresentation}.
      *
-     * @throws IllegalArgumentException If <code>lexicalRepresentation</code> is not a valid representation of a <code>Duration</code>.
+     * @throws IllegalArgumentException If {@code lexicalRepresentation} is not a valid representation of a {@code Duration}.
      * @throws UnsupportedOperationException If implementation cannot support requested values.
-     * @throws NullPointerException if <code>lexicalRepresentation</code> is <code>null</code>.
+     * @throws NullPointerException if {@code lexicalRepresentation} is {@code null}.
      */
     public abstract Duration newDuration(final String lexicalRepresentation);
 
     /**
-     * <p>Obtain a new instance of a <code>Duration</code>
-     * specifying the <code>Duration</code> as milliseconds.</p>
+     * Obtain a new instance of a {@code Duration}
+     * specifying the {@code Duration} as milliseconds.
      *
-     * <p>XML Schema Part 2: Datatypes, 3.2.6 duration, defines <code>duration</code> as:</p>
+     * <p>XML Schema Part 2: Datatypes, 3.2.6 duration, defines {@code duration} as:
      * <blockquote>
      * duration represents a duration of time.
      * The value space of duration is a six-dimensional space where the coordinates designate the
@@ -243,8 +241,8 @@
      * year, month, day, hour, minute, and second.
      * </blockquote>
      * <p>All six values are set by computing their values from the specified milliseconds
-     * and are available using the <code>get</code> methods of  the created {@link Duration}.
-     * The values conform to and are defined by:</p>
+     * and are available using the {@code get} methods of  the created {@link Duration}.
+     * The values conform to and are defined by:
      * <ul>
      *   <li>ISO 8601:2000(E) Section 5.5.3.2 Alternative format</li>
      *   <li><a href="http://www.w3.org/TR/xmlschema-2/#isoformats">
@@ -259,38 +257,38 @@
      * {@link java.util.Calendar#DATE} = 1, etc.
      * This is important as there are variations in the Gregorian Calendar,
      * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
-     * so the result of {@link Duration#getMonths()} and {@link Duration#getDays()} can be influenced.</p>
+     * so the result of {@link Duration#getMonths()} and {@link Duration#getDays()} can be influenced.
      *
      * @param durationInMilliSeconds Duration in milliseconds to create.
      *
-     * @return New <code>Duration</code> representing <code>durationInMilliSeconds</code>.
+     * @return New {@code Duration} representing {@code durationInMilliSeconds}.
      */
     public abstract Duration newDuration(final long durationInMilliSeconds);
 
     /**
-     * <p>Obtain a new instance of a <code>Duration</code>
-     * specifying the <code>Duration</code> as isPositive, years, months, days, hours, minutes, seconds.</p>
+     * Obtain a new instance of a {@code Duration}
+     * specifying the {@code Duration} as isPositive, years, months, days, hours, minutes, seconds.
      *
      * <p>The XML Schema specification states that values can be of an arbitrary size.
      * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
      * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
-     * if implementation capacities are exceeded.</p>
+     * if implementation capacities are exceeded.
      *
-     * <p>A <code>null</code> value indicates that field is not set.</p>
+     * <p>A {@code null} value indicates that field is not set.
      *
-     * @param isPositive Set to <code>false</code> to create a negative duration. When the length
+     * @param isPositive Set to {@code false} to create a negative duration. When the length
      *   of the duration is zero, this parameter will be ignored.
-     * @param years of this <code>Duration</code>
-     * @param months of this <code>Duration</code>
-     * @param days of this <code>Duration</code>
-     * @param hours of this <code>Duration</code>
-     * @param minutes of this <code>Duration</code>
-     * @param seconds of this <code>Duration</code>
+     * @param years of this {@code Duration}
+     * @param months of this {@code Duration}
+     * @param days of this {@code Duration}
+     * @param hours of this {@code Duration}
+     * @param minutes of this {@code Duration}
+     * @param seconds of this {@code Duration}
      *
-     * @return New <code>Duration</code> created from the specified values.
+     * @return New {@code Duration} created from the specified values.
      *
      * @throws IllegalArgumentException If the values are not a valid representation of a
-     * <code>Duration</code>: if all the fields (years, months, ...) are null or
+     * {@code Duration}: if all the fields (years, months, ...) are null or
      * if any of the fields is negative.
      * @throws UnsupportedOperationException If implementation cannot support requested values.
      */
@@ -304,24 +302,24 @@
             final BigDecimal seconds);
 
     /**
-     * <p>Obtain a new instance of a <code>Duration</code>
-     * specifying the <code>Duration</code> as isPositive, years, months, days, hours, minutes, seconds.</p>
+     * Obtain a new instance of a {@code Duration}
+     * specifying the {@code Duration} as isPositive, years, months, days, hours, minutes, seconds.
      *
-     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
+     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
      *
-     * @param isPositive Set to <code>false</code> to create a negative duration. When the length
+     * @param isPositive Set to {@code false} to create a negative duration. When the length
      *   of the duration is zero, this parameter will be ignored.
-     * @param years of this <code>Duration</code>
-     * @param months of this <code>Duration</code>
-     * @param days of this <code>Duration</code>
-     * @param hours of this <code>Duration</code>
-     * @param minutes of this <code>Duration</code>
-     * @param seconds of this <code>Duration</code>
+     * @param years of this {@code Duration}
+     * @param months of this {@code Duration}
+     * @param days of this {@code Duration}
+     * @param hours of this {@code Duration}
+     * @param minutes of this {@code Duration}
+     * @param seconds of this {@code Duration}
      *
-     * @return New <code>Duration</code> created from the specified values.
+     * @return New {@code Duration} created from the specified values.
      *
      * @throws IllegalArgumentException If the values are not a valid representation of a
-     * <code>Duration</code>: if any of the fields is negative.
+     * {@code Duration}: if any of the fields is negative.
      *
      * @see #newDuration(
      *   boolean isPositive,
@@ -371,28 +369,30 @@
             }
 
     /**
-     * <p>Create a <code>Duration</code> of type <code>xdt:dayTimeDuration</code> by parsing its <code>String</code> representation,
+     * Create a {@code Duration} of type {@code xdt:dayTimeDuration}
+     * by parsing its {@code String} representation,
      * "<em>PnDTnHnMnS</em>", <a href="http://www.w3.org/TR/xpath-datamodel#dayTimeDuration">
-     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.</p>
+     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.
      *
-     * <p>The datatype <code>xdt:dayTimeDuration</code> is a subtype of <code>xs:duration</code>
+     * <p>The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
      * whose lexical representation contains only day, hour, minute, and second components.
-     * This datatype resides in the namespace <code>http://www.w3.org/2003/11/xpath-datatypes</code>.</p>
+     * This datatype resides in the namespace {@code http://www.w3.org/2003/11/xpath-datatypes}.
      *
-     * <p>All four values are set and available from the created {@link Duration}</p>
+     * <p>All four values are set and available from the created {@link Duration}
      *
      * <p>The XML Schema specification states that values can be of an arbitrary size.
      * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
      * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
-     * if implementation capacities are exceeded.</p>
+     * if implementation capacities are exceeded.
      *
      * @param lexicalRepresentation Lexical representation of a duration.
      *
-     * @return New <code>Duration</code> created using the specified <code>lexicalRepresentation</code>.
+     * @return New {@code Duration} created using the specified {@code lexicalRepresentation}.
      *
-     * @throws IllegalArgumentException If <code>lexicalRepresentation</code> is not a valid representation of a <code>Duration</code> expressed only in terms of days and time.
+     * @throws IllegalArgumentException If {@code lexicalRepresentation} is
+     *         not a valid representation of a {@code Duration} expressed only in terms of days and time.
      * @throws UnsupportedOperationException If implementation cannot support requested values.
-     * @throws NullPointerException If <code>lexicalRepresentation</code> is <code>null</code>.
+     * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
      */
     public Duration newDurationDayTime(final String lexicalRepresentation) {
         // lexicalRepresentation must be non-null
@@ -415,17 +415,18 @@
     }
 
     /**
-     * <p>Create a <code>Duration</code> of type <code>xdt:dayTimeDuration</code> using the specified milliseconds as defined in
+     * Create a {@code Duration} of type {@code xdt:dayTimeDuration}
+     * using the specified milliseconds as defined in
      * <a href="http://www.w3.org/TR/xpath-datamodel#dayTimeDuration">
-     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.</p>
+     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.
      *
-     * <p>The datatype <code>xdt:dayTimeDuration</code> is a subtype of <code>xs:duration</code>
+     * <p>The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
      * whose lexical representation contains only day, hour, minute, and second components.
-     * This datatype resides in the namespace <code>http://www.w3.org/2003/11/xpath-datatypes</code>.</p>
+     * This datatype resides in the namespace {@code http://www.w3.org/2003/11/xpath-datatypes}.
      *
      * <p>All four values are set by computing their values from the specified milliseconds
-     * and are available using the <code>get</code> methods of  the created {@link Duration}.
-     * The values conform to and are defined by:</p>
+     * and are available using the {@code get} methods of  the created {@link Duration}.
+     * The values conform to and are defined by:
      * <ul>
      *   <li>ISO 8601:2000(E) Section 5.5.3.2 Alternative format</li>
      *   <li><a href="http://www.w3.org/TR/xmlschema-2/#isoformats">
@@ -440,13 +441,13 @@
      * {@link java.util.Calendar#DATE} = 1, etc.
      * This is important as there are variations in the Gregorian Calendar,
      * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
-     * so the result of {@link Duration#getDays()} can be influenced.</p>
+     * so the result of {@link Duration#getDays()} can be influenced.
      *
-     * <p>Any remaining milliseconds after determining the day, hour, minute and second are discarded.</p>
+     * <p>Any remaining milliseconds after determining the day, hour, minute and second are discarded.
      *
-     * @param durationInMilliseconds Milliseconds of <code>Duration</code> to create.
+     * @param durationInMilliseconds Milliseconds of {@code Duration} to create.
      *
-     * @return New <code>Duration</code> created with the specified <code>durationInMilliseconds</code>.
+     * @return New {@code Duration} created with the specified {@code durationInMilliseconds}.
      *
      * @see <a href="http://www.w3.org/TR/xpath-datamodel#dayTimeDuration">
      *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>
@@ -457,34 +458,34 @@
     }
 
     /**
-     * <p>Create a <code>Duration</code> of type <code>xdt:dayTimeDuration</code> using the specified
-     * <code>day</code>, <code>hour</code>, <code>minute</code> and <code>second</code> as defined in
+     * Create a {@code Duration} of type {@code xdt:dayTimeDuration} using the specified
+     * {@code day}, {@code hour}, {@code minute} and {@code second} as defined in
      * <a href="http://www.w3.org/TR/xpath-datamodel#dayTimeDuration">
-     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.</p>
+     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.
      *
-     * <p>The datatype <code>xdt:dayTimeDuration</code> is a subtype of <code>xs:duration</code>
+     * <p>The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
      * whose lexical representation contains only day, hour, minute, and second components.
-     * This datatype resides in the namespace <code>http://www.w3.org/2003/11/xpath-datatypes</code>.</p>
+     * This datatype resides in the namespace {@code http://www.w3.org/2003/11/xpath-datatypes}.
      *
      * <p>The XML Schema specification states that values can be of an arbitrary size.
      * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
      * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
-     * if implementation capacities are exceeded.</p>
+     * if implementation capacities are exceeded.
      *
-     * <p>A <code>null</code> value indicates that field is not set.</p>
+     * <p>A {@code null} value indicates that field is not set.
      *
-     * @param isPositive Set to <code>false</code> to create a negative duration. When the length
+     * @param isPositive Set to {@code false} to create a negative duration. When the length
      *   of the duration is zero, this parameter will be ignored.
-     * @param day Day of <code>Duration</code>.
-     * @param hour Hour of <code>Duration</code>.
-     * @param minute Minute of <code>Duration</code>.
-     * @param second Second of <code>Duration</code>.
+     * @param day Day of {@code Duration}.
+     * @param hour Hour of {@code Duration}.
+     * @param minute Minute of {@code Duration}.
+     * @param second Second of {@code Duration}.
      *
-     * @return New <code>Duration</code> created with the specified <code>day</code>, <code>hour</code>, <code>minute</code>
-     * and <code>second</code>.
+     * @return New {@code Duration} created with the specified {@code day}, {@code hour}, {@code minute}
+     * and {@code second}.
      *
      * @throws IllegalArgumentException If the values are not a valid representation of a
-     * <code>Duration</code>: if all the fields (day, hour, ...) are null or
+     * {@code Duration}: if all the fields (day, hour, ...) are null or
      * if any of the fields is negative.
      * @throws UnsupportedOperationException If implementation cannot support requested values.
      */
@@ -507,29 +508,29 @@
     }
 
     /**
-     * <p>Create a <code>Duration</code> of type <code>xdt:dayTimeDuration</code> using the specified
-     * <code>day</code>, <code>hour</code>, <code>minute</code> and <code>second</code> as defined in
+     * Create a {@code Duration} of type {@code xdt:dayTimeDuration} using the specified
+     * {@code day}, {@code hour}, {@code minute} and {@code second} as defined in
      * <a href="http://www.w3.org/TR/xpath-datamodel#dayTimeDuration">
-     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.</p>
+     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.
      *
-     * <p>The datatype <code>xdt:dayTimeDuration</code> is a subtype of <code>xs:duration</code>
+     * <p>The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
      * whose lexical representation contains only day, hour, minute, and second components.
-     * This datatype resides in the namespace <code>http://www.w3.org/2003/11/xpath-datatypes</code>.</p>
+     * This datatype resides in the namespace {@code http://www.w3.org/2003/11/xpath-datatypes}.
      *
-     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
+     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
      *
-     * @param isPositive Set to <code>false</code> to create a negative duration. When the length
+     * @param isPositive Set to {@code false} to create a negative duration. When the length
      *   of the duration is zero, this parameter will be ignored.
-     * @param day Day of <code>Duration</code>.
-     * @param hour Hour of <code>Duration</code>.
-     * @param minute Minute of <code>Duration</code>.
-     * @param second Second of <code>Duration</code>.
+     * @param day Day of {@code Duration}.
+     * @param hour Hour of {@code Duration}.
+     * @param minute Minute of {@code Duration}.
+     * @param second Second of {@code Duration}.
      *
-     * @return New <code>Duration</code> created with the specified <code>day</code>, <code>hour</code>, <code>minute</code>
-     * and <code>second</code>.
+     * @return New {@code Duration} created with the specified {@code day}, {@code hour}, {@code minute}
+     * and {@code second}.
      *
      * @throws IllegalArgumentException If the values are not a valid representation of a
-     * <code>Duration</code>: if any of the fields (day, hour, ...) is negative.
+     * {@code Duration}: if any of the fields (day, hour, ...) is negative.
      */
     public Duration newDurationDayTime(
             final boolean isPositive,
@@ -548,28 +549,30 @@
             }
 
     /**
-     * <p>Create a <code>Duration</code> of type <code>xdt:yearMonthDuration</code> by parsing its <code>String</code> representation,
+     * Create a {@code Duration} of type {@code xdt:yearMonthDuration}
+     * by parsing its {@code String} representation,
      * "<em>PnYnM</em>", <a href="http://www.w3.org/TR/xpath-datamodel#yearMonthDuration">
-     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.</p>
+     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.
      *
-     * <p>The datatype <code>xdt:yearMonthDuration</code> is a subtype of <code>xs:duration</code>
+     * <p>The datatype {@code xdt:yearMonthDuration} is a subtype of {@code xs:duration}
      * whose lexical representation contains only year and month components.
-     * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.</p>
+     * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
      *
-     * <p>Both values are set and available from the created {@link Duration}</p>
+     * <p>Both values are set and available from the created {@link Duration}
      *
      * <p>The XML Schema specification states that values can be of an arbitrary size.
-     * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
-     * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
-     * if implementation capacities are exceeded.</p>
+     * Implementations may chose not to or be incapable of supporting
+     * arbitrarily large and/or small values. An {@link UnsupportedOperationException}
+     * will be thrown with a message indicating implementation limits
+     * if implementation capacities are exceeded.
      *
      * @param lexicalRepresentation Lexical representation of a duration.
      *
-     * @return New <code>Duration</code> created using the specified <code>lexicalRepresentation</code>.
+     * @return New {@code Duration} created using the specified {@code lexicalRepresentation}.
      *
-     * @throws IllegalArgumentException If <code>lexicalRepresentation</code> is not a valid representation of a <code>Duration</code> expressed only in terms of years and months.
+     * @throws IllegalArgumentException If {@code lexicalRepresentation} is not a valid representation of a {@code Duration} expressed only in terms of years and months.
      * @throws UnsupportedOperationException If implementation cannot support requested values.
-     * @throws NullPointerException If <code>lexicalRepresentation</code> is <code>null</code>.
+     * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
      */
     public Duration newDurationYearMonth(
             final String lexicalRepresentation) {
@@ -594,17 +597,18 @@
     }
 
     /**
-     * <p>Create a <code>Duration</code> of type <code>xdt:yearMonthDuration</code> using the specified milliseconds as defined in
+     * Create a {@code Duration} of type {@code xdt:yearMonthDuration}
+     * using the specified milliseconds as defined in
      * <a href="http://www.w3.org/TR/xpath-datamodel#yearMonthDuration">
-     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.</p>
+     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.
      *
-     * <p>The datatype <code>xdt:yearMonthDuration</code> is a subtype of <code>xs:duration</code>
+     * <p>The datatype {@code xdt:yearMonthDuration} is a subtype of {@code xs:duration}
      * whose lexical representation contains only year and month components.
-     * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.</p>
+     * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
      *
      * <p>Both values are set by computing their values from the specified milliseconds
-     * and are available using the <code>get</code> methods of  the created {@link Duration}.
-     * The values conform to and are defined by:</p>
+     * and are available using the {@code get} methods of  the created {@link Duration}.
+     * The values conform to and are defined by:
      * <ul>
      *   <li>ISO 8601:2000(E) Section 5.5.3.2 Alternative format</li>
      *   <li><a href="http://www.w3.org/TR/xmlschema-2/#isoformats">
@@ -619,13 +623,13 @@
      * {@link java.util.Calendar#DATE} = 1, etc.
      * This is important as there are variations in the Gregorian Calendar,
      * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
-     * so the result of {@link Duration#getMonths()} can be influenced.</p>
+     * so the result of {@link Duration#getMonths()} can be influenced.
      *
-     * <p>Any remaining milliseconds after determining the year and month are discarded.</p>
+     * <p>Any remaining milliseconds after determining the year and month are discarded.
      *
-     * @param durationInMilliseconds Milliseconds of <code>Duration</code> to create.
+     * @param durationInMilliseconds Milliseconds of {@code Duration} to create.
      *
-     * @return New <code>Duration</code> created using the specified <code>durationInMilliseconds</code>.
+     * @return New {@code Duration} created using the specified {@code durationInMilliseconds}.
      */
     public Duration newDurationYearMonth(
             final long durationInMilliseconds) {
@@ -646,27 +650,27 @@
     }
 
     /**
-     * <p>Create a <code>Duration</code> of type <code>xdt:yearMonthDuration</code> using the specified
-     * <code>year</code> and <code>month</code> as defined in
+     * Create a {@code Duration} of type {@code xdt:yearMonthDuration} using the specified
+     * {@code year} and {@code month} as defined in
      * <a href="http://www.w3.org/TR/xpath-datamodel#yearMonthDuration">
-     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.</p>
+     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.
      *
      * <p>The XML Schema specification states that values can be of an arbitrary size.
      * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
      * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
-     * if implementation capacities are exceeded.</p>
+     * if implementation capacities are exceeded.
      *
-     * <p>A <code>null</code> value indicates that field is not set.</p>
+     * <p>A {@code null} value indicates that field is not set.
      *
-     * @param isPositive Set to <code>false</code> to create a negative duration. When the length
+     * @param isPositive Set to {@code false} to create a negative duration. When the length
      *   of the duration is zero, this parameter will be ignored.
-     * @param year Year of <code>Duration</code>.
-     * @param month Month of <code>Duration</code>.
+     * @param year Year of {@code Duration}.
+     * @param month Month of {@code Duration}.
      *
-     * @return New <code>Duration</code> created using the specified <code>year</code> and <code>month</code>.
+     * @return New {@code Duration} created using the specified {@code year} and {@code month}.
      *
      * @throws IllegalArgumentException If the values are not a valid representation of a
-     * <code>Duration</code>: if all of the fields (year, month) are null or
+     * {@code Duration}: if all of the fields (year, month) are null or
      * if any of the fields is negative.
      * @throws UnsupportedOperationException If implementation cannot support requested values.
      */
@@ -687,22 +691,22 @@
     }
 
     /**
-     * <p>Create a <code>Duration</code> of type <code>xdt:yearMonthDuration</code> using the specified
-     * <code>year</code> and <code>month</code> as defined in
+     * Create a {@code Duration} of type {@code xdt:yearMonthDuration} using the specified
+     * {@code year} and {@code month} as defined in
      * <a href="http://www.w3.org/TR/xpath-datamodel#yearMonthDuration">
-     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.</p>
+     *   XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.
      *
-     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
+     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
      *
-     * @param isPositive Set to <code>false</code> to create a negative duration. When the length
+     * @param isPositive Set to {@code false} to create a negative duration. When the length
      *   of the duration is zero, this parameter will be ignored.
-     * @param year Year of <code>Duration</code>.
-     * @param month Month of <code>Duration</code>.
+     * @param year Year of {@code Duration}.
+     * @param month Month of {@code Duration}.
      *
-     * @return New <code>Duration</code> created using the specified <code>year</code> and <code>month</code>.
+     * @return New {@code Duration} created using the specified {@code year} and {@code month}.
      *
      * @throws IllegalArgumentException If the values are not a valid representation of a
-     * <code>Duration</code>: if any of the fields (year, month) is negative.
+     * {@code Duration}: if any of the fields (year, month) is negative.
      */
     public Duration newDurationYearMonth(
             final boolean isPositive,
@@ -716,44 +720,44 @@
             }
 
     /**
-     * <p>Create a new instance of an <code>XMLGregorianCalendar</code>.</p>
+     * Create a new instance of an {@code XMLGregorianCalendar}.
      *
-     * <p>All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null.</p>
+     * <p>All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null.
      *
-     * @return New <code>XMLGregorianCalendar</code> with all date/time datatype fields set to
+     * @return New {@code XMLGregorianCalendar} with all date/time datatype fields set to
      *   {@link DatatypeConstants#FIELD_UNDEFINED} or null.
      */
     public abstract XMLGregorianCalendar newXMLGregorianCalendar();
 
     /**
-     * <p>Create a new XMLGregorianCalendar by parsing the String as a lexical representation.</p>
+     * Create a new XMLGregorianCalendar by parsing the String as a lexical representation.
      *
      * <p>Parsing the lexical string representation is defined in
      * <a href="http://www.w3.org/TR/xmlschema-2/#dateTime-order">XML Schema 1.0 Part 2, Section 3.2.[7-14].1,
-     * <em>Lexical Representation</em>.</a></p>
+     * <em>Lexical Representation</em>.</a>
      *
-     * <p>The string representation may not have any leading and trailing whitespaces.</p>
+     * <p>The string representation may not have any leading and trailing whitespaces.
      *
      * <p>The parsing is done field by field so that
-     * the following holds for any lexically correct String x:</p>
+     * the following holds for any lexically correct String x:
      * <pre>
      * newXMLGregorianCalendar(x).toXMLFormat().equals(x)
      * </pre>
      * <p>Except for the noted lexical/canonical representation mismatches
      * listed in <a href="http://www.w3.org/2001/05/xmlschema-errata#e2-45">
-     * XML Schema 1.0 errata, Section 3.2.7.2</a>.</p>
+     * XML Schema 1.0 errata, Section 3.2.7.2</a>.
      *
      * @param lexicalRepresentation Lexical representation of one the eight XML Schema date/time datatypes.
      *
-     * @return <code>XMLGregorianCalendar</code> created from the <code>lexicalRepresentation</code>.
+     * @return {@code XMLGregorianCalendar} created from the {@code lexicalRepresentation}.
      *
-     * @throws IllegalArgumentException If the <code>lexicalRepresentation</code> is not a valid <code>XMLGregorianCalendar</code>.
-     * @throws NullPointerException If <code>lexicalRepresentation</code> is <code>null</code>.
+     * @throws IllegalArgumentException If the {@code lexicalRepresentation} is not a valid {@code XMLGregorianCalendar}.
+     * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
      */
     public abstract XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation);
 
     /**
-     * <p>Create an <code>XMLGregorianCalendar</code> from a {@link GregorianCalendar}.</p>
+     * Create an {@code XMLGregorianCalendar} from a {@link GregorianCalendar}.
      *
      * <table border="2" rules="all" cellpadding="2">
      *   <thead>
@@ -764,30 +768,30 @@
      *       </th>
      *     </tr>
      *     <tr>
-     *        <th><code>java.util.GregorianCalendar</code> field</th>
-     *        <th><code>javax.xml.datatype.XMLGregorianCalendar</code> field</th>
+     *        <th>{@code java.util.GregorianCalendar} field</th>
+     *        <th>{@code javax.xml.datatype.XMLGregorianCalendar} field</th>
      *     </tr>
      *   </thead>
      *   <tbody>
      *     <tr>
-     *       <td><code>ERA == GregorianCalendar.BC ? -YEAR : YEAR</code></td>
+     *       <td>{@code ERA == GregorianCalendar.BC ? -YEAR : YEAR}</td>
      *       <td>{@link XMLGregorianCalendar#setYear(int year)}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>MONTH + 1</code></td>
+     *       <td>{@code MONTH + 1}</td>
      *       <td>{@link XMLGregorianCalendar#setMonth(int month)}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>DAY_OF_MONTH</code></td>
+     *       <td>{@code DAY_OF_MONTH}</td>
      *       <td>{@link XMLGregorianCalendar#setDay(int day)}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND</code></td>
+     *       <td>{@code HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND}</td>
      *       <td>{@link XMLGregorianCalendar#setTime(int hour, int minute, int second, BigDecimal fractional)}</td>
      *     </tr>
      *     <tr>
      *       <td>
-     *         <code>(ZONE_OFFSET + DST_OFFSET) / (60*1000)</code><br/>
+     *         {@code (ZONE_OFFSET + DST_OFFSET) / (60*1000)}<br>
      *         <em>(in minutes)</em>
      *       </td>
      *       <td>{@link XMLGregorianCalendar#setTimezone(int offset)}<sup><em>*</em></sup>
@@ -796,49 +800,50 @@
      *   </tbody>
      * </table>
      * <p><em>*</em>conversion loss of information. It is not possible to represent
-     * a <code>java.util.GregorianCalendar</code> daylight savings timezone id in the
-     * XML Schema 1.0 date/time datatype representation.</p>
+     * a {@code java.util.GregorianCalendar} daylight savings timezone id in the
+     * XML Schema 1.0 date/time datatype representation.
      *
-     * <p>To compute the return value's <code>TimeZone</code> field,
+     * <p>To compute the return value's {@code TimeZone} field,
      * <ul>
-     * <li>when <code>this.getTimezone() != FIELD_UNDEFINED</code>,
-     * create a <code>java.util.TimeZone</code> with a custom timezone id
-     * using the <code>this.getTimezone()</code>.</li>
-     * <li>else use the <code>GregorianCalendar</code> default timezone value
+     * <li>when {@code this.getTimezone() != FIELD_UNDEFINED},
+     * create a {@code java.util.TimeZone} with a custom timezone id
+     * using the {@code this.getTimezone()}.</li>
+     * <li>else use the {@code GregorianCalendar} default timezone value
      * for the host is defined as specified by
-     * <code>java.util.TimeZone.getDefault()</code>.</li></p>
-     *
-     * @param cal <code>java.util.GregorianCalendar</code> used to create <code>XMLGregorianCalendar</code>
+     * {@code java.util.TimeZone.getDefault()}.</li>
+     * </ul>
      *
-     * @return <code>XMLGregorianCalendar</code> created from <code>java.util.GregorianCalendar</code>
+     * @param cal {@code java.util.GregorianCalendar} used to create {@code XMLGregorianCalendar}
      *
-     * @throws NullPointerException If <code>cal</code> is <code>null</code>.
+     * @return {@code XMLGregorianCalendar} created from {@code java.util.GregorianCalendar}
+     *
+     * @throws NullPointerException If {@code cal} is {@code null}.
      */
     public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal);
 
     /**
-     * <p>Constructor allowing for complete value spaces allowed by
+     * Constructor allowing for complete value spaces allowed by
      * W3C XML Schema 1.0 recommendation for xsd:dateTime and related
-     * builtin datatypes. Note that <code>year</code> parameter supports
+     * builtin datatypes. Note that {@code year} parameter supports
      * arbitrarily large numbers and fractionalSecond has infinite
-     * precision.</p>
+     * precision.
      *
-     * <p>A <code>null</code> value indicates that field is not set.</p>
+     * <p>A {@code null} value indicates that field is not set.
      *
-     * @param year of <code>XMLGregorianCalendar</code> to be created.
-     * @param month of <code>XMLGregorianCalendar</code> to be created.
-     * @param day of <code>XMLGregorianCalendar</code> to be created.
-     * @param hour of <code>XMLGregorianCalendar</code> to be created.
-     * @param minute of <code>XMLGregorianCalendar</code> to be created.
-     * @param second of <code>XMLGregorianCalendar</code> to be created.
-     * @param fractionalSecond of <code>XMLGregorianCalendar</code> to be created.
-     * @param timezone of <code>XMLGregorianCalendar</code> to be created.
+     * @param year of {@code XMLGregorianCalendar} to be created.
+     * @param month of {@code XMLGregorianCalendar} to be created.
+     * @param day of {@code XMLGregorianCalendar} to be created.
+     * @param hour of {@code XMLGregorianCalendar} to be created.
+     * @param minute of {@code XMLGregorianCalendar} to be created.
+     * @param second of {@code XMLGregorianCalendar} to be created.
+     * @param fractionalSecond of {@code XMLGregorianCalendar} to be created.
+     * @param timezone of {@code XMLGregorianCalendar} to be created.
      *
-     * @return <code>XMLGregorianCalendar</code> created from specified values.
+     * @return {@code XMLGregorianCalendar} created from specified values.
      *
      * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
      *   as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
-     *   or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
+     *   or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
      *   as determined by {@link XMLGregorianCalendar#isValid()}.
      */
     public abstract XMLGregorianCalendar newXMLGregorianCalendar(
@@ -852,29 +857,29 @@
             final int timezone);
 
     /**
-     * <p>Constructor of value spaces that a
-     * <code>java.util.GregorianCalendar</code> instance would need to convert to an
-     * <code>XMLGregorianCalendar</code> instance.</p>
+     * Constructor of value spaces that a
+     * {@code java.util.GregorianCalendar} instance would need to convert to an
+     * {@code XMLGregorianCalendar} instance.
      *
-     * <p><code>XMLGregorianCalendar eon</code> and
-     * <code>fractionalSecond</code> are set to <code>null</code></p>
+     * <p>{@code XMLGregorianCalendar eon} and
+     * {@code fractionalSecond} are set to {@code null}
      *
-     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
+     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
      *
-     * @param year of <code>XMLGregorianCalendar</code> to be created.
-     * @param month of <code>XMLGregorianCalendar</code> to be created.
-     * @param day of <code>XMLGregorianCalendar</code> to be created.
-     * @param hour of <code>XMLGregorianCalendar</code> to be created.
-     * @param minute of <code>XMLGregorianCalendar</code> to be created.
-     * @param second of <code>XMLGregorianCalendar</code> to be created.
-     * @param millisecond of <code>XMLGregorianCalendar</code> to be created.
-     * @param timezone of <code>XMLGregorianCalendar</code> to be created.
+     * @param year of {@code XMLGregorianCalendar} to be created.
+     * @param month of {@code XMLGregorianCalendar} to be created.
+     * @param day of {@code XMLGregorianCalendar} to be created.
+     * @param hour of {@code XMLGregorianCalendar} to be created.
+     * @param minute of {@code XMLGregorianCalendar} to be created.
+     * @param second of {@code XMLGregorianCalendar} to be created.
+     * @param millisecond of {@code XMLGregorianCalendar} to be created.
+     * @param timezone of {@code XMLGregorianCalendar} to be created.
      *
-     * @return <code>XMLGregorianCalendar</code> created from specified values.
+     * @return {@code XMLGregorianCalendar} created from specified values.
      *
      * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
      *   as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
-     *   or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
+     *   or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
      *   as determined by {@link XMLGregorianCalendar#isValid()}.
      */
     public XMLGregorianCalendar newXMLGregorianCalendar(
@@ -918,26 +923,26 @@
     }
 
     /**
-     * <p>Create a Java representation of XML Schema builtin datatype <code>date</code> or <code>g*</code>.</p>
+     * Create a Java representation of XML Schema builtin datatype {@code date} or {@code g*}.
      *
-     * <p>For example, an instance of <code>gYear</code> can be created invoking this factory
-     * with <code>month</code> and <code>day</code> parameters set to
-     * {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+     * <p>For example, an instance of {@code gYear} can be created invoking this factory
+     * with {@code month} and {@code day} parameters set to
+     * {@link DatatypeConstants#FIELD_UNDEFINED}.
      *
-     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
+     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
      *
-     * @param year of <code>XMLGregorianCalendar</code> to be created.
-     * @param month of <code>XMLGregorianCalendar</code> to be created.
-     * @param day of <code>XMLGregorianCalendar</code> to be created.
+     * @param year of {@code XMLGregorianCalendar} to be created.
+     * @param month of {@code XMLGregorianCalendar} to be created.
+     * @param day of {@code XMLGregorianCalendar} to be created.
      * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
      *
-     * @return <code>XMLGregorianCalendar</code> created from parameter values.
+     * @return {@code XMLGregorianCalendar} created from parameter values.
      *
      * @see DatatypeConstants#FIELD_UNDEFINED
      *
      * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
      *   as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
-     *   or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
+     *   or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
      *   as determined by {@link XMLGregorianCalendar#isValid()}.
      */
     public XMLGregorianCalendar newXMLGregorianCalendarDate(
@@ -958,20 +963,20 @@
             }
 
     /**
-     * <p>Create a Java instance of XML Schema builtin datatype <code>time</code>.</p>
+     * Create a Java instance of XML Schema builtin datatype {@code time}.
      *
-     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
+     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
      *
      * @param hours number of hours
      * @param minutes number of minutes
      * @param seconds number of seconds
      * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
      *
-     * @return <code>XMLGregorianCalendar</code> created from parameter values.
+     * @return {@code XMLGregorianCalendar} created from parameter values.
      *
      * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
      *   as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
-     *   or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
+     *   or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
      *   as determined by {@link XMLGregorianCalendar#isValid()}.
      *
      * @see DatatypeConstants#FIELD_UNDEFINED
@@ -994,24 +999,24 @@
     }
 
     /**
-     * <p>Create a Java instance of XML Schema builtin datatype time.</p>
+     * Create a Java instance of XML Schema builtin datatype time.
      *
-     * <p>A <code>null</code> value indicates that field is not set.</p>
-     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
+     * <p>A {@code null} value indicates that field is not set.
+     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
      *
      * @param hours number of hours
      * @param minutes number of minutes
      * @param seconds number of seconds
-     * @param fractionalSecond value of <code>null</code> indicates that this optional field is not set.
+     * @param fractionalSecond value of {@code null} indicates that this optional field is not set.
      * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
      *
-     * @return <code>XMLGregorianCalendar</code> created from parameter values.
+     * @return {@code XMLGregorianCalendar} created from parameter values.
      *
      * @see DatatypeConstants#FIELD_UNDEFINED
      *
      * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
      *   as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
-     *   or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
+     *   or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
      *   as determined by {@link XMLGregorianCalendar#isValid()}.
      */
     public XMLGregorianCalendar newXMLGregorianCalendarTime(
@@ -1033,9 +1038,9 @@
             }
 
     /**
-     * <p>Create a Java instance of XML Schema builtin datatype time.</p>
+     * Create a Java instance of XML Schema builtin datatype time.
      *
-     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
+     * <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
      *
      * @param hours number of hours
      * @param minutes number of minutes
@@ -1043,13 +1048,13 @@
      * @param milliseconds number of milliseconds
      * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
      *
-     * @return <code>XMLGregorianCalendar</code> created from parameter values.
+     * @return {@code XMLGregorianCalendar} created from parameter values.
      *
      * @see DatatypeConstants#FIELD_UNDEFINED
      *
      * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
      *   as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
-     *   or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
+     *   or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
      *   as determined by {@link XMLGregorianCalendar#isValid()}.
      */
     public XMLGregorianCalendar newXMLGregorianCalendarTime(
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java	Wed Jul 05 20:30:08 2017 +0200
@@ -35,37 +35,37 @@
 
 /**
  * <p>Immutable representation of a time span as defined in
- * the W3C XML Schema 1.0 specification.</p>
+ * the W3C XML Schema 1.0 specification.
  *
  * <p>A Duration object represents a period of Gregorian time,
  * which consists of six fields (years, months, days, hours,
- * minutes, and seconds) plus a sign (+/-) field.</p>
+ * minutes, and seconds) plus a sign (+/-) field.
  *
- * <p>The first five fields have non-negative (>=0) integers or null
+ * <p>The first five fields have non-negative ({@literal >=}0) integers or null
  * (which represents that the field is not set),
  * and the seconds field has a non-negative decimal or null.
- * A negative sign indicates a negative duration.</p>
+ * A negative sign indicates a negative duration.
  *
  * <p>This class provides a number of methods that make it easy
  * to use for the duration datatype of XML Schema 1.0 with
- * the errata.</p>
+ * the errata.
  *
  * <h2>Order relationship</h2>
  * <p>Duration objects only have partial order, where two values A and B
- * maybe either:</p>
+ * maybe either:
  * <ol>
- *  <li>A&lt;B (A is shorter than B)
- *  <li>A&gt;B (A is longer than B)
+ *  <li>A{@literal <}B (A is shorter than B)
+ *  <li>A{@literal >}B (A is longer than B)
  *  <li>A==B   (A and B are of the same duration)
- *  <li>A&lt;>B (Comparison between A and B is indeterminate)
+ *  <li>A{@literal <>}B (Comparison between A and B is indeterminate)
  * </ol>
  *
  * <p>For example, 30 days cannot be meaningfully compared to one month.
  * The {@link #compare(Duration duration)} method implements this
- * relationship.</p>
+ * relationship.
  *
  * <p>See the {@link #isLongerThan(Duration)} method for details about
- * the order relationship among <code>Duration</code> objects.</p>
+ * the order relationship among {@code Duration} objects.
  *
  * <h2>Operations over Duration</h2>
  * <p>This class provides a set of basic arithmetic operations, such
@@ -73,20 +73,20 @@
  * Because durations don't have total order, an operation could
  * fail for some combinations of operations. For example, you cannot
  * subtract 15 days from 1 month. See the javadoc of those methods
- * for detailed conditions where this could happen.</p>
+ * for detailed conditions where this could happen.
  *
  * <p>Also, division of a duration by a number is not provided because
- * the <code>Duration</code> class can only deal with finite precision
- * decimal numbers. For example, one cannot represent 1 sec divided by 3.</p>
+ * the {@code Duration} class can only deal with finite precision
+ * decimal numbers. For example, one cannot represent 1 sec divided by 3.
  *
  * <p>However, you could substitute a division by 3 with multiplying
- * by numbers such as 0.3 or 0.333.</p>
+ * by numbers such as 0.3 or 0.333.
  *
  * <h2>Range of allowed values</h2>
  * <p>
- * Because some operations of <code>Duration</code> rely on {@link Calendar}
+ * Because some operations of {@code Duration} rely on {@link Calendar}
  * even though {@link Duration} can hold very large or very small values,
- * some of the methods may not work correctly on such <code>Duration</code>s.
+ * some of the methods may not work correctly on such {@code Duration}s.
  * The impacted methods document their dependency on {@link Calendar}.
  *
  * @author <a href="mailto:Joseph.Fialli@Sun.COM">Joseph Fialli</a>
@@ -99,7 +99,7 @@
 public abstract class Duration {
 
     /**
-     * <p>Debugging <code>true</code> or <code>false</code>.</p>
+     * Debugging {@code true} or {@code false}.
      */
     private static final boolean DEBUG = true;
 
@@ -107,24 +107,24 @@
      * Default no-arg constructor.
      *
      * <p>Note: Always use the {@link DatatypeFactory} to
-     * construct an instance of <code>Duration</code>.
+     * construct an instance of {@code Duration}.
      * The constructor on this class cannot be guaranteed to
      * produce an object with a consistent state and may be
-     * removed in the future.</p>
+     * removed in the future.
      */
     public Duration() {
     }
 
     /**
-     * <p>Return the name of the XML Schema date/time type that this instance
+     * Return the name of the XML Schema date/time type that this instance
      * maps to. Type is computed based on fields that are set,
-     * i.e. {@link #isSet(DatatypeConstants.Field field)} == <code>true</code>.</p>
+     * i.e. {@link #isSet(DatatypeConstants.Field field)} == {@code true}.
      *
      * <table border="2" rules="all" cellpadding="2">
      *   <thead>
      *     <tr>
      *       <th align="center" colspan="7">
-     *         Required fields for XML Schema 1.0 Date/Time Datatypes.<br/>
+     *         Required fields for XML Schema 1.0 Date/Time Datatypes.<br>
      *         <i>(timezone is optional for all date/time datatypes)</i>
      *       </th>
      *     </tr>
@@ -238,16 +238,16 @@
     public abstract int getSign();
 
     /**
-     * <p>Get the years value of this <code>Duration</code> as an <code>int</code> or <code>0</code> if not present.</p>
+     * Get the years value of this {@code Duration} as an {@code int} or {@code 0} if not present.
      *
-     * <p><code>getYears()</code> is a convenience method for
-     * {@link #getField(DatatypeConstants.Field field) getField(DatatypeConstants.YEARS)}.</p>
+     * <p>{@code getYears()} is a convenience method for
+     * {@link #getField(DatatypeConstants.Field field) getField(DatatypeConstants.YEARS)}.
      *
-     * <p>As the return value is an <code>int</code>, an incorrect value will be returned for <code>Duration</code>s
-     * with years that go beyond the range of an <code>int</code>.
-     * Use {@link #getField(DatatypeConstants.Field field) getField(DatatypeConstants.YEARS)} to avoid possible loss of precision.</p>
+     * <p>As the return value is an {@code int}, an incorrect value will be returned for {@code Duration}s
+     * with years that go beyond the range of an {@code int}.
+     * Use {@link #getField(DatatypeConstants.Field field) getField(DatatypeConstants.YEARS)} to avoid possible loss of precision.
      *
-     * @return If the years field is present, return its value as an <code>int</code>, else return <code>0</code>.
+     * @return If the years field is present, return its value as an {@code int}, else return {@code 0}.
      */
     public int getYears() {
         return getField(DatatypeConstants.YEARS).intValue();
@@ -260,7 +260,7 @@
      * This method works just like {@link #getYears()} except
      * that this method works on the MONTHS field.
      *
-     * @return Months of this <code>Duration</code>.
+     * @return Months of this {@code Duration}.
      */
     public int getMonths() {
         return getField(DatatypeConstants.MONTHS).intValue();
@@ -273,7 +273,7 @@
      * This method works just like {@link #getYears()} except
      * that this method works on the DAYS field.
      *
-     * @return Days of this <code>Duration</code>.
+     * @return Days of this {@code Duration}.
      */
     public int getDays() {
         return getField(DatatypeConstants.DAYS).intValue();
@@ -286,7 +286,7 @@
      * This method works just like {@link #getYears()} except
      * that this method works on the HOURS field.
      *
-     * @return Hours of this <code>Duration</code>.
+     * @return Hours of this {@code Duration}.
      *
      */
     public int getHours() {
@@ -300,7 +300,7 @@
      * This method works just like {@link #getYears()} except
      * that this method works on the MINUTES field.
      *
-     * @return Minutes of this <code>Duration</code>.
+     * @return Minutes of this {@code Duration}.
      *
      */
     public int getMinutes() {
@@ -323,32 +323,32 @@
     }
 
     /**
-     * <p>Returns the length of the duration in milli-seconds.</p>
+     * Returns the length of the duration in milli-seconds.
      *
      * <p>If the seconds field carries more digits than milli-second order,
      * those will be simply discarded (or in other words, rounded to zero.)
-     * For example, for any Calendar value <code>x</code>,</p>
+     * For example, for any Calendar value {@code x},
      * <pre>
-     * <code>new Duration("PT10.00099S").getTimeInMills(x) == 10000</code>.
-     * <code>new Duration("-PT10.00099S").getTimeInMills(x) == -10000</code>.
+     * {@code new Duration("PT10.00099S").getTimeInMills(x) == 10000}
+     * {@code new Duration("-PT10.00099S").getTimeInMills(x) == -10000}
      * </pre>
      *
      * <p>
      * Note that this method uses the {@link #addTo(Calendar)} method,
-     * which may work incorrectly with <code>Duration</code> objects with
+     * which may work incorrectly with {@code Duration} objects with
      * very large values in its fields. See the {@link #addTo(Calendar)}
      * method for details.
      *
      * @param startInstant
-     *      The length of a month/year varies. The <code>startInstant</code> is
+     *      The length of a month/year varies. The {@code startInstant} is
      *      used to disambiguate this variance. Specifically, this method
-     *      returns the difference between <code>startInstant</code> and
-     *      <code>startInstant+duration</code>
+     *      returns the difference between {@code startInstant} and
+     *      {@code startInstant+duration}
      *
-     * @return milliseconds between <code>startInstant</code> and
-     *   <code>startInstant</code> plus this <code>Duration</code>
+     * @return milliseconds between {@code startInstant} and
+     *   {@code startInstant} plus this {@code Duration}
      *
-     * @throws NullPointerException if <code>startInstant</code> parameter
+     * @throws NullPointerException if {@code startInstant} parameter
      * is null.
      *
      */
@@ -360,33 +360,33 @@
     }
 
     /**
-     * <p>Returns the length of the duration in milli-seconds.</p>
+     * Returns the length of the duration in milli-seconds.
      *
      * <p>If the seconds field carries more digits than milli-second order,
      * those will be simply discarded (or in other words, rounded to zero.)
-     * For example, for any <code>Date</code> value <code>x</code>,</p>
+     * For example, for any {@code Date} value {@code x},
      * <pre>
-     * <code>new Duration("PT10.00099S").getTimeInMills(x) == 10000</code>.
-     * <code>new Duration("-PT10.00099S").getTimeInMills(x) == -10000</code>.
+     * {@code new Duration("PT10.00099S").getTimeInMills(x) == 10000}
+     * {@code new Duration("-PT10.00099S").getTimeInMills(x) == -10000}
      * </pre>
      *
      * <p>
      * Note that this method uses the {@link #addTo(Date)} method,
-     * which may work incorrectly with <code>Duration</code> objects with
+     * which may work incorrectly with {@code Duration} objects with
      * very large values in its fields. See the {@link #addTo(Date)}
      * method for details.
      *
      * @param startInstant
-     *      The length of a month/year varies. The <code>startInstant</code> is
+     *      The length of a month/year varies. The {@code startInstant} is
      *      used to disambiguate this variance. Specifically, this method
-     *      returns the difference between <code>startInstant</code> and
-     *      <code>startInstant+duration</code>.
+     *      returns the difference between {@code startInstant} and
+     *      {@code startInstant+duration}.
      *
      * @throws NullPointerException
      *      If the startInstant parameter is null.
      *
-     * @return milliseconds between <code>startInstant</code> and
-     *   <code>startInstant</code> plus this <code>Duration</code>
+     * @return milliseconds between {@code startInstant} and
+     *   {@code startInstant} plus this {@code Duration}
      *
      * @see #getTimeInMillis(Calendar)
      */
@@ -418,7 +418,7 @@
      *      returns a {@link java.math.BigInteger} object. For SECONDS, this
      *      method returns a {@link java.math.BigDecimal}.
      *
-     * @throws NullPointerException If the <code>field</code> is <code>null</code>.
+     * @throws NullPointerException If the {@code field} is {@code null}.
      */
     public abstract Number getField(final DatatypeConstants.Field field);
 
@@ -440,9 +440,9 @@
     public abstract boolean isSet(final DatatypeConstants.Field field);
 
     /**
-     * <p>Computes a new duration whose value is <code>this+rhs</code>.</p>
+     * Computes a new duration whose value is {@code this+rhs}.
      *
-     * <p>For example,</p>
+     * <p>For example,
      * <pre>
      * "1 day" + "-3 days" = "-2 days"
      * "1 year" + "1 day" = "1 year and 1 day"
@@ -453,28 +453,28 @@
      *
      * <p>Since there's no way to meaningfully subtract 1 day from 1 month,
      * there are cases where the operation fails in
-     * {@link IllegalStateException}.</p>
+     * {@link IllegalStateException}.
      *
      * <p>
-     * Formally, the computation is defined as follows.</p>
+     * Formally, the computation is defined as follows.
      * <p>
-     * Firstly, we can assume that two <code>Duration</code>s to be added
+     * Firstly, we can assume that two {@code Duration}s to be added
      * are both positive without losing generality (i.e.,
-     * <code>(-X)+Y=Y-X</code>, <code>X+(-Y)=X-Y</code>,
-     * <code>(-X)+(-Y)=-(X+Y)</code>)
+     * {@code (-X)+Y=Y-X}, {@code X+(-Y)=X-Y},
+     * {@code (-X)+(-Y)=-(X+Y)})
      *
      * <p>
-     * Addition of two positive <code>Duration</code>s are simply defined as
+     * Addition of two positive {@code Duration}s are simply defined as
      * field by field addition where missing fields are treated as 0.
      * <p>
-     * A field of the resulting <code>Duration</code> will be unset if and
-     * only if respective fields of two input <code>Duration</code>s are unset.
+     * A field of the resulting {@code Duration} will be unset if and
+     * only if respective fields of two input {@code Duration}s are unset.
      * <p>
-     * Note that <code>lhs.add(rhs)</code> will be always successful if
-     * <code>lhs.signum()*rhs.signum()!=-1</code> or both of them are
-     * normalized.</p>
+     * Note that {@code lhs.add(rhs)} will be always successful if
+     * {@code lhs.signum()*rhs.signum()!=-1} or both of them are
+     * normalized.
      *
-     * @param rhs <code>Duration</code> to add to this <code>Duration</code>
+     * @param rhs {@code Duration} to add to this {@code Duration}
      *
      * @return
      *      non-null valid Duration object.
@@ -501,25 +501,22 @@
      * uses int to hold values, there are cases where this method
      * won't work correctly (for example if values of fields
      * exceed the range of int.)
-     * </p>
      *
      * <p>
      * Also, since this duration class is a Gregorian duration, this
      * method will not work correctly if the given {@link Calendar}
      * object is based on some other calendar systems.
-     * </p>
      *
      * <p>
-     * Any fractional parts of this <code>Duration</code> object
+     * Any fractional parts of this {@code Duration} object
      * beyond milliseconds will be simply ignored. For example, if
      * this duration is "P1.23456S", then 1 is added to SECONDS,
      * 234 is added to MILLISECONDS, and the rest will be unused.
-     * </p>
      *
      * <p>
      * Note that because {@link Calendar#add(int, int)} is using
-     * <code>int</code>, <code>Duration</code> with values beyond the
-     * range of <code>int</code> in its fields
+     * {@code int}, {@code Duration} with values beyond the
+     * range of {@code int} in its fields
      * will cause overflow/underflow to the given {@link Calendar}.
      * {@link XMLGregorianCalendar#add(Duration)} provides the same
      * basic operation as this method while avoiding
@@ -571,9 +568,9 @@
     }
 
     /**
-     * <p>Computes a new duration whose value is <code>this-rhs</code>.</p>
+     * Computes a new duration whose value is {@code this-rhs}.
      *
-     * <p>For example:</p>
+     * <p>For example:
      * <pre>
      * "1 day" - "-3 days" = "4 days"
      * "1 year" - "1 day" = IllegalStateException
@@ -583,31 +580,31 @@
      * </pre>
      *
      * <p>Since there's no way to meaningfully subtract 1 day from 1 month,
-     * there are cases where the operation fails in {@link IllegalStateException}.</p>
+     * there are cases where the operation fails in {@link IllegalStateException}.
      *
      * <p>Formally the computation is defined as follows.
-     * First, we can assume that two <code>Duration</code>s are both positive
+     * First, we can assume that two {@code Duration}s are both positive
      * without losing generality.  (i.e.,
-     * <code>(-X)-Y=-(X+Y)</code>, <code>X-(-Y)=X+Y</code>,
-     * <code>(-X)-(-Y)=-(X-Y)</code>)</p>
+     * {@code (-X)-Y=-(X+Y)}, {@code X-(-Y)=X+Y},
+     * {@code (-X)-(-Y)=-(X-Y)})
      *
      * <p>Then two durations are subtracted field by field.
-     * If the sign of any non-zero field <code>F</code> is different from
+     * If the sign of any non-zero field {@code F} is different from
      * the sign of the most significant field,
-     * 1 (if <code>F</code> is negative) or -1 (otherwise)
-     * will be borrowed from the next bigger unit of <code>F</code>.</p>
+     * 1 (if {@code F} is negative) or -1 (otherwise)
+     * will be borrowed from the next bigger unit of {@code F}.
      *
      * <p>This process is repeated until all the non-zero fields have
-     * the same sign.</p>
+     * the same sign.
      *
      * <p>If a borrow occurs in the days field (in other words, if
      * the computation needs to borrow 1 or -1 month to compensate
      * days), then the computation fails by throwing an
-     * {@link IllegalStateException}.</p>
+     * {@link IllegalStateException}.
      *
-     * @param rhs <code>Duration</code> to subtract from this <code>Duration</code>.
+     * @param rhs {@code Duration} to subtract from this {@code Duration}.
      *
-     * @return New <code>Duration</code> created from subtracting <code>rhs</code> from this <code>Duration</code>.
+     * @return New {@code Duration} created from subtracting {@code rhs} from this {@code Duration}.
      *
      * @throws IllegalStateException
      *      If two durations cannot be meaningfully subtracted. For
@@ -624,18 +621,18 @@
     }
 
     /**
-     * <p>Computes a new duration whose value is <code>factor</code> times
-     * longer than the value of this duration.</p>
+     * Computes a new duration whose value is {@code factor} times
+     * longer than the value of this duration.
      *
      * <p>This method is provided for the convenience.
-     * It is functionally equivalent to the following code:</p>
+     * It is functionally equivalent to the following code:
      * <pre>
      * multiply(new BigDecimal(String.valueOf(factor)))
      * </pre>
      *
-     * @param factor Factor times longer of new <code>Duration</code> to create.
+     * @param factor Factor times longer of new {@code Duration} to create.
      *
-     * @return New <code>Duration</code> that is <code>factor</code>times longer than this <code>Duration</code>.
+     * @return New {@code Duration} that is {@code factor}times longer than this {@code Duration}.
      *
      * @see #multiply(BigDecimal)
      */
@@ -644,7 +641,7 @@
     }
 
     /**
-     * Computes a new duration whose value is <code>factor</code> times
+     * Computes a new duration whose value is {@code factor} times
      * longer than the value of this duration.
      *
      * <p>
@@ -656,7 +653,7 @@
      * </pre>
      *
      * <p>
-     * Since the <code>Duration</code> class is immutable, this method
+     * Since the {@code Duration} class is immutable, this method
      * doesn't change the value of this object. It simply computes
      * a new Duration object and returns it.
      *
@@ -671,7 +668,7 @@
      * When fractions of month cannot be meaningfully carried down
      * to days, or year to months, this will cause an
      * {@link IllegalStateException} to be thrown.
-     * For example if you multiple one month by 0.5.</p>
+     * For example if you multiple one month by 0.5.
      *
      * <p>
      * To avoid {@link IllegalStateException}, use
@@ -681,39 +678,39 @@
      * @param factor to multiply by
      *
      * @return
-     *      returns a non-null valid <code>Duration</code> object
+     *      returns a non-null valid {@code Duration} object
      *
      * @throws IllegalStateException if operation produces fraction in
      * the months field.
      *
-     * @throws NullPointerException if the <code>factor</code> parameter is
-     * <code>null</code>.
+     * @throws NullPointerException if the {@code factor} parameter is
+     * {@code null}.
      *
      */
     public abstract Duration multiply(final BigDecimal factor);
 
     /**
-     * Returns a new <code>Duration</code> object whose
-     * value is <code>-this</code>.
+     * Returns a new {@code Duration} object whose
+     * value is {@code -this}.
      *
      * <p>
-     * Since the <code>Duration</code> class is immutable, this method
+     * Since the {@code Duration} class is immutable, this method
      * doesn't change the value of this object. It simply computes
      * a new Duration object and returns it.
      *
      * @return
-     *      always return a non-null valid <code>Duration</code> object.
+     *      always return a non-null valid {@code Duration} object.
      */
     public abstract Duration negate();
 
     /**
-     * <p>Converts the years and months fields into the days field
-     * by using a specific time instant as the reference point.</p>
+     * Converts the years and months fields into the days field
+     * by using a specific time instant as the reference point.
      *
      * <p>For example, duration of one month normalizes to 31 days
-     * given the start time instance "July 8th 2003, 17:40:32".</p>
+     * given the start time instance "July 8th 2003, 17:40:32".
      *
-     * <p>Formally, the computation is done as follows:</p>
+     * <p>Formally, the computation is done as follows:
      * <ol>
      *  <li>the given Calendar object is cloned</li>
      *  <li>the years, months and days fields will be added to the {@link Calendar} object
@@ -725,37 +722,37 @@
      *      Duration object.</li>
      * </ol>
      *
-     * <p>Note that since the Calendar class uses <code>int</code> to
+     * <p>Note that since the Calendar class uses {@code int} to
      * hold the value of year and month, this method may produce
      * an unexpected result if this duration object holds
-     * a very large value in the years or months fields.</p>
+     * a very large value in the years or months fields.
      *
-     * @param startTimeInstant <code>Calendar</code> reference point.
+     * @param startTimeInstant {@code Calendar} reference point.
      *
-     * @return <code>Duration</code> of years and months of this <code>Duration</code> as days.
+     * @return {@code Duration} of years and months of this {@code Duration} as days.
      *
      * @throws NullPointerException If the startTimeInstant parameter is null.
      */
     public abstract Duration normalizeWith(final Calendar startTimeInstant);
 
     /**
-     * <p>Partial order relation comparison with this <code>Duration</code> instance.</p>
+     * Partial order relation comparison with this {@code Duration} instance.
      *
      * <p>Comparison result must be in accordance with
      * <a href="http://www.w3.org/TR/xmlschema-2/#duration-order">W3C XML Schema 1.0 Part 2, Section 3.2.7.6.2,
-     * <i>Order relation on duration</i></a>.</p>
+     * <i>Order relation on duration</i></a>.
      *
-     * <p>Return:</p>
+     * <p>Return:
      * <ul>
-     *   <li>{@link DatatypeConstants#LESSER} if this <code>Duration</code> is shorter than <code>duration</code> parameter</li>
-     *   <li>{@link DatatypeConstants#EQUAL} if this <code>Duration</code> is equal to <code>duration</code> parameter</li>
-     *   <li>{@link DatatypeConstants#GREATER} if this <code>Duration</code> is longer than <code>duration</code> parameter</li>
+     *   <li>{@link DatatypeConstants#LESSER} if this {@code Duration} is shorter than {@code duration} parameter</li>
+     *   <li>{@link DatatypeConstants#EQUAL} if this {@code Duration} is equal to {@code duration} parameter</li>
+     *   <li>{@link DatatypeConstants#GREATER} if this {@code Duration} is longer than {@code duration} parameter</li>
      *   <li>{@link DatatypeConstants#INDETERMINATE} if a conclusive partial order relation cannot be determined</li>
      * </ul>
      *
      * @param duration to compare
      *
-     * @return the relationship between <code>this</code> <code>Duration</code>and <code>duration</code> parameter as
+     * @return the relationship between {@code this Duration} and {@code duration} parameter as
      *   {@link DatatypeConstants#LESSER}, {@link DatatypeConstants#EQUAL}, {@link DatatypeConstants#GREATER}
      *   or {@link DatatypeConstants#INDETERMINATE}.
      *
@@ -763,7 +760,7 @@
      *   cannot reasonably process the request, e.g. W3C XML Schema allows for
      *   arbitrarily large/small/precise values, the request may be beyond the
      *   implementations capability.
-     * @throws NullPointerException if <code>duration</code> is <code>null</code>.
+     * @throws NullPointerException if {@code duration} is {@code null}.
      *
      * @see #isShorterThan(Duration)
      * @see #isLongerThan(Duration)
@@ -771,23 +768,23 @@
     public abstract int compare(final Duration duration);
 
     /**
-     * <p>Checks if this duration object is strictly longer than
-     * another <code>Duration</code> object.</p>
+     * Checks if this duration object is strictly longer than
+     * another {@code Duration} object.
      *
-     * <p>Duration X is "longer" than Y if and only if X>Y
+     * <p>Duration X is "longer" than Y if and only if X {@literal >} Y
      * as defined in the section 3.2.6.2 of the XML Schema 1.0
-     * specification.</p>
+     * specification.
      *
-     * <p>For example, "P1D" (one day) > "PT12H" (12 hours) and
-     * "P2Y" (two years) > "P23M" (23 months).</p>
+     * <p>For example, "P1D" (one day) {@literal >} "PT12H" (12 hours) and
+     * "P2Y" (two years) {@literal >} "P23M" (23 months).
      *
-     * @param duration <code>Duration</code> to test this <code>Duration</code> against.
+     * @param duration {@code Duration} to test this {@code Duration} against.
      *
      * @throws UnsupportedOperationException If the underlying implementation
      *   cannot reasonably process the request, e.g. W3C XML Schema allows for
      *   arbitrarily large/small/precise values, the request may be beyond the
      *   implementations capability.
-     * @throws NullPointerException If <code>duration</code> is null.
+     * @throws NullPointerException If {@code duration} is null.
      *
      * @return
      *      true if the duration represented by this object
@@ -801,19 +798,19 @@
     }
 
     /**
-     * <p>Checks if this duration object is strictly shorter than
-     * another <code>Duration</code> object.</p>
+     * Checks if this duration object is strictly shorter than
+     * another {@code Duration} object.
      *
-     * @param duration <code>Duration</code> to test this <code>Duration</code> against.
+     * @param duration {@code Duration} to test this {@code Duration} against.
      *
-     * @return <code>true</code> if <code>duration</code> parameter is shorter than this <code>Duration</code>,
-     *   else <code>false</code>.
+     * @return {@code true} if {@code duration} parameter is shorter than this {@code Duration},
+     *   else {@code false}.
      *
      * @throws UnsupportedOperationException If the underlying implementation
      *   cannot reasonably process the request, e.g. W3C XML Schema allows for
      *   arbitrarily large/small/precise values, the request may be beyond the
      *   implementations capability.
-     * @throws NullPointerException if <code>duration</code> is null.
+     * @throws NullPointerException if {@code duration} is null.
      *
      * @see #isLongerThan(Duration duration)
      * @see #compare(Duration duration)
@@ -823,19 +820,19 @@
     }
 
     /**
-     * <p>Checks if this duration object has the same duration
-     * as another <code>Duration</code> object.</p>
+     * Checks if this duration object has the same duration
+     * as another {@code Duration} object.
      *
-     * <p>For example, "P1D" (1 day) is equal to "PT24H" (24 hours).</p>
+     * <p>For example, "P1D" (1 day) is equal to "PT24H" (24 hours).
      *
      * <p>Duration X is equal to Y if and only if time instant
      * t+X and t+Y are the same for all the test time instants
      * specified in the section 3.2.6.2 of the XML Schema 1.0
-     * specification.</p>
+     * specification.
      *
-     * <p>Note that there are cases where two <code>Duration</code>s are
+     * <p>Note that there are cases where two {@code Duration}s are
      * "incomparable" to each other, like one month and 30 days.
-     * For example,</p>
+     * For example,
      * <pre>
      * !new Duration("P1M").isShorterThan(new Duration("P30D"))
      * !new Duration("P1M").isLongerThan(new Duration("P30D"))
@@ -843,14 +840,14 @@
      * </pre>
      *
      * @param duration
-     *      The object to compare this <code>Duration</code> against.
+     *      The object to compare this {@code Duration} against.
      *
      * @return
-     *      <code>true</code> if this duration is the same length as
-     *         <code>duration</code>.
-     *      <code>false</code> if <code>duration</code> is <code>null</code>,
+     *      {@code true} if this duration is the same length as
+     *         {@code duration}.
+     *      {@code false} if {@code duration} is {@code null},
      *         is not a
-     *         <code>Duration</code> object,
+     *         {@code Duration} object,
      *         or its length is different from this duration.
      *
      * @throws UnsupportedOperationException If the underlying implementation
@@ -877,18 +874,19 @@
     public abstract int hashCode();
 
     /**
-     * <p>Returns a <code>String</code> representation of this <code>Duration</code> <code>Object</code>.</p>
+     * Returns a {@code String} representation of this {@code Duration Object}.
      *
-     * <p>The result is formatted according to the XML Schema 1.0 spec and can be always parsed back later into the
-     * equivalent <code>Duration</code> <code>Object</code> by {@link DatatypeFactory#newDuration(String  lexicalRepresentation)}.</p>
+     * <p>The result is formatted according to the XML Schema 1.0 spec
+     * and can be always parsed back later into the
+     * equivalent {@code Duration Object} by {@link DatatypeFactory#newDuration(String  lexicalRepresentation)}.
      *
-     * <p>Formally, the following holds for any <code>Duration</code>
-     * <code>Object</code> x:</p>
+     * <p>Formally, the following holds for any {@code Duration}
+     * {@code Object} x:
      * <pre>
      * new Duration(x.toString()).equals(x)
      * </pre>
      *
-     * @return A non-<code>null</code> valid <code>String</code> representation of this <code>Duration</code>.
+     * @return A non-{@code null} valid {@code String} representation of this {@code Duration}.
      */
     public String toString() {
 
@@ -934,14 +932,14 @@
     }
 
     /**
-     * <p>Turns {@link BigDecimal} to a string representation.</p>
+     * Turns {@link BigDecimal} to a string representation.
      *
      * <p>Due to a behavior change in the {@link BigDecimal#toString()}
-     * method in JDK1.5, this had to be implemented here.</p>
+     * method in JDK1.5, this had to be implemented here.
      *
-     * @param bd <code>BigDecimal</code> to format as a <code>String</code>
+     * @param bd {@code BigDecimal} to format as a {@code String}
      *
-     * @return  <code>String</code> representation of <code>BigDecimal</code>
+     * @return  {@code String} representation of {@code BigDecimal}
      */
     private String toString(BigDecimal bd) {
         String intString = bd.unscaledValue().toString();
@@ -972,15 +970,15 @@
 
 
     /**
-     * <p>Calls the {@link Calendar#getTimeInMillis} method.
+     * Calls the {@link Calendar#getTimeInMillis} method.
      * Prior to JDK1.4, this method was protected and therefore
-     * cannot be invoked directly.</p>
+     * cannot be invoked directly.
      *
-     * <p>TODO: In future, this should be replaced by <code>cal.getTimeInMillis()</code>.</p>
+     * <p>TODO: In future, this should be replaced by {@code cal.getTimeInMillis()}.
      *
-     * @param cal <code>Calendar</code> to get time in milliseconds.
+     * @param cal {@code Calendar} to get time in milliseconds.
      *
-     * @return Milliseconds of <code>cal</code>.
+     * @return Milliseconds of {@code cal}.
      */
     private static long getCalendarTimeInMillis(final Calendar cal) {
         return cal.getTime().getTime();
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java	Wed Jul 05 20:30:08 2017 +0200
@@ -43,17 +43,17 @@
  * {@link DatatypeConstants#GMONTH}, and
  * {@link DatatypeConstants#GDAY}
  * defined in the XML Namespace
- * <code>"http://www.w3.org/2001/XMLSchema"</code>.
+ * {@code "http://www.w3.org/2001/XMLSchema"}.
  * These datatypes are normatively defined in
- * <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">W3C XML Schema 1.0 Part 2, Section 3.2.7-14</a>.</p>
+ * <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">W3C XML Schema 1.0 Part 2, Section 3.2.7-14</a>.
  *
  * <p>The table below defines the mapping between XML Schema 1.0
  * date/time datatype fields and this class' fields. It also summarizes
  * the value constraints for the date and time fields defined in
  * <a href="http://www.w3.org/TR/xmlschema-2/#isoformats">W3C XML Schema 1.0 Part 2, Appendix D,
- * <i>ISO 8601 Date and Time Formats</i></a>.</p>
+ * <i>ISO 8601 Date and Time Formats</i></a>.
  *
- * <a name="datetimefieldmapping"/>
+ * <a name="datetimefieldmapping"></a>
  * <table border="2" rules="all" cellpadding="2">
  *   <thead>
  *     <tr>
@@ -64,22 +64,22 @@
  *   </thead>
  *   <tbody>
  *     <tr>
- *       <th>XML Schema 1.0<br/>
- *           datatype<br/>
+ *       <th>XML Schema 1.0<br>
+ *           datatype<br>
  *            field</th>
- *       <th>Related<br/>XMLGregorianCalendar<br/>Accessor(s)</th>
+ *       <th>Related<br>XMLGregorianCalendar<br>Accessor(s)</th>
  *       <th>Value Range</th>
  *     </tr>
  *     <tr>
- *       <td><a name="datetimefield-year"/>year</td>
- *       <td> {@link #getYear()} + {@link #getEon()} or<br/>
+ *       <td><a name="datetimefield-year">year</a></td>
+ *       <td> {@link #getYear()} + {@link #getEon()} or<br>
  *            {@link #getEonAndYear}
  *       </td>
- *       <td> <code>getYear()</code> is a value between -(10^9-1) to (10^9)-1
- *            or {@link DatatypeConstants#FIELD_UNDEFINED}.<br/>
- *            {@link #getEon()} is high order year value in billion of years.<br/>
- *            <code>getEon()</code> has values greater than or equal to (10^9) or less than or equal to -(10^9).
- *            A value of null indicates field is undefined.</br>
+ *       <td> {@code getYear()} is a value between -(10^9-1) to (10^9)-1
+ *            or {@link DatatypeConstants#FIELD_UNDEFINED}.<br>
+ *            {@link #getEon()} is high order year value in billion of years.<br>
+ *            {@code getEon()} has values greater than or equal to (10^9) or less than or equal to -(10^9).
+ *            A value of null indicates field is undefined.<br>
  *            Given that <a href="http://www.w3.org/2001/05/xmlschema-errata#e2-63">XML Schema 1.0 errata</a> states that the year zero
  *            will be a valid lexical value in a future version of XML Schema,
  *            this class allows the year field to be set to zero. Otherwise,
@@ -89,20 +89,20 @@
  *            </td>
  *     </tr>
  *     <tr>
- *       <td><a name="datetimefield-month"/>month</td>
+ *       <td><a name="datetimefield-month">month</a></td>
  *       <td> {@link #getMonth()} </td>
  *       <td> 1 to 12 or {@link DatatypeConstants#FIELD_UNDEFINED} </td>
  *     </tr>
  *     <tr>
- *       <td><a name="datetimefield-day"/>day</td>
+ *       <td><a name="datetimefield-day">day</a></td>
  *       <td> {@link #getDay()} </td>
- *       <td> Independent of month, max range is 1 to 31 or {@link DatatypeConstants#FIELD_UNDEFINED}.<br/>
+ *       <td> Independent of month, max range is 1 to 31 or {@link DatatypeConstants#FIELD_UNDEFINED}.<br>
  *            The normative value constraint stated relative to month
  *            field's value is in <a href="http://www.w3.org/TR/xmlschema-2/#isoformats">W3C XML Schema 1.0 Part 2, Appendix D</a>.
  *       </td>
  *     </tr>
  *     <tr>
- *       <td><a name="datetimefield-hour"/>hour</td>
+ *       <td><a name="datetimefield-hour">hour</a></td>
  *       <td>{@link #getHour()}</td>
  *       <td>
  *         0 to 23 or {@link DatatypeConstants#FIELD_UNDEFINED}.
@@ -114,28 +114,28 @@
  *       </td>
  *     </tr>
  *     <tr>
- *       <td><a name="datetimefield-minute"/>minute</td>
+ *       <td><a name="datetimefield-minute">minute</a></td>
  *       <td> {@link #getMinute()} </td>
  *       <td> 0 to 59 or {@link DatatypeConstants#FIELD_UNDEFINED} </td>
  *     </tr>
  *     <tr>
- *       <td><a name="datetimefield-second"/>second</td>
+ *       <td><a name="datetimefield-second">second</a></td>
  *       <td>
- *         {@link #getSecond()} + {@link #getMillisecond()}/1000 or<br/>
+ *         {@link #getSecond()} + {@link #getMillisecond()}/1000 or<br>
  *         {@link #getSecond()} + {@link #getFractionalSecond()}
  *       </td>
  *       <td>
- *         {@link #getSecond()} from 0 to 60 or {@link DatatypeConstants#FIELD_UNDEFINED}.<br/>
- *         <i>(Note: 60 only allowable for leap second.)</i><br/>
+ *         {@link #getSecond()} from 0 to 60 or {@link DatatypeConstants#FIELD_UNDEFINED}.<br>
+ *         <i>(Note: 60 only allowable for leap second.)</i><br>
  *         {@link #getFractionalSecond()} allows for infinite precision over the range from 0.0 to 1.0 when
- *         the {@link #getSecond()} is defined.<br/>
- *         <code>FractionalSecond</code> is optional and has a value of <code>null</code> when it is undefined.<br />
+ *         the {@link #getSecond()} is defined.<br>
+ *         {@code FractionalSecond} is optional and has a value of {@code null} when it is undefined.<br>
  *            {@link #getMillisecond()} is the convenience
  *            millisecond precision of value of {@link #getFractionalSecond()}.
  *       </td>
  *     </tr>
  *     <tr>
- *       <td><a name="datetimefield-timezone"/>timezone</td>
+ *       <td><a name="datetimefield-timezone">timezone</a></td>
  *       <td> {@link #getTimezone()} </td>
  *       <td> Number of minutes or {@link DatatypeConstants#FIELD_UNDEFINED}.
  *         Value range from -14 hours (-14 * 60 minutes) to 14 hours (14 * 60 minutes).
@@ -145,14 +145,13 @@
  *  </table>
  *
  * <p>All maximum value space constraints listed for the fields in the table
- * above are checked by factory methods, @{link DatatypeFactory},
+ * above are checked by factory methods, {@link DatatypeFactory},
  * setter methods and parse methods of
- * this class. <code>IllegalArgumentException</code> is thrown when a
+ * this class. {@code IllegalArgumentException} is thrown when a
  * parameter's value is outside the value constraint for the field or
  * if the composite
  * values constitute an invalid XMLGregorianCalendar instance (for example, if
  * the 31st of June is specified).
- * </p>
  *
  * <p>The following operations are defined for this class:
  * <ul>
@@ -169,7 +168,6 @@
  *      W3C XML Schema 1.0 Part 2, Appendix E, <i>Adding durations to dateTimes</i></a>.
  *   </li>
  * </ul>
- * </p>
  *
  * @author <a href="mailto:Joseph.Fialli@Sun.com">Joseph Fialli</a>
  * @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
@@ -187,26 +185,26 @@
          * Default no-arg constructor.
          *
          * <p>Note: Always use the {@link DatatypeFactory} to
-         * construct an instance of <code>XMLGregorianCalendar</code>.
+         * construct an instance of {@code XMLGregorianCalendar}.
          * The constructor on this class cannot be guaranteed to
          * produce an object with a consistent state and may be
-         * removed in the future.</p>
+         * removed in the future.
          */
          public XMLGregorianCalendar() {
          }
 
         /**
-         * <p>Unset all fields to undefined.</p>
+         * Unset all fields to undefined.
          *
          * <p>Set all int fields to {@link DatatypeConstants#FIELD_UNDEFINED} and reference fields
-         * to null.</p>
+         * to null.
          */
         public abstract void clear();
 
         /**
-         * <p>Reset this <code>XMLGregorianCalendar</code> to its original values.</p>
+         * Reset this {@code XMLGregorianCalendar} to its original values.
          *
-         * <p><code>XMLGregorianCalendar</code> is reset to the same values as when it was created with
+         * <p>{@code XMLGregorianCalendar} is reset to the same values as when it was created with
          * {@link DatatypeFactory#newXMLGregorianCalendar()},
          * {@link DatatypeFactory#newXMLGregorianCalendar(String lexicalRepresentation)},
          * {@link DatatypeFactory#newXMLGregorianCalendar(
@@ -250,83 +248,82 @@
          *   int seconds,
          *   int milliseconds,
          *   int timezone)}.
-         * </p>
          *
-         * <p><code>reset()</code> is designed to allow the reuse of existing <code>XMLGregorianCalendar</code>s
-         * thus saving resources associated with the creation of new <code>XMLGregorianCalendar</code>s.</p>
+         * <p>{@code reset()} is designed to allow the reuse of existing {@code XMLGregorianCalendar}s
+         * thus saving resources associated with the creation of new {@code XMLGregorianCalendar}s.
          */
         public abstract void reset();
 
     /**
-     * <p>Set low and high order component of XSD <code>dateTime</code> year field.</p>
+     * Set low and high order component of XSD {@code dateTime} year field.
      *
-     * <p>Unset this field by invoking the setter with a parameter value of <code>null</code>.</p>
+     * <p>Unset this field by invoking the setter with a parameter value of {@code null}.
      *
      * @param year value constraints summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
      *
-     * @throws IllegalArgumentException if <code>year</code> parameter is
+     * @throws IllegalArgumentException if {@code year} parameter is
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
     public abstract void setYear(BigInteger year);
 
     /**
-     * <p>Set year of XSD <code>dateTime</code> year field.</p>
+     * Set year of XSD {@code dateTime} year field.
      *
      * <p>Unset this field by invoking the setter with a parameter value of
-     * {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+     * {@link DatatypeConstants#FIELD_UNDEFINED}.
      *
-     * <p>Note: if the absolute value of the <code>year</code> parameter
+     * <p>Note: if the absolute value of the {@code year} parameter
      * is less than 10^9, the eon component of the XSD year field is set to
-     * <code>null</code> by this method.</p>
+     * {@code null} by this method.
      *
      * @param year value constraints are summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
-     *   If year is {@link DatatypeConstants#FIELD_UNDEFINED}, then eon is set to <code>null</code>.
+     *   If year is {@link DatatypeConstants#FIELD_UNDEFINED}, then eon is set to {@code null}.
      */
     public abstract void setYear(int year);
 
     /**
-     * <p>Set month.</p>
+     * Set month.
      *
-     * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+     * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
      *
      * @param month value constraints summarized in <a href="#datetimefield-month">month field of date/time field mapping table</a>.
      *
-     * @throws IllegalArgumentException if <code>month</code> parameter is
+     * @throws IllegalArgumentException if {@code month} parameter is
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
     public abstract void setMonth(int month);
 
     /**
-     * <p>Set days in month.</p>
+     * Set days in month.
      *
-     * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+     * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
      *
      * @param day value constraints summarized in <a href="#datetimefield-day">day field of date/time field mapping table</a>.
      *
-     * @throws IllegalArgumentException if <code>day</code> parameter is
+     * @throws IllegalArgumentException if {@code day} parameter is
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
     public abstract void setDay(int day);
 
     /**
-     * <p>Set the number of minutes in the timezone offset.</p>
+     * Set the number of minutes in the timezone offset.
      *
-     * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+     * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
      *
      * @param offset value constraints summarized in <a href="#datetimefield-timezone">
      *   timezone field of date/time field mapping table</a>.
      *
-     * @throws IllegalArgumentException if <code>offset</code> parameter is
+     * @throws IllegalArgumentException if {@code offset} parameter is
      * outside value constraints for the field as specified in
      * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      */
     public abstract void setTimezone(int offset);
 
     /**
-     * <p>Set time as one unit.</p>
+     * Set time as one unit.
      *
      * @param hour value constraints are summarized in
      * <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
@@ -352,71 +349,71 @@
     }
 
         /**
-         * <p>Set hours.</p>
+         * Set hours.
          *
-         * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * @param hour value constraints summarized in <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
          *
-         * @throws IllegalArgumentException if <code>hour</code> parameter is outside value constraints for the field as specified in
+         * @throws IllegalArgumentException if {@code hour} parameter is outside value constraints for the field as specified in
          *   <a href="#datetimefieldmapping">date/time field mapping table</a>.
         */
         public abstract void setHour(int hour);
 
         /**
-         * <p>Set minutes.</p>
+         * Set minutes.
          *
-         * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * @param minute value constraints summarized in <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
          *
-         * @throws IllegalArgumentException if <code>minute</code> parameter is outside value constraints for the field as specified in
+         * @throws IllegalArgumentException if {@code minute} parameter is outside value constraints for the field as specified in
          *   <a href="#datetimefieldmapping">date/time field mapping table</a>.
         */
         public abstract void setMinute(int minute);
 
         /**
-         * <p>Set seconds.</p>
+         * Set seconds.
          *
-         * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * @param second value constraints summarized in <a href="#datetimefield-second">second field of date/time field mapping table</a>.
          *
-         * @throws IllegalArgumentException if <code>second</code> parameter is outside value constraints for the field as specified in
+         * @throws IllegalArgumentException if {@code second} parameter is outside value constraints for the field as specified in
          *   <a href="#datetimefieldmapping">date/time field mapping table</a>.
         */
         public abstract void setSecond(int second);
 
         /**
-         * <p>Set milliseconds.</p>
+         * Set milliseconds.
          *
-         * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * <p>Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * @param millisecond value constraints summarized in
          *   <a href="#datetimefield-second">second field of date/time field mapping table</a>.
          *
-         * @throws IllegalArgumentException if <code>millisecond</code> parameter is outside value constraints for the field as specified
+         * @throws IllegalArgumentException if {@code millisecond} parameter is outside value constraints for the field as specified
          *   in <a href="#datetimefieldmapping">date/time field mapping table</a>.
         */
         public abstract void setMillisecond(int millisecond);
 
         /**
-         * <p>Set fractional seconds.</p>
+         * Set fractional seconds.
          *
-         * <p>Unset this field by invoking the setter with a parameter value of <code>null</code>.</p>
+         * <p>Unset this field by invoking the setter with a parameter value of {@code null}.
          *
          * @param fractional value constraints summarized in
          *   <a href="#datetimefield-second">second field of date/time field mapping table</a>.
          *
-         * @throws IllegalArgumentException if <code>fractional</code> parameter is outside value constraints for the field as specified
+         * @throws IllegalArgumentException if {@code fractional} parameter is outside value constraints for the field as specified
          *   in <a href="#datetimefieldmapping">date/time field mapping table</a>.
         */
         public abstract void setFractionalSecond(BigDecimal fractional);
 
 
     /**
-     * <p>Set time as one unit, including the optional infinite precision
-     * fractional seconds.</p>
+     * Set time as one unit, including the optional infinite precision
+     * fractional seconds.
      *
      * @param hour value constraints are summarized in
      * <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
@@ -424,7 +421,7 @@
      * <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
      * @param second value constraints are summarized in
      * <a href="#datetimefield-second">second field of date/time field mapping table</a>.
-     * @param fractional value of <code>null</code> indicates this optional
+     * @param fractional value of {@code null} indicates this optional
      *   field is not set.
      *
      * @throws IllegalArgumentException if any parameter is
@@ -445,7 +442,7 @@
 
 
     /**
-     * <p>Set time as one unit, including optional milliseconds.</p>
+     * Set time as one unit, including optional milliseconds.
      *
      * @param hour value constraints are summarized in
      * <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
@@ -469,13 +466,13 @@
     }
 
         /**
-         * <p>Return high order component for XML Schema 1.0 dateTime datatype field for
-         * <code>year</code>.
-         * <code>null</code> if this optional part of the year field is not defined.</p>
+         * Return high order component for XML Schema 1.0 dateTime datatype field for
+         * {@code year}.
+         * {@code null} if this optional part of the year field is not defined.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-year">year field of date/time field mapping table</a>.</p>
-         * @return eon of this <code>XMLGregorianCalendar</code>. The value
+         * <a href="#datetimefield-year">year field of date/time field mapping table</a>.
+         * @return eon of this {@code XMLGregorianCalendar}. The value
          * returned is an integer multiple of 10^9.
          *
          * @see #getYear()
@@ -484,13 +481,13 @@
         public abstract BigInteger getEon();
 
         /**
-         * <p>Return low order component for XML Schema 1.0 dateTime datatype field for
-         * <code>year</code> or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * Return low order component for XML Schema 1.0 dateTime datatype field for
+         * {@code year} or {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-year">year field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-year">year field of date/time field mapping table</a>.
          *
-         * @return year  of this <code>XMLGregorianCalendar</code>.
+         * @return year  of this {@code XMLGregorianCalendar}.
          *
          * @see #getEon()
          * @see #getEonAndYear()
@@ -498,16 +495,16 @@
         public abstract int getYear();
 
         /**
-         * <p>Return XML Schema 1.0 dateTime datatype field for
-         * <code>year</code>.</p>
+         * Return XML Schema 1.0 dateTime datatype field for
+         * {@code year}.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-year">year field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-year">year field of date/time field mapping table</a>.
          *
-         * @return sum of <code>eon</code> and <code>BigInteger.valueOf(year)</code>
-         * when both fields are defined. When only <code>year</code> is defined,
-         * return it. When both <code>eon</code> and <code>year</code> are not
-         * defined, return <code>null</code>.
+         * @return sum of {@code eon} and {@code BigInteger.valueOf(year)}
+         * when both fields are defined. When only {@code year} is defined,
+         * return it. When both {@code eon} and {@code year} are not
+         * defined, return {@code null}.
          *
          * @see #getEon()
          * @see #getYear()
@@ -515,21 +512,21 @@
         public abstract BigInteger getEonAndYear();
 
         /**
-         * <p>Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-month">month field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-month">month field of date/time field mapping table</a>.
          *
-         * @return year  of this <code>XMLGregorianCalendar</code>.
+         * @return year  of this {@code XMLGregorianCalendar}.
          *
          */
         public abstract int getMonth();
 
         /**
-         * Return day in month or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * Return day in month or {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-day">day field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-day">day field of date/time field mapping table</a>.
          *
          * @see #setDay(int)
          */
@@ -540,7 +537,7 @@
          * {@link DatatypeConstants#FIELD_UNDEFINED} if this optional field is not defined.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-timezone">timezone field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-timezone">timezone field of date/time field mapping table</a>.
          *
          * @see #setTimezone(int)
          */
@@ -551,34 +548,34 @@
          * Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
          * @see #setTime(int, int, int)
          */
         public abstract int getHour();
 
         /**
-         * Return minutes or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * Return minutes or {@link DatatypeConstants#FIELD_UNDEFINED}.
          * Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
          * @see #setTime(int, int, int)
          */
         public abstract int getMinute();
 
         /**
-         * <p>Return seconds or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * Return seconds or {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * <p>Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined.
          * When this field is not defined, the optional xs:dateTime
          * fractional seconds field, represented by
          * {@link #getFractionalSecond()} and {@link #getMillisecond()},
-         * must not be defined.</p>
+         * must not be defined.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-second">second field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-second">second field of date/time field mapping table</a>.
          *
-         * @return Second  of this <code>XMLGregorianCalendar</code>.
+         * @return Second  of this {@code XMLGregorianCalendar}.
          *
          * @see #getFractionalSecond()
          * @see #getMillisecond()
@@ -587,20 +584,20 @@
         public abstract int getSecond();
 
         /**
-         * <p>Return millisecond precision of {@link #getFractionalSecond()}.</p>
+         * Return millisecond precision of {@link #getFractionalSecond()}.
          *
          * <p>This method represents a convenience accessor to infinite
          * precision fractional second value returned by
          * {@link #getFractionalSecond()}. The returned value is the rounded
          * down to milliseconds value of
          * {@link #getFractionalSecond()}. When {@link #getFractionalSecond()}
-         * returns <code>null</code>, this method must return
-         * {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * returns {@code null}, this method must return
+         * {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
          * <p>Value constraints for this value are summarized in
-         * <a href="#datetimefield-second">second field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-second">second field of date/time field mapping table</a>.
          *
-         * @return Millisecond  of this <code>XMLGregorianCalendar</code>.
+         * @return Millisecond  of this {@code XMLGregorianCalendar}.
          *
          * @see #getFractionalSecond()
          * @see #setTime(int, int, int)
@@ -618,18 +615,18 @@
         }
 
         /**
-         * <p>Return fractional seconds.</p>
+         * Return fractional seconds.
          *
-         * <p><code>null</code> is returned when this optional field is not defined.</p>
+         * <p>{@code null} is returned when this optional field is not defined.
          *
          * <p>Value constraints are detailed in
-         * <a href="#datetimefield-second">second field of date/time field mapping table</a>.</p>
+         * <a href="#datetimefield-second">second field of date/time field mapping table</a>.
          *
          * <p>This optional field can only have a defined value when the
          * xs:dateTime second field, represented by {@link #getSecond()},
-         * does not return {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
+         * does not return {@link DatatypeConstants#FIELD_UNDEFINED}.
          *
-         * @return fractional seconds  of this <code>XMLGregorianCalendar</code>.
+         * @return fractional seconds  of this {@code XMLGregorianCalendar}.
          *
          * @see #getSecond()
          * @see #setTime(int, int, int, BigDecimal)
@@ -638,51 +635,51 @@
 
     // comparisons
     /**
-     * <p>Compare two instances of W3C XML Schema 1.0 date/time datatypes
+     * Compare two instances of W3C XML Schema 1.0 date/time datatypes
      * according to partial order relation defined in
      * <a href="http://www.w3.org/TR/xmlschema-2/#dateTime-order">W3C XML Schema 1.0 Part 2, Section 3.2.7.3,
-     * <i>Order relation on dateTime</i></a>.</p>
+     * <i>Order relation on dateTime</i></a>.
      *
-     * <p><code>xsd:dateTime</code> datatype field mapping to accessors of
+     * <p>{@code xsd:dateTime} datatype field mapping to accessors of
      * this class are defined in
-     * <a href="#datetimefieldmapping">date/time field mapping table</a>.</p>
+     * <a href="#datetimefieldmapping">date/time field mapping table</a>.
      *
-     * @param xmlGregorianCalendar Instance of <code>XMLGregorianCalendar</code> to compare
+     * @param xmlGregorianCalendar Instance of {@code XMLGregorianCalendar} to compare
      *
-     * @return The relationship between <code>this</code> <code>XMLGregorianCalendar</code> and
-     *   the specified <code>xmlGregorianCalendar</code> as
+     * @return The relationship between {@code this} {@code XMLGregorianCalendar} and
+     *   the specified {@code xmlGregorianCalendar} as
      *   {@link DatatypeConstants#LESSER},
      *   {@link DatatypeConstants#EQUAL},
      *   {@link DatatypeConstants#GREATER} or
      *   {@link DatatypeConstants#INDETERMINATE}.
      *
-     * @throws NullPointerException if <code>xmlGregorianCalendar</code> is null.
+     * @throws NullPointerException if {@code xmlGregorianCalendar} is null.
      */
     public abstract int compare(XMLGregorianCalendar xmlGregorianCalendar);
 
     /**
-     * <p>Normalize this instance to UTC.</p>
+     * Normalize this instance to UTC.
      *
-     * <p>2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z</p>
-     * <p>Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).</p>
+     * <p>2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z
+     * <p>Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).
      *
-     * @return <code>this</code> <code>XMLGregorianCalendar</code> normalized to UTC.
+     * @return {@code this} {@code XMLGregorianCalendar} normalized to UTC.
      */
     public abstract XMLGregorianCalendar normalize();
 
     /**
-     * <p>Compares this calendar to the specified object. The result is
-     * <code>true</code> if and only if the argument is not null and is an
-     * <code>XMLGregorianCalendar</code> object that represents the same
-     * instant in time as this object.</p>
+     * Compares this calendar to the specified object. The result is
+     * {@code true} if and only if the argument is not null and is an
+     * {@code XMLGregorianCalendar} object that represents the same
+     * instant in time as this object.
      *
      * @param obj to compare.
      *
-     * @return <code>true</code> when <code>obj</code> is an instance of
-     * <code>XMLGregorianCalendar</code> and
+     * @return {@code true} when {@code obj} is an instance of
+     * {@code XMLGregorianCalendar} and
      * {@link #compare(XMLGregorianCalendar obj)}
      * returns {@link DatatypeConstants#EQUAL},
-     * otherwise <code>false</code>.
+     * otherwise {@code false}.
      */
     public boolean equals(Object obj) {
 
@@ -693,7 +690,7 @@
     }
 
     /**
-     * <p>Returns a hash code consistent with the definition of the equals method.</p>
+     * Returns a hash code consistent with the definition of the equals method.
      *
      * @return hash code of this object.
      */
@@ -721,15 +718,15 @@
     }
 
     /**
-     * <p>Return the lexical representation of <code>this</code> instance.
+     * Return the lexical representation of {@code this} instance.
      * The format is specified in
      * <a href="http://www.w3.org/TR/xmlschema-2/#dateTime-order">XML Schema 1.0 Part 2, Section 3.2.[7-14].1,
-     * <i>Lexical Representation</i>".</a></p>
+     * <i>Lexical Representation</i>".</a>
      *
      * <p>Specific target lexical representation format is determined by
-     * {@link #getXMLSchemaType()}.</p>
+     * {@link #getXMLSchemaType()}.
      *
-     * @return XML, as <code>String</code>, representation of this <code>XMLGregorianCalendar</code>
+     * @return XML, as {@code String}, representation of this {@code XMLGregorianCalendar}
      *
      * @throws IllegalStateException if the combination of set fields
      *    does not match one of the eight defined XML Schema builtin date/time datatypes.
@@ -737,14 +734,14 @@
     public abstract String toXMLFormat();
 
     /**
-     * <p>Return the name of the XML Schema date/time type that this instance
-     * maps to. Type is computed based on fields that are set.</p>
+     * Return the name of the XML Schema date/time type that this instance
+     * maps to. Type is computed based on fields that are set.
      *
      * <table border="2" rules="all" cellpadding="2">
      *   <thead>
      *     <tr>
      *       <th align="center" colspan="7">
-     *         Required fields for XML Schema 1.0 Date/Time Datatypes.<br/>
+     *         Required fields for XML Schema 1.0 Date/Time Datatypes.<br>
      *         <i>(timezone is optional for all date/time datatypes)</i>
      *       </th>
      *     </tr>
@@ -850,11 +847,11 @@
     public abstract QName getXMLSchemaType();
 
         /**
-         * <p>Returns a <code>String</code> representation of this <code>XMLGregorianCalendar</code> <code>Object</code>.</p>
+         * Returns a {@code String} representation of this {@code XMLGregorianCalendar} {@code Object}.
          *
-         * <p>The result is a lexical representation generated by {@link #toXMLFormat()}.</p>
+         * <p>The result is a lexical representation generated by {@link #toXMLFormat()}.
          *
-         * @return A non-<code>null</code> valid <code>String</code> representation of this <code>XMLGregorianCalendar</code>.
+         * @return A non-{@code null} valid {@code String} representation of this {@code XMLGregorianCalendar}.
          *
      * @throws IllegalStateException if the combination of set fields
      *    does not match one of the eight defined XML Schema builtin date/time datatypes.
@@ -867,89 +864,89 @@
     }
 
     /**
-     * Validate instance by <code>getXMLSchemaType()</code> constraints.
+     * Validate instance by {@code getXMLSchemaType()} constraints.
      * @return true if data values are valid.
      */
     public abstract boolean isValid();
 
     /**
-     * <p>Add <code>duration</code> to this instance.</p>
+     * Add {@code duration} to this instance.
      *
      * <p>The computation is specified in
      * <a href="http://www.w3.org/TR/xmlschema-2/#adding-durations-to-dateTimes">XML Schema 1.0 Part 2, Appendix E,
-     * <i>Adding durations to dateTimes</i>></a>.
+     * <i>Adding durations to dateTimes</i></a>.
      * <a href="#datetimefieldmapping">date/time field mapping table</a>
-     * defines the mapping from XML Schema 1.0 <code>dateTime</code> fields
-     * to this class' representation of those fields.</p>
+     * defines the mapping from XML Schema 1.0 {@code dateTime} fields
+     * to this class' representation of those fields.
      *
-     * @param duration Duration to add to this <code>XMLGregorianCalendar</code>.
+     * @param duration Duration to add to this {@code XMLGregorianCalendar}.
      *
-     * @throws NullPointerException  when <code>duration</code> parameter is <code>null</code>.
+     * @throws NullPointerException  when {@code duration} parameter is {@code null}.
      */
     public abstract void add(Duration duration);
 
     /**
-     * <p>Convert this <code>XMLGregorianCalendar</code> to a {@link GregorianCalendar}.</p>
+     * Convert this {@code XMLGregorianCalendar} to a {@link GregorianCalendar}.
      *
-     * <p>When <code>this</code> instance has an undefined field, this
-     * conversion relies on the <code>java.util.GregorianCalendar</code> default
+     * <p>When {@code this} instance has an undefined field, this
+     * conversion relies on the {@code java.util.GregorianCalendar} default
      * for its corresponding field. A notable difference between
-     * XML Schema 1.0 date/time datatypes and <code>java.util.GregorianCalendar</code>
+     * XML Schema 1.0 date/time datatypes and {@code java.util.GregorianCalendar}
      * is that Timezone value is optional for date/time datatypes and it is
-     * a required field for <code>java.util.GregorianCalendar</code>. See javadoc
-     * for <code>java.util.TimeZone.getDefault()</code> on how the default
-     * is determined. To explicitly specify the <code>TimeZone</code>
+     * a required field for {@code java.util.GregorianCalendar}. See javadoc
+     * for {@code java.util.TimeZone.getDefault()} on how the default
+     * is determined. To explicitly specify the {@code TimeZone}
      * instance, see
-     * {@link #toGregorianCalendar(TimeZone, Locale, XMLGregorianCalendar)}.</p>
+     * {@link #toGregorianCalendar(TimeZone, Locale, XMLGregorianCalendar)}.
      *
      * <table border="2" rules="all" cellpadding="2">
      *   <thead>
      *     <tr>
      *       <th align="center" colspan="2">
      *          Field by Field Conversion from this class to
-     *          <code>java.util.GregorianCalendar</code>
+     *          {@code java.util.GregorianCalendar}
      *       </th>
      *     </tr>
      *   </thead>
      *   <tbody>
      *     <tr>
-     *        <td><code>java.util.GregorianCalendar</code> field</td>
-     *        <td><code>javax.xml.datatype.XMLGregorianCalendar</code> field</td>
+     *        <td>{@code java.util.GregorianCalendar} field</td>
+     *        <td>{@code javax.xml.datatype.XMLGregorianCalendar} field</td>
      *     </tr>
      *     <tr>
-     *       <td><code>ERA</code></td>
-     *       <td>{@link #getEonAndYear()}<code>.signum() < 0 ? GregorianCalendar.BC : GregorianCalendar.AD</code></td>
+     *       <td>{@code ERA}</td>
+     *       <td>{@link #getEonAndYear()}{@code .signum() < 0 ? GregorianCalendar.BC : GregorianCalendar.AD}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>YEAR</code></td>
-     *       <td>{@link #getEonAndYear()}<code>.abs().intValue()</code><i>*</i></td>
+     *       <td>{@code YEAR}</td>
+     *       <td>{@link #getEonAndYear()}{@code .abs().intValue()}<i>*</i></td>
      *     </tr>
      *     <tr>
-     *       <td><code>MONTH</code></td>
+     *       <td>{@code MONTH}</td>
      *       <td>{@link #getMonth()} - {@link DatatypeConstants#JANUARY} + {@link GregorianCalendar#JANUARY}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>DAY_OF_MONTH</code></td>
+     *       <td>{@code DAY_OF_MONTH}</td>
      *       <td>{@link #getDay()}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>HOUR_OF_DAY</code></td>
+     *       <td>{@code HOUR_OF_DAY}</td>
      *       <td>{@link #getHour()}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>MINUTE</code></td>
+     *       <td>{@code MINUTE}</td>
      *       <td>{@link #getMinute()}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>SECOND</code></td>
+     *       <td>{@code SECOND}</td>
      *       <td>{@link #getSecond()}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>MILLISECOND</code></td>
+     *       <td>{@code MILLISECOND}</td>
      *       <td>get millisecond order from {@link #getFractionalSecond()}<i>*</i> </td>
      *     </tr>
      *     <tr>
-     *       <td><code>GregorianCalendar.setTimeZone(TimeZone)</code></td>
+     *       <td>{@code GregorianCalendar.setTimeZone(TimeZone)}</td>
      *       <td>{@link #getTimezone()} formatted into Custom timezone id</td>
      *     </tr>
      *   </tbody>
@@ -958,74 +955,74 @@
      * to source datatype having higher precision than target datatype.
      *
      * <p>To ensure consistency in conversion implementations, the new
-     * <code>GregorianCalendar</code> should be instantiated in following
+     * {@code GregorianCalendar} should be instantiated in following
      * manner.
      * <ul>
-     *   <li>Using <code>timeZone</code> value as defined above, create a new
-     * <code>java.util.GregorianCalendar(timeZone,Locale.getDefault())</code>.
+     *   <li>Using {@code timeZone} value as defined above, create a new
+     * {@code java.util.GregorianCalendar(timeZone,Locale.getDefault())}.
      *   </li>
      *   <li>Initialize all GregorianCalendar fields by calling {@link java.util.GregorianCalendar#clear()}.</li>
      *   <li>Obtain a pure Gregorian Calendar by invoking
-     *   <code>GregorianCalendar.setGregorianChange(
-     *   new Date(Long.MIN_VALUE))</code>.</li>
+     *   {@code GregorianCalendar.setGregorianChange(
+     *   new Date(Long.MIN_VALUE))}.</li>
      *   <li>Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY,
      *       MINUTE, SECOND and MILLISECOND are set using the method
-     *       <code>Calendar.set(int,int)</code></li>
+     *       {@code Calendar.set(int,int)}</li>
      * </ul>
-     * </p>
      *
      * @see #toGregorianCalendar(java.util.TimeZone, java.util.Locale, XMLGregorianCalendar)
      */
     public abstract GregorianCalendar toGregorianCalendar();
 
     /**
-     * <p>Convert this <code>XMLGregorianCalendar</code> along with provided parameters
-     * to a {@link GregorianCalendar} instance.</p>
+     * Convert this {@code XMLGregorianCalendar} along with provided parameters
+     * to a {@link GregorianCalendar} instance.
      *
      * <p> Since XML Schema 1.0 date/time datetypes has no concept of
      * timezone ids or daylight savings timezone ids, this conversion operation
      * allows the user to explicitly specify one with
-     * <code>timezone</code> parameter.</p>
+     * {@code timezone} parameter.
      *
-     * <p>To compute the return value's <code>TimeZone</code> field,
+     * <p>To compute the return value's {@code TimeZone} field,
      * <ul>
-     * <li>when parameter <code>timeZone</code> is non-null,
+     * <li>when parameter {@code timeZone} is non-null,
      * it is the timezone field.</li>
-     * <li>else when <code>this.getTimezone() != FIELD_UNDEFINED</code>,
-     * create a <code>java.util.TimeZone</code> with a custom timezone id
-     * using the <code>this.getTimezone()</code>.</li>
-     * <li>else when <code>defaults.getTimezone() != FIELD_UNDEFINED</code>,
-     * create a <code>java.util.TimeZone</code> with a custom timezone id
-     * using <code>defaults.getTimezone()</code>.</li>
-     * <li>else use the <code>GregorianCalendar</code> default timezone value
+     * <li>else when {@code this.getTimezone() != FIELD_UNDEFINED},
+     * create a {@code java.util.TimeZone} with a custom timezone id
+     * using the {@code this.getTimezone()}.</li>
+     * <li>else when {@code defaults.getTimezone() != FIELD_UNDEFINED},
+     * create a {@code java.util.TimeZone} with a custom timezone id
+     * using {@code defaults.getTimezone()}.</li>
+     * <li>else use the {@code GregorianCalendar} default timezone value
      * for the host is defined as specified by
-     * <code>java.util.TimeZone.getDefault()</code>.</li></p>
+     * {@code java.util.TimeZone.getDefault()}.</li>
+     * </ul>
      *
      * <p>To ensure consistency in conversion implementations, the new
-     * <code>GregorianCalendar</code> should be instantiated in following
+     * {@code GregorianCalendar} should be instantiated in following
      * manner.
      * <ul>
-     *   <li>Create a new <code>java.util.GregorianCalendar(TimeZone,
-     *       Locale)</code> with TimeZone set as specified above and the
-     *       <code>Locale</code> parameter.
+     *   <li>Create a new {@code java.util.GregorianCalendar(TimeZone,
+     *       Locale)} with TimeZone set as specified above and the
+     *       {@code Locale} parameter.
      *   </li>
      *   <li>Initialize all GregorianCalendar fields by calling {@link GregorianCalendar#clear()}</li>
      *   <li>Obtain a pure Gregorian Calendar by invoking
-     *   <code>GregorianCalendar.setGregorianChange(
-     *   new Date(Long.MIN_VALUE))</code>.</li>
+     *   {@code GregorianCalendar.setGregorianChange(
+     *   new Date(Long.MIN_VALUE))}.</li>
      *   <li>Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY,
      *       MINUTE, SECOND and MILLISECOND are set using the method
-     *       <code>Calendar.set(int,int)</code></li>
+     *       {@code Calendar.set(int,int)}</li>
      * </ul>
      *
-     * @param timezone provide Timezone. <code>null</code> is a legal value.
+     * @param timezone provide Timezone. {@code null} is a legal value.
      * @param aLocale  provide explicit Locale. Use default GregorianCalendar locale if
-     *                 value is <code>null</code>.
+     *                 value is {@code null}.
      * @param defaults provide default field values to use when corresponding
      *                 field for this instance is FIELD_UNDEFINED or null.
-     *                 If <code>defaults</code>is <code>null</code> or a field
-     *                 within the specified <code>defaults</code> is undefined,
-     *                 just use <code>java.util.GregorianCalendar</code> defaults.
+     *                 If {@code defaults}is {@code null} or a field
+     *                 within the specified {@code defaults} is undefined,
+     *                 just use {@code java.util.GregorianCalendar} defaults.
      * @return a java.util.GregorianCalendar conversion of this instance.
      */
     public abstract GregorianCalendar toGregorianCalendar(
@@ -1034,7 +1031,7 @@
                 XMLGregorianCalendar defaults);
 
     /**
-     * <p>Returns a <code>java.util.TimeZone</code> for this class.</p>
+     * Returns a {@code java.util.TimeZone} for this class.
      *
      * <p>If timezone field is defined for this instance,
      * returns TimeZone initialized with custom timezone id
@@ -1042,7 +1039,7 @@
      * try the defaultZoneoffset that was passed in.
      * If defaultZoneoffset is FIELD_UNDEFINED, return
      * default timezone for this host.
-     * (Same default as java.util.GregorianCalendar).</p>
+     * (Same default as java.util.GregorianCalendar).
      *
      * @param defaultZoneoffset default zoneoffset if this zoneoffset is
      * {@link DatatypeConstants#FIELD_UNDEFINED}.
@@ -1054,9 +1051,9 @@
 
 
     /**
-     * <p>Creates and returns a copy of this object.</p>
+     * Creates and returns a copy of this object.
      *
-     * @return copy of this <code>Object</code>
+     * @return copy of this {@code Object}
      */
    public abstract Object clone();
 }
--- a/jaxp/src/java.xml/share/classes/javax/xml/namespace/NamespaceContext.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/namespace/NamespaceContext.java	Wed Jul 05 20:30:08 2017 +0200
@@ -28,44 +28,44 @@
 import java.util.Iterator;
 
 /**
- * <p>Interface for read only XML Namespace context processing.</p>
+ * Interface for read only XML Namespace context processing.
  *
- * <p>An XML Namespace has the properties:</p>
+ * <p>An XML Namespace has the properties:
  * <ul>
  *   <li>Namespace URI:
  *       Namespace name expressed as a URI to which the prefix is bound</li>
  *   <li>prefix: syntactically, this is the part of the attribute name
- *       following the <code>XMLConstants.XMLNS_ATTRIBUTE</code>
+ *       following the {@code XMLConstants.XMLNS_ATTRIBUTE}
  *       ("xmlns") in the Namespace declaration</li>
  * </ul>
  * <p>example:
- * <code>&lt;element xmlns:prefix="http://Namespace-name-URI"&gt;</code></p>
+ * {@code <element xmlns:prefix="http://Namespace-name-URI">}
  *
- * <p>All <code>get*(*)</code> methods operate in the current scope
- * for Namespace URI and prefix resolution.</p>
+ * <p>All {@code get*(*)} methods operate in the current scope
+ * for Namespace URI and prefix resolution.
  *
  * <p>Note that a Namespace URI can be bound to
  * <strong>multiple</strong> prefixes in the current scope.  This can
- * occur when multiple <code>XMLConstants.XMLNS_ATTRIBUTE</code>
+ * occur when multiple {@code XMLConstants.XMLNS_ATTRIBUTE}
  * ("xmlns") Namespace declarations occur in the same Start-Tag and
- * refer to the same Namespace URI. e.g.<br />
- * <pre>
- * &lt;element xmlns:prefix1="http://Namespace-name-URI"
- *          xmlns:prefix2="http://Namespace-name-URI"&gt;
+ * refer to the same Namespace URI. e.g.<br>
+ * <pre> {@code
+ * <element xmlns:prefix1="http://Namespace-name-URI"
+ *          xmlns:prefix2="http://Namespace-name-URI"> }
  * </pre>
  * This can also occur when the same Namespace URI is used in multiple
- * <code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns") Namespace
- * declarations in the logical parent element hierarchy.  e.g.<br />
- * <pre>
- * &lt;parent xmlns:prefix1="http://Namespace-name-URI">
- *   &lt;child xmlns:prefix2="http://Namespace-name-URI"&gt;
+ * {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") Namespace
+ * declarations in the logical parent element hierarchy.  e.g.<br>
+ * <pre> {@code
+ * <parent xmlns:prefix1="http://Namespace-name-URI">
+ *   <child xmlns:prefix2="http://Namespace-name-URI">
  *     ...
- *   &lt;/child&gt;
- * &lt;/parent&gt;
- * </pre></p>
+ *   </child>
+ * </parent> }
+ * </pre>
  *
  * <p>A prefix can only be bound to a <strong>single</strong>
- * Namespace URI in the current scope.</p>
+ * Namespace URI in the current scope.
  *
  * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
  * @see javax.xml.XMLConstants
@@ -82,17 +82,17 @@
 public interface NamespaceContext {
 
     /**
-     * <p>Get Namespace URI bound to a prefix in the current scope.</p>
+     * Get Namespace URI bound to a prefix in the current scope.
      *
      * <p>When requesting a Namespace URI by prefix, the following
      * table describes the returned Namespace URI value for all
-     * possible prefix values:</p>
+     * possible prefix values:
      *
      * <table border="2" rules="all" cellpadding="4">
      *   <thead>
      *     <tr>
      *       <td align="center" colspan="2">
-     *         <code>getNamespaceURI(prefix)</code>
+     *         {@code getNamespaceURI(prefix)}
      *         return value for specified prefixes
      *       </td>
      *     </tr>
@@ -103,9 +103,9 @@
      *   </thead>
      *   <tbody>
      *     <tr>
-     *       <td><code>DEFAULT_NS_PREFIX</code> ("")</td>
+     *       <td>{@code DEFAULT_NS_PREFIX} ("")</td>
      *       <td>default Namespace URI in the current scope or
-     *         <code>{@link
+     *         <code> {@link
      *         javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI("")}
      *         </code>
      *         when there is no default Namespace URI in the current scope</td>
@@ -117,24 +117,24 @@
      *     <tr>
      *       <td>unbound prefix</td>
      *       <td>
-     *         <code>{@link
+     *         <code> {@link
      *         javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI("")}
      *         </code>
      *       </td>
      *     </tr>
      *     <tr>
-     *       <td><code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
-     *       <td><code>XMLConstants.XML_NS_URI</code>
+     *       <td>{@code XMLConstants.XML_NS_PREFIX} ("xml")</td>
+     *       <td>{@code XMLConstants.XML_NS_URI}
      *           ("http://www.w3.org/XML/1998/namespace")</td>
      *     </tr>
      *     <tr>
-     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
-     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
+     *       <td>{@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns")</td>
+     *       <td>{@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI}
      *         ("http://www.w3.org/2000/xmlns/")</td>
      *     </tr>
      *     <tr>
-     *       <td><code>null</code></td>
-     *       <td><code>IllegalArgumentException</code> is thrown</td>
+     *       <td>{@code null}</td>
+     *       <td>{@code IllegalArgumentException} is thrown</td>
      *     </tr>
      *    </tbody>
      * </table>
@@ -143,26 +143,26 @@
      *
      * @return Namespace URI bound to prefix in the current scope
      *
-     * @throws IllegalArgumentException When <code>prefix</code> is
-     *   <code>null</code>
+     * @throws IllegalArgumentException When {@code prefix} is
+     *   {@code null}
      */
     String getNamespaceURI(String prefix);
 
     /**
-     * <p>Get prefix bound to Namespace URI in the current scope.</p>
+     * Get prefix bound to Namespace URI in the current scope.
      *
      * <p>To get all prefixes bound to a Namespace URI in the current
-     * scope, use {@link #getPrefixes(String namespaceURI)}.</p>
+     * scope, use {@link #getPrefixes(String namespaceURI)}.
      *
      * <p>When requesting a prefix by Namespace URI, the following
      * table describes the returned prefix value for all Namespace URI
-     * values:</p>
+     * values:
      *
      * <table border="2" rules="all" cellpadding="4">
      *   <thead>
      *     <tr>
      *       <th align="center" colspan="2">
-     *         <code>getPrefix(namespaceURI)</code> return value for
+     *         {@code getPrefix(namespaceURI)} return value for
      *         specified Namespace URIs
      *       </th>
      *     </tr>
@@ -173,8 +173,8 @@
      *   </thead>
      *   <tbody>
      *     <tr>
-     *       <td>&lt;default Namespace URI&gt;</td>
-     *       <td><code>XMLConstants.DEFAULT_NS_PREFIX</code> ("")
+     *       <td>{@code <default Namespace URI>}</td>
+     *       <td>{@code XMLConstants.DEFAULT_NS_PREFIX} ("")
      *       </td>
      *     </tr>
      *     <tr>
@@ -186,21 +186,21 @@
      *     </tr>
      *     <tr>
      *       <td>unbound Namespace URI</td>
-     *       <td><code>null</code></td>
+     *       <td>{@code null}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>XMLConstants.XML_NS_URI</code>
+     *       <td>{@code XMLConstants.XML_NS_URI}
      *           ("http://www.w3.org/XML/1998/namespace")</td>
-     *       <td><code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
+     *       <td>{@code XMLConstants.XML_NS_PREFIX} ("xml")</td>
      *     </tr>
      *     <tr>
-     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
+     *       <td>{@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI}
      *           ("http://www.w3.org/2000/xmlns/")</td>
-     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
+     *       <td>{@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns")</td>
      *     </tr>
      *     <tr>
-     *       <td><code>null</code></td>
-     *       <td><code>IllegalArgumentException</code> is thrown</td>
+     *       <td>{@code null}</td>
+     *       <td>{@code IllegalArgumentException} is thrown</td>
      *     </tr>
      *   </tbody>
      * </table>
@@ -209,32 +209,32 @@
      *
      * @return prefix bound to Namespace URI in current context
      *
-     * @throws IllegalArgumentException When <code>namespaceURI</code> is
-     *   <code>null</code>
+     * @throws IllegalArgumentException When {@code namespaceURI} is
+     *   {@code null}
      */
     String getPrefix(String namespaceURI);
 
     /**
-     * <p>Get all prefixes bound to a Namespace URI in the current
-     * scope.</p>
+     * Get all prefixes bound to a Namespace URI in the current
+     * scope.
      *
      * <p>An Iterator over String elements is returned in an arbitrary,
-     * <strong>implementation dependent</strong>, order.</p>
+     * <strong>implementation dependent</strong>, order.
      *
-     * <p><strong>The <code>Iterator</code> is
+     * <p><strong>The {@code Iterator} is
      * <em>not</em> modifiable.  e.g. the
-     * <code>remove()</code> method will throw
-     * <code>UnsupportedOperationException</code>.</strong></p>
+     * {@code remove()} method will throw
+     * {@code UnsupportedOperationException}.</strong>
      *
      * <p>When requesting prefixes by Namespace URI, the following
      * table describes the returned prefixes value for all Namespace
-     * URI values:</p>
+     * URI values:
      *
      * <table border="2" rules="all" cellpadding="4">
      *   <thead>
      *     <tr>
-     *       <th align="center" colspan="2"><code>
-     *         getPrefixes(namespaceURI)</code> return value for
+     *       <th align="center" colspan="2">{@code
+     *         getPrefixes(namespaceURI)} return value for
      *         specified Namespace URIs</th>
      *     </tr>
      *     <tr>
@@ -245,9 +245,9 @@
      *   <tbody>
      *     <tr>
      *       <td>bound Namespace URI,
-     *         including the &lt;default Namespace URI&gt;</td>
+     *         including the {@code <default Namespace URI>}</td>
      *       <td>
-     *         <code>Iterator</code> over prefixes bound to Namespace URI in
+     *         {@code Iterator} over prefixes bound to Namespace URI in
      *         the current scope in an arbitrary,
      *         <strong>implementation dependent</strong>,
      *         order
@@ -255,34 +255,34 @@
      *     </tr>
      *     <tr>
      *       <td>unbound Namespace URI</td>
-     *       <td>empty <code>Iterator</code></td>
+     *       <td>empty {@code Iterator}</td>
      *     </tr>
      *     <tr>
-     *       <td><code>XMLConstants.XML_NS_URI</code>
+     *       <td>{@code XMLConstants.XML_NS_URI}
      *           ("http://www.w3.org/XML/1998/namespace")</td>
-     *       <td><code>Iterator</code> with one element set to
-     *         <code>XMLConstants.XML_NS_PREFIX</code> ("xml")</td>
+     *       <td>{@code Iterator} with one element set to
+     *         {@code XMLConstants.XML_NS_PREFIX} ("xml")</td>
      *     </tr>
      *     <tr>
-     *       <td><code>XMLConstants.XMLNS_ATTRIBUTE_NS_URI</code>
+     *       <td>{@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI}
      *           ("http://www.w3.org/2000/xmlns/")</td>
-     *       <td><code>Iterator</code> with one element set to
-     *         <code>XMLConstants.XMLNS_ATTRIBUTE</code> ("xmlns")</td>
+     *       <td>{@code Iterator} with one element set to
+     *         {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns")</td>
      *     </tr>
      *     <tr>
-     *       <td><code>null</code></td>
-     *       <td><code>IllegalArgumentException</code> is thrown</td>
+     *       <td>{@code null}</td>
+     *       <td>{@code IllegalArgumentException} is thrown</td>
      *     </tr>
      *   </tbody>
      * </table>
      *
      * @param namespaceURI URI of Namespace to lookup
      *
-     * @return <code>Iterator</code> for all prefixes bound to the
+     * @return {@code Iterator} for all prefixes bound to the
      *   Namespace URI in the current scope
      *
-     * @throws IllegalArgumentException When <code>namespaceURI</code> is
-     *   <code>null</code>
+     * @throws IllegalArgumentException When {@code namespaceURI} is
+     *   {@code null}
      */
     Iterator getPrefixes(String namespaceURI);
 }
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -47,8 +47,8 @@
     private boolean coalescing = false;
 
     /**
-     * <p>Protected constructor to prevent instantiation.
-     * Use {@link #newInstance()}.</p>
+     * Protected constructor to prevent instantiation.
+     * Use {@link #newInstance()}.
      */
     protected DocumentBuilderFactory () {
     }
@@ -60,7 +60,6 @@
      * This method uses the following ordered lookup procedure to determine
      * the {@code DocumentBuilderFactory} implementation class to
      * load:
-     * <p>
      * <ul>
      * <li>
      * Use the {@code javax.xml.parsers.DocumentBuilderFactory} system
@@ -131,7 +130,7 @@
     }
 
     /**
-     * <p>Obtain a new instance of a {@code DocumentBuilderFactory} from class name.
+     * Obtain a new instance of a {@code DocumentBuilderFactory} from class name.
      * This function is useful when there are multiple providers in the classpath.
      * It gives more control to the application as it can specify which provider
      * should be loaded.
@@ -143,21 +142,22 @@
      * <h2>Tip for Trouble-shooting</h2>
      * <p>Setting the {@code jaxp.debug} system property will cause
      * this method to print a lot of debug messages
-     * to {@code System.err} about what it is doing and where it is looking at.</p>
+     * to {@code System.err} about what it is doing and where it is looking at.
      *
-     * <p> If you have problems try:</p>
+     * <p> If you have problems try:
      * <pre>
      * java -Djaxp.debug=1 YourProgram ....
      * </pre>
      *
-     * @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.parsers.DocumentBuilderFactory}.
+     * @param factoryClassName fully qualified factory class name that provides
+     *        implementation of {@code javax.xml.parsers.DocumentBuilderFactory}.
      *
-     * @param classLoader <code>ClassLoader</code> used to load the factory class. If <code>null</code>
-     *                     current <code>Thread</code>'s context classLoader is used to load the factory class.
+     * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+     *                     current {@code Thread}'s context classLoader is used to load the factory class.
      *
      * @return New instance of a {@code DocumentBuilderFactory}
      *
-     * @throws FactoryConfigurationError if <code>factoryClassName</code> is <code>null</code>, or
+     * @throws FactoryConfigurationError if {@code factoryClassName} is {@code null}, or
      *                                   the factory class cannot be loaded, instantiated.
      *
      * @see #newInstance()
@@ -187,7 +187,7 @@
     /**
      * Specifies that the parser produced by this code will
      * provide support for XML namespaces. By default the value of this is set
-     * to <code>false</code>
+     * to {@code false}
      *
      * @param awareness true if the parser produced will provide support
      *                  for XML namespaces; false otherwise.
@@ -200,7 +200,7 @@
     /**
      * Specifies that the parser produced by this code will
      * validate documents as they are parsed. By default the value of this
-     * is set to <code>false</code>.
+     * is set to {@code false}.
      *
      * <p>
      * Note that "the validation" here means
@@ -208,15 +208,13 @@
      * parser</a> as defined in the XML recommendation.
      * In other words, it essentially just controls the DTD validation.
      * (except the legacy two properties defined in JAXP 1.2.)
-     * </p>
      *
      * <p>
      * To use modern schema languages such as W3C XML Schema or
      * RELAX NG instead of DTD, you can configure your parser to be
      * a non-validating parser by leaving the {@link #setValidating(boolean)}
-     * method <code>false</code>, then use the {@link #setSchema(Schema)}
+     * method {@code false}, then use the {@link #setSchema(Schema)}
      * method to associate a schema to a parser.
-     * </p>
      *
      * @param validating true if the parser produced will validate documents
      *                   as they are parsed; false otherwise.
@@ -234,7 +232,7 @@
      * element content that has an element only content model (see XML
      * Rec 3.2.1) will be eliminated. Due to reliance on the content model
      * this setting requires the parser to be in validating mode. By default
-     * the value of this is set to <code>false</code>.
+     * the value of this is set to {@code false}.
      *
      * @param whitespace true if the parser created must eliminate whitespace
      *                   in the element content when parsing XML documents;
@@ -248,7 +246,7 @@
     /**
      * Specifies that the parser produced by this code will
      * expand entity reference nodes. By default the value of this is set to
-     * <code>true</code>
+     * {@code true}
      *
      * @param expandEntityRef true if the parser produced will expand entity
      *                        reference nodes; false otherwise.
@@ -259,11 +257,10 @@
     }
 
     /**
-     * <p>Specifies that the parser produced by this code will
-     * ignore comments. By default the value of this is set to <code>false
-     * </code>.</p>
+     * Specifies that the parser produced by this code will
+     * ignore comments. By default the value of this is set to {@code false}.
      *
-     * @param ignoreComments <code>boolean</code> value to ignore comments during processing
+     * @param ignoreComments {@code boolean} value to ignore comments during processing
      */
 
     public void setIgnoringComments(boolean ignoreComments) {
@@ -274,7 +271,7 @@
      * Specifies that the parser produced by this code will
      * convert CDATA nodes to Text nodes and append it to the
      * adjacent (if any) text node. By default the value of this is set to
-     * <code>false</code>
+     * {@code false}
      *
      * @param coalescing  true if the parser produced will convert CDATA nodes
      *                    to Text nodes and append it to the adjacent (if any)
@@ -367,25 +364,23 @@
      * All implementations that implement JAXP 1.5 or newer are required to
      * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} and
      * {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} properties.
-     * </p>
+     *
      * <ul>
      *   <li>
-     *      <p>
      *      Setting the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property
      *      restricts the access to external DTDs, external Entity References to the
      *      protocols specified by the property.
      *      If access is denied during parsing due to the restriction of this property,
      *      {@link org.xml.sax.SAXException} will be thrown by the parse methods defined by
      *      {@link javax.xml.parsers.DocumentBuilder}.
-     *      </p>
-     *      <p>
+     *   </li>
+     *   <li>
      *      Setting the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} property
      *      restricts the access to external Schema set by the schemaLocation attribute to
      *      the protocols specified by the property.  If access is denied during parsing
      *      due to the restriction of this property, {@link org.xml.sax.SAXException}
      *      will be thrown by the parse methods defined by
      *      {@link javax.xml.parsers.DocumentBuilder}.
-     *      </p>
      *   </li>
      * </ul>
      *
@@ -413,61 +408,61 @@
                 throws IllegalArgumentException;
 
     /**
-     * <p>Set a feature for this {@code DocumentBuilderFactory} and <code>DocumentBuilder</code>s created by this factory.</p>
+     * Set a feature for this {@code DocumentBuilderFactory}
+     * and {@code DocumentBuilder}s created by this factory.
      *
      * <p>
      * Feature names are fully qualified {@link java.net.URI}s.
      * Implementations may define their own features.
      * A {@link ParserConfigurationException} is thrown if this {@code DocumentBuilderFactory} or the
-     * <code>DocumentBuilder</code>s it creates cannot support the feature.
+     * {@code DocumentBuilder}s it creates cannot support the feature.
      * It is possible for a {@code DocumentBuilderFactory} to expose a feature value but be unable to change its state.
-     * </p>
+     *
      *
      * <p>
      * All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
-     * When the feature is:</p>
+     * When the feature is:
      * <ul>
      *   <li>
-     *     <code>true</code>: the implementation will limit XML processing to conform to implementation limits.
+     *     {@code true}: the implementation will limit XML processing to conform to implementation limits.
      *     Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
      *     If XML processing is limited for security reasons, it will be reported via a call to the registered
      *    {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
      *     See {@link  DocumentBuilder#setErrorHandler(org.xml.sax.ErrorHandler errorHandler)}.
      *   </li>
      *   <li>
-     *     <code>false</code>: the implementation will processing XML according to the XML specifications without
+     *     {@code false}: the implementation will processing XML according to the XML specifications without
      *     regard to possible implementation limits.
      *   </li>
      * </ul>
      *
      * @param name Feature name.
-     * @param value Is feature state <code>true</code> or <code>false</code>.
+     * @param value Is feature state {@code true} or {@code false}.
      *
-     * @throws ParserConfigurationException if this {@code DocumentBuilderFactory} or the <code>DocumentBuilder</code>s
+     * @throws ParserConfigurationException if this {@code DocumentBuilderFactory} or the {@code DocumentBuilder}s
      *   it creates cannot support this feature.
-     * @throws NullPointerException If the <code>name</code> parameter is null.
+     * @throws NullPointerException If the {@code name} parameter is null.
      * @since 1.5
      */
     public abstract void setFeature(String name, boolean value)
             throws ParserConfigurationException;
 
     /**
-     * <p>Get the state of the named feature.</p>
+     * Get the state of the named feature.
      *
      * <p>
      * Feature names are fully qualified {@link java.net.URI}s.
      * Implementations may define their own features.
      * An {@link ParserConfigurationException} is thrown if this {@code DocumentBuilderFactory} or the
-     * <code>DocumentBuilder</code>s it creates cannot support the feature.
+     * {@code DocumentBuilder}s it creates cannot support the feature.
      * It is possible for an {@code DocumentBuilderFactory} to expose a feature value but be unable to change its state.
-     * </p>
      *
      * @param name Feature name.
      *
      * @return State of the named feature.
      *
      * @throws ParserConfigurationException if this {@code DocumentBuilderFactory}
-     *   or the <code>DocumentBuilder</code>s it creates cannot support this feature.
+     *   or the {@code DocumentBuilder}s it creates cannot support this feature.
      * @since 1.5
      */
     public abstract boolean getFeature(String name)
@@ -501,7 +496,7 @@
     }
 
     /**
-     * <p>Set the {@link Schema} to be used by parsers created
+     * Set the {@link Schema} to be used by parsers created
      * from this factory.
      *
      * <p>
@@ -529,26 +524,26 @@
      *
      * <p>
      * This processing will take effect even if
-     * the {@link #isValidating()} method returns <code>false</code>.
+     * the {@link #isValidating()} method returns {@code false}.
      *
      * <p>It is an error to use
-     * the <code>http://java.sun.com/xml/jaxp/properties/schemaSource</code>
-     * property and/or the <code>http://java.sun.com/xml/jaxp/properties/schemaLanguage</code>
+     * the {@code http://java.sun.com/xml/jaxp/properties/schemaSource}
+     * property and/or the {@code http://java.sun.com/xml/jaxp/properties/schemaLanguage}
      * property in conjunction with a {@link Schema} object.
      * Such configuration will cause a {@link ParserConfigurationException}
-     * exception when the {@link #newDocumentBuilder()} is invoked.</p>
+     * exception when the {@link #newDocumentBuilder()} is invoked.
      *
      *
-     * <h4>Note for implementors</h4>
+     * <h3>Note for implementors</h3>
      *
      * <p>
      * A parser must be able to work with any {@link Schema}
      * implementation. However, parsers and schemas are allowed
      * to use implementation-specific custom mechanisms
      * as long as they yield the result described in the specification.
-     * </p>
+     *
      *
-     * @param schema <code>Schema</code> to use or <code>null</code>
+     * @param schema {@code Schema} to use or {@code null}
      *   to remove a schema.
      *
      * @throws UnsupportedOperationException When implementation does not
@@ -569,16 +564,16 @@
 
 
     /**
-     * <p>Set state of XInclude processing.</p>
+     * Set state of XInclude processing.
      *
      * <p>If XInclude markup is found in the document instance, should it be
      * processed as specified in <a href="http://www.w3.org/TR/xinclude/">
-     * XML Inclusions (XInclude) Version 1.0</a>.</p>
+     * XML Inclusions (XInclude) Version 1.0</a>.
      *
-     * <p>XInclude processing defaults to <code>false</code>.</p>
+     * <p>XInclude processing defaults to {@code false}.
      *
-     * @param state Set XInclude processing to <code>true</code> or
-     *   <code>false</code>
+     * @param state Set XInclude processing to {@code true} or
+     *   {@code false}
      *
      * @throws UnsupportedOperationException When implementation does not
      *   override this method.
@@ -594,7 +589,7 @@
     }
 
     /**
-     * <p>Get state of XInclude processing.</p>
+     * Get state of XInclude processing.
      *
      * @return current state of XInclude processing
      *
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -42,17 +42,17 @@
 public abstract class SAXParserFactory {
 
     /**
-     * <p>Should Parsers be validating?</p>
+     * Should Parsers be validating?
      */
     private boolean validating = false;
 
     /**
-     * <p>Should Parsers be namespace aware?</p>
+     * Should Parsers be namespace aware?
      */
     private boolean namespaceAware = false;
 
     /**
-     * <p>Protected constructor to force use of {@link #newInstance()}.</p>
+     * Protected constructor to force use of {@link #newInstance()}.
      */
     protected SAXParserFactory () {
 
@@ -64,7 +64,6 @@
      * This method uses the following ordered lookup procedure to determine
      * the {@code SAXParserFactory} implementation class to
      * load:
-     * <p>
      * <ul>
      * <li>
      * Use the {@code javax.xml.parsers.SAXParserFactory} system
@@ -138,19 +137,19 @@
     }
 
     /**
-     * <p>Obtain a new instance of a {@code SAXParserFactory} from class name.
+     * Obtain a new instance of a {@code SAXParserFactory} from class name.
      * This function is useful when there are multiple providers in the classpath.
      * It gives more control to the application as it can specify which provider
-     * should be loaded.</p>
+     * should be loaded.
      *
      * <p>Once an application has obtained a reference to a {@code SAXParserFactory}
-     * it can use the factory to configure and obtain parser instances.</p>
+     * it can use the factory to configure and obtain parser instances.
      *
      *
      * <h2>Tip for Trouble-shooting</h2>
      * <p>Setting the {@code jaxp.debug} system property will cause
      * this method to print a lot of debug messages
-     * to {@code System.err} about what it is doing and where it is looking at.</p>
+     * to {@code System.err} about what it is doing and where it is looking at.
      *
      * <p>
      * If you have problems, try:
@@ -160,12 +159,12 @@
      *
      * @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.parsers.SAXParserFactory}.
      *
-     * @param classLoader <code>ClassLoader</code> used to load the factory class. If <code>null</code>
-     *                     current <code>Thread</code>'s context classLoader is used to load the factory class.
+     * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+     *                     current {@code Thread}'s context classLoader is used to load the factory class.
      *
      * @return New instance of a {@code SAXParserFactory}
      *
-     * @throws FactoryConfigurationError if <code>factoryClassName</code> is <code>null</code>, or
+     * @throws FactoryConfigurationError if {@code factoryClassName} is {@code null}, or
      *                                   the factory class cannot be loaded, instantiated.
      *
      * @see #newInstance()
@@ -179,8 +178,8 @@
     }
 
     /**
-     * <p>Creates a new instance of a SAXParser using the currently
-     * configured factory parameters.</p>
+     * Creates a new instance of a SAXParser using the currently
+     * configured factory parameters.
      *
      * @return A new instance of a SAXParser.
      *
@@ -196,7 +195,7 @@
     /**
      * Specifies that the parser produced by this code will
      * provide support for XML namespaces. By default the value of this is set
-     * to <code>false</code>.
+     * to {@code false}.
      *
      * @param awareness true if the parser produced by this code will
      *                  provide support for XML namespaces; false otherwise.
@@ -209,7 +208,7 @@
     /**
      * Specifies that the parser produced by this code will
      * validate documents as they are parsed. By default the value of this is
-     * set to <code>false</code>.
+     * set to {@code false}.
      *
      * <p>
      * Note that "the validation" here means
@@ -217,15 +216,13 @@
      * parser</a> as defined in the XML recommendation.
      * In other words, it essentially just controls the DTD validation.
      * (except the legacy two properties defined in JAXP 1.2.)
-     * </p>
      *
      * <p>
      * To use modern schema languages such as W3C XML Schema or
      * RELAX NG instead of DTD, you can configure your parser to be
      * a non-validating parser by leaving the {@link #setValidating(boolean)}
-     * method <code>false</code>, then use the {@link #setSchema(Schema)}
+     * method {@code false}, then use the {@link #setSchema(Schema)}
      * method to associate a schema to a parser.
-     * </p>
      *
      * @param validating true if the parser produced by this code will
      *                   validate documents as they are parsed; false otherwise.
@@ -260,24 +257,23 @@
     }
 
     /**
-     *
-     * <p>Sets the particular feature in the underlying implementation of
+     * Sets the particular feature in the underlying implementation of
      * org.xml.sax.XMLReader.
      * A list of the core features and properties can be found at
-     * <a href="http://www.saxproject.org/">http://www.saxproject.org/</a></p>
+     * <a href="http://www.saxproject.org/">http://www.saxproject.org/</a>
      *
      * <p>All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
-     * When the feature is</p>
+     * When the feature is
      * <ul>
      *   <li>
-     *     <code>true</code>: the implementation will limit XML processing to conform to implementation limits.
+     *     {@code true}: the implementation will limit XML processing to conform to implementation limits.
      *     Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
      *     If XML processing is limited for security reasons, it will be reported via a call to the registered
      *     {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
-     *     See {@link SAXParser} <code>parse</code> methods for handler specification.
+     *     See {@link SAXParser} {@code parse} methods for handler specification.
      *   </li>
      *   <li>
-     *     When the feature is <code>false</code>, the implementation will processing XML according to the XML specifications without
+     *     When the feature is {@code false}, the implementation will processing XML according to the XML specifications without
      *     regard to possible implementation limits.
      *   </li>
      * </ul>
@@ -292,7 +288,7 @@
      * @throws SAXNotSupportedException When the underlying XMLReader
      *            recognizes the property name but doesn't support the
      *            property.
-     * @throws NullPointerException If the <code>name</code> parameter is null.
+     * @throws NullPointerException If the {@code name} parameter is null.
      *
      * @see org.xml.sax.XMLReader#setFeature
      */
@@ -302,8 +298,8 @@
 
     /**
      *
-     * <p>Returns the particular property requested for in the underlying
-     * implementation of org.xml.sax.XMLReader.</p>
+     * Returns the particular property requested for in the underlying
+     * implementation of org.xml.sax.XMLReader.
      *
      * @param name The name of the property to be retrieved.
      *
@@ -347,12 +343,12 @@
     }
 
     /**
-     * <p>Set the {@link Schema} to be used by parsers created
-     * from this factory.</p>
+     * Set the {@link Schema} to be used by parsers created
+     * from this factory.
      *
      * <p>When a {@link Schema} is non-null, a parser will use a validator
      * created from it to validate documents before it passes information
-     * down to the application.</p>
+     * down to the application.
      *
      * <p>When warnings/errors/fatal errors are found by the validator, the parser must
      * handle them as if those errors were found by the parser itself.
@@ -364,29 +360,28 @@
      * <p>A validator may modify the SAX event stream (for example by
      * adding default values that were missing in documents), and a parser
      * is responsible to make sure that the application will receive
-     * those modified event stream.</p>
+     * those modified event stream.
      *
-     * <p>Initially, <code>null</code> is set as the {@link Schema}.</p>
+     * <p>Initially, {@code null} is set as the {@link Schema}.
      *
      * <p>This processing will take effect even if
-     * the {@link #isValidating()} method returns <code>false</code>.
+     * the {@link #isValidating()} method returns {@code false}.
      *
      * <p>It is an error to use
-     * the <code>http://java.sun.com/xml/jaxp/properties/schemaSource</code>
-     * property and/or the <code>http://java.sun.com/xml/jaxp/properties/schemaLanguage</code>
+     * the {@code http://java.sun.com/xml/jaxp/properties/schemaSource}
+     * property and/or the {@code http://java.sun.com/xml/jaxp/properties/schemaLanguage}
      * property in conjunction with a non-null {@link Schema} object.
      * Such configuration will cause a {@link SAXException}
-     * exception when those properties are set on a {@link SAXParser}.</p>
+     * exception when those properties are set on a {@link SAXParser}.
      *
-     * <h4>Note for implementors</h4>
+     * <h3>Note for implementors</h3>
      * <p>
      * A parser must be able to work with any {@link Schema}
      * implementation. However, parsers and schemas are allowed
      * to use implementation-specific custom mechanisms
      * as long as they yield the result described in the specification.
-     * </p>
      *
-     * @param schema <code>Schema</code> to use, <code>null</code> to remove a schema.
+     * @param schema {@code Schema} to use, {@code null} to remove a schema.
      *
      * @throws UnsupportedOperationException When implementation does not
      *   override this method
@@ -404,16 +399,16 @@
     }
 
     /**
-     * <p>Set state of XInclude processing.</p>
+     * Set state of XInclude processing.
      *
      * <p>If XInclude markup is found in the document instance, should it be
      * processed as specified in <a href="http://www.w3.org/TR/xinclude/">
-     * XML Inclusions (XInclude) Version 1.0</a>.</p>
+     * XML Inclusions (XInclude) Version 1.0</a>.
      *
-     * <p>XInclude processing defaults to <code>false</code>.</p>
+     * <p>XInclude processing defaults to {@code false}.
      *
-     * @param state Set XInclude processing to <code>true</code> or
-     *   <code>false</code>
+     * @param state Set XInclude processing to {@code true} or
+     *   {@code false}
      *
      * @throws UnsupportedOperationException When implementation does not
      *   override this method
@@ -429,7 +424,7 @@
     }
 
     /**
-     * <p>Get state of XInclude processing.</p>
+     * Get state of XInclude processing.
      *
      * @return current state of XInclude processing
      *
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -70,7 +70,6 @@
    * This static method creates a new factory instance.
    * This method uses the following ordered lookup procedure to determine
    * the XMLEventFactory implementation class to load:
-   * <p>
    * <ul>
    * <li>
    *   Use the javax.xml.stream.XMLEventFactory system property.
@@ -158,7 +157,6 @@
    * <p>
    * This method uses the following ordered lookup procedure to determine
    * the XMLEventFactory implementation class to load:
-   * <p>
    * <ul>
    * <li>
    *   Use the value of the system property identified by {@code factoryId}.
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLInputFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -160,7 +160,7 @@
    * This static method creates a new factory instance.
    * This method uses the following ordered lookup procedure to determine
    * the XMLInputFactory implementation class to load:
-   * </p>
+   *
    * <ul>
    * <li>
    *   <p>Use the javax.xml.stream.XMLInputFactory system property.
@@ -201,12 +201,11 @@
    * <p>
    *   Once an application has obtained a reference to a XMLInputFactory it
    *   can use the factory to configure and obtain stream instances.
-   * </p>
    * <p>
    *   Note that this is a new method that replaces the deprecated newInstance() method.
    *     No changes in behavior are defined by this replacement method relative to
    *     the deprecated method.
-   * </p>
+   *
    * @throws FactoryConfigurationError in case of {@linkplain
    *   java.util.ServiceConfigurationError service configuration error} or if
    *   the implementation is not available or cannot be instantiated.
@@ -245,7 +244,6 @@
    * <p>
    * This method uses the following ordered lookup procedure to determine
    * the XMLInputFactory implementation class to load:
-   * <p>
    * <ul>
    * <li>
    *   <p>
@@ -488,7 +486,6 @@
    * <p>
    * All implementations that implement JAXP 1.5 or newer are required to
    * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property.
-   * </p>
    * <ul>
    *   <li>
    *        <p>
@@ -497,7 +494,7 @@
    *        due to the restriction of this property, {@link javax.xml.stream.XMLStreamException}
    *        will be thrown by the {@link javax.xml.stream.XMLStreamReader#next()} or
    *        {@link javax.xml.stream.XMLEventReader#nextEvent()} method.
-   *        </p>
+   *
    *   </li>
    * </ul>
    * @param name The name of the property (may not be null)
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -54,17 +54,18 @@
  *        <th>Default Value</th>
  *        <th>Required</th>
  *              </tr>
- *         <tr><td>javax.xml.stream.isRepairingNamespaces</td><td>defaults prefixes on the output side</td><td>Boolean</td><td>False</td><td>Yes</td></tr>
+ *         <tr><td>javax.xml.stream.isRepairingNamespaces</td><td>defaults prefixes
+ *                 on the output side</td><td>Boolean</td><td>False</td><td>Yes</td></tr>
  *      </tbody>
  *   </table>
  *
- * <p>The following paragraphs describe the namespace and prefix repair algorithm:</p>
+ * <p>The following paragraphs describe the namespace and prefix repair algorithm:
  *
  * <p>The property can be set with the following code line:
- * <code>setProperty("javax.xml.stream.isRepairingNamespaces",new Boolean(true|false));</code></p>
+ * {@code setProperty("javax.xml.stream.isRepairingNamespaces", new Boolean(true|false));}
  *
  * <p>This property specifies that the writer default namespace prefix declarations.
- * The default value is false. </p>
+ * The default value is false.
  *
  * <p>If a writer isRepairingNamespaces it will create a namespace declaration
  * on the current StartElement for
@@ -74,11 +75,11 @@
  * has not been declared in a parent of the current StartElement it will be declared
  * on the current StartElement.  If the defaultNamespace is bound and in scope
  * and the default namespace matches the URI of the attribute or StartElement
- * QName no prefix will be assigned.</p>
+ * QName no prefix will be assigned.
  *
  * <p>If an element or attribute name has a prefix, but is not
  * bound to any namespace URI, then the prefix will be removed
- * during serialization.</p>
+ * during serialization.
  *
  * <p>If element and/or attribute names in the same start or
  * empty-element tag are bound to different namespace URIs and
@@ -86,20 +87,20 @@
  * occurring attribute retains the original prefix and the
  * following attributes have their prefixes replaced with a
  * new prefix that is bound to the namespace URIs of those
- * attributes. </p>
+ * attributes.
  *
  * <p>If an element or attribute name uses a prefix that is
  * bound to a different URI than that inherited from the
  * namespace context of the parent of that element and there
  * is no namespace declaration in the context of the current
- * element then such a namespace declaration is added. </p>
+ * element then such a namespace declaration is added.
  *
  * <p>If an element or attribute name is bound to a prefix and
  * there is a namespace declaration that binds that prefix
  * to a different URI then that namespace declaration is
  * either removed if the correct mapping is inherited from
  * the parent context of that element, or changed to the
- * namespace URI of the element or attribute using that prefix.</p>
+ * namespace URI of the element or attribute using that prefix.
  *
  * @version 1.2
  * @author Copyright (c) 2009, 2015 by Oracle Corporation. All Rights Reserved.
@@ -136,7 +137,6 @@
    * This static method creates a new factory instance. This method uses the
    * following ordered lookup procedure to determine the XMLOutputFactory
    * implementation class to load:
-   * <p>
    * <ul>
    * <li>
    *   Use the javax.xml.stream.XMLOutputFactory system property.
@@ -177,6 +177,7 @@
    *   <p>
    *   Otherwise, the system-default implementation is returned.
    * </li>
+   * </ul>
    * <p>
    * Once an application has obtained a reference to a XMLOutputFactory it
    * can use the factory to configure and obtain stream instances.
@@ -222,7 +223,6 @@
    * <p>
    * This method uses the following ordered lookup procedure to determine
    * the XMLOutputFactory implementation class to load:
-   * <p>
    * <ul>
    * <li>
    *   Use the value of the system property identified by {@code factoryId}.
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamReader.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamReader.java	Wed Jul 05 20:30:08 2017 +0200
@@ -57,9 +57,9 @@
  * javax.xml.stream.notations and javax.xml.stream.entities.
  * When the current event is a DTD the following call will return a
  * list of Notations
- *  <code>List l = (List) getProperty("javax.xml.stream.notations");</code>
+ * {@code List l = (List) getProperty("javax.xml.stream.notations");}
  * The following call will return a list of entity declarations:
- * <code>List l = (List) getProperty("javax.xml.stream.entities");</code>
+ * {@code List l = (List) getProperty("javax.xml.stream.entities");}
  * These properties can only be accessed during a DTD event and
  * are defined to return null if the information is not available.
  *
@@ -97,12 +97,13 @@
  *            getElementText(), nextTag()
  *       </td>
  *     </tr>
+ *     <tr>
  *       <td> ATTRIBUTE  </td>
  *       <td> next(), nextTag()
  *            getAttributeXXX(), isAttributeSpecified(),
  *       </td>
  *     </tr>
- *     </tr>
+ *     <tr>
  *       <td> NAMESPACE  </td>
  *       <td> next(), nextTag()
  *            getNamespaceXXX()
@@ -184,7 +185,7 @@
    * If element content is empty (i.e. content is "") then no CHARACTERS event will be reported.
    *
    * <p>Given the following XML:<br>
-   * &lt;foo>&lt;!--description-->content text&lt;![CDATA[&lt;greeting>Hello&lt;/greeting>]]>other content&lt;/foo><br>
+   * {@code <foo><!--description-->content text<![CDATA[<greeting>Hello>/greeting>]]>other content>/foo>}<br>
    * The behavior of calling next() when being on foo will be:<br>
    * 1- the comment (COMMENT)<br>
    * 2- then the characters section (CHARACTERS)<br>
@@ -192,14 +193,14 @@
    * 4- then the next characters section (another CHARACTERS)<br>
    * 5- then the END_ELEMENT<br>
    *
-   * <p><b>NOTE:</b> empty element (such as &lt;tag/>) will be reported
+   * <p><b>NOTE:</b> empty element (such as {@code <tag/>}) will be reported
    *  with  two separate events: START_ELEMENT, END_ELEMENT - This preserves
-   *   parsing equivalency of empty element to &lt;tag>&lt;/tag>.
+   *   parsing equivalency of empty element to {@code <tag></tag>}.
    *
    * This method will throw an IllegalStateException if it is called after hasNext() returns false.
    * @see javax.xml.stream.events.XMLEvent
    * @return the integer code corresponding to the current parse event
-   * @throws NoSuchElementException if this is called when hasNext() returns false
+   * @throws java.util.NoSuchElementException if this is called when hasNext() returns false
    * @throws XMLStreamException  if there is an error processing the underlying XML source
    */
   public int next() throws XMLStreamException;
@@ -219,38 +220,39 @@
    * Reads the content of a text-only element, an exception is thrown if this is
    * not a text-only element.
    * Regardless of value of javax.xml.stream.isCoalescing this method always returns coalesced content.
-   * <br /> Precondition: the current event is START_ELEMENT.
-   * <br /> Postcondition: the current event is the corresponding END_ELEMENT.
+   * <br> Precondition: the current event is START_ELEMENT.
+   * <br> Postcondition: the current event is the corresponding END_ELEMENT.
    *
-   * <br />The method does the following (implementations are free to optimized
+   * <br>The method does the following (implementations are free to optimized
    * but must do equivalent processing):
    * <pre>
    * if(getEventType() != XMLStreamConstants.START_ELEMENT) {
-   * throw new XMLStreamException(
-   * "parser must be on START_ELEMENT to read next text", getLocation());
+   *     throw new XMLStreamException(
+   *     "parser must be on START_ELEMENT to read next text", getLocation());
    * }
+   *
    * int eventType = next();
    * StringBuffer content = new StringBuffer();
-   * while(eventType != XMLStreamConstants.END_ELEMENT ) {
-   * if(eventType == XMLStreamConstants.CHARACTERS
-   * || eventType == XMLStreamConstants.CDATA
-   * || eventType == XMLStreamConstants.SPACE
-   * || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
-   * buf.append(getText());
-   * } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
-   * || eventType == XMLStreamConstants.COMMENT) {
-   * // skipping
-   * } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
-   * throw new XMLStreamException(
-   * "unexpected end of document when reading element text content", this);
-   * } else if(eventType == XMLStreamConstants.START_ELEMENT) {
-   * throw new XMLStreamException(
-   * "element text content may not contain START_ELEMENT", getLocation());
-   * } else {
-   * throw new XMLStreamException(
-   * "Unexpected event type "+eventType, getLocation());
-   * }
-   * eventType = next();
+   * while(eventType != XMLStreamConstants.END_ELEMENT) {
+   *     if(eventType == XMLStreamConstants.CHARACTERS
+   *        || eventType == XMLStreamConstants.CDATA
+   *        || eventType == XMLStreamConstants.SPACE
+   *        || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
+   *           buf.append(getText());
+   *     } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
+   *               || eventType == XMLStreamConstants.COMMENT) {
+   *         // skipping
+   *     } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
+   *         throw new XMLStreamException(
+   *         "unexpected end of document when reading element text content", this);
+   *     } else if(eventType == XMLStreamConstants.START_ELEMENT) {
+   *         throw new XMLStreamException(
+   *         "element text content may not contain START_ELEMENT", getLocation());
+   *     } else {
+   *         throw new XMLStreamException(
+   *         "Unexpected event type "+eventType, getLocation());
+   *     }
+   *     eventType = next();
    * }
    * return buf.toString();
    * </pre>
@@ -268,33 +270,33 @@
    * are encountered, an exception is thrown. This method should
    * be used when processing element-only content seperated by white space.
    *
-   * <br /> Precondition: none
-   * <br /> Postcondition: the current event is START_ELEMENT or END_ELEMENT
+   * <br> Precondition: none
+   * <br> Postcondition: the current event is START_ELEMENT or END_ELEMENT
    * and cursor may have moved over any whitespace event.
    *
-   * <br />Essentially it does the following (implementations are free to optimized
+   * <br>Essentially it does the following (implementations are free to optimized
    * but must do equivalent processing):
-   * <pre>
+   * <pre> {@code
    * int eventType = next();
-   * while((eventType == XMLStreamConstants.CHARACTERS &amp;&amp; isWhiteSpace()) // skip whitespace
-   * || (eventType == XMLStreamConstants.CDATA &amp;&amp; isWhiteSpace())
+   * while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace
+   * || (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
    * // skip whitespace
    * || eventType == XMLStreamConstants.SPACE
    * || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
    * || eventType == XMLStreamConstants.COMMENT
    * ) {
-   * eventType = next();
+   *     eventType = next();
    * }
-   * if (eventType != XMLStreamConstants.START_ELEMENT &amp;&amp; eventType != XMLStreamConstants.END_ELEMENT) {
-   * throw new String XMLStreamException("expected start or end tag", getLocation());
+   * if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) {
+   *     throw new String XMLStreamException("expected start or end tag", getLocation());
    * }
-   * return eventType;
+   * return eventType; }
    * </pre>
    *
    * @return the event type of the element read (START_ELEMENT or END_ELEMENT)
    * @throws XMLStreamException if the current event is not white space, PROCESSING_INSTRUCTION,
    * START_ELEMENT or END_ELEMENT
-   * @throws NoSuchElementException if this is called when hasNext() returns false
+   * @throws java.util.NoSuchElementException if this is called when hasNext() returns false
    */
   public int nextTag() throws XMLStreamException;
 
@@ -309,7 +311,7 @@
   public boolean hasNext() throws XMLStreamException;
 
   /**
-   * Frees any resources associated with this Reader.  This method does not close the
+   * Frees any resources associated with this Reader. This method does not close the
    * underlying input source.
    * @throws XMLStreamException if there are errors freeing associated resources
    */
@@ -542,7 +544,7 @@
    * If the number of characters actually copied is less than the "length", then there is no more text.
    * Otherwise, subsequent calls need to be made until all text has been retrieved. For example:
    *
-   *<code>
+   * <pre>{@code
    * int length = 1024;
    * char[] myBuffer = new char[ length ];
    *
@@ -553,7 +555,7 @@
    *   if (nCopied < length)
    *       break;
    * }
-   * </code>
+   * } </pre>
    * XMLStreamException may be thrown if there are any XML errors in the underlying source.
    * The "targetStart" argument must be greater than or equal to 0 and less than the length of "target",
    * Length must be greater than 0 and "targetStart + length" must be less than or equal to length of "target".
@@ -564,8 +566,8 @@
    * @param length the number of characters to copy
    * @return the number of characters actually copied
    * @throws XMLStreamException if the underlying XML source is not well-formed
-   * @throws IndexOutOfBoundsException if targetStart < 0 or > than the length of target
-   * @throws IndexOutOfBoundsException if length < 0 or targetStart + length > length of target
+   * @throws IndexOutOfBoundsException if targetStart {@literal <} 0 or {@literal >} than the length of target
+   * @throws IndexOutOfBoundsException if length {@literal <} 0 or targetStart + length {@literal >} length of target
    * @throws UnsupportedOperationException if this method is not supported
    * @throws NullPointerException is if target is null
    */
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java	Wed Jul 05 20:30:08 2017 +0200
@@ -33,9 +33,9 @@
 /**
  * The XMLStreamWriter interface specifies how to write XML.  The XMLStreamWriter  does
  * not perform well formedness checking on its input.  However
- * the writeCharacters method is required to escape &amp; , &lt; and &gt;
+ * the writeCharacters method is required to escape {@literal &, < and >}
  * For attribute values the writeAttribute method will escape the
- * above characters plus &quot; to ensure that all character content
+ * above characters plus {@literal "} to ensure that all character content
  * and attribute values are well formed.
  *
  * Each NAMESPACE
@@ -44,12 +44,12 @@
  * <table border="1" cellpadding="2" cellspacing="0">
  *     <thead>
  *         <tr>
- *             <th colspan="5">XML Namespaces, <code>javax.xml.stream.isRepairingNamespaces</code> and write method behaviour</th>
+ *             <th colspan="5">XML Namespaces, {@code javax.xml.stream.isRepairingNamespaces} and write method behaviour</th>
  *         </tr>
  *         <tr>
  *             <th>Method</th> <!-- method -->
- *             <th colspan="2"><code>isRepairingNamespaces</code> == true</th>
- *             <th colspan="2"><code>isRepairingNamespaces</code> == false</th>
+ *             <th colspan="2">{@code isRepairingNamespaces} == true</th>
+ *             <th colspan="2">{@code isRepairingNamespaces} == false</th>
  *         </tr>
  *         <tr>
  *             <th></th> <!-- method -->
@@ -62,7 +62,7 @@
  *
  *     <tbody>
  *         <tr>
- *             <th><code>writeAttribute(namespaceURI, localName, value)</code></th>
+ *             <th>{@code writeAttribute(namespaceURI, localName, value)}</th>
  *             <!-- isRepairingNamespaces == true -->
  *             <td>
  *                 <!-- namespaceURI bound -->
@@ -79,19 +79,19 @@
  *             </td>
  *             <td>
  *                 <!-- namespaceURI unbound -->
- *                 <code>XMLStreamException</code>
+ *                 {@code XMLStreamException}
  *             </td>
  *         </tr>
  *
  *         <tr>
- *             <th><code>writeAttribute(prefix, namespaceURI, localName, value)</code></th>
+ *             <th>{@code writeAttribute(prefix, namespaceURI, localName, value)}</th>
  *             <!-- isRepairingNamespaces == true -->
  *             <td>
  *                 <!-- namespaceURI bound -->
- *                 bound to same prefix:<br />
- *                 prefix:localName="value"&nbsp;<sup>[1]</sup><br />
- *                 <br />
- *                 bound to different prefix:<br />
+ *                 bound to same prefix:<br>
+ *                 prefix:localName="value"&nbsp;<sup>[1]</sup><br>
+ *                 <br>
+ *                 bound to different prefix:<br>
  *                 xmlns:{generated}="namespaceURI" {generated}:localName="value"
  *             </td>
  *             <td>
@@ -101,11 +101,11 @@
  *             <!-- isRepairingNamespaces == false -->
  *             <td>
  *                 <!-- namespaceURI bound -->
- *                 bound to same prefix:<br />
- *                 prefix:localName="value"&nbsp;<sup>[1][2]</sup><br />
- *                 <br />
- *                 bound to different prefix:<br />
- *                 <code>XMLStreamException</code><sup>[2]</sup>
+ *                 bound to same prefix:<br>
+ *                 prefix:localName="value"&nbsp;<sup>[1][2]</sup><br>
+ *                 <br>
+ *                 bound to different prefix:<br>
+ *                 {@code XMLStreamException}<sup>[2]</sup>
  *             </td>
  *             <td>
  *                 <!-- namespaceURI unbound -->
@@ -114,58 +114,58 @@
  *         </tr>
  *
  *         <tr>
- *             <th><code>writeStartElement(namespaceURI, localName)</code><br />
- *                 <br />
- *                 <code>writeEmptyElement(namespaceURI, localName)</code></th>
+ *             <th>{@code writeStartElement(namespaceURI, localName)}<br>
+ *                 <br>
+ *                 {@code writeEmptyElement(namespaceURI, localName)}</th>
  *             <!-- isRepairingNamespaces == true -->
  *             <td >
  *                 <!-- namespaceURI bound -->
- *                 &lt;prefix:localName&gt;&nbsp;<sup>[1]</sup>
+ *                 {@code <prefix:localName>}&nbsp;<sup>[1]</sup>
  *             </td>
  *             <td>
  *                 <!-- namespaceURI unbound -->
- *                 &lt;{generated}:localName xmlns:{generated}="namespaceURI"&gt;
+ *                 {@code <{generated}:localName xmlns:{generated}="namespaceURI">}
  *             </td>
  *             <!-- isRepairingNamespaces == false -->
  *             <td>
  *                 <!-- namespaceURI bound -->
- *                 &lt;prefix:localName&gt;&nbsp;<sup>[1]</sup>
+ *                 {@code prefix:localName>}&nbsp;<sup>[1]</sup>
  *             </td>
  *             <td>
  *                 <!-- namespaceURI unbound -->
- *                 <code>XMLStreamException</code>
+ *                 {@code XMLStreamException}
  *             </td>
  *         </tr>
  *
  *         <tr>
- *             <th><code>writeStartElement(prefix, localName, namespaceURI)</code><br />
- *                 <br />
- *                 <code>writeEmptyElement(prefix, localName, namespaceURI)</code></th>
+ *             <th>{@code writeStartElement(prefix, localName, namespaceURI)}<br>
+ *                 <br>
+ *                 {@code writeEmptyElement(prefix, localName, namespaceURI)}</th>
  *             <!-- isRepairingNamespaces == true -->
  *             <td>
  *                 <!-- namespaceURI bound -->
- *                 bound to same prefix:<br />
- *                 &lt;prefix:localName&gt;&nbsp;<sup>[1]</sup><br />
- *                 <br />
- *                 bound to different prefix:<br />
- *                 &lt;{generated}:localName xmlns:{generated}="namespaceURI"&gt;
+ *                 bound to same prefix:<br>
+ *                 {@code <prefix:localName>}&nbsp;<sup>[1]</sup><br>
+ *                 <br>
+ *                 bound to different prefix:<br>
+ *                 {@code <{generated}:localName xmlns:{generated}="namespaceURI">}
  *             </td>
  *             <td>
  *                 <!-- namespaceURI unbound -->
- *                 &lt;prefix:localName xmlns:prefix="namespaceURI"&gt;&nbsp;<sup>[4]</sup>
+ *                 {@code <prefix:localName xmlns:prefix="namespaceURI">}&nbsp;<sup>[4]</sup>
  *             </td>
  *             <!-- isRepairingNamespaces == false -->
  *             <td>
  *                 <!-- namespaceURI bound -->
- *                 bound to same prefix:<br />
- *                 &lt;prefix:localName&gt;&nbsp;<sup>[1]</sup><br />
- *                 <br />
- *                 bound to different prefix:<br />
- *                 <code>XMLStreamException</code>
+ *                 bound to same prefix:<br>
+ *                 {@code <prefix:localName>}&nbsp;<sup>[1]</sup><br>
+ *                 <br>
+ *                 bound to different prefix:<br>
+ *                 {@code XMLStreamException}
  *             </td>
  *             <td>
  *                 <!-- namespaceURI unbound -->
- *                 &lt;prefix:localName&gt;&nbsp;
+ *                 {@code <prefix:localName>}&nbsp;
  *             </td>
  *         </tr>
  *     </tbody>
@@ -175,10 +175,14 @@
  *                 Notes:
  *                 <ul>
  *                     <li>[1] if namespaceURI == default Namespace URI, then no prefix is written</li>
- *                     <li>[2] if prefix == "" || null && namespaceURI == "", then no prefix or Namespace declaration is generated or written</li>
+ *                     <li>[2] if prefix == "" || null {@literal &&} namespaceURI == "", then
+ *                        no prefix or Namespace declaration is generated or written</li>
  *                     <li>[3] if prefix == "" || null, then a prefix is randomly generated</li>
- *                     <li>[4] if prefix == "" || null, then it is treated as the default Namespace and no prefix is generated or written, an xmlns declaration is generated and written if the namespaceURI is unbound</li>
- *                     <li>[5] if prefix == "" || null, then it is treated as an invalid attempt to define the default Namespace and an XMLStreamException is thrown</li>
+ *                     <li>[4] if prefix == "" || null, then it is treated as the default Namespace and
+ *                        no prefix is generated or written, an xmlns declaration is generated
+ *                        and written if the namespaceURI is unbound</li>
+ *                     <li>[5] if prefix == "" || null, then it is treated as an invalid attempt to
+ *                        define the default Namespace and an XMLStreamException is thrown</li>
  *                 </ul>
  *             </td>
  *         </tr>
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java	Wed Jul 05 20:30:08 2017 +0200
@@ -27,7 +27,7 @@
 
 /**
  * <p>An object that implements this interface contains the information
- * needed to build a transformation result tree.</p>
+ * needed to build a transformation result tree.
  *
  * @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
  * @since 1.4
@@ -38,7 +38,7 @@
      * The name of the processing instruction that is sent if the
      * result tree disables output escaping.
      *
-     * <p>Normally, result tree serialization escapes & and < (and
+     * <p>Normally, result tree serialization escapes{@literal & and <} (and
      * possibly other characters) when outputting text nodes.
      * This ensures that the output is well-formed XML. However,
      * it is sometimes convenient to be able to produce output that is
@@ -46,10 +46,10 @@
      * the output may include ill-formed sections that will
      * be transformed into well-formed XML by a subsequent non-XML aware
      * process. If a processing instruction is sent with this name,
-     * serialization should be output without any escaping. </p>
+     * serialization should be output without any escaping.
      *
      * <p>Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and
-     * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.</p>
+     * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.
      *
      * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
      */
@@ -71,7 +71,7 @@
      *
      * <p>If the Result is not to be written to a file, the system identifier is optional.
      * The application may still want to provide one, however, for use in error messages
-     * and warnings, or to resolve relative output identifiers.</p>
+     * and warnings, or to resolve relative output identifiers.
      *
      * @param systemId The system identifier as a URI string.
      */
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/TransformerFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/TransformerFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -28,13 +28,13 @@
 /**
  * <p>A TransformerFactory instance can be used to create
  * {@link javax.xml.transform.Transformer} and
- * {@link javax.xml.transform.Templates} objects.</p>
+ * {@link javax.xml.transform.Templates} objects.
  *
  * <p>The system property that determines which Factory implementation
- * to create is named <code>"javax.xml.transform.TransformerFactory"</code>.
+ * to create is named {@code "javax.xml.transform.TransformerFactory"}.
  * This property names a concrete subclass of the
  * {@code TransformerFactory} abstract class. If the property is not
- * defined, a platform default is be used.</p>
+ * defined, a platform default is be used.
  *
  * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
  * @author <a href="mailto:Neeraj.Bajaj@sun.com">Neeraj Bajaj</a>
@@ -51,14 +51,11 @@
 
 
     /**
-     * <p>
      * Obtain a new instance of a {@code TransformerFactory}.
      * This static method creates a new factory instance.
      * <p>
      * This method uses the following ordered lookup procedure to determine
-     * the {@code TransformerFactory} implementation class to
-     * load:
-     * <p>
+     * the {@code TransformerFactory} implementation class to load:
      * <ul>
      * <li>
      * Use the {@code javax.xml.transform.TransformerFactory} system
@@ -118,34 +115,34 @@
     }
 
     /**
-     * <p>Obtain a new instance of a {@code TransformerFactory} from factory class name.
+     * Obtain a new instance of a {@code TransformerFactory} from factory class name.
      * This function is useful when there are multiple providers in the classpath.
      * It gives more control to the application as it can specify which provider
-     * should be loaded.</p>
+     * should be loaded.
      *
      * <p>Once an application has obtained a reference to a
      * {@code TransformerFactory} it can use the factory to configure
-     * and obtain transformer instances.</p>
+     * and obtain transformer instances.
      *
      * <h2>Tip for Trouble-shooting</h2>
-     * <p>Setting the <code>jaxp.debug</code> system property will cause
+     * <p>Setting the {@code jaxp.debug} system property will cause
      * this method to print a lot of debug messages
-     * to <code>System.err</code> about what it is doing and where it is looking at.</p>
+     * to {@code System.err} about what it is doing and where it is looking at.
      *
-     * <p> If you have problems try:</p>
+     * <p> If you have problems try:
      * <pre>
      * java -Djaxp.debug=1 YourProgram ....
      * </pre>
      *
      * @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.transform.TransformerFactory}.
      *
-     * @param classLoader <code>ClassLoader</code> used to load the factory class. If <code>null</code>
-     *                     current <code>Thread</code>'s context classLoader is used to load the factory class.
+     * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+     *                     current {@code Thread}'s context classLoader is used to load the factory class.
      *
      * @return new TransformerFactory instance, never null.
      *
      * @throws TransformerFactoryConfigurationError
-     *                    if <code>factoryClassName</code> is <code>null</code>, or
+     *                    if {@code factoryClassName} is {@code null}, or
      *                   the factory class cannot be loaded, instantiated.
      *
      * @see #newInstance()
@@ -160,29 +157,29 @@
                     factoryClassName, classLoader, false, false);
     }
     /**
-     * <p>Process the <code>Source</code> into a <code>Transformer</code>
-     * <code>Object</code>.  The <code>Source</code> is an XSLT document that
+     * Process the {@code Source} into a {@code Transformer}
+     * {@code Object}.  The {@code Source} is an XSLT document that
      * conforms to <a href="http://www.w3.org/TR/xslt">
      * XSL Transformations (XSLT) Version 1.0</a>.  Care must
-     * be taken not to use this <code>Transformer</code> in multiple
-     * <code>Thread</code>s running concurrently.
-     * Different <code>TransformerFactories</code> can be used concurrently by
-     * different <code>Thread</code>s.</p>
+     * be taken not to use this {@code Transformer} in multiple
+     * {@code Thread}s running concurrently.
+     * Different {@code TransformerFactories} can be used concurrently by
+     * different {@code Thread}s.
      *
-     * @param source <code>Source </code> of XSLT document used to create
-     *   <code>Transformer</code>.
-     *   Examples of XML <code>Source</code>s include
+     * @param source {@code Source } of XSLT document used to create
+     *   {@code Transformer}.
+     *   Examples of XML {@code Source}s include
      *   {@link javax.xml.transform.dom.DOMSource DOMSource},
      *   {@link javax.xml.transform.sax.SAXSource SAXSource}, and
      *   {@link javax.xml.transform.stream.StreamSource StreamSource}.
      *
-     * @return A <code>Transformer</code> object that may be used to perform
-     *   a transformation in a single <code>Thread</code>, never
-     *   <code>null</code>.
+     * @return A {@code Transformer} object that may be used to perform
+     *   a transformation in a single {@code Thread}, never
+     *   {@code null}.
      *
      * @throws TransformerConfigurationException Thrown if there are errors when
-     *    parsing the <code>Source</code> or it is not possible to create a
-     *   <code>Transformer</code> instance.
+     *    parsing the {@code Source} or it is not possible to create a
+     *   {@code Transformer} instance.
      *
      * @see <a href="http://www.w3.org/TR/xslt">
      *   XSL Transformations (XSLT) Version 1.0</a>
@@ -191,15 +188,15 @@
         throws TransformerConfigurationException;
 
     /**
-     * <p>Create a new <code>Transformer</code> that performs a copy
-     * of the <code>Source</code> to the <code>Result</code>.
-     * i.e. the "<em>identity transform</em>".</p>
+     * Create a new {@code Transformer} that performs a copy
+     * of the {@code Source} to the {@code Result}.
+     * i.e. the "<em>identity transform</em>".
      *
      * @return A Transformer object that may be used to perform a transformation
      * in a single thread, never null.
      *
      * @throws TransformerConfigurationException When it is not
-     *   possible to create a <code>Transformer</code> instance.
+     *   possible to create a {@code Transformer} instance.
      */
     public abstract Transformer newTransformer()
         throws TransformerConfigurationException;
@@ -215,7 +212,7 @@
      * @param source An object that holds a URL, input stream, etc.
      *
      * @return A Templates object capable of being used for transformation
-     *   purposes, never <code>null</code>.
+     *   purposes, never {@code null}.
      *
      * @throws TransformerConfigurationException When parsing to
      *   construct the Templates object fails.
@@ -224,13 +221,13 @@
         throws TransformerConfigurationException;
 
     /**
-     * <p>Get the stylesheet specification(s) associated with the
-     * XML <code>Source</code> document via the
+     * Get the stylesheet specification(s) associated with the
+     * XML {@code Source} document via the
      * <a href="http://www.w3.org/TR/xml-stylesheet/">
      * xml-stylesheet processing instruction</a> that match the given criteria.
      * Note that it is possible to return several stylesheets, in which case
      * they are applied as if they were a list of imports or cascades in a
-     * single stylesheet.</p>
+     * single stylesheet.
      *
      * @param source The XML source document.
      * @param media The media attribute to be matched.  May be null, in which
@@ -238,12 +235,12 @@
      * @param title The value of the title attribute to match.  May be null.
      * @param charset The value of the charset attribute to match.  May be null.
      *
-     * @return A <code>Source</code> <code>Object</code> suitable for passing
+     * @return A {@code Source} {@code Object} suitable for passing
      *   to the {@code TransformerFactory}.
      *
-     * @throws TransformerConfigurationException An <code>Exception</code>
+     * @throws TransformerConfigurationException An {@code Exception}
      *   is thrown if an error occurings during parsing of the
-     *   <code>source</code>.
+     *   {@code source}.
      *
      * @see <a href="http://www.w3.org/TR/xml-stylesheet/">
      *   Associating Style Sheets with XML documents Version 1.0</a>
@@ -275,22 +272,21 @@
     //======= CONFIGURATION METHODS =======
 
         /**
-         * <p>Set a feature for this {@code TransformerFactory} and <code>Transformer</code>s
-         * or <code>Template</code>s created by this factory.</p>
+         * <p>Set a feature for this {@code TransformerFactory} and {@code Transformer}s
+         * or {@code Template}s created by this factory.
          *
          * <p>
          * Feature names are fully qualified {@link java.net.URI}s.
          * Implementations may define their own features.
          * An {@link TransformerConfigurationException} is thrown if this {@code TransformerFactory} or the
-         * <code>Transformer</code>s or <code>Template</code>s it creates cannot support the feature.
+         * {@code Transformer}s or {@code Template}s it creates cannot support the feature.
          * It is possible for an {@code TransformerFactory} to expose a feature value but be unable to change its state.
-         * </p>
          *
          * <p>All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
-         * When the feature is:</p>
+         * When the feature is:
          * <ul>
          *   <li>
-         *     <code>true</code>: the implementation will limit XML processing to conform to implementation limits
+         *     {@code true}: the implementation will limit XML processing to conform to implementation limits
          *     and behave in a secure fashion as defined by the implementation.
          *     Examples include resolving user defined style sheets and functions.
          *     If XML processing is limited for security reasons, it will be reported via a call to the registered
@@ -298,17 +294,17 @@
          *     See {@link  #setErrorListener(ErrorListener listener)}.
          *   </li>
          *   <li>
-         *     <code>false</code>: the implementation will processing XML according to the XML specifications without
+         *     {@code false}: the implementation will processing XML according to the XML specifications without
          *     regard to possible implementation limits.
          *   </li>
          * </ul>
          *
          * @param name Feature name.
-         * @param value Is feature state <code>true</code> or <code>false</code>.
+         * @param value Is feature state {@code true} or {@code false}.
          *
          * @throws TransformerConfigurationException if this {@code TransformerFactory}
-         *   or the <code>Transformer</code>s or <code>Template</code>s it creates cannot support this feature.
-     * @throws NullPointerException If the <code>name</code> parameter is null.
+         *   or the {@code Transformer}s or {@code Template}s it creates cannot support this feature.
+     * @throws NullPointerException If the {@code name} parameter is null.
          */
         public abstract void setFeature(String name, boolean value)
                 throws TransformerConfigurationException;
@@ -319,16 +315,15 @@
          * <p>
          * Feature names are fully qualified {@link java.net.URI}s.
          * Implementations may define their own features.
-         * <code>false</code> is returned if this {@code TransformerFactory} or the
-         * <code>Transformer</code>s or <code>Template</code>s it creates cannot support the feature.
+         * {@code false} is returned if this {@code TransformerFactory} or the
+         * {@code Transformer}s or {@code Template}s it creates cannot support the feature.
          * It is possible for an {@code TransformerFactory} to expose a feature value but be unable to change its state.
-         * </p>
          *
          * @param name Feature name.
          *
-     * @return The current state of the feature, <code>true</code> or <code>false</code>.
+     * @return The current state of the feature, {@code true} or {@code false}.
      *
-     * @throws NullPointerException If the <code>name</code> parameter is null.
+     * @throws NullPointerException If the {@code name} parameter is null.
      */
     public abstract boolean getFeature(String name);
 
@@ -336,13 +331,13 @@
      * Allows the user to set specific attributes on the underlying
      * implementation.  An attribute in this context is defined to
      * be an option that the implementation provides.
-     * An <code>IllegalArgumentException</code> is thrown if the underlying
+     * An {@code IllegalArgumentException} is thrown if the underlying
      * implementation doesn't recognize the attribute.
      * <p>
      * All implementations that implement JAXP 1.5 or newer are required to
      * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD}  and
      * {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_STYLESHEET} properties.
-     * </p>
+     *
      * <ul>
      *   <li>
      *      <p>
@@ -351,7 +346,7 @@
      *      If access is denied during transformation due to the restriction of this property,
      *      {@link javax.xml.transform.TransformerException} will be thrown by
      *      {@link javax.xml.transform.Transformer#transform(Source, Result)}.
-     *      </p>
+     *
      *      <p>
      *      Access to external DTDs in the stylesheet is restricted to the protocols
      *      specified by the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property.
@@ -359,7 +354,7 @@
      *      restriction of this property,
      *      {@link javax.xml.transform.TransformerConfigurationException} will be thrown
      *      by the {@link #newTransformer(Source)} method.
-     *      </p>
+     *
      *      <p>
      *      Access to external reference set by the stylesheet processing instruction,
      *      Import and Include element is restricted to the protocols specified by the
@@ -368,14 +363,14 @@
      *      restriction of this property,
      *      {@link javax.xml.transform.TransformerConfigurationException} will be thrown
      *      by the {@link #newTransformer(Source)} method.
-     *      </p>
+     *
      *      <p>
      *      Access to external document through XSLT document function is restricted
      *      to the protocols specified by the property. If access is denied during
      *      the transformation due to the restriction of this property,
      *      {@link javax.xml.transform.TransformerException} will be thrown by the
      *      {@link javax.xml.transform.Transformer#transform(Source, Result)} method.
-     *      </p>
+     *
      *   </li>
      * </ul>
      *
@@ -390,7 +385,7 @@
     /**
      * Allows the user to retrieve specific attributes on the underlying
      * implementation.
-     * An <code>IllegalArgumentException</code> is thrown if the underlying
+     * An {@code IllegalArgumentException} is thrown if the underlying
      * implementation doesn't recognize the attribute.
      *
      * @param name The name of the attribute.
@@ -406,13 +401,13 @@
      * Set the error event listener for the TransformerFactory, which
      * is used for the processing of transformation instructions,
      * and not for the transformation itself.
-     * An <code>IllegalArgumentException</code> is thrown if the
-     * <code>ErrorListener</code> listener is <code>null</code>.
+     * An {@code IllegalArgumentException} is thrown if the
+     * {@code ErrorListener} listener is {@code null}.
      *
      * @param listener The new error listener.
      *
-     * @throws IllegalArgumentException When <code>listener</code> is
-     *   <code>null</code>
+     * @throws IllegalArgumentException When {@code listener} is
+     *   {@code null}
      */
     public abstract void setErrorListener(ErrorListener listener);
 
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java	Wed Jul 05 20:30:08 2017 +0200
@@ -29,29 +29,32 @@
 import org.w3c.dom.Node;
 
 /**
- * <p>Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.</p>
+ * Acts as a holder for a transformation result tree
+ * in the form of a Document Object Model (DOM) tree.
  *
- * <p>If no output DOM source is set, the transformation will create a Document node as the holder for the result of the transformation,
- * which may be retrieved with {@link #getNode()}.</p>
+ * <p>If no output DOM source is set, the transformation will create
+ * a Document node as the holder for the result of the transformation,
+ * which may be retrieved with {@link #getNode()}.
  *
  * @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
  * @since 1.4
  */
 public class DOMResult implements Result {
 
-    /** <p>If {@link javax.xml.transform.TransformerFactory#getFeature}
-     * returns <code>true</code> when passed this value as an argument,
-     * the <code>Transformer</code> supports <code>Result</code> output of this type.</p>
+    /**
+     * If {@link javax.xml.transform.TransformerFactory#getFeature}
+     * returns {@code true} when passed this value as an argument,
+     * the {@code Transformer} supports {@code Result} output of this type.
      */
     public static final String FEATURE = "http://javax.xml.transform.dom.DOMResult/feature";
 
     /**
-     * <p>Zero-argument default constructor.</p>
+     * Zero-argument default constructor.
      *
-     * <p><code>node</code>,
-     * <code>siblingNode</code> and
-     * <code>systemId</code>
-     * will be set to <code>null</code>.</p>
+     * <p>{@code node},
+     * {@code siblingNode} and
+     * {@code systemId}
+     * will be set to {@code null}.
      */
     public DOMResult() {
         setNode(null);
@@ -60,17 +63,17 @@
     }
 
     /**
-     * <p>Use a DOM node to create a new output target.</p>
+     * Use a DOM node to create a new output target.
      *
      * <p>In practice, the node should be
      * a {@link org.w3c.dom.Document} node,
      * a {@link org.w3c.dom.DocumentFragment} node, or
      * a {@link org.w3c.dom.Element} node.
-     * In other words, a node that accepts children.</p>
+     * In other words, a node that accepts children.
      *
-     * <p><code>siblingNode</code> and
-     * <code>systemId</code>
-     * will be set to <code>null</code>.</p>
+     * <p>{@code siblingNode} and
+     * {@code systemId}
+     * will be set to {@code null}.
      *
      * @param node The DOM node that will contain the result tree.
      */
@@ -81,15 +84,15 @@
     }
 
     /**
-     * <p>Use a DOM node to create a new output target with the specified System ID.<p>
+     * Use a DOM node to create a new output target with the specified System ID.
      *
      * <p>In practice, the node should be
      * a {@link org.w3c.dom.Document} node,
      * a {@link org.w3c.dom.DocumentFragment} node, or
      * a {@link org.w3c.dom.Element} node.
-     * In other words, a node that accepts children.</p>
+     * In other words, a node that accepts children.
      *
-     * <p><code>siblingNode</code> will be set to <code>null</code>.</p>
+     * <p>{@code siblingNode} will be set to {@code null}.
      *
      * @param node The DOM node that will contain the result tree.
      * @param systemId The system identifier which may be used in association with this node.
@@ -101,32 +104,33 @@
     }
 
     /**
-     * <p>Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before.</p>
+     * Use a DOM node to create a new output target specifying
+     * the child node where the result nodes should be inserted before.
      *
-     * <p>In practice, <code>node</code> and <code>nextSibling</code> should be
+     * <p>In practice, {@code node} and {@code nextSibling} should be
      * a {@link org.w3c.dom.Document} node,
      * a {@link org.w3c.dom.DocumentFragment} node, or
      * a {@link org.w3c.dom.Element} node.
-     * In other words, a node that accepts children.</p>
+     * In other words, a node that accepts children.
      *
-     * <p>Use <code>nextSibling</code> to specify the child node
+     * <p>Use {@code nextSibling} to specify the child node
      * where the result nodes should be inserted before.
-     * If <code>nextSibling</code> is not a sibling of <code>node</code>,
-     * then an <code>IllegalArgumentException</code> is thrown.
-     * If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>,
-     * then an <code>IllegalArgumentException</code> is thrown.
-     * If <code>nextSibling</code> is <code>null</code>,
+     * If {@code nextSibling} is not a sibling of {@code node},
+     * then an {@code IllegalArgumentException} is thrown.
+     * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+     * then an {@code IllegalArgumentException} is thrown.
+     * If {@code nextSibling} is {@code null},
      * then the behavior is the same as calling {@link #DOMResult(Node node)},
-     * i.e. append the result nodes as the last child of the specified <code>node</code>.</p>
+     * i.e. append the result nodes as the last child of the specified {@code node}.
      *
-     * <p><code>systemId</code> will be set to <code>null</code>.</p>
+     * <p>{@code systemId} will be set to {@code null}.
      *
      * @param node The DOM node that will contain the result tree.
      * @param nextSibling The child node where the result nodes should be inserted before.
      *
-     * @throws IllegalArgumentException If <code>nextSibling</code> is not a sibling of <code>node</code> or
-     *   <code>node</code> is <code>null</code> and <code>nextSibling</code>
-     *   is not <code>null</code>.
+     * @throws IllegalArgumentException If {@code nextSibling} is not a sibling of {@code node} or
+     *   {@code node} is {@code null} and {@code nextSibling}
+     *   is not {@code null}.
      *
      * @since 1.5
      */
@@ -151,33 +155,35 @@
     }
 
     /**
-     * <p>Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and
-     * the specified System ID.</p>
+     * Use a DOM node to create a new output target specifying the child
+     * node where the result nodes should be inserted before and
+     * the specified System ID.
      *
-     * <p>In practice, <code>node</code> and <code>nextSibling</code> should be
+     * <p>In practice, {@code node} and {@code nextSibling} should be
      * a {@link org.w3c.dom.Document} node,
      * a {@link org.w3c.dom.DocumentFragment} node, or a
      * {@link org.w3c.dom.Element} node.
-     * In other words, a node that accepts children.</p>
+     * In other words, a node that accepts children.
      *
-     * <p>Use <code>nextSibling</code> to specify the child node
+     * <p>Use {@code nextSibling} to specify the child node
      * where the result nodes should be inserted before.
-     * If <code>nextSibling</code> is not a sibling of <code>node</code>,
-     * then an <code>IllegalArgumentException</code> is thrown.
-     * If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>,
-     * then an <code>IllegalArgumentException</code> is thrown.
-     * If <code>nextSibling</code> is <code>null</code>,
+     * If {@code nextSibling} is not a sibling of {@code node},
+     * then an {@code IllegalArgumentException} is thrown.
+     * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+     * then an {@code IllegalArgumentException} is thrown.
+     * If {@code nextSibling} is {@code null},
      * then the behavior is the same as calling {@link #DOMResult(Node node, String systemId)},
-     * i.e. append the result nodes as the last child of the specified node and use the specified System ID.</p>
+     * i.e. append the result nodes as the last child of the specified
+     * node and use the specified System ID.
      *
      * @param node The DOM node that will contain the result tree.
      * @param nextSibling The child node where the result nodes should be inserted before.
      * @param systemId The system identifier which may be used in association with this node.
      *
-     * @throws IllegalArgumentException If <code>nextSibling</code> is not a
-     *   sibling of <code>node</code> or
-     *   <code>node</code> is <code>null</code> and <code>nextSibling</code>
-     *   is not <code>null</code>.
+     * @throws IllegalArgumentException If {@code nextSibling} is not a
+     *   sibling of {@code node} or
+     *   {@code node} is {@code null} and {@code nextSibling}
+     *   is not {@code null}.
      *
      * @since 1.5
      */
@@ -202,27 +208,27 @@
     }
 
     /**
-     * <p>Set the node that will contain the result DOM tree.<p>
+     * Set the node that will contain the result DOM tree.
      *
      * <p>In practice, the node should be
      * a {@link org.w3c.dom.Document} node,
      * a {@link org.w3c.dom.DocumentFragment} node, or
      * a {@link org.w3c.dom.Element} node.
-     * In other words, a node that accepts children.</p>
+     * In other words, a node that accepts children.
      *
-     * <p>An <code>IllegalStateException</code> is thrown if
-     * <code>nextSibling</code> is not <code>null</code> and
-     * <code>node</code> is not a parent of <code>nextSibling</code>.
-     * An <code>IllegalStateException</code> is thrown if <code>node</code> is <code>null</code> and
-     * <code>nextSibling</code> is not <code>null</code>.</p>
+     * <p>An {@code IllegalStateException} is thrown if
+     * {@code nextSibling} is not {@code null} and
+     * {@code node} is not a parent of {@code nextSibling}.
+     * An {@code IllegalStateException} is thrown if {@code node} is {@code null} and
+     * {@code nextSibling} is not {@code null}.
      *
      * @param node The node to which the transformation will be appended.
      *
-     * @throws IllegalStateException If <code>nextSibling</code> is not
-     *   <code>null</code> and
-     *   <code>nextSibling</code> is not a child of <code>node</code> or
-     *   <code>node</code> is <code>null</code> and
-     *   <code>nextSibling</code> is not <code>null</code>.
+     * @throws IllegalStateException If {@code nextSibling} is not
+     *   {@code null} and
+     *   {@code nextSibling} is not a child of {@code node} or
+     *   {@code node} is {@code null} and
+     *   {@code nextSibling} is not {@code null}.
      */
     public void setNode(Node node) {
         // does the corrent parent/child relationship exist?
@@ -242,7 +248,7 @@
     }
 
     /**
-     * <p>Get the node that will contain the result DOM tree.</p>
+     * Get the node that will contain the result DOM tree.
      *
      * <p>If no node was set via
      * {@link #DOMResult(Node node)},
@@ -251,7 +257,7 @@
      * {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
      * {@link #setNode(Node node)},
      * then the node will be set by the transformation, and may be obtained from this method once the transformation is complete.
-     * Calling this method before the transformation will return <code>null</code>.</p>
+     * Calling this method before the transformation will return {@code null}.
      *
      * @return The node to which the transformation will be appended.
      */
@@ -260,24 +266,24 @@
     }
 
     /**
-     * <p>Set the child node before which the result nodes will be inserted.</p>
+     * Set the child node before which the result nodes will be inserted.
      *
-     * <p>Use <code>nextSibling</code> to specify the child node
+     * <p>Use {@code nextSibling} to specify the child node
      * before which the result nodes should be inserted.
-     * If <code>nextSibling</code> is not a descendant of <code>node</code>,
-     * then an <code>IllegalArgumentException</code> is thrown.
-     * If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>,
-     * then an <code>IllegalStateException</code> is thrown.
-     * If <code>nextSibling</code> is <code>null</code>,
+     * If {@code nextSibling} is not a descendant of {@code node},
+     * then an {@code IllegalArgumentException} is thrown.
+     * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+     * then an {@code IllegalStateException} is thrown.
+     * If {@code nextSibling} is {@code null},
      * then the behavior is the same as calling {@link #DOMResult(Node node)},
-     * i.e. append the result nodes as the last child of the specified <code>node</code>.</p>
+     * i.e. append the result nodes as the last child of the specified {@code node}.
      *
      * @param nextSibling The child node before which the result nodes will be inserted.
      *
-     * @throws IllegalArgumentException If <code>nextSibling</code> is not a
-     *   descendant of <code>node</code>.
-     * @throws IllegalStateException If <code>node</code> is <code>null</code>
-     *   and <code>nextSibling</code> is not <code>null</code>.
+     * @throws IllegalArgumentException If {@code nextSibling} is not a
+     *   descendant of {@code node}.
+     * @throws IllegalStateException If {@code node} is {@code null}
+     *   and {@code nextSibling} is not {@code null}.
      *
      * @since 1.5
      */
@@ -300,13 +306,13 @@
     }
 
     /**
-     * <p>Get the child node before which the result nodes will be inserted.</p>
+     * Get the child node before which the result nodes will be inserted.
      *
      * <p>If no node was set via
      * {@link #DOMResult(Node node, Node nextSibling)},
      * {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
      * {@link #setNextSibling(Node nextSibling)},
-     * then <code>null</code> will be returned.</p>
+     * then {@code null} will be returned.
      *
      * @return The child node before which the result nodes will be inserted.
      *
@@ -317,7 +323,7 @@
     }
 
     /**
-     * <p>Set the systemId that may be used in association with the node.</p>
+     * Set the systemId that may be used in association with the node.
      *
      * @param systemId The system identifier as a URI string.
      */
@@ -326,13 +332,13 @@
     }
 
     /**
-     * <p>Get the System Identifier.</p>
+     * Get the System Identifier.
      *
      * <p>If no System ID was set via
      * {@link #DOMResult(Node node, String systemId)},
      * {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
      * {@link #setSystemId(String systemId)},
-     * then <code>null</code> will be returned.</p>
+     * then {@code null} will be returned.
      *
      * @return The system identifier.
      */
@@ -345,19 +351,19 @@
     //////////////////////////////////////////////////////////////////////
 
     /**
-     * <p>The node to which the transformation will be appended.</p>
+     * The node to which the transformation will be appended.
      */
     private Node node = null;
 
     /**
-     * <p>The child node before which the result nodes will be inserted.</p>
+     * The child node before which the result nodes will be inserted.
      *
      * @since 1.5
      */
     private Node nextSibling = null;
 
     /**
-     * <p>The System ID that may be used in association with the node.</p>
+     * The System ID that may be used in association with the node.
      */
     private String systemId = null;
 }
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -65,9 +65,6 @@
 			<li>@see XMLEventReader</li>
 		</ul>
 		
-		<p>
-			@since 1.6
-		</p>
-
+		@since 1.6
 	</body>
 </html>
--- a/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/SchemaFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -37,7 +37,7 @@
 import org.xml.sax.SAXParseException;
 
 /**
- * Factory that creates {@link Schema} objects&#x2E; Entry-point to
+ * Factory that creates {@link Schema} objects. Entry-point to
  * the validation API.
  *
  * <p>
@@ -49,12 +49,12 @@
  * it is the application's responsibility to ensure that at most
  * one thread is using a {@link SchemaFactory} object at any
  * given moment. Implementations are encouraged to mark methods
- * as <code>synchronized</code> to protect themselves from broken clients.
+ * as {@code synchronized} to protect themselves from broken clients.
  *
  * <p>
  * {@link SchemaFactory} is not re-entrant. While one of the
- * <code>newSchema</code> methods is being invoked, applications
- * may not attempt to recursively invoke the <code>newSchema</code> method,
+ * {@code newSchema} methods is being invoked, applications
+ * may not attempt to recursively invoke the {@code newSchema} method,
  * even from the same thread.
  *
  * <h2><a name="schemaLanguage"></a>Schema Language</h2>
@@ -92,11 +92,11 @@
  *   </thead>
  *   <tbody>
  *     <tr>
- *       <td>{@link javax.xml.XMLConstants#W3C_XML_SCHEMA_NS_URI} ("<code>http://www.w3.org/2001/XMLSchema</code>")</td>
+ *       <td>{@link javax.xml.XMLConstants#W3C_XML_SCHEMA_NS_URI} ("{@code http://www.w3.org/2001/XMLSchema}")</td>
  *       <td><a href="http://www.w3.org/TR/xmlschema-1">W3C XML Schema 1.0</a></td>
  *     </tr>
  *     <tr>
- *       <td>{@link javax.xml.XMLConstants#RELAXNG_NS_URI} ("<code>http://relaxng.org/ns/structure/1.0</code>")</td>
+ *       <td>{@link javax.xml.XMLConstants#RELAXNG_NS_URI} ("{@code http://relaxng.org/ns/structure/1.0}")</td>
  *       <td><a href="http://www.relaxng.org/">RELAX NG 1.0</a></td>
  *     </tr>
  *   </tbody>
@@ -112,24 +112,24 @@
      private static SecuritySupport ss = new SecuritySupport();
 
     /**
-     * <p>Constructor for derived classes.</p>
+     * Constructor for derived classes.
      *
-     * <p>The constructor does nothing.</p>
+     * <p>The constructor does nothing.
      *
      * <p>Derived classes must create {@link SchemaFactory} objects that have
-     * <code>null</code> {@link ErrorHandler} and
-     * <code>null</code> {@link LSResourceResolver}.</p>
+     * {@code null} {@link ErrorHandler} and
+     * {@code null} {@link LSResourceResolver}.
      */
     protected SchemaFactory() {
     }
 
     /**
-     * <p>Lookup an implementation of the <code>SchemaFactory</code> that supports the specified
-     * schema language and return it.</p>
+     * Lookup an implementation of the {@code SchemaFactory} that supports the specified
+     * schema language and return it.
      *
-     * <p>To find a <code>SchemaFactory</code> object for a given schema language,
+     * <p>To find a {@code SchemaFactory} object for a given schema language,
      * this method looks the following places in the following order
-     * where "the class loader" refers to the context class loader:</p>
+     * where "the class loader" refers to the context class loader:
      * <ol>
      *  <li>
      *     <p>
@@ -178,9 +178,9 @@
      *   </li>
      *   <li>
      *     <p>
-     *     Platform default <code>SchemaFactory</code> is located
+     *     Platform default {@code SchemaFactory} is located
      *     in a implementation specific way. There must be a platform default
-     *     <code>SchemaFactory</code> for W3C XML Schema.
+     *     {@code SchemaFactory} for W3C XML Schema.
      *   </li>
      * </ol>
      *
@@ -201,12 +201,12 @@
      *      <a href="#schemaLanguage">the list of available
      *      schema languages</a> for the possible values.
      *
-     * @return New instance of a <code>SchemaFactory</code>
+     * @return New instance of a {@code SchemaFactory}
      *
      * @throws IllegalArgumentException
      *      If no implementation of the schema language is available.
      * @throws NullPointerException
-     *      If the <code>schemaLanguage</code> parameter is null.
+     *      If the {@code schemaLanguage} parameter is null.
      * @throws SchemaFactoryConfigurationError
      *      If a configuration error is encountered.
      *
@@ -233,42 +233,42 @@
     }
 
     /**
-     * <p>Obtain a new instance of a <code>SchemaFactory</code> from class name. <code>SchemaFactory</code>
+     * Obtain a new instance of a {@code SchemaFactory} from class name. {@code SchemaFactory}
      * is returned if specified factory class name supports the specified schema language.
      * This function is useful when there are multiple providers in the classpath.
      * It gives more control to the application as it can specify which provider
-     * should be loaded.</p>
+     * should be loaded.
      *
      * <h2>Tip for Trouble-shooting</h2>
-     * <p>Setting the <code>jaxp.debug</code> system property will cause
+     * <p>Setting the {@code jaxp.debug} system property will cause
      * this method to print a lot of debug messages
-     * to <code>System.err</code> about what it is doing and where it is looking at.</p>
+     * to {@code System.err} about what it is doing and where it is looking at.
      *
-     * <p> If you have problems try:</p>
+     * <p> If you have problems try:
      * <pre>
      * java -Djaxp.debug=1 YourProgram ....
      * </pre>
      *
      * @param schemaLanguage Specifies the schema language which the returned
-     *                          <code>SchemaFactory</code> will understand. See
+     *                          {@code SchemaFactory} will understand. See
      *                          <a href="#schemaLanguage">the list of available
      *                          schema languages</a> for the possible values.
      *
-     * @param factoryClassName fully qualified factory class name that provides implementation of <code>javax.xml.validation.SchemaFactory</code>.
+     * @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.validation.SchemaFactory}.
      *
-     * @param classLoader <code>ClassLoader</code> used to load the factory class. If <code>null</code>
-     *                     current <code>Thread</code>'s context classLoader is used to load the factory class.
+     * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+     *                     current {@code Thread}'s context classLoader is used to load the factory class.
      *
-     * @return New instance of a <code>SchemaFactory</code>
+     * @return New instance of a {@code SchemaFactory}
      *
      * @throws IllegalArgumentException
-     *                   if <code>factoryClassName</code> is <code>null</code>, or
+     *                   if {@code factoryClassName} is {@code null}, or
      *                   the factory class cannot be loaded, instantiated or doesn't
-     *                   support the schema language specified in <code>schemLanguage</code>
+     *                   support the schema language specified in {@code schemLanguage}
      *                   parameter.
      *
      * @throws NullPointerException
-     *      If the <code>schemaLanguage</code> parameter is null.
+     *      If the {@code schemaLanguage} parameter is null.
      *
      * @see #newInstance(String schemaLanguage)
      *
@@ -299,16 +299,16 @@
     }
 
     /**
-     * <p>Is specified schema supported by this <code>SchemaFactory</code>?</p>
+     * Is specified schema supported by this {@code SchemaFactory}?
      *
-     * @param schemaLanguage Specifies the schema language which the returned <code>SchemaFactory</code> will understand.
-     *    <code>schemaLanguage</code> must specify a <a href="#schemaLanguage">valid</a> schema language.
+     * @param schemaLanguage Specifies the schema language which the returned {@code SchemaFactory} will understand.
+     *    {@code schemaLanguage} must specify a <a href="#schemaLanguage">valid</a> schema language.
      *
-     * @return <code>true</code> if <code>SchemaFactory</code> supports <code>schemaLanguage</code>, else <code>false</code>.
+     * @return {@code true} if {@code SchemaFactory} supports {@code schemaLanguage}, else {@code false}.
      *
-     * @throws NullPointerException If <code>schemaLanguage</code> is <code>null</code>.
-     * @throws IllegalArgumentException If <code>schemaLanguage.length() == 0</code>
-     *   or <code>schemaLanguage</code> does not specify a <a href="#schemaLanguage">valid</a> schema language.
+     * @throws NullPointerException If {@code schemaLanguage} is {@code null}.
+     * @throws IllegalArgumentException If {@code schemaLanguage.length() == 0}
+     *   or {@code schemaLanguage} does not specify a <a href="#schemaLanguage">valid</a> schema language.
      */
     public abstract boolean isSchemaLanguageSupported(String schemaLanguage);
 
@@ -320,7 +320,7 @@
      * temporarily be unable to return its value.
      *
      * <p>Implementors are free (and encouraged) to invent their own features,
-     * using names built on their own URIs.</p>
+     * using names built on their own URIs.
      *
      * @param name The feature name, which is a non-null fully-qualified URI.
      *
@@ -331,7 +331,7 @@
      * @throws SAXNotSupportedException When the
      *   {@link SchemaFactory} recognizes the feature name but
      *   cannot determine its value at this time.
-     * @throws NullPointerException If <code>name</code> is <code>null</code>.
+     * @throws NullPointerException If {@code name} is {@code null}.
      *
      * @see #setFeature(String, boolean)
      */
@@ -345,38 +345,37 @@
     }
 
     /**
-     * <p>Set a feature for this <code>SchemaFactory</code>,
+     * Set a feature for this {@code SchemaFactory},
      * {@link Schema}s created by this factory, and by extension,
      * {@link Validator}s and {@link ValidatorHandler}s created by
      * those {@link Schema}s.
-     * </p>
      *
      * <p>Implementors and developers should pay particular attention
      * to how the special {@link Schema} object returned by {@link
      * #newSchema()} is processed. In some cases, for example, when the
-     * <code>SchemaFactory</code> and the class actually loading the
+     * {@code SchemaFactory} and the class actually loading the
      * schema come from different implementations, it may not be possible
-     * for <code>SchemaFactory</code> features to be inherited automatically.
+     * for {@code SchemaFactory} features to be inherited automatically.
      * Developers should
      * make sure that features, such as secure processing, are explicitly
-     * set in both places.</p>
+     * set in both places.
      *
      * <p>The feature name is any fully-qualified URI. It is
      * possible for a {@link SchemaFactory} to expose a feature value but
-     * to be unable to change the current value.</p>
+     * to be unable to change the current value.
      *
      * <p>All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
-     * When the feature is:</p>
+     * When the feature is:
      * <ul>
      *   <li>
-     *     <code>true</code>: the implementation will limit XML processing to conform to implementation limits.
+     *     {@code true}: the implementation will limit XML processing to conform to implementation limits.
      *     Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
      *     If XML processing is limited for security reasons, it will be reported via a call to the registered
      *    {@link ErrorHandler#fatalError(SAXParseException exception)}.
      *     See {@link #setErrorHandler(ErrorHandler errorHandler)}.
      *   </li>
      *   <li>
-     *     <code>false</code>: the implementation will processing XML according to the XML specifications without
+     *     {@code false}: the implementation will processing XML according to the XML specifications without
      *     regard to possible implementation limits.
      *   </li>
      * </ul>
@@ -389,7 +388,7 @@
      * @throws SAXNotSupportedException When the
      *   {@link SchemaFactory} recognizes the feature name but
      *   cannot set the requested value.
-     * @throws NullPointerException If <code>name</code> is <code>null</code>.
+     * @throws NullPointerException If {@code name} is {@code null}.
      *
      * @see #getFeature(String)
      */
@@ -405,15 +404,15 @@
     /**
      * Set the value of a property.
      *
-     * <p>The property name is any fully-qualified URI.  It is
+     * <p>The property name is any fully-qualified URI. It is
      * possible for a {@link SchemaFactory} to recognize a property name but
-     * to be unable to change the current value.</p>
+     * to be unable to change the current value.
      *
      * <p>
      * All implementations that implement JAXP 1.5 or newer are required to
      * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} and
      * {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} properties.
-     * </p>
+     *
      * <ul>
      *   <li>
      *      <p>Access to external DTDs in Schema files is restricted to the protocols
@@ -421,14 +420,14 @@
      *      If access is denied during the creation of new Schema due to the restriction
      *      of this property, {@link org.xml.sax.SAXException} will be thrown by the
      *      {@link #newSchema(Source)} or {@link #newSchema(File)}
-     *      or {@link #newSchema(URL)} or  or {@link #newSchema(Source[])} method.</p>
+     *      or {@link #newSchema(URL)} or {@link #newSchema(Source[])} method.
      *
      *      <p>Access to external DTDs in xml source files is restricted to the protocols
      *      specified by the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property.
      *      If access is denied during validation due to the restriction
      *      of this property, {@link org.xml.sax.SAXException} will be thrown by the
      *      {@link javax.xml.validation.Validator#validate(Source)} or
-     *      {@link javax.xml.validation.Validator#validate(Source, Result)} method.</p>
+     *      {@link javax.xml.validation.Validator#validate(Source, Result)} method.
      *
      *      <p>Access to external reference set by the schemaLocation attribute is
      *      restricted to the protocols specified by the
@@ -436,7 +435,7 @@
      *      If access is denied during validation due to the restriction of this property,
      *      {@link org.xml.sax.SAXException} will be thrown by the
      *      {@link javax.xml.validation.Validator#validate(Source)} or
-     *      {@link javax.xml.validation.Validator#validate(Source, Result)} method.</p>
+     *      {@link javax.xml.validation.Validator#validate(Source, Result)} method.
      *
      *      <p>Access to external reference set by the Import
      *      and Include element is restricted to the protocols specified by the
@@ -444,7 +443,7 @@
      *      If access is denied during the creation of new Schema due to the restriction
      *      of this property, {@link org.xml.sax.SAXException} will be thrown by the
      *      {@link #newSchema(Source)} or {@link #newSchema(File)}
-     *      or {@link #newSchema(URL)} or {@link #newSchema(Source[])} method.</p>
+     *      or {@link #newSchema(URL)} or {@link #newSchema(Source[])} method.
      *   </li>
      * </ul>
      *
@@ -456,7 +455,7 @@
      * @throws SAXNotSupportedException When the
      *   {@link SchemaFactory} recognizes the property name but
      *   cannot set the requested value.
-     * @throws NullPointerException If <code>name</code> is <code>null</code>.
+     * @throws NullPointerException If {@code name} is {@code null}.
      */
     public void setProperty(String name, Object object)
         throws SAXNotRecognizedException, SAXNotSupportedException {
@@ -472,13 +471,13 @@
      *
      * <p>The property name is any fully-qualified URI.  It is
      * possible for a {@link SchemaFactory} to recognize a property name but
-     * temporarily be unable to return its value.</p>
+     * temporarily be unable to return its value.
      *
      * <p>{@link SchemaFactory}s are not required to recognize any specific
-     * property names.</p>
+     * property names.
      *
      * <p>Implementors are free (and encouraged) to invent their own properties,
-     * using names built on their own URIs.</p>
+     * using names built on their own URIs.
      *
      * @param name The property name, which is a non-null fully-qualified URI.
      *
@@ -489,7 +488,7 @@
      * @throws SAXNotSupportedException When the
      *   XMLReader recognizes the property name but
      *   cannot determine its value at this time.
-     * @throws NullPointerException If <code>name</code> is <code>null</code>.
+     * @throws NullPointerException If {@code name} is {@code null}.
      *
      * @see #setProperty(String, Object)
      */
@@ -504,7 +503,7 @@
 
     /**
      * Sets the {@link ErrorHandler} to receive errors encountered
-     * during the <code>newSchema</code> method invocation.
+     * during the {@code newSchema} method invocation.
      *
      * <p>
      * Error handler can be used to customize the error handling process
@@ -521,7 +520,7 @@
      * <p>
      * If any {@link Throwable} (or instances of its derived classes)
      * is thrown from an {@link ErrorHandler},
-     * the caller of the <code>newSchema</code> method will be thrown
+     * the caller of the {@code newSchema} method will be thrown
      * the same {@link Throwable} object.
      *
      * <p>
@@ -557,7 +556,7 @@
      * {@link ValidatorHandler}s that are created from this {@link SchemaFactory}.
      *
      * @param errorHandler A new error handler to be set.
-     *   This parameter can be <code>null</code>.
+     *   This parameter can be {@code null}.
      */
     public abstract void setErrorHandler(ErrorHandler errorHandler);
 
@@ -583,7 +582,7 @@
      * when it needs to locate external resources while parsing schemas,
      * although exactly what constitutes "locating external resources" is
      * up to each schema language. For example, for W3C XML Schema,
-     * this includes files <code>&lt;include></code>d or <code>&lt;import></code>ed,
+     * this includes files {@code <include>}d or {@code <import>}ed,
      * and DTD referenced from schema files, etc.
      *
      * <p>
@@ -607,7 +606,7 @@
      * If a {@link LSResourceResolver} throws a {@link RuntimeException}
      *  (or instances of its derived classes),
      * then the {@link SchemaFactory} will abort the parsing and
-     * the caller of the <code>newSchema</code> method will receive
+     * the caller of the {@code newSchema} method will receive
      * the same {@link RuntimeException}.
      *
      * <p>
@@ -635,48 +634,48 @@
     public abstract LSResourceResolver getResourceResolver();
 
     /**
-     * <p>Parses the specified source as a schema and returns it as a schema.</p>
+     * Parses the specified source as a schema and returns it as a schema.
      *
-     * <p>This is a convenience method for {@link #newSchema(Source[] schemas)}.</p>
+     * <p>This is a convenience method for {@link #newSchema(Source[] schemas)}.
      *
      * @param schema Source that represents a schema.
      *
-     * @return New <code>Schema</code> from parsing <code>schema</code>.
+     * @return New {@code Schema} from parsing {@code schema}.
      *
      * @throws SAXException If a SAX error occurs during parsing.
-     * @throws NullPointerException if <code>schema</code> is null.
+     * @throws NullPointerException if {@code schema} is null.
      */
     public Schema newSchema(Source schema) throws SAXException {
         return newSchema(new Source[]{schema});
     }
 
     /**
-     * <p>Parses the specified <code>File</code> as a schema and returns it as a <code>Schema</code>.</p>
+     * Parses the specified {@code File} as a schema and returns it as a {@code Schema}.
      *
-     * <p>This is a convenience method for {@link #newSchema(Source schema)}.</p>
+     * <p>This is a convenience method for {@link #newSchema(Source schema)}.
      *
      * @param schema File that represents a schema.
      *
-     * @return New <code>Schema</code> from parsing <code>schema</code>.
+     * @return New {@code Schema} from parsing {@code schema}.
      *
      * @throws SAXException If a SAX error occurs during parsing.
-     * @throws NullPointerException if <code>schema</code> is null.
+     * @throws NullPointerException if {@code schema} is null.
      */
     public Schema newSchema(File schema) throws SAXException {
         return newSchema(new StreamSource(schema));
     }
 
     /**
-     * <p>Parses the specified <code>URL</code> as a schema and returns it as a <code>Schema</code>.</p>
+     * Parses the specified {@code URL} as a schema and returns it as a {@code Schema}.
      *
-     * <p>This is a convenience method for {@link #newSchema(Source schema)}.</p>
+     * <p>This is a convenience method for {@link #newSchema(Source schema)}.
      *
-     * @param schema <code>URL</code> that represents a schema.
+     * @param schema {@code URL} that represents a schema.
      *
-     * @return New <code>Schema</code> from parsing <code>schema</code>.
+     * @return New {@code Schema} from parsing {@code schema}.
      *
      * @throws SAXException If a SAX error occurs during parsing.
-     * @throws NullPointerException if <code>schema</code> is null.
+     * @throws NullPointerException if {@code schema} is null.
      */
     public Schema newSchema(URL schema) throws SAXException {
         return newSchema(new StreamSource(schema.toExternalForm()));
@@ -710,7 +709,7 @@
      * regard.  While a processor should be consistent in its treatment of
      * JAXP schema sources and XML Schema imports, the behaviour between
      * JAXP-compliant parsers may vary; in particular, parsers may choose
-     * to ignore all but the first &lt;import> for a given namespace,
+     * to ignore all but the first {@code <import>} for a given namespace,
      * regardless of information provided in schemaLocation.
      *
      * <p>
@@ -721,7 +720,7 @@
      * <h2>RELAX NG</h2>
      *
      * <p>For RELAX NG, this method must throw {@link UnsupportedOperationException}
-     * if <code>schemas.length!=1</code>.
+     * if {@code schemas.length!=1}.
      *
      *
      * @param schemas
@@ -748,7 +747,7 @@
      *      When an {@link ErrorHandler} is set, errors are reported to
      *      there first. See {@link #setErrorHandler(ErrorHandler)}.
      * @throws NullPointerException
-     *      If the <code>schemas</code> parameter itself is null or
+     *      If the {@code schemas} parameter itself is null or
      *      any item in the array is null.
      * @throws IllegalArgumentException
      *      If any item in the array is not recognized by this method.
@@ -765,7 +764,7 @@
      * is created.
      *
      * <p>Also, implementations are allowed to use implementation-specific
-     * property/feature to alter the semantics of this method.</p>
+     * property/feature to alter the semantics of this method.
      *
      * <p>Implementors and developers should pay particular attention
      * to how the features set on this {@link SchemaFactory} are
@@ -776,7 +775,7 @@
      * for {@link SchemaFactory} features to be inherited automatically.
      * Developers should
      * make sure that features, such as secure processing, are explicitly
-     * set in both places.</p>
+     * set in both places.
      *
      * <h2>W3C XML Schema 1.0</h2>
      * <p>
--- a/jaxp/src/java.xml/share/classes/javax/xml/validation/Validator.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/Validator.java	Wed Jul 05 20:30:08 2017 +0200
@@ -37,16 +37,15 @@
 import org.xml.sax.SAXNotSupportedException;
 
 /**
- * <p>A processor that checks an XML document against {@link Schema}.</p>
+ * A processor that checks an XML document against {@link Schema}.
  *
  * <p>
  * A validator object is not thread-safe and not reentrant.
  * In other words, it is the application's responsibility to make
  * sure that one {@link Validator} object is not used from
- * more than one thread at any given time, and while the <code>validate</code>
+ * more than one thread at any given time, and while the {@code validate}
  * method is invoked, applications may not recursively call
- * the <code>validate</code> method.
- * <p>
+ * the {@code validate} method.
  *
  *
  * @author  <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
@@ -57,27 +56,28 @@
     /**
      * Constructor for derived classes.
      *
-     * <p>The constructor does nothing.</p>
+     * <p>The constructor does nothing.
      *
      * <p>Derived classes must create {@link Validator} objects that have
-     * <code>null</code> {@link ErrorHandler} and
-     * <code>null</code> {@link LSResourceResolver}.
-     * </p>
+     * {@code null} {@link ErrorHandler} and
+     * {@code null} {@link LSResourceResolver}.
      */
     protected Validator() {
     }
 
         /**
-         * <p>Reset this <code>Validator</code> to its original configuration.</p>
+         * Reset this {@code Validator} to its original configuration.
          *
-         * <p><code>Validator</code> is reset to the same state as when it was created with
+         * <p>{@code Validator} is reset to the same state as when it was created with
          * {@link Schema#newValidator()}.
-         * <code>reset()</code> is designed to allow the reuse of existing <code>Validator</code>s
-         * thus saving resources associated with the creation of new <code>Validator</code>s.</p>
+         * {@code reset()} is designed to allow the reuse of existing {@code Validator}s
+         * thus saving resources associated with the creation of new {@code Validator}s.
          *
-         * <p>The reset <code>Validator</code> is not guaranteed to have the same {@link LSResourceResolver} or {@link ErrorHandler}
-         * <code>Object</code>s, e.g. {@link Object#equals(Object obj)}.  It is guaranteed to have a functionally equal
-         * <code>LSResourceResolver</code> and <code>ErrorHandler</code>.</p>
+         * <p>The reset {@code Validator} is not guaranteed to have
+         * the same {@link LSResourceResolver} or {@link ErrorHandler}
+         * {@code Object}s, e.g. {@link Object#equals(Object obj)}.
+         * It is guaranteed to have a functionally equal
+         * {@code LSResourceResolver} and {@code ErrorHandler}.
          */
         public abstract void reset();
 
@@ -86,7 +86,7 @@
      *
      * <p>This is just a convenience method for
      * {@link #validate(Source source, Result result)}
-     * with <code>result</code> of <code>null</code>.</p>
+     * with {@code result} of {@code null}.
      *
      * @param source
      *      XML to be validated. Must be an XML document or
@@ -97,7 +97,7 @@
      *      or throw an IllegalArgumentException.
      *
      * @throws IllegalArgumentException
-     *      If the <code>Source</code>
+     *      If the {@code Source}
      *      is an XML artifact that the implementation cannot
      *      validate (for example, a processing instruction).
      *
@@ -113,8 +113,8 @@
      *      {@link IOException}.
      *
      *
-     * @throws NullPointerException If <code>source</code> is
-     *   <code>null</code>.
+     * @throws NullPointerException If {@code source} is
+     *   {@code null}.
      *
      * @see #validate(Source source, Result result)
      */
@@ -125,16 +125,16 @@
     }
 
     /**
-     * <p>Validates the specified input and send the augmented validation
-     * result to the specified output.</p>
+     * Validates the specified input and send the augmented validation
+     * result to the specified output.
      *
      * <p>This method places the following restrictions on the types of
-     * the {@link Source}/{@link Result} accepted.</p>
+     * the {@link Source}/{@link Result} accepted.
      *
      * <table border=1>
      * <thead>
      *  <tr>
-     *   <th colspan="5"><code>Source</code> / <code>Result</code> Accepted</th>
+     *   <th colspan="5">{@code Source} / {@code Result} Accepted</th>
      *  </tr>
      *  <tr>
      *   <th></th>
@@ -146,7 +146,7 @@
      * </thead>
      * <tbody align="center">
      *  <tr>
-     *   <td><code>null</code></td>
+     *   <td>{@code null}</td>
      *   <td>OK</td>
      *   <td>OK</td>
      *   <td>OK</td>
@@ -155,44 +155,44 @@
      *  <tr>
      *   <th>{@link javax.xml.transform.stream.StreamResult}</th>
      *   <td>OK</td>
-     *   <td><code>IllegalArgumentException</code></td>
-     *   <td><code>IllegalArgumentException</code></td>
-     *   <td><code>IllegalArgumentException</code></td>
+     *   <td>{@code IllegalArgumentException}</td>
+     *   <td>{@code IllegalArgumentException}</td>
+     *   <td>{@code IllegalArgumentException}</td>
      *  </tr>
      *  <tr>
      *   <th>{@link javax.xml.transform.sax.SAXResult}</th>
-     *   <td><code>IllegalArgumentException</code></td>
+     *   <td>{@code IllegalArgumentException}</td>
      *   <td>OK</td>
-     *   <td><code>IllegalArgumentException</code></td>
-     *   <td><code>IllegalArgumentException</code></td>
+     *   <td>{@code IllegalArgumentException}</td>
+     *   <td>{@code IllegalArgumentException}</td>
      *  </tr>
      *  <tr>
      *   <th>{@link javax.xml.transform.dom.DOMResult}</th>
-     *   <td><code>IllegalArgumentException</code></td>
-     *   <td><code>IllegalArgumentException</code></td>
+     *   <td>{@code IllegalArgumentException}</td>
+     *   <td>{@code IllegalArgumentException}</td>
      *   <td>OK</td>
-     *   <td><code>IllegalArgumentException</code></td>
+     *   <td>{@code IllegalArgumentException}</td>
      *  </tr>
      *  <tr>
      *   <th>{@link javax.xml.transform.stax.StAXResult}</th>
-     *   <td><code>IllegalArgumentException</code></td>
-     *   <td><code>IllegalArgumentException</code></td>
-     *   <td><code>IllegalArgumentException</code></td>
+     *   <td>{@code IllegalArgumentException}</td>
+     *   <td>{@code IllegalArgumentException}</td>
+     *   <td>{@code IllegalArgumentException}</td>
      *   <td>OK</td>
      *  </tr>
      * </tbody>
      * </table>
      *
-     * <p>To validate one <code>Source</code> into another kind of
-     * <code>Result</code>, use the identity transformer (see
-     * {@link javax.xml.transform.TransformerFactory#newTransformer()}).</p>
+     * <p>To validate one {@code Source} into another kind of
+     * {@code Result}, use the identity transformer (see
+     * {@link javax.xml.transform.TransformerFactory#newTransformer()}).
      *
      * <p>Errors found during the validation is sent to the specified
-     * {@link ErrorHandler}.</p>
+     * {@link ErrorHandler}.
      *
      * <p>If a document is valid, or if a document contains some errors
-     * but none of them were fatal and the <code>ErrorHandler</code> didn't
-     * throw any exception, then the method returns normally.</p>
+     * but none of them were fatal and the {@code ErrorHandler} didn't
+     * throw any exception, then the method returns normally.
      *
      * @param source
      *      XML to be validated. Must be an XML document or
@@ -203,34 +203,34 @@
      *      or throw an IllegalArgumentException.
      *
      * @param result
-     *      The <code>Result</code> object that receives (possibly augmented)
+     *      The {@code Result} object that receives (possibly augmented)
      *      XML. This parameter can be null if the caller is not interested
      *      in it.
      *
-     *      Note that when a <code>DOMResult</code> is used,
+     *      Note that when a {@code DOMResult} is used,
      *      a validator might just pass the same DOM node from
-     *      <code>DOMSource</code> to <code>DOMResult</code>
-     *      (in which case <code>source.getNode()==result.getNode()</code>),
+     *      {@code DOMSource} to {@code DOMResult}
+     *      (in which case {@code source.getNode()==result.getNode()}),
      *      it might copy the entire DOM tree, or it might alter the
      *      node given by the source.
      *
      * @throws IllegalArgumentException
-     *      If the <code>Result</code> type doesn't match the
-     *      <code>Source</code> type of if the <code>Source</code>
+     *      If the {@code Result} type doesn't match the
+     *      {@code Source} type of if the {@code Source}
      *      is an XML artifact that the implementation cannot
      *      validate (for example, a processing instruction).
      * @throws SAXException
-     *      If the <code>ErrorHandler</code> throws a
-     *      <code>SAXException</code> or
-     *      if a fatal error is found and the <code>ErrorHandler</code> returns
+     *      If the {@code ErrorHandler} throws a
+     *      {@code SAXException} or
+     *      if a fatal error is found and the {@code ErrorHandler} returns
      *      normally.
      * @throws IOException
      *      If the validator is processing a
-     *      <code>SAXSource</code> and the
+     *      {@code SAXSource} and the
      *      underlying {@link org.xml.sax.XMLReader} throws an
-     *      <code>IOException</code>.
+     *      {@code IOException}.
      * @throws NullPointerException
-     *      If the <code>source</code> parameter is <code>null</code>.
+     *      If the {@code source} parameter is {@code null}.
      *
      * @see #validate(Source source)
      */
@@ -239,7 +239,7 @@
 
     /**
      * Sets the {@link ErrorHandler} to receive errors encountered
-     * during the <code>validate</code> method invocation.
+     * during the {@code validate} method invocation.
      *
      * <p>
      * Error handler can be used to customize the error handling process
@@ -255,7 +255,7 @@
      *
      * <p>
      * If any {@link Throwable} is thrown from an {@link ErrorHandler},
-     * the caller of the <code>validate</code> method will be thrown
+     * the caller of the {@code validate} method will be thrown
      * the same {@link Throwable} object.
      *
      * <p>
@@ -329,7 +329,7 @@
      * If a {@link LSResourceResolver} throws a {@link RuntimeException}
      *  (or instances of its derived classes),
      * then the {@link Validator} will abort the parsing and
-     * the caller of the <code>validate</code> method will receive
+     * the caller of the {@code validate} method will receive
      * the same {@link RuntimeException}.
      *
      * <p>
@@ -366,7 +366,7 @@
      * contexts, such as before, during, or after a validation.
      *
      * <p>Implementors are free (and encouraged) to invent their own features,
-     * using names built on their own URIs.</p>
+     * using names built on their own URIs.
      *
      * @param name The feature name, which is a non-null fully-qualified URI.
      *
@@ -398,14 +398,14 @@
      * <p>
      * Feature can be used to control the way a {@link Validator}
      * parses schemas, although {@link Validator}s are not required
-     * to recognize any specific feature names.</p>
+     * to recognize any specific feature names.
      *
      * <p>The feature name is any fully-qualified URI.  It is
      * possible for a {@link Validator} to expose a feature value but
      * to be unable to change the current value.
      * Some feature values may be immutable or mutable only
      * in specific contexts, such as before, during, or after
-     * a validation.</p>
+     * a validation.
      *
      * @param name The feature name, which is a non-null fully-qualified URI.
      * @param value The requested value of the feature (true or false).
@@ -438,27 +438,27 @@
      * to be unable to change the current value.
      * Some property values may be immutable or mutable only
      * in specific contexts, such as before, during, or after
-     * a validation.</p>
+     * a validation.
      *
      * <p>
      * All implementations that implement JAXP 1.5 or newer are required to
      * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} and
      * {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} properties.
-     * </p>
+     *
      * <ul>
      *   <li>
      *      <p>Access to external DTDs in source or Schema file is restricted to
      *      the protocols specified by the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD}
      *      property.  If access is denied during validation due to the restriction
      *      of this property, {@link org.xml.sax.SAXException} will be thrown by the
-     *      {@link #validate(Source)} method.</p>
+     *      {@link #validate(Source)} method.
      *
      *      <p>Access to external reference set by the schemaLocation attribute is
      *      restricted to the protocols specified by the
      *      {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} property.
      *      If access is denied during validation due to the restriction of this property,
      *      {@link org.xml.sax.SAXException} will be thrown by the
-     *      {@link #validate(Source)} method.</p>
+     *      {@link #validate(Source)} method.
      *   </li>
      * </ul>
      *
@@ -490,13 +490,13 @@
      * possible for a {@link Validator} to recognize a property name but
      * temporarily be unable to return its value.
      * Some property values may be available only in specific
-     * contexts, such as before, during, or after a validation.</p>
+     * contexts, such as before, during, or after a validation.
      *
      * <p>{@link Validator}s are not required to recognize any specific
-     * property names.</p>
+     * property names.
      *
      * <p>Implementors are free (and encouraged) to invent their own properties,
-     * using names built on their own URIs.</p>
+     * using names built on their own URIs.
      *
      * @param name The property name, which is a non-null fully-qualified URI.
      *
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPath.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPath.java	Wed Jul 05 20:30:08 2017 +0200
@@ -32,7 +32,7 @@
 /**
  * {@code XPath} provides access to the XPath evaluation environment and expressions.
  *
- * <a name="XPath-evaluation"/>
+ * <a name="XPath-evaluation"></a>
  * <table border="1" cellpadding="2">
  *   <thead>
  *     <tr>
@@ -90,7 +90,6 @@
  * more than one thread at any given time, and while the {@code evaluate}
  * method is invoked, applications may not recursively call
  * the {@code evaluate} method.
- * <p>
  *
  * @author  <a href="Norman.Walsh@Sun.com">Norman Walsh</a>
  * @author  <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
@@ -462,7 +461,6 @@
      * <pre> {@code
      *     evaluateExpression(expression, item, XPathEvaluationResult.class);
      * }</pre>
-     * <p>
      *
      * @implSpec
      * The default implementation in the XPath API is equivalent to:
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathEvaluationResult.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathEvaluationResult.java	Wed Jul 05 20:30:08 2017 +0200
@@ -32,7 +32,6 @@
  * evaluation of an XPath expression within the context of a particular node.
  * The evaluation of an XPath expression can result in various result types as
  * defined in XML Path Language (XPath) Version 1.0.
- * <p>
  *
  * @param <T> the object type returned by the XPath evaluation.
  * @see <a href="http://www.w3.org/TR/xpath">XML Path Language (XPath) Version
@@ -121,7 +120,7 @@
     public XPathResultType type();
 
     /**
-     * Returns the value of the result as the type &lt;T&gt; specified for the class.
+     * Returns the value of the result as the type {@code <T>} specified for the class.
      *
      * @return The value of the result.
      */
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathException.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathException.java	Wed Jul 05 20:30:08 2017 +0200
@@ -33,7 +33,7 @@
 import java.io.InvalidClassException;
 
 /**
- * <code>XPathException</code> represents a generic XPath exception.</p>
+ * {@code XPathException} represents a generic XPath exception.
  *
  * @author  <a href="Norman.Walsh@Sun.com">Norman Walsh</a>
  * @author <a href="mailto:Jeff.Suttor@Sun.COM">Jeff Suttor</a>
@@ -46,23 +46,23 @@
     };
 
     /**
-     * <p>Stream Unique Identifier.</p>
+     * Stream Unique Identifier.
      */
     private static final long serialVersionUID = -1837080260374986980L;
 
     /**
-     * <p>Constructs a new <code>XPathException</code>
-     * with the specified detail <code>message</code>.</p>
+     * Constructs a new {@code XPathException}
+     * with the specified detail {@code message}.
      *
-     * <p>The <code>cause</code> is not initialized.</p>
+     * <p>The {@code cause} is not initialized.
      *
-     * <p>If <code>message</code> is <code>null</code>,
-     * then a <code>NullPointerException</code> is thrown.</p>
+     * <p>If {@code message} is {@code null},
+     * then a {@code NullPointerException} is thrown.
      *
      * @param message The detail message.
      *
-     * @throws NullPointerException When <code>message</code> is
-     *   <code>null</code>.
+     * @throws NullPointerException When {@code message} is
+     *   {@code null}.
      */
     public XPathException(String message) {
         super(message);
@@ -72,15 +72,15 @@
     }
 
     /**
-     * <p>Constructs a new <code>XPathException</code>
-     * with the specified <code>cause</code>.</p>
+     * Constructs a new {@code XPathException}
+     * with the specified {@code cause}.
      *
-     * <p>If <code>cause</code> is <code>null</code>,
-     * then a <code>NullPointerException</code> is thrown.</p>
+     * <p>If {@code cause} is {@code null},
+     * then a {@code NullPointerException} is thrown.
      *
      * @param cause The cause.
      *
-     * @throws NullPointerException if <code>cause</code> is <code>null</code>.
+     * @throws NullPointerException if {@code cause} is {@code null}.
      */
     public XPathException(Throwable cause) {
         super(cause);
@@ -90,7 +90,7 @@
     }
 
     /**
-     * <p>Get the cause of this XPathException.</p>
+     * Get the cause of this XPathException.
      *
      * @return Cause of this XPathException.
      */
@@ -103,7 +103,7 @@
      * The cause is got from the parent class.
      *
      * @param out stream used for serialization.
-     * @throws IOException thrown by <code>ObjectOutputStream</code>
+     * @throws IOException thrown by {@code ObjectOutputStream}
      *
      */
     private void writeObject(ObjectOutputStream out)
@@ -120,8 +120,8 @@
      * done before.
      *
      * @param in stream used for deserialization
-     * @throws IOException thrown by <code>ObjectInputStream</code>
-     * @throws ClassNotFoundException  thrown by <code>ObjectInputStream</code>
+     * @throws IOException thrown by {@code ObjectInputStream}
+     * @throws ClassNotFoundException  thrown by {@code ObjectInputStream}
      */
     private void readObject(ObjectInputStream in)
             throws IOException, ClassNotFoundException
@@ -139,9 +139,9 @@
     }
 
     /**
-     * <p>Print stack trace to specified <code>PrintStream</code>.</p>
+     * Print stack trace to specified {@code PrintStream}.
      *
-     * @param s Print stack trace to this <code>PrintStream</code>.
+     * @param s Print stack trace to this {@code PrintStream}.
      */
     public void printStackTrace(java.io.PrintStream s) {
         if (getCause() != null) {
@@ -153,16 +153,16 @@
     }
 
     /**
-     * <p>Print stack trace to <code>System.err</code>.</p>
+     * Print stack trace to {@code System.err}.
      */
     public void printStackTrace() {
         printStackTrace(System.err);
     }
 
     /**
-     * <p>Print stack trace to specified <code>PrintWriter</code>.</p>
+     * Print stack trace to specified {@code PrintWriter}.
      *
-     * @param s Print stack trace to this <code>PrintWriter</code>.
+     * @param s Print stack trace to this {@code PrintWriter}.
      */
     public void printStackTrace(PrintWriter s) {
 
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpression.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpression.java	Wed Jul 05 20:30:08 2017 +0200
@@ -29,9 +29,9 @@
 import org.xml.sax.InputSource;
 
 /**
- * <p>{@code XPathExpression} provides access to compiled XPath expressions.</p>
+ * {@code XPathExpression} provides access to compiled XPath expressions.
  *
- * <a name="XPathExpression-evaluation"/>
+ * <a name="XPathExpression-evaluation"></a>
  * <table border="1" cellpadding="2">
  *   <thead>
  *     <tr>
@@ -54,7 +54,7 @@
  *        If the expression contains a variable reference, its value will be found through the {@link XPathVariableResolver}.
  *        An {@link XPathExpressionException} is raised if the variable resolver is undefined or
  *        the resolver returns {@code null} for the variable.
- *        The value of a variable must be immutable through the course of any single evaluation.</p>
+ *        The value of a variable must be immutable through the course of any single evaluation.
  *      </td>
  *    </tr>
  *    <tr>
@@ -62,7 +62,7 @@
  *      <td>
  *        If the expression contains a function reference, the function will be found through the {@link XPathFunctionResolver}.
  *        An {@link XPathExpressionException} is raised if the function resolver is undefined or
- *        the function resolver returns {@code null} for the function.</p>
+ *        the function resolver returns {@code null} for the function.
  *      </td>
  *    </tr>
  *    <tr>
@@ -76,9 +76,10 @@
  *      <td>
  *        This result of evaluating an expression is converted to an instance of the desired return type.
  *        Valid return types are defined in {@link XPathConstants}.
- *        Conversion to the return type follows XPath conversion rules.</p>
+ *        Conversion to the return type follows XPath conversion rules.
  *      </td>
  *    </tr>
+ *   </tbody>
  * </table>
  *
  * <p>An XPath expression is not thread-safe and not reentrant.
@@ -87,7 +88,6 @@
  * more than one thread at any given time, and while the {@code evaluate}
  * method is invoked, applications may not recursively call
  * the {@code evaluate} method.
- * <p>
  *
  * @author  <a href="mailto:Norman.Walsh@Sun.com">Norman Walsh</a>
  * @author  <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
@@ -98,10 +98,10 @@
 
 
     /**
-     * <p>Evaluate the compiled XPath expression in the specified context and return the result as the specified type.</p>
+     * Evaluate the compiled XPath expression in the specified context and return the result as the specified type.
      *
      * <p>See <a href="#XPathExpression-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
-     * variable, function and QName resolution and return type conversion.</p>
+     * variable, function and QName resolution and return type conversion.
      *
      * <p>
      * The parameter {@code item} represents the context the XPath expression
@@ -126,13 +126,13 @@
         throws XPathExpressionException;
 
     /**
-     * <p>Evaluate the compiled XPath expression in the specified context and return the result as a {@code String}.</p>
+     * Evaluate the compiled XPath expression in the specified context and return the result as a {@code String}.
      *
      * <p>This method calls {@link #evaluate(Object item, QName returnType)} with a {@code returnType} of
-     * {@link XPathConstants#STRING}.</p>
+     * {@link XPathConstants#STRING}.
      *
      * <p>See <a href="#XPathExpression-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
-     * variable, function and QName resolution and return type conversion.</p>
+     * variable, function and QName resolution and return type conversion.
      *
      * <p>
      * The parameter {@code item} represents the context the XPath expression
@@ -153,20 +153,21 @@
         throws XPathExpressionException;
 
     /**
-     * <p>Evaluate the compiled XPath expression in the context of the specified {@code InputSource} and return the result as the
-     * specified type.</p>
+     * Evaluate the compiled XPath expression in the context
+     * of the specified {@code InputSource} and return the result as the
+     * specified type.
      *
      * <p>This method builds a data model for the {@link InputSource} and calls
-     * {@link #evaluate(Object item, QName returnType)} on the resulting document object.</p>
+     * {@link #evaluate(Object item, QName returnType)} on the resulting document object.
      *
      * <p>See <a href="#XPathExpression-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
-     * variable, function and QName resolution and return type conversion.</p>
+     * variable, function and QName resolution and return type conversion.
      *
      * <p>If {@code returnType} is not one of the types defined in {@link XPathConstants},
-     * then an {@code IllegalArgumentException} is thrown.</p>
+     * then an {@code IllegalArgumentException} is thrown.
      *
      * <p>If {@code source} or {@code returnType} is {@code null},
-     * then a {@code NullPointerException} is thrown.</p>
+     * then a {@code NullPointerException} is thrown.
      *
      * @param source The {@code InputSource} of the document to evaluate over.
      * @param returnType The desired return type.
@@ -182,16 +183,17 @@
         throws XPathExpressionException;
 
     /**
-     * <p>Evaluate the compiled XPath expression in the context of the specified {@code InputSource} and return the result as a
-     * {@code String}.</p>
+     * Evaluate the compiled XPath expression in the context
+     * of the specified {@code InputSource} and return the result as a
+     * {@code String}.
      *
      * <p>This method calls {@link #evaluate(InputSource source, QName returnType)} with a {@code returnType} of
-     * {@link XPathConstants#STRING}.</p>
+     * {@link XPathConstants#STRING}.
      *
      * <p>See <a href="#XPathExpression-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
-     * variable, function and QName resolution and return type conversion.</p>
+     * variable, function and QName resolution and return type conversion.
      *
-     * <p>If {@code source} is {@code null}, then a {@code NullPointerException} is thrown.</p>
+     * <p>If {@code source} is {@code null}, then a {@code NullPointerException} is thrown.
      *
      * @param source The {@code InputSource} of the document to evaluate over.
      *
@@ -351,7 +353,6 @@
      * <pre> {@code
      *     evaluateExpression(source, XPathEvaluationResult.class);
      * }</pre>
-     * <p>
      *
      * @implSpec
      * The default implementation in the XPath API is equivalent to:
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpressionException.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathExpressionException.java	Wed Jul 05 20:30:08 2017 +0200
@@ -26,7 +26,7 @@
 package javax.xml.xpath;
 
 /**
- * <code>XPathExpressionException</code> represents an error in an XPath expression.</p>
+ * {@code XPathExpressionException} represents an error in an XPath expression.
  *
  * @author  <a href="mailto:Norman.Walsh@Sun.com">Norman Walsh</a>
  * @author  <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
@@ -35,38 +35,38 @@
 public class XPathExpressionException extends XPathException {
 
     /**
-     * <p>Stream Unique Identifier.</p>
+     * Stream Unique Identifier.
      */
     private static final long serialVersionUID = -1837080260374986980L;
 
     /**
-     * <p>Constructs a new <code>XPathExpressionException</code>
-     * with the specified detail <code>message</code>.</p>
+     * Constructs a new {@code XPathExpressionException}
+     * with the specified detail {@code message}.
      *
-     * <p>The <code>cause</code> is not initialized.</p>
+     * <p>The {@code cause} is not initialized.
      *
-     * <p>If <code>message</code> is <code>null</code>,
-     * then a <code>NullPointerException</code> is thrown.</p>
+     * <p>If {@code message} is {@code null},
+     * then a {@code NullPointerException} is thrown.
      *
      * @param message The detail message.
      *
-     * @throws NullPointerException When <code>message</code> is
-     *   <code>null</code>.
+     * @throws NullPointerException When {@code message} is
+     *   {@code null}.
      */
     public XPathExpressionException(String message) {
         super(message);
     }
 
     /**
-     * <p>Constructs a new <code>XPathExpressionException</code>
-     * with the specified <code>cause</code>.</p>
+     * Constructs a new {@code XPathExpressionException}
+     * with the specified {@code cause}.
      *
-     * <p>If <code>cause</code> is <code>null</code>,
-     * then a <code>NullPointerException</code> is thrown.</p>
+     * <p>If {@code cause} is {@code null},
+     * then a {@code NullPointerException} is thrown.
      *
      * @param cause The cause.
      *
-     * @throws NullPointerException if <code>cause</code> is <code>null</code>.
+     * @throws NullPointerException if {@code cause} is {@code null}.
      */
     public XPathExpressionException(Throwable cause) {
         super(cause);
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryConfigurationException.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFactoryConfigurationException.java	Wed Jul 05 20:30:08 2017 +0200
@@ -26,7 +26,8 @@
 package javax.xml.xpath;
 
 /**
- * <code>XPathFactoryConfigurationException</code> represents a configuration error in a <code>XPathFactory</code> environment.</p>
+ * {@code XPathFactoryConfigurationException} represents
+ * a configuration error in a {@code XPathFactory} environment.
  *
  * @author  <a href="mailto:Norman.Walsh@Sun.com">Norman Walsh</a>
  * @author  <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
@@ -35,37 +36,38 @@
 public class XPathFactoryConfigurationException extends XPathException {
 
     /**
-     * <p>Stream Unique Identifier.</p>
+     * Stream Unique Identifier.
      */
     private static final long serialVersionUID = -1837080260374986980L;
 
     /**
-     * <p>Constructs a new <code>XPathFactoryConfigurationException</code> with the specified detail <code>message</code>.</p>
+     * Constructs a new {@code XPathFactoryConfigurationException}
+     * with the specified detail {@code message}.
      *
-     * <p>The <code>cause</code> is not initialized.</p>
+     * <p>The {@code cause} is not initialized.
      *
-     * <p>If <code>message</code> is <code>null</code>,
-     * then a <code>NullPointerException</code> is thrown.</p>
+     * <p>If {@code message} is {@code null},
+     * then a {@code NullPointerException} is thrown.
      *
      * @param message The detail message.
      *
-     * @throws NullPointerException When <code>message</code> is
-     *   <code>null</code>.
+     * @throws NullPointerException When {@code message} is
+     *   {@code null}.
      */
     public XPathFactoryConfigurationException(String message) {
         super(message);
     }
 
     /**
-     * <p>Constructs a new <code>XPathFactoryConfigurationException</code>
-     * with the specified <code>cause</code>.</p>
+     * Constructs a new {@code XPathFactoryConfigurationException}
+     * with the specified {@code cause}.
      *
-     * <p>If <code>cause</code> is <code>null</code>,
-     * then a <code>NullPointerException</code> is thrown.</p>
+     * <p>If {@code cause} is {@code null},
+     * then a {@code NullPointerException} is thrown.
      *
      * @param cause The cause.
      *
-     * @throws NullPointerException if <code>cause</code> is <code>null</code>.
+     * @throws NullPointerException if {@code cause} is {@code null}.
      */
     public XPathFactoryConfigurationException(Throwable cause) {
         super(cause);
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFunctionException.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathFunctionException.java	Wed Jul 05 20:30:08 2017 +0200
@@ -26,7 +26,7 @@
 package javax.xml.xpath;
 
 /**
- * <code>XPathFunctionException</code> represents an error with an XPath function.</p>
+ * {@code XPathFunctionException} represents an error with an XPath function.
  *
  * @author  <a href="mailto:Norman.Walsh@Sun.com">Norman Walsh</a>
  * @author  <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
@@ -35,36 +35,36 @@
 public class XPathFunctionException extends XPathExpressionException {
 
     /**
-     * <p>Stream Unique Identifier.</p>
+     * Stream Unique Identifier.
      */
     private static final long serialVersionUID = -1837080260374986980L;
 
     /**
-     * <p>Constructs a new <code>XPathFunctionException</code> with the specified detail <code>message</code>.</p>
+     * Constructs a new {@code XPathFunctionException} with the specified detail {@code message}.
      *
-     * <p>The <code>cause</code> is not initialized.</p>
+     * <p>The {@code cause} is not initialized.
      *
-     * <p>If <code>message</code> is <code>null</code>,
-     * then a <code>NullPointerException</code> is thrown.</p>
+     * <p>If {@code message} is {@code null},
+     * then a {@code NullPointerException} is thrown.
      *
      * @param message The detail message.
      *
-     * @throws NullPointerException When <code>message</code> is
-     *   <code>null</code>.
+     * @throws NullPointerException When {@code message} is
+     *   {@code null}.
      */
     public XPathFunctionException(String message) {
         super(message);
     }
 
     /**
-     * <p>Constructs a new <code>XPathFunctionException</code> with the specified <code>cause</code>.</p>
+     * Constructs a new {@code XPathFunctionException} with the specified {@code cause}.
      *
-     * <p>If <code>cause</code> is <code>null</code>,
-     * then a <code>NullPointerException</code> is thrown.</p>
+     * <p>If {@code cause} is {@code null},
+     * then a {@code NullPointerException} is thrown.
      *
      * @param cause The cause.
      *
-     * @throws NullPointerException if <code>cause</code> is <code>null</code>.
+     * @throws NullPointerException if {@code cause} is {@code null}.
      */
     public XPathFunctionException(Throwable cause) {
         super(cause);
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -282,7 +282,6 @@
 <h3>5. Using the XPath API</h3>
 
 Consider the following XML document:
-<p>
 <blockquote>
 <pre>
 &lt;widgets&gt;
@@ -366,7 +365,6 @@
 specification also provides functions that returns Integer type. To facilitate
 such operations, the XPath API allows Integer and Long to be used in 
 {@code evaluateExpression} method such as the following code: 
-<p>
 <blockquote>
 <pre>
 int count = xpath.evaluate("count(/widgets/widget)", document, Integer.class);
--- a/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -21,11 +21,11 @@
       W3C IPR SOFTWARE NOTICE
     </h1>
     <h3>
-      Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
-      Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</loc>, <loc
-      href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
+      Copyright &copy; 2000 <a href="http://www.w3.org/">World Wide Web
+      Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+      Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+      National de Recherche en Informatique et en Automatique</a>, <a
+      href="http://www.keio.ac.jp/">Keio University</a>). All Rights
       Reserved.
     </h3>
     <p>
@@ -66,25 +66,25 @@
     </p>
     <ol>
       <li>
-	The full text of this NOTICE in a location viewable to users of the
-	redistributed or derivative work.
+        The full text of this NOTICE in a location viewable to users of the
+        redistributed or derivative work.
       </li>
       <li>
-	Any pre-existing intellectual property disclaimers, notices, or terms
-	and conditions. If none exist, a short notice of the following form
-	(hypertext is preferred, text is permitted) should be used within the
-	body of any redistributed or derivative code: "Copyright &copy;
-	[$date-of-software] <a href="http://www.w3.org/">World Wide Web
-	Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-	Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-	National de Recherche en Informatique et en Automatique</a>, <a
-	href="http://www.keio.ac.jp/">Keio University</a>).  All Rights
-	Reserved. http://www.w3.org/Consortium/Legal/"
+        Any pre-existing intellectual property disclaimers, notices, or terms
+        and conditions. If none exist, a short notice of the following form
+        (hypertext is preferred, text is permitted) should be used within the
+        body of any redistributed or derivative code: "Copyright &copy;
+        [$date-of-software] <a href="http://www.w3.org/">World Wide Web
+        Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+        Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+        National de Recherche en Informatique et en Automatique</a>, <a
+        href="http://www.keio.ac.jp/">Keio University</a>).  All Rights
+        Reserved. http://www.w3.org/Consortium/Legal/"
       </li>
       <li>
-	Notice of any changes or modifications to the W3C files, including the
-	date changes were made. (We recommend you provide URIs to the location
-	from which the code is derived.)
+        Notice of any changes or modifications to the W3C files, including the
+        date changes were made. (We recommend you provide URIs to the location
+        from which the code is derived.)
       </li>
     </ol>
     <p>
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/AttributeList.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/AttributeList.java	Wed Jul 05 20:30:08 2017 +0200
@@ -42,7 +42,7 @@
  *
  * <p>This is the original SAX1 interface for reporting an element's
  * attributes.  Unlike the new {@link org.xml.sax.Attributes Attributes}
- * interface, it does not support Namespace-related information.</p>
+ * interface, it does not support Namespace-related information.
  *
  * <p>When an attribute list is supplied as part of a
  * {@link org.xml.sax.DocumentHandler#startElement startElement}
@@ -51,16 +51,16 @@
  * to the parser, the attribute list is invalid.  To save a
  * persistent copy of the attribute list, use the SAX1
  * {@link org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
- * helper class.</p>
+ * helper class.
  *
  * <p>An attribute list includes only attributes that have been
- * specified or defaulted: #IMPLIED attributes will not be included.</p>
+ * specified or defaulted: #IMPLIED attributes will not be included.
  *
  * <p>There are two ways for the SAX application to obtain information
  * from the AttributeList.  First, it can iterate through the entire
- * list:</p>
+ * list:
  *
- * <pre>
+ * <pre>{@code
  * public void startElement (String name, AttributeList atts) {
  *   for (int i = 0; i < atts.getLength(); i++) {
  *     String name = atts.getName(i);
@@ -69,13 +69,13 @@
  *     [...]
  *   }
  * }
- * </pre>
+ * }</pre>
  *
  * <p>(Note that the result of getLength() will be zero if there
  * are no attributes.)
  *
  * <p>As an alternative, the application can request the value or
- * type of specific attributes:</p>
+ * type of specific attributes:
  *
  * <pre>
  * public void startElement (String name, AttributeList atts) {
@@ -107,7 +107,7 @@
      * <p>The SAX parser may provide attributes in any
      * arbitrary order, regardless of the order in which they were
      * declared or specified.  The number of attributes may be
-     * zero.</p>
+     * zero.
      *
      * @return The number of attributes in the list.
      */
@@ -120,10 +120,10 @@
      * <p>The names must be unique: the SAX parser shall not include the
      * same attribute twice.  Attributes without values (those declared
      * #IMPLIED without a value specified in the start tag) will be
-     * omitted from the list.</p>
+     * omitted from the list.
      *
      * <p>If the attribute name has a namespace prefix, the prefix
-     * will still be attached.</p>
+     * will still be attached.
      *
      * @param i The index of the attribute in the list (starting at 0).
      * @return The name of the indexed attribute, or null
@@ -138,15 +138,15 @@
      *
      * <p>The attribute type is one of the strings "CDATA", "ID",
      * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
-     * or "NOTATION" (always in upper case).</p>
+     * or "NOTATION" (always in upper case).
      *
      * <p>If the parser has not read a declaration for the attribute,
      * or if the parser does not report attribute types, then it must
      * return the value "CDATA" as stated in the XML 1.0 Recommentation
-     * (clause 3.3.3, "Attribute-Value Normalization").</p>
+     * (clause 3.3.3, "Attribute-Value Normalization").
      *
      * <p>For an enumerated attribute that is not a notation, the
-     * parser will report the type as "NMTOKEN".</p>
+     * parser will report the type as "NMTOKEN".
      *
      * @param i The index of the attribute in the list (starting at 0).
      * @return The attribute type as a string, or
@@ -162,7 +162,7 @@
      *
      * <p>If the attribute value is a list of tokens (IDREFS,
      * ENTITIES, or NMTOKENS), the tokens will be concatenated
-     * into a single string separated by whitespace.</p>
+     * into a single string separated by whitespace.
      *
      * @param i The index of the attribute in the list (starting at 0).
      * @return The attribute value as a string, or
@@ -183,10 +183,10 @@
      * Return the type of an attribute in the list (by name).
      *
      * <p>The return value is the same as the return value for
-     * getType(int).</p>
+     * getType(int).
      *
      * <p>If the attribute name has a namespace prefix in the document,
-     * the application must include the prefix here.</p>
+     * the application must include the prefix here.
      *
      * @param name The name of the attribute.
      * @return The attribute type as a string, or null if no
@@ -200,10 +200,10 @@
      * Return the value of an attribute in the list (by name).
      *
      * <p>The return value is the same as the return value for
-     * getValue(int).</p>
+     * getValue(int).
      *
      * <p>If the attribute name has a namespace prefix in the document,
-     * the application must include the prefix here.</p>
+     * the application must include the prefix here.
      *
      * @param name the name of the attribute to return
      * @return The attribute value as a string, or null if
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/ext/EntityResolver2.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/ext/EntityResolver2.java	Wed Jul 05 20:30:08 2017 +0200
@@ -61,7 +61,6 @@
  * recognized).  If that flag is unrecognized, or its value is false,
  * or the resolver does not implement this interface, then only the
  * {@link EntityResolver} method will be used.
- * </p>
  *
  * <p>That supports three categories of application that modify entity
  * resolution.  <em>Old Style</em> applications won't know about this interface;
@@ -76,7 +75,6 @@
  * They will insist that feature flag have a value of "true", and the
  * EntityResolver2 implementation they provide  might throw an exception
  * if the original SAX 1.0 style entity resolution method is invoked.
- * </p>
  *
  * @see org.xml.sax.XMLReader#setEntityResolver
  *
@@ -95,7 +93,7 @@
      * through the {@link LexicalHandler#startDTD startDTD()} method as if
      * the document text had originally included the external subset;
      * this callback is made before any internal subset data or errors
-     * are reported.</p>
+     * are reported.
      *
      * <p>This method can also be used with documents that have no DOCTYPE
      * declaration.  When the root element is encountered,
@@ -104,7 +102,7 @@
      * element is declared to be the root element, giving the effect of
      * splicing a DOCTYPE declaration at the end the prolog of a document
      * that could not otherwise be valid.  The sequence of parser callbacks
-     * in that case logically resembles this:</p>
+     * in that case logically resembles this:
      *
      * <pre>
      * ... comments and PIs from the prolog (as usual)
@@ -122,7 +120,7 @@
      * {@link #resolveEntity resolveEntity()} to gain benefits such as use
      * of local caches of DTD entities.  Also, this method will never be
      * used by a (non-validating) processor that is not including external
-     * parameter entities. </p>
+     * parameter entities.
      *
      * <p>Uses for this method include facilitating data validation when
      * interoperating with XML processors that would always require
@@ -131,12 +129,11 @@
      * Non-validation motives include forcing documents to include DTDs so
      * that attributes are handled consistently.
      * For example, an XPath processor needs to know which attibutes have
-     * type "ID" before it can process a widely used type of reference.</p>
+     * type "ID" before it can process a widely used type of reference.
      *
      * <p><strong>Warning:</strong> Returning an external subset modifies
      * the input document.  By providing definitions for general entities,
      * it can make a malformed document appear to be well formed.
-     * </p>
      *
      * @param name Identifies the document root element.  This name comes
      *  from a DOCTYPE declaration (where available) or from the actual
@@ -166,8 +163,8 @@
      * This method provides more flexibility than the {@link EntityResolver}
      * interface, supporting implementations of more complex catalogue
      * schemes such as the one defined by the <a href=
-        "http://www.oasis-open.org/committees/entity/spec-2001-08-06.html"
-        >OASIS XML Catalogs</a> specification.</p>
+     *   "http://www.oasis-open.org/committees/entity/spec-2001-08-06.html"
+     *   >OASIS XML Catalogs</a> specification.
      *
      * <p>Parsers configured to use this resolver method will call it
      * to determine the input source to use for any external entity
@@ -176,13 +173,13 @@
      * by {@link #getExternalSubset getExternalSubset()}.
      * When a (non-validating) processor is configured not to include
      * a class of entities (parameter or general) through use of feature
-     * flags, this method is not invoked for such entities.  </p>
+     * flags, this method is not invoked for such entities.
      *
      * <p>Note that the entity naming scheme used here is the same one
      * used in the {@link LexicalHandler}, or in the {@link
-        org.xml.sax.ContentHandler#skippedEntity
-        ContentHandler.skippedEntity()}
-     * method. </p>
+     *   org.xml.sax.ContentHandler#skippedEntity
+     *   ContentHandler.skippedEntity()}
+     * method.
      *
      * @param name Identifies the external entity being resolved.
      *  Either "[dtd]" for the external subset, or a name starting
@@ -196,7 +193,7 @@
      *  are interpreted.  This is always an absolute URI, unless it is
      *  null (likely because the XMLReader was given an InputSource without
      *  one).  This URI is defined by the XML specification to be the one
-     *  associated with the "&lt;" starting the relevant declaration.
+     *  associated with the "{@literal <}" starting the relevant declaration.
      * @param systemId The system identifier of the external entity
      *  being referenced; either a relative or absolute URI.
      *  This is never null when invoked by a SAX2 parser; only declared
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -49,7 +49,7 @@
  * </blockquote>
  *
  * <p>This class contains static methods for creating an XML reader
- * from an explicit class name, or based on runtime defaults:</p>
+ * from an explicit class name, or based on runtime defaults:
  *
  * <pre>
  * try {
@@ -64,8 +64,8 @@
  * <em>createXMLReader</em> to handle cases where the external
  * configuration mechanisms aren't set up.  That method should do its
  * best to return a parser when one is in the class path, even when
- * nothing bound its class name to <code>org.xml.sax.driver</code> so
- * those configuration mechanisms would see it.</p>
+ * nothing bound its class name to {@code org.xml.sax.driver} so
+ * those configuration mechanisms would see it.
  *
  * @since 1.4, SAX 2.0
  * @author David Megginson, David Brownell
@@ -76,7 +76,7 @@
     /**
      * Private constructor.
      *
-     * <p>This constructor prevents the class from being instantiated.</p>
+     * <p>This constructor prevents the class from being instantiated.
      */
     private XMLReaderFactory ()
     {
@@ -91,9 +91,10 @@
      * Attempt to create an XMLReader from system defaults.
      * In environments which can support it, the name of the XMLReader
      * class is determined by trying each these options in order, and
-     * using the first one which succeeds:</p> <ul>
+     * using the first one which succeeds:
+     * <ul>
      *
-     * <li>If the system property <code>org.xml.sax.driver</code>
+     * <li>If the system property {@code org.xml.sax.driver}
      * has a value, that is used as an XMLReader class name. </li>
      *
      * <li>The JAR "Services API" is used to look for a class name
@@ -107,14 +108,13 @@
      * <li>Finally, if {@link ParserFactory#makeParser()} can
      * return a system default SAX1 parser, that parser is wrapped in
      * a {@link ParserAdapter}.  (This is a migration aid for SAX1
-     * environments, where the <code>org.xml.sax.parser</code> system
+     * environments, where the {@code org.xml.sax.parser} system
      * property will often be usable.) </li>
-     *
      * </ul>
      *
      * <p> In environments such as small embedded systems, which can not
      * support that flexibility, other mechanisms to determine the default
-     * may be used. </p>
+     * may be used.
      *
      * <p>Note that many Java environments allow system properties to be
      * initialized on a command line.  This means that <em>in most cases</em>
@@ -122,7 +122,6 @@
      * method will succeed, except when security policies intervene.
      * This will also maximize application portability to older SAX
      * environments, with less robust implementations of this method.
-     * </p>
      *
      * @return A new XMLReader.
      * @exception org.xml.sax.SAXException If no default XMLReader class
@@ -204,11 +203,11 @@
      * Attempt to create an XML reader from a class name.
      *
      * <p>Given a class name, this method attempts to load
-     * and instantiate the class as an XML reader.</p>
+     * and instantiate the class as an XML reader.
      *
      * <p>Note that this method will not be usable in environments where
      * the caller (perhaps an applet) is not permitted to load classes
-     * dynamically.</p>
+     * dynamically.
      *
      * @return A new XML reader.
      * @exception org.xml.sax.SAXException If the class cannot be
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/AstroTest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package test.astro;
+
+import static java.lang.String.valueOf;
+import static org.testng.Assert.assertEquals;
+import static test.astro.AstroConstants.ASTROCAT;
+import static test.astro.AstroConstants.GOLDEN_DIR;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.List;
+
+import javax.xml.transform.sax.TransformerHandler;
+
+import jaxp.library.JAXPFileBaseTest;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+/*
+ * @summary run astro application, test xslt
+ *
+ * There are vast amounts of textual astronomical data, typically user is
+ * interested in a small subset, which is the result from carrying out a query.
+ * A query can be composed of one or more filters, for example, the user could
+ * query the database for all stars of visual magnitude down to 6.5 that lie
+ * between right ascensions 0 h to 2 h, and between declinations of 45 to 90 degrees.
+ *
+ * Astro application uses JAXP to query astronomical data saved in an XML dataset.
+ * A FilterFactory implementation creates filter(A filter is an instance of a JAXP
+ * TransformerHandler) from an XSL stylesheet.
+ * A InputSourceFactory implementation creates a new sax input source from an XML file.
+ * AstroProcessor leverages InputSourceFactory to parse catalog.xml, which saves
+ * textual astronomical data, and then creates filters with specified parameters
+ * from FilterFactory, all of the filters are chained together, AstroProcessor
+ * appends the HTML filter at the end of filter chain, and hooks up the chain to
+ * the input source, finally processes and outputs to the user specified output file.
+ *
+ * AstroTest drives AstroProcessor to run the specified queries(total 4 in setup),
+ * and then compares the output with the golden files to determine PASS or FAIL.
+ * It provides variant implementations of FilterFactory and InputSourceFactory to
+ * AstroProcessor to test different JAXP classes and features.
+ *
+ */
+public class AstroTest extends JAXPFileBaseTest {
+    private FiltersAndGolden[] data;
+
+    @BeforeClass
+    public void setup() throws Exception {
+        data = new FiltersAndGolden[4];
+        data[0] = new FiltersAndGolden(getGoldenFileContent(1), astro -> astro.getRAFilter(0.106, 0.108));
+        data[1] = new FiltersAndGolden(getGoldenFileContent(2), astro -> astro.getStellarTypeFilter("K0IIIbCN-0.5"));
+        data[2] = new FiltersAndGolden(getGoldenFileContent(3), astro -> astro.getStellarTypeFilter("G"), astro -> astro.getDecFilter(-5.0, 60.0));
+        data[3] = new FiltersAndGolden(getGoldenFileContent(4), astro -> astro.getRADECFilter(0.084, 0.096, -5.75, 14.0));
+    }
+
+    /*
+     * Provide permutations of InputSourceFactory and FilterFactory for test.
+     */
+    @DataProvider(name = "factories")
+    public Object[][] getQueryFactories() {
+        return new Object[][] {
+                { StreamFilterFactoryImpl.class, InputSourceFactoryImpl.class },
+                { SAXFilterFactoryImpl.class, InputSourceFactoryImpl.class },
+                { DOMFilterFactoryImpl.class, InputSourceFactoryImpl.class },
+                { TemplatesFilterFactoryImpl.class, InputSourceFactoryImpl.class },
+                { StreamFilterFactoryImpl.class, DOML3InputSourceFactoryImpl.class } };
+    }
+
+    @Test(dataProvider = "factories")
+    public void test(Class<FilterFactory> fFactClass, Class<InputSourceFactory> isFactClass) throws Exception {
+        System.out.println(fFactClass.getName() +" : " + isFactClass.getName());
+        AstroProcessor astro = new AstroProcessor(fFactClass, ASTROCAT, isFactClass);
+
+        for (int i = 0; i < data.length; i++) {
+            runProcess(astro, valueOf(i + 1), data[i].getGolden(), data[i].getFilters());
+        }
+    }
+
+    private void runProcess(AstroProcessor astro, String processNum, List<String> goldenfileContent, FilterCreator... filterCreators) throws Exception {
+        System.out.println("run process " + processNum);
+        TransformerHandler[] filters = new TransformerHandler[filterCreators.length];
+        for (int i = 0; i < filterCreators.length; i++)
+            filters[i] = filterCreators[i].createFilter(astro);
+
+        String outputfile = Files.createTempFile(Paths.get("").toAbsolutePath(), "query" + processNum + ".out.", null).toString();
+        System.out.println("output file: " + outputfile);
+        astro.process(outputfile, filters);
+        assertEquals(Files.readAllLines(Paths.get(outputfile)), goldenfileContent);
+    }
+
+    private List<String>  getGoldenFileContent(int num) throws IOException {
+        return Files.readAllLines(Paths.get(GOLDEN_DIR + "query" + num + ".out"));
+    }
+
+    @FunctionalInterface
+    private interface FilterCreator {
+        TransformerHandler createFilter(AstroProcessor astro) throws Exception;
+    }
+
+    private static class FiltersAndGolden {
+        private FilterCreator[] filters;
+        private List<String> golden;
+
+        FiltersAndGolden(List<String> golden, FilterCreator... filters) {
+            this.filters = filters;
+            this.golden = golden;
+        }
+
+        FilterCreator[] getFilters() {
+            return filters;
+        }
+
+        List<String> getGolden() {
+            return golden;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/DocumentLSTest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static jaxp.library.JAXPTestUtilities.filenameToURL;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
+import static org.w3c.dom.ls.DOMImplementationLS.MODE_SYNCHRONOUS;
+import static test.astro.AstroConstants.ASTROCAT;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Writer;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import jaxp.library.JAXPFileBaseTest;
+
+import org.testng.annotations.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSOutput;
+import org.w3c.dom.ls.LSParser;
+import org.w3c.dom.ls.LSSerializer;
+
+/*
+ * @summary org.w3c.dom.ls tests
+ */
+public class DocumentLSTest extends JAXPFileBaseTest {
+    /*
+     * Test creating an empty Document
+     */
+    @Test
+    public void testNewDocument() throws ParserConfigurationException {
+        Document doc = getDocumentBuilder().newDocument();
+        assertNull(doc.getDocumentElement());
+    }
+
+    /*
+     * Test creating an LSInput instance, and parsing ByteStream
+     */
+    @Test
+    public void testLSInputParsingByteStream() throws Exception {
+        DOMImplementationLS impl = (DOMImplementationLS) getDocumentBuilder().getDOMImplementation();
+        LSParser domParser = impl.createLSParser(MODE_SYNCHRONOUS, null);
+        LSInput src = impl.createLSInput();
+
+        try (InputStream is = new FileInputStream(ASTROCAT)) {
+            src.setByteStream(is);
+            assertNotNull(src.getByteStream());
+            // set certified accessor methods
+            boolean origCertified = src.getCertifiedText();
+            src.setCertifiedText(true);
+            assertTrue(src.getCertifiedText());
+            src.setCertifiedText(origCertified); // set back to orig
+
+            src.setSystemId(filenameToURL(ASTROCAT));
+
+            Document doc = domParser.parse(src);
+            Element result = doc.getDocumentElement();
+            assertEquals(result.getTagName(), "stardb");
+        }
+    }
+
+    /*
+     * Test creating an LSInput instance, and parsing String
+     */
+    @Test
+    public void testLSInputParsingString() throws Exception {
+        DOMImplementationLS impl = (DOMImplementationLS) getDocumentBuilder().getDOMImplementation();
+        String xml = "<?xml version='1.0'?><test>runDocumentLS_Q6</test>";
+
+        LSParser domParser = impl.createLSParser(MODE_SYNCHRONOUS, null);
+        LSSerializer domSerializer = impl.createLSSerializer();
+        // turn off xml decl in serialized string for comparison
+        domSerializer.getDomConfig().setParameter("xml-declaration", Boolean.FALSE);
+        LSInput src = impl.createLSInput();
+        src.setStringData(xml);
+        assertEquals(src.getStringData(), xml);
+
+        Document doc = domParser.parse(src);
+        String result = domSerializer.writeToString(doc);
+
+        assertEquals(result, "<test>runDocumentLS_Q6</test>");
+    }
+
+    /*
+     * Test writing with an LSOutput instance
+     */
+    @Test
+    public void testLSOutput() throws Exception {
+        DocumentBuilder db = getDocumentBuilder();
+        // Create the Document using the supplied builder...
+        Document doc = db.parse(ASTROCAT);
+
+        DOMImplementationLS impl = null;
+
+        impl = (DOMImplementationLS) db.getDOMImplementation();
+        LSSerializer domSerializer = impl.createLSSerializer();
+        MyDOMOutput mydomoutput = new MyDOMOutput();
+        try (OutputStream os = new FileOutputStream("test.out")) {
+            mydomoutput.setByteStream(os);
+            mydomoutput.setEncoding("UTF-8");
+            assertTrue(domSerializer.write(doc, mydomoutput));
+        }
+    }
+
+    private static class MyDOMOutput implements LSOutput {
+        private OutputStream bytestream = null;
+        private String encoding = null;
+        private String sysId = null;
+        private Writer writer = null;
+
+        public OutputStream getByteStream() {
+            return bytestream;
+        }
+
+        public Writer getCharacterStream() {
+            return writer;
+        }
+
+        public String getEncoding() {
+            return encoding;
+        }
+
+        public String getSystemId() {
+            return sysId;
+        }
+
+        public void setByteStream(OutputStream bs) {
+            bytestream = bs;
+        }
+
+        public void setCharacterStream(Writer cs) {
+            writer = cs;
+        }
+
+        public void setEncoding(String enc) {
+            encoding = enc;
+        }
+
+        public void setSystemId(String sysId) {
+            this.sysId = sysId;
+        }
+    }
+
+    private DocumentBuilder getDocumentBuilder() throws ParserConfigurationException {
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        dbf.setNamespaceAware(true);
+        return dbf.newDocumentBuilder();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/NamespaceContextTest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static javax.xml.XMLConstants.DEFAULT_NS_PREFIX;
+import static javax.xml.XMLConstants.NULL_NS_URI;
+import static org.testng.Assert.assertEquals;
+
+import javax.xml.namespace.QName;
+
+import jaxp.library.JAXPBaseTest;
+
+import org.testng.annotations.Test;
+
+/*
+ * @summary javax.xml.namespace.QName tests
+ */
+public class NamespaceContextTest extends JAXPBaseTest {
+    private static final String PREFIX = "astro";
+    private static final String LOCAL_PART = "stardb";
+    private static final String NS_URI = "http://www.astro.com";
+
+    /*
+     * Test QName(String, String, String) and accessors.
+     */
+    @Test
+    public void testQNameConstructor() {
+        QName qname = new QName(NS_URI, LOCAL_PART, PREFIX);
+        assertEquals(qname.getNamespaceURI(), NS_URI);
+        assertEquals(qname.getLocalPart(), LOCAL_PART);
+        assertEquals(qname.getPrefix(), PREFIX);
+    }
+
+    /*
+     * Construct QName(String localpart), then test for default ns_uri and
+     * prefix constant.
+     */
+    @Test
+    public void testDefaultFields() {
+        QName qname = new QName(LOCAL_PART); // just the local part specified
+        assertEquals(qname.getNamespaceURI(), NULL_NS_URI);
+        assertEquals(qname.getLocalPart(), LOCAL_PART);
+        assertEquals(qname.getPrefix(), DEFAULT_NS_PREFIX);
+    }
+
+    /*
+     * Construct QName(String ns,String localpart), then test for default prefix
+     * constant.
+     */
+    @Test
+    public void testDefaultPrefix() {
+        QName qname = new QName(NS_URI, LOCAL_PART); // no pref
+        assertEquals(qname.getNamespaceURI(), NS_URI);
+        assertEquals(qname.getLocalPart(), LOCAL_PART);
+        assertEquals(qname.getPrefix(), DEFAULT_NS_PREFIX);
+    }
+
+    /*
+     * Round trip testing of QName to String, String to QName and test for
+     * equality.
+     */
+    @Test
+    public void testQNameString() {
+        QName qname = new QName(NS_URI, LOCAL_PART, PREFIX);
+        assertEquals(QName.valueOf(qname.toString()), qname);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/SAX201Test.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import javax.xml.parsers.SAXParserFactory;
+
+import jaxp.library.JAXPBaseTest;
+
+import org.testng.annotations.Test;
+import org.xml.sax.XMLReader;
+
+/*
+ * @summary verify SAX 2.0.1 allows to use null in setters
+ */
+public class SAX201Test extends JAXPBaseTest {
+    @Test
+    public void test() throws Exception {
+        SAXParserFactory spf = SAXParserFactory.newInstance();
+        spf.setNamespaceAware(true);
+        XMLReader reader = spf.newSAXParser().getXMLReader();
+        reader.setErrorHandler(null); // SAX 2.0.1 allows
+        reader.setContentHandler(null); // SAX 2.0.1 allows
+        reader.setEntityResolver(null); // SAX 2.0.1 allows
+        reader.setDTDHandler(null); // SAX 2.0.1 allows
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/SchemaValidationTest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
+import static test.astro.AstroConstants.ASTROCAT;
+import static test.astro.AstroConstants.JAXP_SCHEMA_LANGUAGE;
+import static test.astro.AstroConstants.JAXP_SCHEMA_SOURCE;
+
+import java.io.File;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import jaxp.library.JAXPFileBaseTest;
+
+import org.testng.annotations.Test;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/*
+ * @summary test parser sets schema related properties to do validation
+ */
+public class SchemaValidationTest extends JAXPFileBaseTest {
+    /*
+     * Only set the schemaLanguage, without setting schemaSource. It should
+     * work.
+     */
+    @Test
+    public void testSchemaValidation() throws Exception {
+        SAXParser sp = getValidatingParser();
+        sp.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
+        sp.parse(new File(ASTROCAT), new DefaultHandler());
+    }
+
+    /*
+     * Test SAXException shall be thrown if schemaSource is set but
+     * schemaLanguage is not set.
+     */
+    @Test(expectedExceptions = SAXException.class)
+    public void testSchemaValidationNeg() throws Exception {
+        SAXParser sp = getValidatingParser();
+        sp.setProperty(JAXP_SCHEMA_SOURCE, "catalog.xsd");
+        sp.parse(new File(ASTROCAT), new DefaultHandler());
+    }
+
+    private SAXParser getValidatingParser() throws ParserConfigurationException, SAXException {
+        SAXParserFactory spf = SAXParserFactory.newInstance();
+        spf.setNamespaceAware(true);
+        spf.setValidating(true);
+        return spf.newSAXParser();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/XPathAPITest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
+import static javax.xml.xpath.XPathConstants.DOM_OBJECT_MODEL;
+import static javax.xml.xpath.XPathConstants.NODESET;
+import static jaxp.library.JAXPTestUtilities.filenameToURL;
+import static org.testng.Assert.assertEquals;
+import static test.astro.AstroConstants.ASTROCAT;
+import static test.astro.AstroConstants.JAXP_SCHEMA_LANGUAGE;
+import static test.astro.AstroConstants.JAXP_SCHEMA_SOURCE;
+
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import javax.xml.xpath.XPathVariableResolver;
+
+import jaxp.library.JAXPFileBaseTest;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/*
+ * @summary test XPath API
+ */
+@Test(singleThreaded = true)
+public class XPathAPITest extends JAXPFileBaseTest {
+    private static final String STARDB_STAR_3_CONSTELLATION = "//astro:stardb/astro:star[3]/astro:constellation";
+    private static final String STARDB_STAR = "//astro:stardb/astro:star";
+    private Document doc;
+    private XPathFactory xpf;
+    private NamespaceContext nsContext;
+
+    @BeforeClass
+    public void setup() throws Exception {
+        DocumentBuilderFactory df = DocumentBuilderFactory.newInstance();
+        df.setNamespaceAware(true);
+        df.setValidating(true);
+        df.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
+        df.setAttribute(JAXP_SCHEMA_SOURCE, "catalog.xsd");
+        DocumentBuilder bldr = df.newDocumentBuilder();
+        doc = bldr.parse(ASTROCAT);
+
+        xpf = XPathFactory.newInstance(DOM_OBJECT_MODEL);
+
+        nsContext = new MyNamespaceContext();
+    }
+
+    @DataProvider(name = "nodelist-evaluator")
+    public Object[][] getNodeListEvaluator() throws MalformedURLException {
+        return new Object[][] { { (XPathEvaluator) expression -> getXPath().evaluate(expression, doc.getDocumentElement(), NODESET) },
+                { (XPathEvaluator) expression -> getXPath().evaluate(expression, createXMLInputSource(), NODESET) },
+                { (XPathEvaluator) expression -> getXPathExpression(expression).evaluate(doc.getDocumentElement(), NODESET) },
+                { (XPathEvaluator) expression -> getXPathExpression(expression).evaluate(createXMLInputSource(), NODESET) } };
+    }
+
+    /*
+     * Test xpath expression evaluations method that returns type indicated by
+     * QName
+     */
+    @Test(dataProvider = "nodelist-evaluator")
+    public void testEvaluateNodeList(XPathEvaluator evaluator) throws Exception {
+        NodeList o = (NodeList) evaluator.evaluate(STARDB_STAR);
+        assertEquals(o.getLength(), 10);
+    }
+
+    @DataProvider(name = "string-evaluator")
+    public Object[][] getStringEvaluator() throws MalformedURLException {
+        return new Object[][] { { (XPathEvaluator) expression -> getXPath().evaluate(expression, doc.getDocumentElement()) },
+                { (XPathEvaluator) expression -> getXPath().evaluate(expression, createXMLInputSource()) },
+                { (XPathEvaluator) expression -> getXPathExpression(expression).evaluate(doc.getDocumentElement()) },
+                { (XPathEvaluator) expression -> getXPathExpression(expression).evaluate(createXMLInputSource()) } };
+    }
+
+    /*
+     * Test xpath expression evaluations method that returns String
+     */
+    @Test(dataProvider = "string-evaluator")
+    public void testEvaluateString(XPathEvaluator evaluator) throws Exception {
+        assertEquals(evaluator.evaluate(STARDB_STAR_3_CONSTELLATION), "Psc");
+    }
+
+    @Test
+    public void testXPathVariableResolver() throws Exception {
+        XPath xpath = getXPath();
+        xpath.setXPathVariableResolver(new MyXPathVariableResolver());
+        assertEquals(xpath.evaluate("//astro:stardb/astro:star[astro:hr=$id]/astro:constellation", doc.getDocumentElement()), "Peg");
+
+    }
+
+    private static class MyXPathVariableResolver implements XPathVariableResolver {
+        public Object resolveVariable(QName vname) {
+            return "4"; // resolve $id as 4, xpath will locate to star[hr=4]
+        }
+    }
+
+    /*
+     * Implementation of a NamespaceContext interface for the Xpath api tests.
+     * Used in xpath.setNamespaceContext(...)
+     */
+    private static class MyNamespaceContext implements NamespaceContext {
+        public String getNamespaceURI(String prefix) {
+            return "astro".equals(prefix) ? "http://www.astro.com/astro" : "";
+        }
+
+        public String getPrefix(String nsURI) {
+            return "http://www.astro.com/astro".equals(nsURI) ? "astro" : "";
+        }
+
+        public Iterator getPrefixes(String nsURI) {
+            ArrayList list = new ArrayList();
+            list.add("astro");
+            return list.iterator();
+        }
+    }
+
+    @FunctionalInterface
+    private interface XPathEvaluator {
+        Object evaluate(String expression) throws XPathExpressionException;
+    }
+
+    private XPath getXPath() {
+        XPath xpath = xpf.newXPath();
+        xpath.setNamespaceContext(nsContext);
+        return xpath;
+    }
+
+    private XPathExpression getXPathExpression(String expression) throws XPathExpressionException {
+        return getXPath().compile(expression);
+    }
+
+    private InputSource createXMLInputSource() {
+        return new InputSource(filenameToURL(ASTROCAT));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/catalog.xml	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,17 @@
+<?xml version="1.1" encoding="UTF-8"?>
+<stardb xmlns="http://www.astro.com/astro" xmlns:astro="http://www.astro.com/astro" xsi:schemaLocation="http://www.astro.com/astro catalog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+   <_test01></_test01>
+   <test-02 xmlns:xsi=""></test-02>
+   <test.03></test.03>
+   <_test-04>T%e!s#t$</_test-04>
+   <star><hr>1</hr><constellation/><fullname/><ra><h>00</h><m>05</m><s>09.9</s><dv>0.08608333333333333</dv></ra><dec><sgn/><d>45</d><m>13</m><s>45</s><dv>45.22916666666667</dv></dec><glng>114.44</glng><glat>-16.88</glat><vmag>6.70</vmag><spec>A1Vn</spec></star>
+   <star><hr>2</hr><constellation/><fullname/><ra><h>00</h><m>05</m><s>03.8</s><dv>0.08438888888888889</dv></ra><dec><sgn>-</sgn><d>00</d><m>30</m><s>11</s><dv>-0.5030555555555556</dv></dec><glng>98.33</glng><glat>-61.14</glat><vmag>6.29</vmag><spec>gG9</spec></star>
+   <star><hr>3</hr><constellation>Psc</constellation><fullname>33    Psc</fullname><ra><h>00</h><m>05</m><s>20.1</s><dv>0.08891666666666666</dv></ra><dec><sgn>-</sgn><d>05</d><m>42</m><s>27</s><dv>-5.7075000000000005</dv></dec><glng>93.75</glng><glat>-65.93</glat><vmag>4.61</vmag><spec>K0IIIbCN-0.5</spec></star>
+   <star><hr>4</hr><constellation>Peg</constellation><fullname>86    Peg</fullname><ra><h>00</h><m>05</m><s>42.0</s><dv>0.095</dv></ra><dec><sgn/><d>13</d><m>23</m><s>46</s><dv>13.39611111111111</dv></dec><glng>106.19</glng><glat>-47.98</glat><vmag>5.51</vmag><spec>G5III</spec></star>
+   <star><hr>5</hr><constellation/><fullname/><ra><h>00</h><m>06</m><s>16.0</s><dv>0.10444444444444445</dv></ra><dec><sgn/><d>58</d><m>26</m><s>12</s><dv>58.43666666666666</dv></dec><glng>117.03</glng><glat>-03.92</glat><vmag>5.96</vmag><spec>G5V</spec></star>
+   <star><hr>6</hr><constellation/><fullname/><ra><h>00</h><m>06</m><s>19.0</s><dv>0.10527777777777779</dv></ra><dec><sgn>-</sgn><d>49</d><m>04</m><s>30</s><dv>-49.075</dv></dec><glng>321.61</glng><glat>-66.38</glat><vmag>5.70</vmag><spec>G1IV</spec></star>
+   <star><hr>7</hr><constellation>Cas</constellation><fullname>10    Cas</fullname><ra><h>00</h><m>06</m><s>26.5</s><dv>0.10736111111111112</dv></ra><dec><sgn/><d>64</d><m>11</m><s>46</s><dv>64.19611111111111</dv></dec><glng>118.06</glng><glat>1.75</glat><vmag>5.59</vmag><spec>B9III</spec></star>
+   <star><hr>8</hr><constellation/><fullname/><ra><h>00</h><m>06</m><s>36.8</s><dv>0.11022222222222222</dv></ra><dec><sgn/><d>29</d><m>01</m><s>17</s><dv>29.02138888888889</dv></dec><glng>111.26</glng><glat>-32.83</glat><vmag>6.13</vmag><spec>K0V</spec></star>
+   <star><hr>9</hr><constellation/><fullname/><ra><h>00</h><m>06</m><s>50.1</s><dv>0.11391666666666667</dv></ra><dec><sgn>-</sgn><d>23</d><m>06</m><s>27</s><dv>-23.1075</dv></dec><glng>52.21</glng><glat>-79.14</glat><vmag>6.18</vmag><spec>A7V</spec></star>
+   <star><hr>10</hr><constellation/><fullname/><ra><h>00</h><m>07</m><s>18.2</s><dv>0.12172222222222222</dv></ra><dec><sgn>-</sgn><d>17</d><m>23</m><s>11</s><dv>-17.386388888888888</dv></dec><glng>74.36</glng><glat>-75.90</glat><vmag>6.19</vmag><spec>A6Vn</spec></star>
+</stardb>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/catalog.xml.bak	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,2 @@
+<?xml version="1.1" encoding="UTF-8"?>
+<stardb xmlns="http://www.astro.com/astro" xmlns:astro="http://www.astro.com/astro" xsi:schemaLocation="http://www.astro.com/astro catalog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><_test01></_test01><test-02 xmlns:xsi=""></test-02><test.03></test.03><_test-04>T%e!s#t$</_test-04><star><hr>1</hr><constellation/><fullname/><ra><h>00</h><m>05</m><s>09.9</s><dv>0.08608333333333333</dv></ra><dec><sgn/><d>45</d><m>13</m><s>45</s><dv>45.22916666666667</dv></dec><glng>114.44</glng><glat>-16.88</glat><vmag>6.70</vmag><spec>A1Vn</spec></star><star><hr>2</hr><constellation/><fullname/><ra><h>00</h><m>05</m><s>03.8</s><dv>0.08438888888888889</dv></ra><dec><sgn>-</sgn><d>00</d><m>30</m><s>11</s><dv>-0.5030555555555556</dv></dec><glng>98.33</glng><glat>-61.14</glat><vmag>6.29</vmag><spec>gG9</spec></star><star><hr>3</hr><constellation>Psc</constellation><fullname>33    Psc</fullname><ra><h>00</h><m>05</m><s>20.1</s><dv>0.08891666666666666</dv></ra><dec><sgn>-</sgn><d>05</d><m>42</m><s>27</s><dv>-5.7075000000000005</dv></dec><glng>93.75</glng><glat>-65.93</glat><vmag>4.61</vmag><spec>K0IIIbCN-0.5</spec></star><star><hr>4</hr><constellation>Peg</constellation><fullname>86    Peg</fullname><ra><h>00</h><m>05</m><s>42.0</s><dv>0.095</dv></ra><dec><sgn/><d>13</d><m>23</m><s>46</s><dv>13.39611111111111</dv></dec><glng>106.19</glng><glat>-47.98</glat><vmag>5.51</vmag><spec>G5III</spec></star><star><hr>5</hr><constellation/><fullname/><ra><h>00</h><m>06</m><s>16.0</s><dv>0.10444444444444445</dv></ra><dec><sgn/><d>58</d><m>26</m><s>12</s><dv>58.43666666666666</dv></dec><glng>117.03</glng><glat>-03.92</glat><vmag>5.96</vmag><spec>G5V</spec></star><star><hr>6</hr><constellation/><fullname/><ra><h>00</h><m>06</m><s>19.0</s><dv>0.10527777777777779</dv></ra><dec><sgn>-</sgn><d>49</d><m>04</m><s>30</s><dv>-49.075</dv></dec><glng>321.61</glng><glat>-66.38</glat><vmag>5.70</vmag><spec>G1IV</spec></star><star><hr>7</hr><constellation>Cas</constellation><fullname>10    Cas</fullname><ra><h>00</h><m>06</m><s>26.5</s><dv>0.10736111111111112</dv></ra><dec><sgn/><d>64</d><m>11</m><s>46</s><dv>64.19611111111111</dv></dec><glng>118.06</glng><glat>1.75</glat><vmag>5.59</vmag><spec>B9III</spec></star><star><hr>8</hr><constellation/><fullname/><ra><h>00</h><m>06</m><s>36.8</s><dv>0.11022222222222222</dv></ra><dec><sgn/><d>29</d><m>01</m><s>17</s><dv>29.02138888888889</dv></dec><glng>111.26</glng><glat>-32.83</glat><vmag>6.13</vmag><spec>K0V</spec></star><star><hr>9</hr><constellation/><fullname/><ra><h>00</h><m>06</m><s>50.1</s><dv>0.11391666666666667</dv></ra><dec><sgn>-</sgn><d>23</d><m>06</m><s>27</s><dv>-23.1075</dv></dec><glng>52.21</glng><glat>-79.14</glat><vmag>6.18</vmag><spec>A7V</spec></star><star><hr>10</hr><constellation/><fullname/><ra><h>00</h><m>07</m><s>18.2</s><dv>0.12172222222222222</dv></ra><dec><sgn>-</sgn><d>17</d><m>23</m><s>11</s><dv>-17.386388888888888</dv></dec><glng>74.36</glng><glat>-75.90</glat><vmag>6.19</vmag><spec>A6Vn</spec></star></stardb>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/catalog.xsd	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,122 @@
+<xs:schema 
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    targetNamespace="http://www.astro.com/astro" 
+    xmlns:astro="http://www.astro.com/astro"
+    elementFormDefault="qualified"
+    attributeFormDefault="qualified"
+>
+    <!-- Star Identification String Type  -->
+    <xs:simpleType name="staridType">
+	<xs:restriction base="xs:string">
+	    <xs:maxLength value="4"/>
+	</xs:restriction>
+    </xs:simpleType>
+
+    <!-- Hour Type -->
+    <xs:simpleType name="hourType">
+	<xs:restriction base="xs:decimal">
+	    <xs:minInclusive value="0.0"/>
+	    <xs:maxInclusive value="24.0"/>
+	</xs:restriction>
+    </xs:simpleType>
+
+    <!-- Minute Type -->
+    <xs:simpleType name="minuteType">
+	<xs:restriction base="xs:decimal">
+	    <xs:minInclusive value="0.0"/>
+	    <xs:maxInclusive value="60.0"/>
+	</xs:restriction>
+    </xs:simpleType>
+
+    <!-- Second Type -->
+    <xs:simpleType name="secondType">
+	<xs:restriction base="xs:decimal">
+	    <xs:minInclusive value="0.0"/>
+	    <xs:maxInclusive value="60.0"/>
+	</xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="decimalValueType">
+	<xs:restriction base="xs:decimal">
+	</xs:restriction>
+    </xs:simpleType> 
+
+    <xs:simpleType name="degType">
+	<xs:restriction base="xs:decimal">
+	    <xs:minInclusive value="-90.0"/>
+	    <xs:maxInclusive value="90.0"/>
+	</xs:restriction>
+    </xs:simpleType> 
+
+    <xs:simpleType name="vmagType">
+	<xs:restriction base="xs:decimal">
+	    <xs:minInclusive value="-3.0"/>
+	    <xs:maxInclusive value="12.0"/>
+	</xs:restriction>
+    </xs:simpleType> 
+
+
+    <xs:simpleType name="signType">
+	<xs:restriction base="xs:string">
+	    <xs:enumeration value="+"/>
+	    <xs:enumeration value="-"/>
+	    <xs:enumeration value=""/>
+	</xs:restriction>
+    </xs:simpleType> 
+
+    <xs:complexType name="raType">
+	<xs:sequence>
+	    <xs:element name="h"  type="astro:hourType"/>
+	    <xs:element name="m"  type="astro:minuteType"/>
+	    <xs:element name="s"  type="astro:secondType"/>
+	    <xs:element name="dv" type="astro:decimalValueType"/>
+	</xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="decType">
+	<xs:sequence>
+	    <xs:element name="sgn" type="astro:signType"/>
+	    <xs:element name="d"   type="astro:degType"/>
+	    <xs:element name="m"   type="astro:minuteType"/>
+	    <xs:element name="s"   type="astro:secondType"/>
+	    <xs:element name="dv"  type="astro:decimalValueType"/>
+	</xs:sequence>
+    </xs:complexType>
+
+
+    <xs:complexType name="starType">
+	<xs:sequence>
+	    <xs:element name="hr"            type="astro:staridType"/>
+	    <xs:element name="constellation" type="xs:string"/>
+	    <xs:element name="fullname"      type="xs:string"/>
+	    <xs:element name="ra"            type="astro:raType"/>
+	    <xs:element name="dec"           type="astro:decType"/>
+	    <xs:element name="glng"          type="xs:decimal"/>
+	    <xs:element name="glat"          type="xs:decimal"/>
+	    <xs:element name="vmag"          type="astro:vmagType"/>
+	    <xs:element name="spec"          type="xs:string"/>
+	</xs:sequence>
+    </xs:complexType>
+
+
+    <!-- The real part of the catalog starts here -->
+    <xs:element name="stardb">
+       <xs:complexType>
+          <xs:sequence>
+
+	     <!-- for testing purposes -->
+	     <xs:element name="_test01" type="xs:string"
+		minOccurs="0" maxOccurs="1"/>
+	     <xs:element name="test-02" type="xs:string"/>
+	     <xs:element name="test.03" type="xs:string"/>
+	     <xs:element name="_test-04" type="xs:string"/>
+
+	     <!-- astro data elements -->
+             <xs:element name="star" type="astro:starType"
+	        minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+       </xs:complexType>
+    </xs:element>
+    <!-- The real part of the catalog ends here -->
+
+</xs:schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/gold/query1.out	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,15 @@
+<html xmlns:astro="http://www.astro.com/astro">
+<h1>Bright Star Catalog Extract</h1>
+<body>
+<b>Star Id: </b>7<br>
+<b>Constellation: </b>Cas<br>
+<b>Description: </b>10    Cas<br>
+<b>RA J2000: </b>00:06:26.5<br>
+<b>DEC J2000: </b>64:11:46<br>
+<b>Visual Magnitude: </b>5.59<br>
+<b>Spectral Type: </b>B9III<br>
+<b>Galactic Longitude: </b>118.06<br>
+<b>Galactic Latitude: </b>1.75<br>
+<hr>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/gold/query2.out	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,15 @@
+<html xmlns:astro="http://www.astro.com/astro">
+<h1>Bright Star Catalog Extract</h1>
+<body>
+<b>Star Id: </b>3<br>
+<b>Constellation: </b>Psc<br>
+<b>Description: </b>33    Psc<br>
+<b>RA J2000: </b>00:05:20.1<br>
+<b>DEC J2000: </b>05:42:27<br>
+<b>Visual Magnitude: </b>4.61<br>
+<b>Spectral Type: </b>K0IIIbCN-0.5<br>
+<b>Galactic Longitude: </b>93.75<br>
+<b>Galactic Latitude: </b>-65.93<br>
+<hr>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/gold/query3.out	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,39 @@
+<html xmlns:astro="http://www.astro.com/astro">
+<h1>Bright Star Catalog Extract</h1>
+<body>
+<b>Star Id: </b>2<br>
+<b>Constellation: </b>
+<br>
+<b>Description: </b>
+<br>
+<b>RA J2000: </b>00:05:03.8<br>
+<b>DEC J2000: </b>00:30:11<br>
+<b>Visual Magnitude: </b>6.29<br>
+<b>Spectral Type: </b>gG9<br>
+<b>Galactic Longitude: </b>98.33<br>
+<b>Galactic Latitude: </b>-61.14<br>
+<hr>
+<b>Star Id: </b>4<br>
+<b>Constellation: </b>Peg<br>
+<b>Description: </b>86    Peg<br>
+<b>RA J2000: </b>00:05:42.0<br>
+<b>DEC J2000: </b>13:23:46<br>
+<b>Visual Magnitude: </b>5.51<br>
+<b>Spectral Type: </b>G5III<br>
+<b>Galactic Longitude: </b>106.19<br>
+<b>Galactic Latitude: </b>-47.98<br>
+<hr>
+<b>Star Id: </b>5<br>
+<b>Constellation: </b>
+<br>
+<b>Description: </b>
+<br>
+<b>RA J2000: </b>00:06:16.0<br>
+<b>DEC J2000: </b>58:26:12<br>
+<b>Visual Magnitude: </b>5.96<br>
+<b>Spectral Type: </b>G5V<br>
+<b>Galactic Longitude: </b>117.03<br>
+<b>Galactic Latitude: </b>-03.92<br>
+<hr>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/gold/query4.out	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,37 @@
+<html xmlns:astro="http://www.astro.com/astro">
+<h1>Bright Star Catalog Extract</h1>
+<body>
+<b>Star Id: </b>2<br>
+<b>Constellation: </b>
+<br>
+<b>Description: </b>
+<br>
+<b>RA J2000: </b>00:05:03.8<br>
+<b>DEC J2000: </b>00:30:11<br>
+<b>Visual Magnitude: </b>6.29<br>
+<b>Spectral Type: </b>gG9<br>
+<b>Galactic Longitude: </b>98.33<br>
+<b>Galactic Latitude: </b>-61.14<br>
+<hr>
+<b>Star Id: </b>3<br>
+<b>Constellation: </b>Psc<br>
+<b>Description: </b>33    Psc<br>
+<b>RA J2000: </b>00:05:20.1<br>
+<b>DEC J2000: </b>05:42:27<br>
+<b>Visual Magnitude: </b>4.61<br>
+<b>Spectral Type: </b>K0IIIbCN-0.5<br>
+<b>Galactic Longitude: </b>93.75<br>
+<b>Galactic Latitude: </b>-65.93<br>
+<hr>
+<b>Star Id: </b>4<br>
+<b>Constellation: </b>Peg<br>
+<b>Description: </b>86    Peg<br>
+<b>RA J2000: </b>00:05:42.0<br>
+<b>DEC J2000: </b>13:23:46<br>
+<b>Visual Magnitude: </b>5.51<br>
+<b>Spectral Type: </b>G5III<br>
+<b>Galactic Longitude: </b>106.19<br>
+<b>Galactic Latitude: </b>-47.98<br>
+<hr>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/dec-ent.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,36 @@
+<!-- This is the external entity version of dec.xsl 
+     in which the top level template has been removed
+     and referenced as an external entity
+--> 
+     
+<!DOCTYPE xsl:transform [
+  <!ENTITY toplevel SYSTEM "http://astro.com/stylesheets/toptemplate">
+]>
+
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<xsl:output method="xml"/>
+	
+	<!-- dec between 00:00:00 and 01:00:00 --> 
+	<xsl:param name="dec_min_deg" select="0.0"/>
+	<xsl:param name="dec_max_deg" select="1.0"/>
+	
+	<!-- introduce the external entity -->
+	&toplevel;          
+	
+	<xsl:template match="astro:star">
+	   <xsl:if test="(
+	                  (number(astro:dec/astro:dv) &gt;= $dec_min_deg) and
+	                  (number(astro:dec/astro:dv) &lt;= $dec_max_deg))" >
+	          <xsl:copy-of select="."/>
+	   </xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/dec.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,32 @@
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<xsl:output method="xml"/>
+	
+	<!-- dec between 00:00:00 and 01:00:00 --> 
+	<xsl:param name="dec_min_deg" select="0.0"/>
+	<xsl:param name="dec_max_deg" select="1.0"/>
+	
+	<xsl:template match="astro:stardb">
+	   <stardb xmlns="http://www.astro.com/astro"
+	      xsi:schemaLocation="http://www.astro.com/astro catalog.xsd"
+	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	          <xsl:apply-templates/>
+	   </stardb>
+	</xsl:template>
+	
+	<xsl:template match="astro:star">
+	   <xsl:if test="(
+	                  (number(astro:dec/astro:dv) &gt;= $dec_min_deg) and
+	                  (number(astro:dec/astro:dv) &lt;= $dec_max_deg))" >
+	          <xsl:copy-of select="."/>
+	   </xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/dec_frag.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,26 @@
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<!-- dec_frag.xsl = fragment used in radec.xsl --> 
+	
+	<xsl:output method="xml"/>
+	
+	<xsl:param name="dec_min_deg" select="-5.75"/>
+	<xsl:param name="dec_max_deg" select="14.0"/>
+	
+	
+	<xsl:template match="astro:star" mode="RA_PASSED" >
+	   <xsl:if test="(
+	                  (number(astro:dec/astro:dv) &gt;= $dec_min_deg) and
+	                  (number(astro:dec/astro:dv) &lt;= $dec_max_deg))" >
+	          <xsl:copy-of select="."/>
+	   </xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/html.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,38 @@
+<xsl:transform
+  xmlns=""
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  
+	<xsl:strip-space elements="*"/>
+	
+	<xsl:output method="html"/>
+	
+	<xsl:template match="astro:stardb">
+	   <html>
+	   <h1>Bright Star Catalog Extract</h1>
+	   <body>
+	      <xsl:apply-templates/>
+	   </body>
+	   </html>
+	</xsl:template>
+	
+	<xsl:template match="astro:star">
+	   <b>Star Id: </b><xsl:value-of select="astro:hr"/><br/>
+	   <b>Constellation: </b><xsl:value-of select="astro:constellation"/><br/>
+	   <b>Description: </b><xsl:value-of select="astro:fullname"/><br/>
+	   <b>RA J2000: </b><xsl:value-of select="astro:ra/astro:h"/><xsl:text>:</xsl:text><xsl:value-of select="astro:ra/astro:m"/><xsl:text>:</xsl:text><xsl:value-of select="astro:ra/astro:s"/><br/>
+	   <b>DEC J2000: </b><xsl:value-of select="astro:ra/astro:sgn"/><xsl:value-of select="astro:dec/astro:d"/><xsl:text>:</xsl:text><xsl:value-of select="astro:dec/astro:m"/><xsl:text>:</xsl:text><xsl:value-of select="astro:dec/astro:s"/><br/>
+	   <b>Visual Magnitude: </b><xsl:value-of select="astro:vmag"/><br/>
+	   <b>Spectral Type: </b><xsl:value-of select="astro:spec"/><br/>
+	   <b>Galactic Longitude: </b><xsl:value-of select="astro:glng"/><br/>
+	   <b>Galactic Latitude: </b><xsl:value-of select="astro:glat"/><br/>
+	   <hr></hr>
+	</xsl:template>
+	
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/ra-ent.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,29 @@
+<!DOCTYPE xsl:transform [
+  <!ENTITY toplevel SYSTEM "http://astro.com/stylesheets/toptemplate">
+]>
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<xsl:output method="xml"/>
+	
+	<!-- ra between 00:00:00 and 01:00:00 --> 
+	<xsl:param name="ra_min_hr" select="0.106"/>
+	<xsl:param name="ra_max_hr" select="0.108"/>
+	
+	&toplevel;
+	
+	<xsl:template match="astro:star">
+	   <xsl:if test="(
+	                  (number(astro:ra/astro:dv) &gt;= $ra_min_hr) and
+	                  (number(astro:ra/astro:dv) &lt;= $ra_max_hr))" >
+	          <xsl:copy-of select="."/>
+	   </xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/ra-uri.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,27 @@
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<xsl:output method="xml"/>
+	
+	<!-- ra between 00:00:00 and 01:00:00 --> 
+	<xsl:param name="ra_min_hr" select="0.106"/>
+	<xsl:param name="ra_max_hr" select="0.108"/>
+	
+	<!-- will use the uri resolver to resolve to  'toptemplate.xsl' -->
+	<xsl:include href="http://astro.com/stylesheets/topleveltemplate"/>
+	
+	<xsl:template match="astro:star">
+	   <xsl:if test="(
+	                  (number(astro:ra/astro:dv) &gt;= $ra_min_hr) and
+	                  (number(astro:ra/astro:dv) &lt;= $ra_max_hr))" >
+	          <xsl:copy-of select="."/>
+	   </xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/ra.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,32 @@
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<xsl:output method="xml"/>
+	
+	<!-- ra between 00:00:00 and 01:00:00 --> 
+	<xsl:param name="ra_min_hr" select="0.106"/>
+	<xsl:param name="ra_max_hr" select="0.108"/>
+	
+	<xsl:template match="astro:stardb">
+	      <stardb xmlns="http://www.astro.com/astro"
+	      xsi:schemaLocation="http://www.astro.com/astro catalog.xsd"
+	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	          <xsl:apply-templates/>
+	      </stardb>
+	</xsl:template>
+	
+	<xsl:template match="astro:star">
+	   <xsl:if test="(
+	                  (number(astro:ra/astro:dv) &gt;= $ra_min_hr) and
+	                  (number(astro:ra/astro:dv) &lt;= $ra_max_hr))" >
+	          <xsl:copy-of select="."/>
+	   </xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/ra_frag.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,26 @@
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<!-- ra_frag = fragment used in radec.xsl -->
+	
+	<xsl:output method="xml"/>
+	
+	<xsl:param name="ra_min_hr" select="0.084"/>
+	<xsl:param name="ra_max_hr" select="0.096"/>
+	
+	
+	<xsl:template match="astro:star">
+	   <xsl:if test="(
+	                  (number(astro:ra/astro:dv) &gt;= $ra_min_hr) and
+	                  (number(astro:ra/astro:dv) &lt;= $ra_max_hr))" >
+	          <xsl:apply-templates select="." mode="RA_PASSED"/> 
+	   </xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/radec.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,28 @@
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<!-- radec.xsl = filters on both RA and DEC using modes -->
+	
+	<xsl:output method="xml"/>
+	
+	<!-- include the fragments for ra and dec filtering -->
+	
+	<xsl:include href="ra_frag.xsl"/>
+	<xsl:include href="dec_frag.xsl"/>
+	
+	<xsl:template match="astro:stardb">
+	      <stardb xmlns="http://www.astro.com/astro"
+	      xsi:schemaLocation="http://www.astro.com/astro catalog.xsd"
+	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
+	          <xsl:apply-templates/>
+	      </stardb>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/stellartype.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,29 @@
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<xsl:output method="xml"/>
+	
+	<!-- search stars of a particular type --> 
+	<xsl:param name="type" select="G"/>
+	
+	<xsl:template match="astro:stardb">
+	   <stardb xmlns="http://www.astro.com/astro"
+	      xsi:schemaLocation="http://www.astro.com/astro catalog.xsd"
+	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
+	          <xsl:apply-templates/>
+	   </stardb>
+	</xsl:template>
+	
+	<xsl:template match="astro:star">
+	   <xsl:if test="(contains(astro:spec,$type))" >
+	          <xsl:copy-of select="."/>
+	   </xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/toptemplate.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,17 @@
+
+<!--
+<xsl:transform
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+-->
+
+<xsl:template match="astro:stardb">
+      <stardb xmlns="http://www.astro.com/astro"
+      xsi:schemaLocation="http://www.astro.com/astro catalog.xsd"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
+          <xsl:apply-templates/>
+      </stardb>
+</xsl:template>
+
+<!--
+</xsl:transform>
+-->
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/functional/test/astro/xmlfiles/xsl/toptemplateinc.xsl	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,24 @@
+<xsl:transform
+  xmlns:astro="http://www.astro.com/astro"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+	<!--
+	 - toptemplateinc.xsl = toptemplate used in an xsl:include element
+	 -        which demands that this is a complete stylesheet.
+	 -        The related toptemplate.xsl is not a complete stylesheet
+	 -        as it is used in ext entity references.  
+	-->
+	
+	<xsl:template match="astro:stardb">
+	      <stardb xmlns="http://www.astro.com/astro"
+	      xsi:schemaLocation="http://www.astro.com/astro catalog.xsd"
+	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
+	          <xsl:apply-templates/>
+	      </stardb>
+	</xsl:template>
+	
+	<xsl:template match="astro:_test-04">
+	    <!-- discard text contents -->
+	</xsl:template>
+
+</xsl:transform>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/AbstractFilterFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+package test.astro;
+
+import static test.astro.AstroConstants.HTMLXSL;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.sax.TransformerHandler;
+
+import org.xml.sax.SAXException;
+
+public abstract class AbstractFilterFactory implements FilterFactory {
+    @Override
+    public TransformerHandler newRAFilter(double min, double max) throws TransformerConfigurationException, SAXException, ParserConfigurationException,
+            IOException {
+        TransformerHandler retval = getTransformerHandler(getRAXsl());
+        Transformer xformer = retval.getTransformer();
+        xformer.setParameter("ra_min_hr", String.valueOf(min));
+        xformer.setParameter("ra_max_hr", String.valueOf(max));
+        return retval;
+    }
+
+    @Override
+    public TransformerHandler newDECFilter(double min, double max) throws TransformerConfigurationException, SAXException, ParserConfigurationException,
+            IOException {
+        TransformerHandler retval = getTransformerHandler(getDECXsl());
+        Transformer xformer = retval.getTransformer();
+        xformer.setParameter("dec_min_deg", String.valueOf(min));
+        xformer.setParameter("dec_max_deg", String.valueOf(max));
+        return retval;
+    }
+
+    @Override
+    public TransformerHandler newRADECFilter(double rmin, double rmax, double dmin, double dmax) throws TransformerConfigurationException, SAXException,
+            ParserConfigurationException, IOException {
+        TransformerHandler retval = getTransformerHandler(getRADECXsl());
+        Transformer xformer = retval.getTransformer();
+        xformer.setParameter("ra_min_hr", String.valueOf(rmin));
+        xformer.setParameter("ra_max_hr", String.valueOf(rmax));
+        xformer.setParameter("dec_min_deg", String.valueOf(dmin));
+        xformer.setParameter("dec_max_deg", String.valueOf(dmax));
+        return retval;
+    }
+
+    @Override
+    public TransformerHandler newStellarTypeFilter(String type) throws TransformerConfigurationException, SAXException, ParserConfigurationException,
+            IOException {
+        TransformerHandler retval = getTransformerHandler(getStellarXsl());
+        Transformer xformer = retval.getTransformer();
+        xformer.setParameter("type", type);
+        return retval;
+    }
+
+    @Override
+    public TransformerHandler newHTMLOutput() throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException {
+        return getTransformerHandler(HTMLXSL);
+    }
+
+    abstract protected TransformerHandler getTransformerHandler(String xslFileName) throws SAXException, ParserConfigurationException,
+            TransformerConfigurationException, IOException;
+
+    abstract protected String getRAXsl();
+
+    abstract protected String getDECXsl();
+
+    abstract protected String getRADECXsl();
+
+    abstract protected String getStellarXsl();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/AstroConstants.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package test.astro;
+
+import static java.io.File.separator;
+import static jaxp.library.JAXPTestUtilities.getPathByClassName;
+
+public class AstroConstants {
+    // Query parameters :
+
+    public static final double RA_MIN = 0.0; // hours
+    public static final double RA_MAX = 24.0; // hours
+    public static final double DEC_MIN = -90.000; // degrees
+    public static final double DEC_MAX = 90.000; // degrees
+
+    // Stylesheet source paths:
+
+    public static final String XSLPATH = getPathByClassName(AstroConstants.class, "xmlfiles" + separator + "xsl");
+    public static final String RAXSL = XSLPATH + "ra.xsl";
+    public static final String DECXSL = XSLPATH + "dec.xsl";
+    public static final String RADECXSL = XSLPATH + "radec.xsl";
+    public static final String STYPEXSL = XSLPATH + "stellartype.xsl";
+    public static final String HTMLXSL = XSLPATH + "html.xsl";
+
+    public static final String RAENTXSL = XSLPATH + "ra-ent.xsl";
+    public static final String DECENTXSL = XSLPATH + "dec-ent.xsl";
+    public static final String RAURIXSL = XSLPATH + "ra-uri.xsl";
+    public static final String TOPTEMPLXSL = XSLPATH + "toptemplate.xsl";
+    public static final String TOPTEMPLINCXSL = XSLPATH + "toptemplateinc.xsl";
+
+    // Catalog references
+
+    public static final String ASTROCAT = getPathByClassName(AstroConstants.class, "xmlfiles") + "catalog.xml";
+
+
+    public static final String GOLDEN_DIR = getPathByClassName(AstroConstants.class, "xmlfiles" + separator + "gold");
+    public static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
+    public static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/AstroProcessor.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,279 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
+import static test.astro.AstroConstants.DEC_MAX;
+import static test.astro.AstroConstants.DEC_MIN;
+import static test.astro.AstroConstants.JAXP_SCHEMA_LANGUAGE;
+import static test.astro.AstroConstants.JAXP_SCHEMA_SOURCE;
+import static test.astro.AstroConstants.RA_MAX;
+import static test.astro.AstroConstants.RA_MIN;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.XMLReader;
+
+/*
+ * AstroProcessor is to carry out the user's query with filters and produce a table of
+ * star records that match the criterion, and finally output with HTML format.
+ */
+public class AstroProcessor {
+    private String catalogFileName;
+
+    private FilterFactory ffact;
+    private InputSourceFactory isfact;
+
+    private SAXParserFactory spf;
+
+    /*
+     * Constructor for the Main astro class.
+     *
+     * @param fFactClass the class of the FilterFactory implementation
+     *
+     * @param catalogfilename the name of the XML input document (database)
+     *
+     * @param isFactClass the class of the Input Source Factory implementation
+     */
+    public AstroProcessor(Class<FilterFactory> fFactClass, String catalogFileName, Class<InputSourceFactory> isFactClass) throws Exception {
+        // create the Filter Factory instance...
+
+        ffact = fFactClass.newInstance();
+
+        // create the Input Source Instance
+
+        isfact = isFactClass.newInstance();
+
+        spf = SAXParserFactory.newInstance();
+        spf.setNamespaceAware(true);
+        spf.setValidating(true);
+
+        // All XML Readers are required to recognize these two:
+        spf.setFeature("http://xml.org/sax/features/namespaces", true);
+        spf.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
+
+        // Other features...
+        spf.setFeature("http://xml.org/sax/features/validation", true);
+        spf.setFeature("http://apache.org/xml/features/validation/schema", true);
+        spf.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
+
+        this.catalogFileName = catalogFileName;
+    }
+
+    /*
+     * Sets the star stellar type query.
+     *
+     * @param arg stellar type string, can be a substring.
+     */
+    public TransformerHandler getStellarTypeFilter(String arg) throws TransformerConfigurationException, SAXException, ParserConfigurationException,
+            IOException {
+        String stellarType = null;
+        if (arg != null && arg.length() != 0) {
+            stellarType = arg; // set value of query
+        } else {
+            throw new IllegalArgumentException("\n  Stellar type string of length zero found.");
+        }
+
+        return ffact.newStellarTypeFilter(stellarType);
+    }
+
+    /*
+     * Sets the right ascension parameters for a query. Parameters are validated
+     * to be in the range of 0h and 24h inclusive.
+     *
+     * @param min minimum right ascension in hours.
+     *
+     * @param max maximum right ascension in hours.
+     */
+    public TransformerHandler getRAFilter(double min, double max) throws TransformerConfigurationException, SAXException, ParserConfigurationException,
+            IOException {
+        double raMin = RA_MIN; // hours
+        double raMax = RA_MAX; // hours
+        if (min < max) {
+            if ((min >= RA_MIN && min <= RA_MAX) && (max >= RA_MIN && max <= RA_MAX)) {
+                raMin = min; // set value of query
+                raMax = max; // set value of query
+
+            }
+        } else {
+            throw new IllegalArgumentException("min must be less than max.\n" + "min=" + min + ", max=" + max);
+        }
+
+        return ffact.newRAFilter(raMin, raMax);
+    }
+
+    /*
+     * Sets the right ascension and dec parameters for a query. Parameters are
+     * validated to be in the range of ra 0h and 24h and dec -90 to +90
+     * inclusive.
+     *
+     * @param rmin minimum right ascension in hours.
+     *
+     * @param rmax maximum right ascension in hours.
+     *
+     * @param dmin minimum declination in degs.
+     *
+     * @param dmax maximum declination in degs.
+     */
+    public TransformerHandler getRADECFilter(double rmin, double rmax, double dmin, double dmax) throws TransformerConfigurationException, SAXException,
+            ParserConfigurationException, IOException {
+        double raMin = RA_MIN; // hours
+        double raMax = RA_MAX; // hours
+        double decMin = DEC_MIN; // degrees
+        double decMax = DEC_MAX; // degrees
+        if (rmin < rmax && dmin < dmax) {
+            if ((rmin >= RA_MIN && rmin <= RA_MAX) && (rmax >= RA_MIN && rmax <= RA_MAX)) {
+                raMin = rmin; // set value of query
+                raMax = rmax; // set value of query
+            }
+            if ((dmin >= DEC_MIN && dmin <= DEC_MAX) && (dmax >= DEC_MIN && dmax <= DEC_MAX)) {
+                decMin = dmin; // set value of query
+                decMax = dmax; // set value of query
+            }
+
+        } else {
+            throw new IllegalArgumentException("min must be less than max.\n" + "rmin=" + rmin + ", rmax=" + rmax + ", dmin=" + dmin + ", dmax=" + dmax);
+        }
+
+        return ffact.newRADECFilter(raMin, raMax, decMin, decMax);
+    }
+
+    /*
+     * Sets the declination parameters for a query. Parameters are validated to
+     * be in the range of -90 and +90 degrees inclusive.
+     *
+     * @param min minimum declination in degrees.
+     *
+     * @param max maximum declination in degrees.
+     */
+    public TransformerHandler getDecFilter(double min, double max) throws TransformerConfigurationException, SAXException, ParserConfigurationException,
+            IOException {
+        double decMin = DEC_MIN; // degrees
+        double decMax = DEC_MAX; // degrees
+        if (min < max) {
+            if ((min >= DEC_MIN && min <= DEC_MAX) && (max >= DEC_MIN && max <= DEC_MAX)) {
+                decMin = min; // set value of query
+                decMax = max; // set value of query
+            }
+        } else {
+            throw new IllegalArgumentException("min must be less than max.\n" + "min=" + min + ", max=" + max);
+        }
+
+        return ffact.newDECFilter(decMin, decMax);
+    }
+
+    /*
+     * Runs the filter process against the astronomical database.
+     *
+     * @throws Exception
+     */
+    public void process(String outputfile, TransformerHandler... filters) throws Exception {
+        XMLReader catparser = getXMLReader();
+
+        File catalogfile = new File(catalogFileName);
+        InputSource catsrc = isfact.newInputSource(catalogfile.getPath());
+
+        TransformerHandler outfilter = ffact.newHTMLOutput();
+        // create an array from the Vector of filters...
+
+        // hook the filters up to each other, there may be zero filters
+        int nfilters = filters.length;
+        if (nfilters != 0) {
+            TransformerHandler prev = null;
+            for (int i = 0; i < filters.length; i++) {
+                TransformerHandler curr = filters[i];
+                if (prev != null) {
+                    prev.setResult(new SAXResult(curr));
+                }
+                prev = curr;
+            }
+            // hook up the last filter to the output filter
+            prev.setResult(new SAXResult(outfilter));
+            // hook up the catalog parser to the first filter...
+            catparser.setContentHandler(filters[0]);
+        } else {
+            // There are no query filters,
+            // hook up the catalog parser directly to output filter...
+            catparser.setContentHandler(outfilter);
+        }
+        // hook up the output filter to the output file or std out
+        if (outputfile != null) {
+            outfilter.setResult(new StreamResult(outputfile));
+        } else {
+            outfilter.setResult(new StreamResult(System.out));
+        }
+
+        catparser.parse(catsrc);
+    }
+
+    private XMLReader getXMLReader() throws Exception {
+        SAXParser parser = spf.newSAXParser();
+        parser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA_NS_URI);
+        parser.setProperty(JAXP_SCHEMA_SOURCE, "catalog.xsd");
+        XMLReader catparser = parser.getXMLReader();
+        catparser.setErrorHandler(new CatalogErrorHandler());
+        return catparser;
+    }
+
+    /*
+     * Error Handler for the parsing of the XML astronomical catalog.
+     */
+    private static class CatalogErrorHandler implements ErrorHandler {
+        private String getParseExceptionInfo(SAXParseException spe) {
+            String systemId = spe.getSystemId();
+            if (systemId == null) {
+                systemId = "null";
+            }
+            String info = "Catalog URI=" + systemId + " Line=" + spe.getLineNumber() + ": " + spe.getMessage();
+            return info;
+        }
+
+        public void warning(SAXParseException spe) throws SAXException {
+            String message = "Warning: " + getParseExceptionInfo(spe);
+            throw new SAXException(message);
+        }
+
+        public void error(SAXParseException spe) throws SAXException {
+            String message = "Error: " + getParseExceptionInfo(spe);
+            throw new SAXException(message);
+        }
+
+        public void fatalError(SAXParseException spe) throws SAXException {
+            String message = "Fatal Error: " + getParseExceptionInfo(spe);
+            throw new SAXException(message);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/DOMFilterFactoryImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static jaxp.library.JAXPTestUtilities.filenameToURL;
+import static test.astro.AstroConstants.DECXSL;
+import static test.astro.AstroConstants.RAXSL;
+import static test.astro.AstroConstants.STYPEXSL;
+
+import java.io.IOException;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+/*
+ * Implementation of the filter factory interface that utilizes DOM
+ * sources rather than Stream or SAX sources. This factory utilizes a
+ * DocumentBuilder to read in the stylesheets and create the DOM used
+ * to create the filters for the query pipeline.
+ *
+ */
+public class DOMFilterFactoryImpl extends SourceFilterFactory {
+    @Override
+    protected Source getSource(String xslFileName) throws SAXException, ParserConfigurationException, IOException {
+        Document document = getStylesheetDOM(xslFileName);
+        return new DOMSource(document);
+    }
+
+
+    @Override
+    protected String getRAXsl() {
+        return RAXSL;
+    }
+
+    @Override
+    protected String getDECXsl() {
+        return DECXSL;
+    }
+
+    @Override
+    protected String getRADECXsl() {
+        return DECXSL;
+    }
+
+    @Override
+    protected String getStellarXsl() {
+        return STYPEXSL;
+    }
+
+    private Document getStylesheetDOM(String xslfilename) throws SAXException, IOException, ParserConfigurationException {
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        dbf.setNamespaceAware(true);
+        return dbf.newDocumentBuilder().parse(filenameToURL(xslfilename));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/DOML3InputSourceFactoryImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static jaxp.library.JAXPTestUtilities.filenameToURL;
+import static org.w3c.dom.ls.DOMImplementationLS.MODE_SYNCHRONOUS;
+import static org.w3c.dom.traversal.NodeFilter.SHOW_ELEMENT;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSParser;
+import org.w3c.dom.ls.LSParserFilter;
+import org.w3c.dom.ls.LSSerializer;
+import org.w3c.dom.ls.LSSerializerFilter;
+import org.xml.sax.InputSource;
+
+/*
+ * A specialized implementation of an Input Source factory that utilizes
+ * DOM Level 3 implementations to build a Document (DOM) from the
+ * astro input file (XML) and then will serialize the DOM. The serialized DOM
+ * of the astro input file is then used to create the sax InputSource
+ * and set it's system id. It is then returned to the caller.
+ *
+ */
+public class DOML3InputSourceFactoryImpl implements InputSourceFactory {
+    public InputSource newInputSource(String filename) throws Exception {
+        // Create DOMImplementationLS, and DOM L3 LSParser
+        DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
+        DocumentBuilder bldr = fact.newDocumentBuilder();
+        DOMImplementationLS impl = (DOMImplementationLS) bldr.getDOMImplementation();
+        LSParser domparser = impl.createLSParser(MODE_SYNCHRONOUS, null);
+        domparser.setFilter(new MyDOMBuilderFilter());
+
+        // Parse the xml document to create the DOM Document using
+        // the DOM L3 LSParser and a LSInput (formerly LSInputSource)
+        Document doc = null;
+        LSInput src = impl.createLSInput();
+        // register the input file with the input source...
+        String systemId = filenameToURL(filename);
+        src.setSystemId(systemId);
+        try (Reader reader = new FileReader(filename)) {
+            src.setCharacterStream(reader);
+            src.setEncoding("UTF-8");
+            doc = domparser.parse(src);
+        }
+
+        // Use DOM L3 LSSerializer (previously called a DOMWriter)
+        // to serialize the xml doc DOM to a file stream.
+        String tmpCatalog = Files.createTempFile(Paths.get("").toAbsolutePath(), "catalog.xml", null).toString();
+
+        LSSerializer domserializer = impl.createLSSerializer();
+        domserializer.setFilter(new MyDOMWriterFilter());
+        domserializer.getNewLine();
+        DOMConfiguration config = domserializer.getDomConfig();
+        config.setParameter("xml-declaration", Boolean.TRUE);
+        String result = domserializer.writeToString(doc);
+        try (FileWriter os = new FileWriter(tmpCatalog, false)) {
+            os.write(result);
+            os.flush();
+        }
+
+        // Return the Input Source created from the Serialized DOM L3 Document.
+        InputSource catsrc = new InputSource(new InputStreamReader(new ByteArrayInputStream(Files.readAllBytes(Paths.get(tmpCatalog)))));
+        catsrc.setSystemId(systemId);
+        return catsrc;
+    }
+
+    /*
+     * Implementation of a DOM L3 DOM Builder Filter. The filter is capable of
+     * examining nodes as they are available during the parse. This
+     * implementation both rejects (filters) and modifies particular nodes
+     * during the parse of the document. As such, the document in memory will
+     * become a subset of the document on the stream in accordance with the DOM
+     * Level 3 Load and Save Specification, v1.0, sect. 1.3 Load Interfaces.
+     */
+    private static class MyDOMBuilderFilter implements LSParserFilter {
+
+        /*
+         * Filter the DOM. Define element(s) and their children that should be
+         * efficiently skipped thereby filtering them out of the stream.
+         */
+        @Override
+        public short startElement(Element e) {
+            return "_test01".equals(e.getTagName()) ? FILTER_REJECT : FILTER_ACCEPT;
+        }
+
+        /*
+         * Modify the DOM 'in situ'. Find a particular Node and change the Node
+         * value of its child, allow other nodes to pass through unchanged.
+         */
+        @Override
+        public short acceptNode(Node n) {
+            String localname = n.getLocalName();
+            if (localname.equals("_test-04")) {
+                Node child = n.getFirstChild();
+                String text = child.getNodeValue();
+                if (text.equals("T%e!s#t$")) {
+                    child.setNodeValue("T%E!S#T$");
+                }
+            }
+            return FILTER_ACCEPT;
+        }
+
+        /*
+         * Tells the DOMBuilder what types of nodes to show to the filter.
+         */
+        @Override
+        public int getWhatToShow() {
+            return SHOW_ELEMENT;
+        }
+    }
+
+    /*
+     * Implementation of a DOM Serializer Filter (previously called a DOM Writer
+     * Filter) which is a specialization of the NodeFilter interface.
+     */
+    private static class MyDOMWriterFilter implements LSSerializerFilter {
+        public MyDOMWriterFilter() {
+        }
+
+        /*
+         * Must implement method from NodeFilter interface
+         */
+        @Override
+        public short acceptNode(Node node) {
+            return FILTER_ACCEPT;
+        }
+
+        /*
+         * Tells the DOMBuilder what types of nodes to show to the filter.
+         */
+        @Override
+        public int getWhatToShow() {
+            return SHOW_ELEMENT;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/FilterFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.TransformerConfigurationException;
+
+import org.xml.sax.SAXException;
+
+/*
+ * Defines the interface for all concrete implementations of a Filter
+ * Factory.
+ */
+public interface FilterFactory {
+    /*
+     * Allows only the stars between right ascension (R.A.) of min and max to
+     * pass. Filters out all stars that are not in that range of right
+     * ascension. Units of right ascension are hours (h), range of parameters is
+     * 0h to 24h.
+     *
+     * @param min minimum R.A.
+     *
+     * @param max maxmimum R.A.
+     */
+    TransformerHandler newRAFilter(double min, double max) throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException;
+
+    /*
+     * Allows only the stars between declination (DEC) of min and max to pass.
+     * Filters out all stars that are not in that range of declination. Units of
+     * declination are degrees (degs), range of parameters is -90 and +90 degs.
+     *
+     * @param min minimum DEC
+     *
+     * @param max maxmimum DEC
+     */
+    TransformerHandler newDECFilter(double min, double max) throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException;
+
+    /*
+     * Combines the usage of newRAFilter and newDECFilter into one.
+     *
+     * @param rmin minimum R.A.
+     *
+     * @param rmax maxmimum R.A.
+     *
+     * @param dmin minimum DEC
+     *
+     * @param dmax maxmimum DEC
+     */
+    TransformerHandler newRADECFilter(double rmin, double rmax, double dmin, double dmax) throws TransformerConfigurationException, SAXException,
+            ParserConfigurationException, IOException;
+
+    TransformerHandler newStellarTypeFilter(String type) throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException;
+
+    TransformerHandler newHTMLOutput() throws TransformerConfigurationException, SAXException, ParserConfigurationException, IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/InputSourceFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import org.xml.sax.InputSource;
+
+/*
+ * Interface for all input source factory objects. The default implementation
+ * 'InputSourceFactoryImpl' is provided as a straight forward factory
+ * class that creates a new sax input source from a filename.
+ *
+ */
+public interface InputSourceFactory {
+    /*
+     * Creates a new sax InputSource object from a filename.
+     * Also sets the system id of the input source.
+     * @param file filename of the XML input to create the input source.
+     */
+    InputSource newInputSource(String file) throws Exception;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/InputSourceFactoryImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static jaxp.library.JAXPTestUtilities.filenameToURL;
+
+import org.xml.sax.InputSource;
+
+/*
+ * Default implementation of a input source factory. This is the most
+ * straight forward way to create a sax input source and set it's
+ * system id.
+ *
+ */
+public class InputSourceFactoryImpl implements InputSourceFactory {
+    public InputSourceFactoryImpl() {
+    }
+
+    public InputSource newInputSource(String filename) {
+        InputSource catSrc = new InputSource(filename);
+        catSrc.setSystemId(filenameToURL(filename));
+        return catSrc;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/SAXFilterFactoryImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static jaxp.library.JAXPTestUtilities.filenameToURL;
+import static test.astro.AstroConstants.DECENTXSL;
+import static test.astro.AstroConstants.DECXSL;
+import static test.astro.AstroConstants.RAENTXSL;
+import static test.astro.AstroConstants.STYPEXSL;
+import static test.astro.AstroConstants.TOPTEMPLXSL;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Source;
+import javax.xml.transform.sax.SAXSource;
+
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/*
+ * Implementation of the filter factory interface that utilizes SAX
+ * sources rather than Stream sources. This factory utilizes a
+ * SAX parser factory and XMLReader to read in the stylesheets used
+ * to create the filters for the query pipeline.
+ * The XMLReader has been equipped with an entity resolver
+ * SAXFilterFactoryEntityResolver, it is used to resolve external
+ * entities in two specialized stylesheets, ra-ent.xsl (derived from
+ * ra.xsl) and dec-ent.xsl (derived from dec.xsl).
+ *
+ */
+public class SAXFilterFactoryImpl extends SourceFilterFactory {
+    private EntityResolver entityResolver;
+
+    public SAXFilterFactoryImpl() {
+        super();
+        entityResolver = new SAXFilterFactoryEntityResolver();
+    }
+
+    @Override
+    protected Source getSource(String xslFileName) throws SAXException, ParserConfigurationException {
+        SAXSource saxsource = new SAXSource(new InputSource(filenameToURL(xslFileName)));
+        saxsource.setXMLReader(getXMLReader());
+        return saxsource;
+    }
+
+    @Override
+    protected String getRAXsl() {
+        return RAENTXSL;
+    }
+
+    @Override
+    protected String getDECXsl() {
+        return DECENTXSL;
+    }
+
+    @Override
+    protected String getRADECXsl() {
+        return DECXSL;
+    }
+
+    @Override
+    protected String getStellarXsl() {
+        return STYPEXSL;
+    }
+
+    /*
+     * Entity resolver implementation that is used in the SAXFilterFactory
+     * implementation for handling external entities that appear in two
+     * specialized stylesheets, 'ra-ent.xsl' and 'dec-ent.xsl'. Both of these
+     * stylesheets contain an external entity reference to the top level
+     * stylesheet template, which is stored in a separate file,
+     * 'toptemplate.xsl'.
+     */
+    private static class SAXFilterFactoryEntityResolver implements EntityResolver {
+        public InputSource resolveEntity(String publicid, String sysId) {
+            if (sysId.equals("http://astro.com/stylesheets/toptemplate")) {
+                InputSource retval = new InputSource(TOPTEMPLXSL);
+                retval.setSystemId(filenameToURL(TOPTEMPLXSL));
+                return retval;
+            } else {
+                return null; // use default behavior
+            }
+        }
+    }
+
+    private XMLReader getXMLReader() throws SAXException, ParserConfigurationException {
+        SAXParserFactory pfactory = SAXParserFactory.newInstance();
+        pfactory.setNamespaceAware(true);
+        // pfactory.setValidating(true);
+        XMLReader xmlreader = pfactory.newSAXParser().getXMLReader();
+        // entity resolver is used in stylesheets ra-ent.xsl,
+        // dec-ent.xsl. Other stylehsheets will not use it
+        // since they do not contain ext entities.
+        xmlreader.setEntityResolver(entityResolver);
+        return xmlreader;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/SourceFilterFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -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.
+ */
+package test.astro;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+
+import org.xml.sax.SAXException;
+
+public abstract class SourceFilterFactory extends AbstractFilterFactory {
+    @Override
+    protected TransformerHandler getTransformerHandler(String xslFileName) throws SAXException, ParserConfigurationException,
+            TransformerConfigurationException, IOException {
+        return getFactory().newTransformerHandler(getSource(xslFileName));
+    }
+
+    abstract protected Source getSource(String xslFileName) throws SAXException, ParserConfigurationException, IOException;
+
+    private SAXTransformerFactory getFactory() {
+        return (SAXTransformerFactory) TransformerFactory.newInstance();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/StreamFilterFactoryImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static jaxp.library.JAXPTestUtilities.filenameToURL;
+import static test.astro.AstroConstants.DECXSL;
+import static test.astro.AstroConstants.RADECXSL;
+import static test.astro.AstroConstants.RAXSL;
+import static test.astro.AstroConstants.STYPEXSL;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+public class StreamFilterFactoryImpl extends SourceFilterFactory {
+    @Override
+    protected Source getSource(String xslFileName) {
+        return new StreamSource(filenameToURL(xslFileName));
+    }
+
+    @Override
+    protected String getRAXsl() {
+        return RAXSL;
+    }
+
+    @Override
+    protected String getDECXsl() {
+        return DECXSL;
+    }
+
+    @Override
+    protected String getRADECXsl() {
+        return RADECXSL;
+    }
+
+    @Override
+    protected String getStellarXsl() {
+        return STYPEXSL;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/libs/test/astro/TemplatesFilterFactoryImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package test.astro;
+
+import static jaxp.library.JAXPTestUtilities.filenameToURL;
+import static test.astro.AstroConstants.DECXSL;
+import static test.astro.AstroConstants.RAURIXSL;
+import static test.astro.AstroConstants.STYPEXSL;
+import static test.astro.AstroConstants.TOPTEMPLINCXSL;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.URIResolver;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TemplatesHandler;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamSource;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/*
+ * Implementation of the filter factory interface that utilizes
+ * a TemplatesHandler and creates Templates from the stylesheets.
+ * The Templates objects are then used to create a TransformerHandler
+ * a.k.a Filter which is returned to the caller.
+ * This factory uses a Uri resolver which is registered with the
+ * Transformer factory.
+ *
+ */
+public class TemplatesFilterFactoryImpl extends AbstractFilterFactory {
+    private final URIResolver uriResolver = new TemplatesFilterFactoryURIResolver();
+
+    @Override
+    protected String getRAXsl() {
+        return RAURIXSL;
+    }
+
+    @Override
+    protected String getDECXsl() {
+        return DECXSL;
+    }
+
+    @Override
+    protected String getRADECXsl() {
+        return DECXSL;
+    }
+
+    @Override
+    protected String getStellarXsl() {
+        return STYPEXSL;
+    }
+
+    @Override
+    protected TransformerHandler getTransformerHandler(String xslFileName) throws SAXException, ParserConfigurationException,
+            TransformerConfigurationException, IOException {
+        SAXTransformerFactory factory = (SAXTransformerFactory) TransformerFactory.newInstance();
+        factory.setURIResolver(uriResolver);
+
+        TemplatesHandler templatesHandler = factory.newTemplatesHandler();
+
+        SAXParserFactory pFactory = SAXParserFactory.newInstance();
+        pFactory.setNamespaceAware(true);
+
+        XMLReader xmlreader = pFactory.newSAXParser().getXMLReader();
+
+        // create the stylesheet input source
+        InputSource xslSrc = new InputSource(xslFileName);
+
+        xslSrc.setSystemId(filenameToURL(xslFileName));
+        // hook up the templates handler as the xsl content handler
+        xmlreader.setContentHandler(templatesHandler);
+        // call parse on the xsl input source
+
+        xmlreader.parse(xslSrc);
+
+        // extract the Templates object created from the xsl input source
+        return factory.newTransformerHandler(templatesHandler.getTemplates());
+    }
+
+    /*
+     * Uri resolver used to resolve stylesheet used by the Templates filter
+     * factory.
+     */
+    private static class TemplatesFilterFactoryURIResolver implements URIResolver {
+        public Source resolve(String href, String base) throws TransformerException {
+            if ("http://astro.com/stylesheets/topleveltemplate".equals(href)) {
+                StreamSource ss = new StreamSource(TOPTEMPLINCXSL);
+                ss.setSystemId(filenameToURL(TOPTEMPLINCXSL));
+                return ss;
+            } else {
+                return null;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/JdkXmlDomTest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -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.
+ */
+package org.w3c.dom;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/*
+ * @bug 8078139
+ * @summary Verifies that jdk.xml.dom classes are loaded by the ext class loader.
+ */
+public class JdkXmlDomTest {
+    @Test
+    public void test() throws ClassNotFoundException {
+        ClassLoader cl = ClassLoader.getSystemClassLoader().getParent();
+        Class<?> cls = Class.forName("org.w3c.dom.xpath.XPathEvaluator", false, cl);
+
+        Assert.assertTrue(cls.getClassLoader() != null);
+    }
+}
--- a/jaxws/.hgtags	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/.hgtags	Wed Jul 05 20:30:08 2017 +0200
@@ -306,3 +306,4 @@
 1e06b36bb396c0495e0774f1c6b0356d03847659 jdk9-b58
 8a9ebae410bc388668fc203e559b5407bde757eb jdk9-b59
 f31835b59035377a220efc5a248b90f090ee1689 jdk9-b60
+77f44848c44c003205490bf5ab88035233b65418 jdk9-b61
--- a/jaxws/src/java.activation/share/classes/javax/activation/ActivationDataFlavor.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.activation/share/classes/javax/activation/ActivationDataFlavor.java	Wed Jul 05 20:30:08 2017 +0200
@@ -31,10 +31,10 @@
 
 /**
  * The ActivationDataFlavor class is a special subclass of
- * <code>java.awt.datatransfer.DataFlavor</code>. It allows the JAF to
+ * {@code java.awt.datatransfer.DataFlavor}. It allows the JAF to
  * set all three values stored by the DataFlavor class via a new
- * constructor. It also contains improved MIME parsing in the <code>equals
- * </code> method. Except for the improved parsing, its semantics are
+ * constructor. It also contains improved MIME parsing in the {@code equals}
+ * method. Except for the improved parsing, its semantics are
  * identical to that of the JDK's DataFlavor class.
  *
  * @since 1.6
@@ -70,7 +70,6 @@
      * representationClass = representationClass<br>
      * mimeType            = mimeType<br>
      * humanName           = humanName
-     * <p>
      *
      * @param representationClass the class used in this DataFlavor
      * @param mimeType the MIME type of the data represented by this class
@@ -98,7 +97,7 @@
      * otherwise:
      * <p>
      * representationClass = InputStream<p>
-     * mimeType = mimeType<p>
+     * mimeType = mimeType
      *
      * @param representationClass the class used in this DataFlavor
      * @param humanPresentableName the human presentable name of the flavor
@@ -175,7 +174,7 @@
 
     /**
      * Compares the DataFlavor passed in with this DataFlavor; calls
-     * the <code>isMimeTypeEqual</code> method.
+     * the {@code isMimeTypeEqual} method.
      *
      * @param dataFlavor        the DataFlavor to compare with
      * @return                  true if the MIME type and representation class
--- a/jaxws/src/java.activation/share/classes/javax/activation/CommandInfo.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.activation/share/classes/javax/activation/CommandInfo.java	Wed Jul 05 20:30:08 2017 +0200
@@ -85,10 +85,10 @@
      * Return the instantiated JavaBean component.
      * <p>
      * Begin by instantiating the component with
-     * <code>Beans.instantiate()</code>.
+     * {@code Beans.instantiate()}.
      * <p>
-     * If the bean implements the <code>javax.activation.CommandObject</code>
-     * interface, call its <code>setCommandContext</code> method.
+     * If the bean implements the {@code javax.activation.CommandObject}
+     * interface, call its {@code setCommandContext} method.
      * <p>
      * If the DataHandler parameter is null, then the bean is
      * instantiated with no data. NOTE: this may be useful
@@ -102,7 +102,7 @@
      * this method will check if it implements the
      * java.io.Externalizable interface. If it does, the bean's
      * readExternal method will be called if an InputStream
-     * can be acquired from the DataHandler.<p>
+     * can be acquired from the DataHandler.
      *
      * @param dh        The DataHandler that describes the data to be
      *                  passed to the command.
--- a/jaxws/src/java.activation/share/classes/javax/activation/CommandMap.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.activation/share/classes/javax/activation/CommandMap.java	Wed Jul 05 20:30:08 2017 +0200
@@ -46,7 +46,6 @@
 
     /**
      * Get the default CommandMap.
-     * <p>
      *
      * <ul>
      * <li> In cases where a CommandMap instance has been previously set
@@ -54,7 +53,7 @@
      *  return the CommandMap.
      * <li>
      *  In cases where no CommandMap has been set, the CommandMap
-     *       creates an instance of <code>MailcapCommandMap</code> and
+     *       creates an instance of {@code MailcapCommandMap} and
      *       set that to the default, returning its value.
      *
      * </ul>
@@ -77,7 +76,7 @@
 
     /**
      * Set the default CommandMap. Reset the CommandMap to the default by
-     * calling this method with <code>null</code>.
+     * calling this method with {@code null}.
      *
      * @param commandMap The new default CommandMap.
      * @exception SecurityException if the caller doesn't have permission
@@ -118,10 +117,10 @@
      * Get the preferred command list from a MIME Type. The actual semantics
      * are determined by the implementation of the CommandMap. <p>
      *
-     * The <code>DataSource</code> provides extra information, such as
+     * The {@code DataSource} provides extra information, such as
      * the file name, that a CommandMap implementation may use to further
      * refine the list of commands that are returned.  The implementation
-     * in this class simply calls the <code>getPreferredCommands</code>
+     * in this class simply calls the {@code getPreferredCommands}
      * method that ignores this argument.
      *
      * @param mimeType  the MIME type
@@ -146,10 +145,10 @@
      * Get all the available commands for this type. This method
      * should return all the possible commands for this MIME type. <p>
      *
-     * The <code>DataSource</code> provides extra information, such as
+     * The {@code DataSource} provides extra information, such as
      * the file name, that a CommandMap implementation may use to further
      * refine the list of commands that are returned.  The implementation
-     * in this class simply calls the <code>getAllCommands</code>
+     * in this class simply calls the {@code getAllCommands}
      * method that ignores this argument.
      *
      * @param mimeType  the MIME type
@@ -173,10 +172,10 @@
     /**
      * Get the default command corresponding to the MIME type. <p>
      *
-     * The <code>DataSource</code> provides extra information, such as
+     * The {@code DataSource} provides extra information, such as
      * the file name, that a CommandMap implementation may use to further
      * refine the command that is chosen.  The implementation
-     * in this class simply calls the <code>getCommand</code>
+     * in this class simply calls the {@code getCommand}
      * method that ignores this argument.
      *
      * @param mimeType  the MIME type
@@ -206,10 +205,10 @@
      * The mechanism and semantics for determining this are determined
      * by the implementation of the particular CommandMap. <p>
      *
-     * The <code>DataSource</code> provides extra information, such as
+     * The {@code DataSource} provides extra information, such as
      * the file name, that a CommandMap implementation may use to further
      * refine the choice of DataContentHandler.  The implementation
-     * in this class simply calls the <code>createDataContentHandler</code>
+     * in this class simply calls the {@code createDataContentHandler}
      * method that ignores this argument.
      *
      * @param mimeType  the MIME type
--- a/jaxws/src/java.activation/share/classes/javax/activation/CommandObject.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.activation/share/classes/javax/activation/CommandObject.java	Wed Jul 05 20:30:08 2017 +0200
@@ -34,7 +34,7 @@
  * data they should operate on.  JavaBeans that don't implement
  * this interface may be used as well.  Such commands may obtain
  * the data using the Externalizable interface, or using an
- * application-specific method.<p>
+ * application-specific method.
  *
  * @since 1.6
  */
@@ -44,7 +44,7 @@
      * Initialize the Command with the verb it is requested to handle
      * and the DataHandler that describes the data it will
      * operate on. <b>NOTE:</b> it is acceptable for the caller
-     * to pass <i>null</i> as the value for <code>DataHandler</code>.
+     * to pass <i>null</i> as the value for {@code DataHandler}.
      *
      * @param verb The Command Verb this object refers to.
      * @param dh The DataHandler.
--- a/jaxws/src/java.activation/share/classes/javax/activation/DataHandler.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.activation/share/classes/javax/activation/DataHandler.java	Wed Jul 05 20:30:08 2017 +0200
@@ -54,11 +54,11 @@
  *
  * <b>DataHandler and CommandMaps</b><p>
  * The DataHandler keeps track of the current CommandMap that it uses to
- * service requests for commands (<code>getCommand</code>,
- * <code>getAllCommands</code>, <code>getPreferredCommands</code>).
+ * service requests for commands ({@code getCommand, getAllCommands,
+ * getPreferredCommands}).
  * Each instance of a DataHandler may have a CommandMap associated with
- * it using the <code>setCommandMap</code> method.  If a CommandMap was
- * not set, DataHandler calls the <code>getDefaultCommandMap</code>
+ * it using the {@code setCommandMap} method.  If a CommandMap was
+ * not set, DataHandler calls the {@code getDefaultCommandMap}
  * method in CommandMap and uses the value it returns. See
  * <i>CommandMap</i> for more information. <p>
  *
@@ -105,7 +105,7 @@
     private String shortType = null;
 
     /**
-     * Create a <code>DataHandler</code> instance referencing the
+     * Create a {@code DataHandler} instance referencing the
      * specified DataSource.  The data exists in a byte stream form.
      * The DataSource will provide an InputStream to access the data.
      *
@@ -118,7 +118,7 @@
     }
 
     /**
-     * Create a <code>DataHandler</code> instance representing an object
+     * Create a {@code DataHandler} instance representing an object
      * of this MIME type.  This constructor is
      * used when the application already has an in-memory representation
      * of the data in the form of a Java Object.
@@ -133,8 +133,8 @@
     }
 
     /**
-     * Create a <code>DataHandler</code> instance referencing a URL.
-     * The DataHandler internally creates a <code>URLDataSource</code>
+     * Create a {@code DataHandler} instance referencing a URL.
+     * The DataHandler internally creates a {@code URLDataSource}
      * instance to represent the URL.
      *
      * @param url       a URL object
@@ -181,7 +181,7 @@
     /**
      * Return the name of the data object. If this DataHandler
      * was created with a DataSource, this method calls through
-     * to the <code>DataSource.getName</code> method, otherwise it
+     * to the {@code DataSource.getName} method, otherwise it
      * returns <i>null</i>.
      *
      * @return  the name of the object
@@ -211,7 +211,7 @@
      * Get the InputStream for this object. <p>
      *
      * For DataHandlers instantiated with a DataSource, the DataHandler
-     * calls the <code>DataSource.getInputStream</code> method and
+     * calls the {@code DataSource.getInputStream} method and
      * returns the result to the caller.
      * <p>
      * For DataHandlers instantiated with an Object, the DataHandler
@@ -219,11 +219,11 @@
      * the DataHandler can not find a DataContentHandler for this MIME
      * type, it throws an UnsupportedDataTypeException.  If it is
      * successful, it creates a pipe and a thread.  The thread uses the
-     * DataContentHandler's <code>writeTo</code> method to write the
+     * DataContentHandler's {@code writeTo} method to write the
      * stream data into one end of the pipe.  The other end of the pipe
      * is returned to the caller.  Because a thread is created to copy
      * the data, IOExceptions that may occur during the copy can not be
-     * propagated back to the caller. The result is an empty stream.<p>
+     * propagated back to the caller. The result is an empty stream.
      *
      * @return  the InputStream representing this data
      * @exception IOException   if an I/O error occurs
@@ -281,7 +281,7 @@
     }
 
     /**
-     * Write the data to an <code>OutputStream</code>.<p>
+     * Write the data to an {@code OutputStream}.<p>
      *
      * If the DataHandler was created with a DataSource, writeTo
      * retrieves the InputStream and copies the bytes from the
@@ -290,7 +290,7 @@
      * If the DataHandler was created with an object, writeTo
      * retrieves the DataContentHandler for the object's type.
      * If the DataContentHandler was found, it calls the
-     * <code>writeTo</code> method on the <code>DataContentHandler</code>.
+     * {@code writeTo} method on the {@code DataContentHandler}.
      *
      * @param os        the OutputStream to write to
      * @exception IOException   if an I/O error occurs
@@ -322,8 +322,8 @@
      * Get an OutputStream for this DataHandler to allow overwriting
      * the underlying data.
      * If the DataHandler was created with a DataSource, the
-     * DataSource's <code>getOutputStream</code> method is called.
-     * Otherwise, <code>null</code> is returned.
+     * DataSource's {@code getOutputStream} method is called.
+     * Otherwise, {@code null} is returned.
      *
      * @return the OutputStream
      *
@@ -348,12 +348,12 @@
      * The DataHandler attempts to find a DataContentHandler that
      * corresponds to the MIME type of the data. If one is located,
      * the DataHandler calls the DataContentHandler's
-     * <code>getTransferDataFlavors</code> method. <p>
+     * {@code getTransferDataFlavors} method. <p>
      *
      * If a DataContentHandler can <i>not</i> be located, and if the
      * DataHandler was created with a DataSource (or URL), one
      * DataFlavor is returned that represents this object's MIME type
-     * and the <code>java.io.InputStream</code> class.  If the
+     * and the {@code java.io.InputStream} class.  If the
      * DataHandler was created with an object and a MIME type,
      * getTransferDataFlavors returns one DataFlavor that represents
      * this object's MIME type and the object's class.
@@ -381,7 +381,7 @@
      * for this object.<p>
      *
      * This method iterates through the DataFlavors returned from
-     * <code>getTransferDataFlavors</code>, comparing each with
+     * {@code getTransferDataFlavors}, comparing each with
      * the specified flavor.
      *
      * @param flavor    the requested flavor for the data
@@ -407,10 +407,10 @@
      *
      * The DataHandler attempts to locate a DataContentHandler
      * for this MIME type. If one is found, the passed in DataFlavor
-     * and the type of the data are passed to its <code>getTransferData</code>
+     * and the type of the data are passed to its {@code getTransferData}
      * method. If the DataHandler fails to locate a DataContentHandler
      * and the flavor specifies this object's MIME type and the
-     * <code>java.io.InputStream</code> class, this object's InputStream
+     * {@code java.io.InputStream} class, this object's InputStream
      * is returned.
      * Otherwise it throws an UnsupportedFlavorException. <p>
      *
@@ -438,10 +438,10 @@
 
     /**
      * Set the CommandMap for use by this DataHandler.
-     * Setting it to <code>null</code> causes the CommandMap to revert
+     * Setting it to {@code null} causes the CommandMap to revert
      * to the CommandMap returned by the
-     * <code>CommandMap.getDefaultCommandMap</code> method.
-     * Changing the CommandMap, or setting it to <code>null</code>,
+     * {@code CommandMap.getDefaultCommandMap} method.
+     * Changing the CommandMap, or setting it to {@code null},
      * clears out any data cached from the previous CommandMap.
      *
      * @param commandMap        the CommandMap to use in this DataHandler
@@ -460,7 +460,7 @@
 
     /**
      * Return the <i>preferred</i> commands for this type of data.
-     * This method calls the <code>getPreferredCommands</code> method
+     * This method calls the {@code getPreferredCommands} method
      * in the CommandMap associated with this instance of DataHandler.
      * This method returns an array that represents a subset of
      * available commands. In cases where multiple commands for the
@@ -484,7 +484,7 @@
      * This method returns an array containing all commands
      * for the type of data represented by this DataHandler. The
      * MIME type for the underlying data represented by this DataHandler
-     * is used to call through to the <code>getAllCommands</code> method
+     * is used to call through to the {@code getAllCommands} method
      * of the CommandMap associated with this DataHandler.
      *
      * @return  the CommandInfo objects representing all the commands
@@ -502,7 +502,7 @@
      * Get the command <i>cmdName</i>. Use the search semantics as
      * defined by the CommandMap installed in this DataHandler. The
      * MIME type for the underlying data represented by this DataHandler
-     * is used to call through to the <code>getCommand</code> method
+     * is used to call through to the {@code getCommand} method
      * of the CommandMap associated with this DataHandler.
      *
      * @param cmdName   the command name
@@ -527,7 +527,7 @@
      * If the DataHandler was instantiated with a DataSource,
      * this method uses a DataContentHandler to return the content
      * object for the data represented by this DataHandler. If no
-     * <code>DataContentHandler</code> can be found for the
+     * {@code DataContentHandler} can be found for the
      * the type of this data, the DataHandler returns an
      * InputStream for the data.
      *
@@ -547,9 +547,9 @@
      * and instantiates the corresponding command, usually
      * a JavaBean component.
      * <p>
-     * This method calls the CommandInfo's <code>getCommandObject</code>
-     * method with the <code>ClassLoader</code> used to load
-     * the <code>javax.activation.DataHandler</code> class itself.
+     * This method calls the CommandInfo's {@code getCommandObject}
+     * method with the {@code ClassLoader} used to load
+     * the {@code javax.activation.DataHandler} class itself.
      *
      * @param cmdinfo   the CommandInfo corresponding to a command
      * @return  the instantiated command object
@@ -701,16 +701,16 @@
     }
 
     /**
-     * Returns an <code>InputStream</code> representing this object.
-     * @return  the <code>InputStream</code>
+     * Returns an {@code InputStream} representing this object.
+     * @return  the {@code InputStream}
      */
     public InputStream getInputStream() throws IOException {
         return dataHandler.getInputStream();
     }
 
     /**
-     * Returns the <code>OutputStream</code> for this object.
-     * @return  the <code>OutputStream</code>
+     * Returns the {@code OutputStream} for this object.
+     * @return  the {@code OutputStream}
      */
     public OutputStream getOutputStream() throws IOException {
         return dataHandler.getOutputStream();
@@ -754,7 +754,7 @@
     }
 
     /**
-     * Return the DataFlavors for this <code>DataContentHandler</code>.
+     * Return the DataFlavors for this {@code DataContentHandler}.
      * @return  the DataFlavors
      */
     public DataFlavor[] getTransferDataFlavors() {
@@ -842,7 +842,7 @@
     }
 
     /**
-     * Return the DataFlavors for this <code>DataContentHandler</code>.
+     * Return the DataFlavors for this {@code DataContentHandler}.
      * @return  the DataFlavors
      */
     public synchronized DataFlavor[] getTransferDataFlavors() {
--- a/jaxws/src/java.activation/share/classes/javax/activation/MailcapCommandMap.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.activation/share/classes/javax/activation/MailcapCommandMap.java	Wed Jul 05 20:30:08 2017 +0200
@@ -45,14 +45,13 @@
  * system for mailcap file entries. When requests are made
  * to search for commands in the MailcapCommandMap, it searches
  * mailcap files in the following order:
- * <p>
  * <ol>
  * <li> Programatically added entries to the MailcapCommandMap instance.
- * <li> The file <code>.mailcap</code> in the user's home directory.
- * <li> The file &lt;<i>java.home</i>&gt;<code>/lib/mailcap</code>.
- * <li> The file or resources named <code>META-INF/mailcap</code>.
- * <li> The file or resource named <code>META-INF/mailcap.default</code>
- * (usually found only in the <code>activation.jar</code> file).
+ * <li> The file {@code .mailcap} in the user's home directory.
+ * <li> The file {@literal <}<i>java.home</i>{@literal >}{@code /lib/mailcap}.
+ * <li> The file or resources named {@code META-INF/mailcap}.
+ * <li> The file or resource named {@code META-INF/mailcap.default}
+ * (usually found only in the {@code activation.jar} file).
  * </ol>
  * <p>
  * <b>Mailcap file format:</b><p>
@@ -70,46 +69,43 @@
  *
  * When a mailcap file is
  * parsed, the MailcapCommandMap recognizes certain parameter signatures,
- * specifically those parameter names that begin with <code>x-java-</code>.
+ * specifically those parameter names that begin with {@code x-java-}.
  * The MailcapCommandMap uses this signature to find
  * command entries for inclusion into its registries.
- * Parameter names with the form <code>x-java-&lt;name></code>
+ * Parameter names with the form {@code x-java-<name>}
  * are read by the MailcapCommandMap as identifying a command
- * with the name <i>name</i>. When the <i>name</i> is <code>
- * content-handler</code> the MailcapCommandMap recognizes the class
+ * with the name <i>name</i>. When the <i>name</i> is {@code
+ * content-handler} the MailcapCommandMap recognizes the class
  * signified by this parameter as a <i>DataContentHandler</i>.
  * All other commands are handled generically regardless of command
  * name. The command implementation is specified by a fully qualified
  * class name of a JavaBean(tm) component. For example; a command for viewing
- * some data can be specified as: <code>x-java-view=com.foo.ViewBean</code>.<p>
+ * some data can be specified as: {@code x-java-view=com.foo.ViewBean}.<p>
  *
- * When the command name is <code>fallback-entry</code>, the value of
- * the command may be <code>true</code> or <code>false</code>.  An
+ * When the command name is {@code fallback-entry}, the value of
+ * the command may be {@code true} or {@code false}.  An
  * entry for a MIME type that includes a parameter of
- * <code>x-java-fallback-entry=true</code> defines fallback commands
+ * {@code x-java-fallback-entry=true} defines fallback commands
  * for that MIME type that will only be used if no non-fallback entry
- * can be found.  For example, an entry of the form <code>text/*; ;
- * x-java-fallback-entry=true; x-java-view=com.sun.TextViewer</code>
+ * can be found.  For example, an entry of the form {@code text/*; ;
+ * x-java-fallback-entry=true; x-java-view=com.sun.TextViewer}
  * specifies a view command to be used for any text MIME type.  This
  * view command would only be used if a non-fallback view command for
  * the MIME type could not be found.<p>
  *
  * MailcapCommandMap aware mailcap files have the
- * following general form:<p>
- * <code>
- * # Comments begin with a '#' and continue to the end of the line.<br>
- * &lt;mime type>; ; &lt;parameter list><br>
- * # Where a parameter list consists of one or more parameters,<br>
- * # where parameters look like: x-java-view=com.sun.TextViewer<br>
- * # and a parameter list looks like: <br>
+ * following general form:
+ * <pre>{@code
+ * # Comments begin with a '#' and continue to the end of the line.
+ * <mime type>; ; <parameter list>
+ * # Where a parameter list consists of one or more parameters,
+ * # where parameters look like: x-java-view=com.sun.TextViewer
+ * # and a parameter list looks like:
  * text/plain; ; x-java-view=com.sun.TextViewer; x-java-edit=com.sun.TextEdit
- * <br>
- * # Note that mailcap entries that do not contain 'x-java' parameters<br>
- * # and comply to RFC 1524 are simply ignored:<br>
- * image/gif; /usr/dt/bin/sdtimage %s<br>
- *
- * </code>
- * <p>
+ * # Note that mailcap entries that do not contain 'x-java' parameters
+ * # and comply to RFC 1524 are simply ignored:
+ * image/gif; /usr/dt/bin/sdtimage %s
+ * }</pre>
  *
  * @author Bart Calder
  * @author Bill Shannon
@@ -451,7 +447,7 @@
     }
 
     /**
-     * Get the command corresponding to <code>cmdName</code> for the MIME type.
+     * Get the command corresponding to {@code cmdName} for the MIME type.
      *
      * @param mimeType  the MIME type
      * @param cmdName   the command name
--- a/jaxws/src/java.activation/share/classes/javax/activation/MimetypesFileTypeMap.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.activation/share/classes/javax/activation/MimetypesFileTypeMap.java	Wed Jul 05 20:30:08 2017 +0200
@@ -33,33 +33,32 @@
 
 /**
  * This class extends FileTypeMap and provides data typing of files
- * via their file extension. It uses the <code>.mime.types</code> format. <p>
+ * via their file extension. It uses the {@code .mime.types} format. <p>
  *
  * <b>MIME types file search order:</b><p>
  * The MimetypesFileTypeMap looks in various places in the user's
  * system for MIME types file entries. When requests are made
  * to search for MIME types in the MimetypesFileTypeMap, it searches
  * MIME types files in the following order:
- * <p>
  * <ol>
  * <li> Programmatically added entries to the MimetypesFileTypeMap instance.
- * <li> The file <code>.mime.types</code> in the user's home directory.
- * <li> The file &lt;<i>java.home</i>&gt;<code>/lib/mime.types</code>.
- * <li> The file or resources named <code>META-INF/mime.types</code>.
- * <li> The file or resource named <code>META-INF/mimetypes.default</code>
- * (usually found only in the <code>activation.jar</code> file).
+ * <li> The file {@code .mime.types} in the user's home directory.
+ * <li> The file {@literal <}<i>java.home</i>{@literal >}{@code /lib/mime.types}.
+ * <li> The file or resources named {@code META-INF/mime.types}.
+ * <li> The file or resource named {@code META-INF/mimetypes.default}
+ * (usually found only in the {@code activation.jar} file).
  * </ol>
  * <p>
- * <b>MIME types file format:</b><p>
+ * <b>MIME types file format:</b>
  *
- * <code>
- * # comments begin with a '#'<br>
- * # the format is &lt;mime type> &lt;space separated file extensions><br>
- * # for example:<br>
- * text/plain    txt text TXT<br>
- * # this would map file.txt, file.text, and file.TXT to<br>
- * # the mime type "text/plain"<br>
- * </code>
+ * <pre>{@code
+ * # comments begin with a '#'
+ * # the format is <mime type> <space separated file extensions>
+ * # for example:
+ * text/plain    txt text TXT
+ * # this would map file.txt, file.text, and file.TXT to
+ * # the mime type "text/plain"
+ * }</pre>
  *
  * @author Bart Calder
  * @author Bill Shannon
@@ -277,7 +276,7 @@
     /**
      * Return the MIME type of the file object.
      * The implementation in this class calls
-     * <code>getContentType(f.getName())</code>.
+     * {@code getContentType(f.getName())}.
      *
      * @param f the file
      * @return  the file's MIME type
--- a/jaxws/src/java.annotations.common/share/classes/javax/annotation/PostConstruct.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.annotations.common/share/classes/javax/annotation/PostConstruct.java	Wed Jul 05 20:30:08 2017 +0200
@@ -39,7 +39,6 @@
  * method can be annotated with this annotation. The method on which the
  * PostConstruct annotation is applied MUST fulfill all of the following
  * criteria:
- * <p>
  * <ul>
  * <li>The method MUST NOT have any parameters except in the case of
  * interceptors in which case it takes an InvocationContext object as
--- a/jaxws/src/java.annotations.common/share/classes/javax/annotation/PreDestroy.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.annotations.common/share/classes/javax/annotation/PreDestroy.java	Wed Jul 05 20:30:08 2017 +0200
@@ -38,7 +38,6 @@
  * except the application client container in Java EE 5. The method on which
  * the PreDestroy annotation is applied MUST fulfill all of the following
  * criteria:
- * <p>
  * <ul>
  * <li>The method MUST NOT have any parameters except in the case of
  * interceptors in which case it takes an InvocationContext object as
--- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/DatatypeConverterInterface.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/DatatypeConverterInterface.java	Wed Jul 05 20:30:08 2017 +0200
@@ -38,19 +38,16 @@
  * functionality.  Calling this api repeatedly will have no effect - the
  * DatatypeConverter instance passed into the first invocation is the one that
  * will be used from then on.
- * </p>
  *
  * <p>
  * This interface defines the parse and print methods. There is one
  * parse and print method for each XML schema datatype specified in the
  * the default binding Table 5-1 in the JAXB specification.
- * </p>
  *
  * <p>
  * The parse and print methods defined here are invoked by the static parse
  * and print methods defined in the {@link DatatypeConverter DatatypeConverter}
  * class.
- * </p>
  *
  * <p>
  * A parse method for a XML schema datatype must be capable of converting any
@@ -60,21 +57,23 @@
  * If an error is encountered during conversion, then an IllegalArgumentException
  * or a subclass of IllegalArgumentException must be thrown by the method.
  *
- * </p>
- *
  * <p>
  * A print method for a XML schema datatype can output any lexical
  * representation that is valid with respect to the XML schema datatype.
  * If an error is encountered during conversion, then an IllegalArgumentException,
  * or a subclass of IllegalArgumentException must be thrown by the method.
- * </p>
  *
+ * <p>
  * The prefix xsd: is used to refer to XML schema datatypes
  * <a href="http://www.w3.org/TR/xmlschema-2/"> XML Schema Part2: Datatypes
  * specification.</a>
  *
- * <p>
- * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Ryan Shoemaker,Sun Microsystems Inc.</li></ul>
+ * @author <ul>
+ *         <li>Sekhar Vajjhala, Sun Microsystems, Inc.</li>
+ *         <li>Joe Fialli, Sun Microsystems Inc.</li>
+ *         <li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li>
+ *         <li>Ryan Shoemaker,Sun Microsystems Inc.</li>
+ *         </ul>
  * @see DatatypeConverter
  * @see ParseConversionEvent
  * @see PrintConversionEvent
@@ -83,7 +82,6 @@
 
 public interface DatatypeConverterInterface {
     /**
-     * <p>
      * Convert the string argument into a string.
      * @param lexicalXSDString
      *     A lexical representation of the XML Schema datatype xsd:string
@@ -93,91 +91,83 @@
     public String parseString( String lexicalXSDString );
 
     /**
-     * <p>
      * Convert the string argument into a BigInteger value.
      * @param lexicalXSDInteger
      *     A string containing a lexical representation of
      *     xsd:integer.
      * @return
      *     A BigInteger value represented by the string argument.
-     * @throws NumberFormatException <code>lexicalXSDInteger</code> is not a valid string representation of a {@link java.math.BigInteger} value.
+     * @throws NumberFormatException {@code lexicalXSDInteger} is not a valid string representation of a {@link java.math.BigInteger} value.
      */
     public java.math.BigInteger parseInteger( String lexicalXSDInteger );
 
     /**
-     * <p>
      * Convert the string argument into an int value.
      * @param lexicalXSDInt
      *     A string containing a lexical representation of
      *     xsd:int.
      * @return
      *     An int value represented byte the string argument.
-     * @throws NumberFormatException <code>lexicalXSDInt</code> is not a valid string representation of an <code>int</code> value.
+     * @throws NumberFormatException {@code lexicalXSDInt} is not a valid string representation of an {@code int} value.
      */
     public int parseInt( String lexicalXSDInt );
 
     /**
-     * <p>
      * Converts the string argument into a long value.
      * @param lexicalXSDLong
      *     A string containing lexical representation of
      *     xsd:long.
      * @return
      *     A long value represented by the string argument.
-     * @throws NumberFormatException <code>lexicalXSDLong</code> is not a valid string representation of a <code>long</code> value.
+     * @throws NumberFormatException {@code lexicalXSDLong} is not a valid string representation of a {@code long} value.
      */
     public long parseLong( String lexicalXSDLong );
 
     /**
-     * <p>
      * Converts the string argument into a short value.
      * @param lexicalXSDShort
      *     A string containing lexical representation of
      *     xsd:short.
      * @return
      *     A short value represented by the string argument.
-     * @throws NumberFormatException <code>lexicalXSDShort</code> is not a valid string representation of a <code>short</code> value.
+     * @throws NumberFormatException {@code lexicalXSDShort} is not a valid string representation of a {@code short} value.
      */
     public short parseShort( String lexicalXSDShort );
 
     /**
-     * <p>
      * Converts the string argument into a BigDecimal value.
      * @param lexicalXSDDecimal
      *     A string containing lexical representation of
      *     xsd:decimal.
      * @return
      *     A BigDecimal value represented by the string argument.
-     * @throws NumberFormatException <code>lexicalXSDDecimal</code> is not a valid string representation of {@link java.math.BigDecimal}.
+     * @throws NumberFormatException {@code lexicalXSDDecimal} is not a valid string representation of {@link java.math.BigDecimal}.
      */
     public java.math.BigDecimal parseDecimal( String lexicalXSDDecimal );
 
     /**
-     * <p>
      * Converts the string argument into a float value.
      * @param lexicalXSDFloat
      *     A string containing lexical representation of
      *     xsd:float.
      * @return
      *     A float value represented by the string argument.
-     * @throws NumberFormatException <code>lexicalXSDFloat</code> is not a valid string representation of a <code>float</code> value.
+     * @throws NumberFormatException {@code lexicalXSDFloat} is not a valid string representation of a {@code float} value.
      */
     public float parseFloat( String lexicalXSDFloat );
 
     /**
-     * <p>
      * Converts the string argument into a double value.
      * @param lexicalXSDDouble
      *     A string containing lexical representation of
      *     xsd:double.
      * @return
      *     A double value represented by the string argument.
-     * @throws NumberFormatException <code>lexicalXSDDouble</code> is not a valid string representation of a <code>double</code> value.
+     * @throws NumberFormatException {@code lexicalXSDDouble} is not a valid string representation of a {@code double} value.
      */
     public double parseDouble( String lexicalXSDDouble );
 
     /**
-     * <p>
      * Converts the string argument into a boolean value.
      * @param lexicalXSDBoolean
      *     A string containing lexical representation of
@@ -189,20 +179,18 @@
     public boolean parseBoolean( String lexicalXSDBoolean );
 
     /**
-     * <p>
      * Converts the string argument into a byte value.
      * @param lexicalXSDByte
      *     A string containing lexical representation of
      *     xsd:byte.
      * @return
      *     A byte value represented by the string argument.
-     * @throws NumberFormatException <code>lexicalXSDByte</code> does not contain a parseable byte.
+     * @throws NumberFormatException {@code lexicalXSDByte} does not contain a parseable byte.
      * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:byte.
      */
     public byte parseByte( String lexicalXSDByte );
 
     /**
-     * <p>
      * Converts the string argument into a QName value.
      *
      * <p>
@@ -222,7 +210,6 @@
                                              javax.xml.namespace.NamespaceContext nsc);
 
     /**
-     * <p>
      * Converts the string argument into a Calendar value.
      * @param lexicalXSDDateTime
      *     A string containing lexical representation of
@@ -234,7 +221,6 @@
     public java.util.Calendar parseDateTime( String lexicalXSDDateTime );
 
     /**
-     * <p>
      * Converts the string argument into an array of bytes.
      * @param lexicalXSDBase64Binary
      *     A string containing lexical representation
@@ -246,7 +232,6 @@
     public byte[] parseBase64Binary( String lexicalXSDBase64Binary );
 
     /**
-     * <p>
      * Converts the string argument into an array of bytes.
      * @param lexicalXSDHexBinary
      *     A string containing lexical representation of
@@ -258,7 +243,6 @@
     public byte[] parseHexBinary( String lexicalXSDHexBinary );
 
     /**
-     * <p>
      * Converts the string argument into a long value.
      * @param lexicalXSDUnsignedInt
      *     A string containing lexical representation
@@ -270,7 +254,6 @@
     public long parseUnsignedInt( String lexicalXSDUnsignedInt );
 
     /**
-     * <p>
      * Converts the string argument into an int value.
      * @param lexicalXSDUnsignedShort
      *     A string containing lexical
@@ -282,7 +265,6 @@
     public int parseUnsignedShort( String lexicalXSDUnsignedShort );
 
     /**
-     * <p>
      * Converts the string argument into a Calendar value.
      * @param lexicalXSDTime
      *     A string containing lexical representation of
@@ -294,7 +276,6 @@
     public java.util.Calendar parseTime( String lexicalXSDTime );
 
     /**
-     * <p>
      * Converts the string argument into a Calendar value.
      * @param lexicalXSDDate
      *     A string containing lexical representation of
@@ -306,7 +287,6 @@
     public java.util.Calendar parseDate( String lexicalXSDDate );
 
     /**
-     * <p>
      * Return a string containing the lexical representation of the
      * simple type.
      * @param lexicalXSDAnySimpleType
@@ -319,7 +299,6 @@
     public String parseAnySimpleType( String lexicalXSDAnySimpleType );
 
     /**
-     * <p>
      * Converts the string argument into a string.
      * @param val
      *     A string value.
@@ -329,7 +308,6 @@
     public String printString( String val );
 
     /**
-     * <p>
      * Converts a BigInteger value into a string.
      * @param val
      *     A BigInteger value
@@ -340,7 +318,6 @@
     public String printInteger( java.math.BigInteger val );
 
     /**
-     * <p>
      * Converts an int value into a string.
      * @param val
      *     An int value
@@ -351,7 +328,6 @@
 
 
     /**
-     * <p>
      * Converts a long value into a string.
      * @param val
      *     A long value
@@ -361,7 +337,6 @@
     public String printLong( long val );
 
     /**
-     * <p>
      * Converts a short value into a string.
      * @param val
      *     A short value
@@ -371,7 +346,6 @@
     public String printShort( short val );
 
     /**
-     * <p>
      * Converts a BigDecimal value into a string.
      * @param val
      *     A BigDecimal value
@@ -382,7 +356,6 @@
     public String printDecimal( java.math.BigDecimal val );
 
     /**
-     * <p>
      * Converts a float value into a string.
      * @param val
      *     A float value
@@ -392,7 +365,6 @@
     public String printFloat( float val );
 
     /**
-     * <p>
      * Converts a double value into a string.
      * @param val
      *     A double value
@@ -402,7 +374,6 @@
     public String printDouble( double val );
 
     /**
-     * <p>
      * Converts a boolean value into a string.
      * @param val
      *     A boolean value
@@ -412,7 +383,6 @@
     public String printBoolean( boolean val );
 
     /**
-     * <p>
      * Converts a byte value into a string.
      * @param val
      *     A byte value
@@ -422,7 +392,6 @@
     public String printByte( byte val );
 
     /**
-     * <p>
      * Converts a QName instance into a string.
      * @param val
      *     A QName value
@@ -437,7 +406,6 @@
                               javax.xml.namespace.NamespaceContext nsc );
 
     /**
-     * <p>
      * Converts a Calendar value into a string.
      * @param val
      *     A Calendar value
@@ -448,7 +416,6 @@
     public String printDateTime( java.util.Calendar val );
 
     /**
-     * <p>
      * Converts an array of bytes into a string.
      * @param val
      *     an array of bytes
@@ -459,7 +426,6 @@
     public String printBase64Binary( byte[] val );
 
     /**
-     * <p>
      * Converts an array of bytes into a string.
      * @param val
      *     an array of bytes
@@ -470,7 +436,6 @@
     public String printHexBinary( byte[] val );
 
     /**
-     * <p>
      * Converts a long value into a string.
      * @param val
      *     A long value
@@ -480,7 +445,6 @@
     public String printUnsignedInt( long val );
 
     /**
-     * <p>
      * Converts an int value into a string.
      * @param val
      *     An int value
@@ -490,7 +454,6 @@
     public String printUnsignedShort( int val );
 
     /**
-     * <p>
      * Converts a Calendar value into a string.
      * @param val
      *     A Calendar value
@@ -501,7 +464,6 @@
     public String printTime( java.util.Calendar val );
 
     /**
-     * <p>
      * Converts a Calendar value into a string.
      * @param val
      *     A Calendar value
@@ -512,7 +474,6 @@
     public String printDate( java.util.Calendar val );
 
     /**
-     * <p>
      * Converts a string value into a string.
      * @param val
      *     A string value
--- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBPermission.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/JAXBPermission.java	Wed Jul 05 20:30:08 2017 +0200
@@ -40,7 +40,6 @@
  * The following table lists all the possible {@code JAXBPermission} 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 summary="Permission target name, what the permission allows, and associated risks">
  * <tr>
--- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlElement.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlElement.java	Wed Jul 05 20:30:08 2017 +0200
@@ -36,7 +36,7 @@
 /**
  * Maps a JavaBean property to a XML element derived from property name.
  *
- * <p> <b>Usage</b> </p>
+ * <p> <b>Usage</b>
  * <p>
  * <tt>@XmlElement</tt> annotation can be used with the following program
  * elements:
@@ -44,8 +44,6 @@
  *   <li> a JavaBean property </li>
  *   <li> non static, non transient field </li>
  *   <li> within {@link XmlElements}
- * <p>
- *
  * </ul>
  *
  * The usage is subject to the following constraints:
@@ -79,7 +77,7 @@
  * <pre>
  *     //Example: Code fragment
  *     public class USPrice {
- *         &#64;XmlElement(name="itemprice")
+ *        {@literal @}XmlElement(name="itemprice")
  *         public java.math.BigDecimal price;
  *     }
  * {@code
@@ -95,10 +93,9 @@
  *
  * <b> Example 2: </b> Map a field to a nillable element.
  *   <pre>
- *
  *     //Example: Code fragment
  *     public class USPrice {
- *         &#64;XmlElement(nillable=true)
+ *        {@literal @}XmlElement(nillable=true)
  *         public java.math.BigDecimal price;
  *     }
  * {@code
@@ -113,10 +110,9 @@
  * <p>
  * <b> Example 3: </b> Map a field to a nillable, required element.
  *   <pre>
- *
  *     //Example: Code fragment
  *     public class USPrice {
- *         &#64;XmlElement(nillable=true, required=true)
+ *        {@literal @}XmlElement(nillable=true, required=true)
  *         public java.math.BigDecimal price;
  *     }
  * {@code
@@ -134,7 +130,6 @@
  * <p>
  * See Example 6 in @{@link XmlType}.
  *
- * <p>
  * @author Sekhar Vajjhala, Sun Microsystems, Inc.
  * @since 1.6, JAXB 2.0
  */
--- a/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/attachment/AttachmentMarshaller.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.bind/share/classes/javax/xml/bind/attachment/AttachmentMarshaller.java	Wed Jul 05 20:30:08 2017 +0200
@@ -29,22 +29,22 @@
 import javax.xml.bind.Marshaller;
 
 /**
- * <p>Enable JAXB marshalling to optimize storage of binary data.</p>
+ * <p>Enable JAXB marshalling to optimize storage of binary data.
  *
  * <p>This API enables an efficient cooperative creation of optimized
  * binary data formats between a JAXB marshalling process and a MIME-based package
  * processor. A JAXB implementation marshals the root body of a MIME-based package,
  * delegating the creation of referenceable MIME parts to
- * the MIME-based package processor that implements this abstraction.</p>
+ * the MIME-based package processor that implements this abstraction.
  *
  * <p>XOP processing is enabled when {@link #isXOPPackage()} is true.
  *    See {@link #addMtomAttachment(DataHandler, String, String)} for details.
- * </p>
+ *
  *
  * <p>WS-I Attachment Profile 1.0 is supported by
  * {@link #addSwaRefAttachment(DataHandler)} being called by the
  * marshaller for each JAXB property related to
- * {http://ws-i.org/profiles/basic/1.1/xsd}swaRef.</p>
+ * {http://ws-i.org/profiles/basic/1.1/xsd}swaRef.
  *
  *
  * @author Marc Hadley
@@ -60,33 +60,33 @@
 public abstract class AttachmentMarshaller {
 
     /**
-     * <p>Consider MIME content <code>data</code> for optimized binary storage as an attachment.
+     * <p>Consider MIME content {@code data} for optimized binary storage as an attachment.
      *
      * <p>
      * This method is called by JAXB marshal process when {@link #isXOPPackage()} is
-     * <code>true</code>, for each element whose datatype is "base64Binary", as described in
+     * {@code true}, for each element whose datatype is "base64Binary", as described in
      * Step 3 in
      * <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages">Creating XOP Packages</a>.
      *
      * <p>
-     * The method implementor determines whether <code>data</code> shall be attached separately
+     * The method implementor determines whether {@code data} shall be attached separately
      * or inlined as base64Binary data. If the implementation chooses to optimize the storage
-     * of the binary data as a MIME part, it is responsible for attaching <code>data</code> to the
+     * of the binary data as a MIME part, it is responsible for attaching {@code data} to the
      * MIME-based package, and then assigning an unique content-id, cid, that identifies
      * the MIME part within the MIME message. This method returns the cid,
      * which enables the JAXB marshaller to marshal a XOP element that refers to that cid in place
      * of marshalling the binary data. When the method returns null, the JAXB marshaller
-     * inlines <code>data</code> as base64binary data.
+     * inlines {@code data} as base64binary data.
      *
      * <p>
      * The caller of this method is required to meet the following constraint.
-     * If the element infoset item containing <code>data</code> has the attribute
-     * <code>xmime:contentType</code> or if the JAXB property/field representing
-     * <code>data</code>is annotated with a known MIME type,
-     * <code>data.getContentType()</code> should be set to that MIME type.
+     * If the element infoset item containing {@code data} has the attribute
+     * {@code xmime:contentType} or if the JAXB property/field representing
+     * {@code data} is annotated with a known MIME type,
+     * {@code data.getContentType()} should be set to that MIME type.
      *
      * <p>
-     * The <code>elementNamespace</code> and <code>elementLocalName</code>
+     * The {@code elementNamespace} and {@code elementLocalName}
      * parameters provide the
      * context that contains the binary data. This information could
      * be used by the MIME-based package processor to determine if the
@@ -101,7 +101,7 @@
      *      The local name of the element. Always a non-null valid string.
      *
      * @return
-     *     a valid content-id URI (see <a href="http://www.w3.org/TR/xop10/#RFC2387">RFC 2387</a>) that identifies the attachment containing <code>data</code>.
+     *     a valid content-id URI (see <a href="http://www.w3.org/TR/xop10/#RFC2387">RFC 2387</a>) that identifies the attachment containing {@code data}.
      *     Otherwise, null if the attachment was not added and should instead be inlined in the message.
      *
      * @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/">XML-binary Optimized Packaging</a>
@@ -110,12 +110,12 @@
     public abstract String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName);
 
     /**
-     * <p>Consider binary <code>data</code> for optimized binary storage as an attachment.
+     * <p>Consider binary {@code data} for optimized binary storage as an attachment.
      *
-     * <p>Since content type is not known, the attachment's MIME content type must be set to "application/octet-stream".</p>
+     * <p>Since content type is not known, the attachment's MIME content type must be set to "application/octet-stream".
      *
      * <p>
-     * The <code>elementNamespace</code> and <code>elementLocalName</code>
+     * The {@code elementNamespace} and {@code elementLocalName}
      * parameters provide the
      * context that contains the binary data. This information could
      * be used by the MIME-based package processor to determine if the
@@ -146,21 +146,21 @@
      *      The local name of the element. Always a non-null valid string.
      *
      * @return content-id URI, cid, to the attachment containing
-     *         <code>data</code> or null if data should be inlined.
+     *         {@code data} or null if data should be inlined.
      *
      * @see #addMtomAttachment(DataHandler, String, String)
      */
     public abstract String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName);
 
     /**
-     * <p>Read-only property that returns true if JAXB marshaller should enable XOP creation.</p>
+     * <p>Read-only property that returns true if JAXB marshaller should enable XOP creation.
      *
      * <p>This value must not change during the marshalling process. When this
-     * value is true, the <code>addMtomAttachment(...)</code> method
+     * value is true, the {@code addMtomAttachment(...)} method
      * is invoked when the appropriate binary datatypes are encountered by
-     * the marshal process.</p>
+     * the marshal process.
      *
-     * <p>Marshaller.marshal() must throw IllegalStateException if this value is <code>true</code>
+     * <p>Marshaller.marshal() must throw IllegalStateException if this value is {@code true}
      * and the XML content to be marshalled violates Step 1 in
      * <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages">Creating XOP Pacakges</a>
      * http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages.
@@ -168,18 +168,18 @@
      * [namespace name] of "http://www.w3.org/2004/08/xop/include" and a [local name] of Include"</i>
      *
      * <p>When this method returns true and during the marshal process
-     * at least one call to <code>addMtomAttachment(...)</code> returns
+     * at least one call to {@code addMtomAttachment(...)} returns
      * a content-id, the MIME-based package processor must label the
      * root part with the application/xop+xml media type as described in
      * Step 5 of
-     * <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages">Creating XOP Pacakges</a>.<p>
+     * <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages">Creating XOP Pacakges</a>.
      *
      * @return true when MIME context is a XOP Package.
      */
     public boolean isXOPPackage() { return false; }
 
    /**
-    * <p>Add MIME <code>data</code> as an attachment and return attachment's content-id, cid.</p>
+    * <p>Add MIME {@code data} as an attachment and return attachment's content-id, cid.
     *
     * <p>
     * This method is called by JAXB marshal process for each element/attribute typed as
@@ -188,7 +188,7 @@
     * MIME attachment, and generating a content-id, cid, that uniquely identifies the attachment
     * within the MIME-based package.
     *
-    * <p>Caller inserts the returned content-id, cid, into the XML content being marshalled.</p>
+    * <p>Caller inserts the returned content-id, cid, into the XML content being marshalled.
     *
     * @param data
     *       represents the data to be attached. Must be non-null.
--- a/jaxws/src/java.xml.ws/share/classes/javax/jws/soap/InitParam.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/jws/soap/InitParam.java	Wed Jul 05 20:30:08 2017 +0200
@@ -27,7 +27,7 @@
 
 /**
  * @since 1.6
- * @Deprecated
+ * @deprecated
  */
 @Deprecated public @interface InitParam {
     String name();
--- a/jaxws/src/java.xml.ws/share/classes/javax/jws/soap/SOAPMessageHandler.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/jws/soap/SOAPMessageHandler.java	Wed Jul 05 20:30:08 2017 +0200
@@ -27,7 +27,7 @@
 
 /**
  * @since 1.6
- * @Deprecated
+ * @deprecated
  */
 @Deprecated public @interface SOAPMessageHandler {
     String name() default "";
--- a/jaxws/src/java.xml.ws/share/classes/javax/jws/soap/SOAPMessageHandlers.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/jws/soap/SOAPMessageHandlers.java	Wed Jul 05 20:30:08 2017 +0200
@@ -29,7 +29,7 @@
 
 /**
  * @since 1.6
- * @Deprecated
+ * @deprecated
  */
 @Retention(value=RetentionPolicy.RUNTIME)
 @Target({TYPE})
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/AttachmentPart.java	Wed Jul 05 20:30:08 2017 +0200
@@ -32,54 +32,53 @@
 import javax.activation.DataHandler;
 
 /**
- * A single attachment to a <code>SOAPMessage</code> object. A <code>SOAPMessage</code>
- * object may contain zero, one, or many <code>AttachmentPart</code> objects.
- * Each <code>AttachmentPart</code> object consists of two parts,
+ * A single attachment to a {@code SOAPMessage} object. A {@code SOAPMessage}
+ * object may contain zero, one, or many {@code AttachmentPart} objects.
+ * Each {@code AttachmentPart} object consists of two parts,
  * application-specific content and associated MIME headers. The
  * MIME headers consists of name/value pairs that can be used to
  * identify and describe the content.
  * <p>
- * An <code>AttachmentPart</code> object must conform to certain standards.
+ * An {@code AttachmentPart} object must conform to certain standards.
  * <OL>
  * <LI>It must conform to <a href="http://www.ietf.org/rfc/rfc2045.txt">
  *     MIME [RFC2045] standards</a>
  * <LI>It MUST contain content
  * <LI>The header portion MUST include the following header:
  *  <UL>
- *   <LI><code>Content-Type</code><br>
+ *   <LI>{@code Content-Type}<br>
  *       This header identifies the type of data in the content of an
- *       <code>AttachmentPart</code> object and MUST conform to [RFC2045].
+ *       {@code AttachmentPart} object and MUST conform to [RFC2045].
  *       The following is an example of a Content-Type header:
  *       <PRE>
  *       Content-Type:  application/xml
  *       </PRE>
- *       The following line of code, in which <code>ap</code> is an
- *       <code>AttachmentPart</code> object, sets the header shown in
+ *       The following line of code, in which {@code ap} is an
+ *       {@code AttachmentPart} object, sets the header shown in
  *       the previous example.
  *       <PRE>
  *       ap.setMimeHeader("Content-Type", "application/xml");
  *       </PRE>
- * <p>
  *  </UL>
  * </OL>
  * <p>
- * There are no restrictions on the content portion of an <code>
- * AttachmentPart</code> object. The content may be anything from a
+ * There are no restrictions on the content portion of an {@code
+ * AttachmentPart} object. The content may be anything from a
  * simple plain text object to a complex XML document or image file.
  *
  * <p>
- * An <code>AttachmentPart</code> object is created with the method
- * <code>SOAPMessage.createAttachmentPart</code>. After setting its MIME headers,
- *  the <code>AttachmentPart</code> object is added to the message
- * that created it with the method <code>SOAPMessage.addAttachmentPart</code>.
+ * An {@code AttachmentPart} object is created with the method
+ * {@code SOAPMessage.createAttachmentPart}. After setting its MIME headers,
+ *  the {@code AttachmentPart} object is added to the message
+ * that created it with the method {@code SOAPMessage.addAttachmentPart}.
  *
  * <p>
- * The following code fragment, in which <code>m</code> is a
- * <code>SOAPMessage</code> object and <code>contentStringl</code> is a
- * <code>String</code>, creates an instance of <code>AttachmentPart</code>,
- * sets the <code>AttachmentPart</code> object with some content and
- * header information, and adds the <code>AttachmentPart</code> object to
- * the <code>SOAPMessage</code> object.
+ * The following code fragment, in which {@code m} is a
+ * {@code SOAPMessage} object and {@code contentStringl} is a
+ * {@code String}, creates an instance of {@code AttachmentPart},
+ * sets the {@code AttachmentPart} object with some content and
+ * header information, and adds the {@code AttachmentPart} object to
+ * the {@code SOAPMessage} object.
  * <PRE>
  *     AttachmentPart ap1 = m.createAttachmentPart();
  *     ap1.setContent(contentString1, "text/plain");
@@ -89,7 +88,7 @@
  *
  * <p>
  * The following code fragment creates and adds a second
- * <code>AttachmentPart</code> instance to the same message. <code>jpegData</code>
+ * {@code AttachmentPart} instance to the same message. {@code jpegData}
  * is a binary byte buffer representing the jpeg file.
  * <PRE>
  *     AttachmentPart ap2 = m.createAttachmentPart();
@@ -98,19 +97,19 @@
  *     m.addAttachmentPart(ap2);
  * </PRE>
  * <p>
- * The <code>getContent</code> method retrieves the contents and header from
- * an <code>AttachmentPart</code> object. Depending on the
- * <code>DataContentHandler</code> objects present, the returned
- * <code>Object</code> can either be a typed Java object corresponding
- * to the MIME type or an <code>InputStream</code> object that contains the
+ * The {@code getContent} method retrieves the contents and header from
+ * an {@code AttachmentPart} object. Depending on the
+ * {@code DataContentHandler} objects present, the returned
+ * {@code Object} can either be a typed Java object corresponding
+ * to the MIME type or an {@code InputStream} object that contains the
  * content as bytes.
  * <PRE>
  *     String content1 = ap1.getContent();
  *     java.io.InputStream content2 = ap2.getContent();
  * </PRE>
  *
- * The method <code>clearContent</code> removes all the content from an
- * <code>AttachmentPart</code> object but does not affect its header information.
+ * The method {@code clearContent} removes all the content from an
+ * {@code AttachmentPart} object but does not affect its header information.
  * <PRE>
  *     ap1.clearContent();
  * </PRE>
@@ -120,10 +119,10 @@
 
 public abstract class AttachmentPart {
     /**
-     * Returns the number of bytes in this <code>AttachmentPart</code>
+     * Returns the number of bytes in this {@code AttachmentPart}
      * object.
      *
-     * @return the size of this <code>AttachmentPart</code> object in bytes
+     * @return the size of this {@code AttachmentPart} object in bytes
      *         or -1 if the size cannot be determined
      * @exception SOAPException if the content of this attachment is
      *            corrupted of if there was an exception while trying
@@ -132,52 +131,52 @@
     public abstract int getSize() throws SOAPException;
 
     /**
-     * Clears out the content of this <code>AttachmentPart</code> object.
+     * Clears out the content of this {@code AttachmentPart} object.
      * The MIME header portion is left untouched.
      */
     public abstract void clearContent();
 
     /**
-     * Gets the content of this <code>AttachmentPart</code> object as a Java
+     * Gets the content of this {@code AttachmentPart} object as a Java
      * object. The type of the returned Java object depends on (1) the
-     * <code>DataContentHandler</code> object that is used to interpret the bytes
-     * and (2) the <code>Content-Type</code> given in the header.
+     * {@code DataContentHandler} object that is used to interpret the bytes
+     * and (2) the {@code Content-Type} given in the header.
      * <p>
      * For the MIME content types "text/plain", "text/html" and "text/xml", the
-     * <code>DataContentHandler</code> object does the conversions to and
+     * {@code DataContentHandler} object does the conversions to and
      * from the Java types corresponding to the MIME types.
-     * For other MIME types,the <code>DataContentHandler</code> object
-     * can return an <code>InputStream</code> object that contains the content data
+     * For other MIME types,the {@code DataContentHandler} object
+     * can return an {@code InputStream} object that contains the content data
      * as raw bytes.
      * <p>
      * A SAAJ-compliant implementation must, as a minimum, return a
-     * <code>java.lang.String</code> object corresponding to any content
-     * stream with a <code>Content-Type</code> value of
-     * <code>text/plain</code>, a
-     * <code>javax.xml.transform.stream.StreamSource</code> object corresponding to a
-     * content stream with a <code>Content-Type</code> value of
-     * <code>text/xml</code>, a <code>java.awt.Image</code> object
+     * {@code java.lang.String} object corresponding to any content
+     * stream with a {@code Content-Type} value of
+     * {@code text/plain}, a
+     * {@code javax.xml.transform.stream.StreamSource} object corresponding to a
+     * content stream with a {@code Content-Type} value of
+     * {@code text/xml}, a {@code java.awt.Image} object
      * corresponding to a content stream with a
-     * <code>Content-Type</code> value of <code>image/gif</code> or
-     * <code>image/jpeg</code>.  For those content types that an
-     * installed <code>DataContentHandler</code> object does not understand, the
-     * <code>DataContentHandler</code> object is required to return a
-     * <code>java.io.InputStream</code> object with the raw bytes.
+     * {@code Content-Type} value of {@code image/gif} or
+     * {@code image/jpeg}.  For those content types that an
+     * installed {@code DataContentHandler} object does not understand, the
+     * {@code DataContentHandler} object is required to return a
+     * {@code java.io.InputStream} object with the raw bytes.
      *
-     * @return a Java object with the content of this <code>AttachmentPart</code>
+     * @return a Java object with the content of this {@code AttachmentPart}
      *         object
      *
      * @exception SOAPException if there is no content set into this
-     *            <code>AttachmentPart</code> object or if there was a data
+     *            {@code AttachmentPart} object or if there was a data
      *            transformation error
      */
     public abstract Object getContent() throws SOAPException;
 
     /**
-     * Gets the content of this <code>AttachmentPart</code> object as an
-     * InputStream as if a call had been made to <code>getContent</code> and no
-     * <code>DataContentHandler</code> had been registered for the
-     * <code>content-type</code> of this <code>AttachmentPart</code>.
+     * Gets the content of this {@code AttachmentPart} object as an
+     * InputStream as if a call had been made to {@code getContent} and no
+     * {@code DataContentHandler} had been registered for the
+     * {@code content-type} of this {@code AttachmentPart}.
      *<p>
      * Note that reading from the returned InputStream would result in consuming
      * the data in the stream. It is the responsibility of the caller to reset
@@ -185,11 +184,11 @@
      * of the raw attachment content is required then the {@link #getRawContentBytes} API
      * should be used instead.
      *
-     * @return an <code>InputStream</code> from which the raw data contained by
-     *      the <code>AttachmentPart</code> can be accessed.
+     * @return an {@code InputStream} from which the raw data contained by
+     *      the {@code AttachmentPart} can be accessed.
      *
      * @throws SOAPException if there is no content set into this
-     *      <code>AttachmentPart</code> object or if there was a data
+     *      {@code AttachmentPart} object or if there was a data
      *      transformation error.
      *
      * @since 1.6, SAAJ 1.3
@@ -198,16 +197,16 @@
     public abstract InputStream getRawContent() throws SOAPException;
 
     /**
-     * Gets the content of this <code>AttachmentPart</code> object as a
-     * byte[] array as if a call had been made to <code>getContent</code> and no
-     * <code>DataContentHandler</code> had been registered for the
-     * <code>content-type</code> of this <code>AttachmentPart</code>.
+     * Gets the content of this {@code AttachmentPart} object as a
+     * byte[] array as if a call had been made to {@code getContent} and no
+     * {@code DataContentHandler} had been registered for the
+     * {@code content-type} of this {@code AttachmentPart}.
      *
-     * @return a <code>byte[]</code> array containing the raw data of the
-     *      <code>AttachmentPart</code>.
+     * @return a {@code byte[]} array containing the raw data of the
+     *      {@code AttachmentPart}.
      *
      * @throws SOAPException if there is no content set into this
-     *      <code>AttachmentPart</code> object or if there was a data
+     *      {@code AttachmentPart} object or if there was a data
      *      transformation error.
      *
      * @since 1.6, SAAJ 1.3
@@ -215,16 +214,16 @@
     public abstract byte[] getRawContentBytes() throws SOAPException;
 
     /**
-     * Returns an <code>InputStream</code> which can be used to obtain the
-     * content of <code>AttachmentPart</code>  as Base64 encoded
+     * Returns an {@code InputStream} which can be used to obtain the
+     * content of {@code AttachmentPart}  as Base64 encoded
      * character data, this method would base64 encode the raw bytes
      * of the attachment and return.
      *
-     * @return an <code>InputStream</code> from which the Base64 encoded
-     *       <code>AttachmentPart</code> can be read.
+     * @return an {@code InputStream} from which the Base64 encoded
+     *       {@code AttachmentPart} can be read.
      *
      * @throws SOAPException if there is no content set into this
-     *      <code>AttachmentPart</code> object or if there was a data
+     *      {@code AttachmentPart} object or if there was a data
      *      transformation error.
      *
      * @since 1.6, SAAJ 1.3
@@ -233,11 +232,11 @@
 
     /**
      * Sets the content of this attachment part to that of the given
-     * <code>Object</code> and sets the value of the <code>Content-Type</code>
+     * {@code Object} and sets the value of the {@code Content-Type}
      * header to the given type. The type of the
-     * <code>Object</code> should correspond to the value given for the
-     * <code>Content-Type</code>. This depends on the particular
-     * set of <code>DataContentHandler</code> objects in use.
+     * {@code Object} should correspond to the value given for the
+     * {@code Content-Type}. This depends on the particular
+     * set of {@code DataContentHandler} objects in use.
      *
      *
      * @param object the Java object that makes up the content for
@@ -247,7 +246,7 @@
      *
      * @exception IllegalArgumentException may be thrown if the contentType
      *            does not match the type of the content object, or if there
-     *            was no <code>DataContentHandler</code> object for this
+     *            was no {@code DataContentHandler} object for this
      *            content object
      *
      * @see #getContent
@@ -256,31 +255,31 @@
 
     /**
      * Sets the content of this attachment part to that contained by the
-     * <code>InputStream</code> <code>content</code> and sets the value of the
-     * <code>Content-Type</code> header to the value contained in
-     * <code>contentType</code>.
+     * {@code InputStream} {@code content} and sets the value of the
+     * {@code Content-Type} header to the value contained in
+     * {@code contentType}.
      * <P>
      *  A subsequent call to getSize() may not be an exact measure
      *  of the content size.
      *
      * @param content the raw data to add to the attachment part
-     * @param contentType the value to set into the <code>Content-Type</code>
+     * @param contentType the value to set into the {@code Content-Type}
      * header
      *
      * @exception SOAPException if an there is an error in setting the content
-     * @exception NullPointerException if <code>content</code> is null
+     * @exception NullPointerException if {@code content} is null
      * @since 1.6, SAAJ 1.3
      */
     public abstract void setRawContent(InputStream content, String contentType) throws SOAPException;
 
     /**
      * Sets the content of this attachment part to that contained by the
-     * <code>byte[]</code> array <code>content</code> and sets the value of the
-     * <code>Content-Type</code> header to the value contained in
-     * <code>contentType</code>.
+     * {@code byte[]} array {@code content} and sets the value of the
+     * {@code Content-Type} header to the value contained in
+     * {@code contentType}.
      *
      * @param content the raw data to add to the attachment part
-     * @param contentType the value to set into the <code>Content-Type</code>
+     * @param contentType the value to set into the {@code Content-Type}
      * header
      * @param offset the offset in the byte array of the content
      * @param len the number of bytes that form the content
@@ -296,20 +295,20 @@
 
     /**
      * Sets the content of this attachment part from the Base64 source
-     * <code>InputStream</code>  and sets the value of the
-     * <code>Content-Type</code> header to the value contained in
-     * <code>contentType</code>, This method would first decode the base64
+     * {@code InputStream}  and sets the value of the
+     * {@code Content-Type} header to the value contained in
+     * {@code contentType}, This method would first decode the base64
      * input and write the resulting raw bytes to the attachment.
      * <P>
      *  A subsequent call to getSize() may not be an exact measure
      *  of the content size.
      *
      * @param content the base64 encoded data to add to the attachment part
-     * @param contentType the value to set into the <code>Content-Type</code>
+     * @param contentType the value to set into the {@code Content-Type}
      * header
      *
      * @exception SOAPException if an there is an error in setting the content
-     * @exception NullPointerException if <code>content</code> is null
+     * @exception NullPointerException if {@code content} is null
      *
      * @since 1.6, SAAJ 1.3
      */
@@ -318,30 +317,30 @@
 
 
     /**
-     * Gets the <code>DataHandler</code> object for this <code>AttachmentPart</code>
+     * Gets the {@code DataHandler} object for this {@code AttachmentPart}
      * object.
      *
-     * @return the <code>DataHandler</code> object associated with this
-     *         <code>AttachmentPart</code> object
+     * @return the {@code DataHandler} object associated with this
+     *         {@code AttachmentPart} object
      *
      * @exception SOAPException if there is no data in
-     * this <code>AttachmentPart</code> object
+     * this {@code AttachmentPart} object
      */
     public abstract DataHandler getDataHandler()
         throws SOAPException;
 
     /**
-     * Sets the given <code>DataHandler</code> object as the data handler
-     * for this <code>AttachmentPart</code> object. Typically, on an incoming
+     * Sets the given {@code DataHandler} object as the data handler
+     * for this {@code AttachmentPart} object. Typically, on an incoming
      * message, the data handler is automatically set. When
      * a message is being created and populated with content, the
-     * <code>setDataHandler</code> method can be used to get data from
+     * {@code setDataHandler} method can be used to get data from
      * various data sources into the message.
      *
-     * @param dataHandler the <code>DataHandler</code> object to be set
+     * @param dataHandler the {@code DataHandler} object to be set
      *
      * @exception IllegalArgumentException if there was a problem with
-     *            the specified <code>DataHandler</code> object
+     *            the specified {@code DataHandler} object
      */
     public abstract void setDataHandler(DataHandler dataHandler);
 
@@ -349,8 +348,8 @@
     /**
      * Gets the value of the MIME header whose name is "Content-ID".
      *
-     * @return a <code>String</code> giving the value of the
-     *          "Content-ID" header or <code>null</code> if there
+     * @return a {@code String} giving the value of the
+     *          "Content-ID" header or {@code null} if there
      *          is none
      * @see #setContentId
      */
@@ -364,8 +363,8 @@
     /**
      * Gets the value of the MIME header whose name is "Content-Location".
      *
-     * @return a <code>String</code> giving the value of the
-     *          "Content-Location" header or <code>null</code> if there
+     * @return a {@code String} giving the value of the
+     *          "Content-Location" header or {@code null} if there
      *          is none
      */
     public String getContentLocation() {
@@ -378,8 +377,8 @@
     /**
      * Gets the value of the MIME header whose name is "Content-Type".
      *
-     * @return a <code>String</code> giving the value of the
-     *          "Content-Type" header or <code>null</code> if there
+     * @return a {@code String} giving the value of the
+     *          "Content-Type" header or {@code null} if there
      *          is none
      */
     public String getContentType() {
@@ -392,11 +391,11 @@
     /**
      * Sets the MIME header whose name is "Content-ID" with the given value.
      *
-     * @param contentId a <code>String</code> giving the value of the
+     * @param contentId a {@code String} giving the value of the
      *          "Content-ID" header
      *
      * @exception IllegalArgumentException if there was a problem with
-     *            the specified <code>contentId</code> value
+     *            the specified {@code contentId} value
      * @see #getContentId
      */
     public void setContentId(String contentId)
@@ -409,7 +408,7 @@
      * Sets the MIME header whose name is "Content-Location" with the given value.
      *
      *
-     * @param contentLocation a <code>String</code> giving the value of the
+     * @param contentLocation a {@code String} giving the value of the
      *          "Content-Location" header
      * @exception IllegalArgumentException if there was a problem with
      *            the specified content location
@@ -422,7 +421,7 @@
     /**
      * Sets the MIME header whose name is "Content-Type" with the given value.
      *
-     * @param contentType a <code>String</code> giving the value of the
+     * @param contentType a {@code String} giving the value of the
      *          "Content-Type" header
      *
      * @exception IllegalArgumentException if there was a problem with
@@ -449,10 +448,10 @@
 
     /**
      * Gets all the values of the header identified by the given
-     * <code>String</code>.
+     * {@code String}.
      *
      * @param name the name of the header; example: "Content-Type"
-     * @return a <code>String</code> array giving the value for the
+     * @return a {@code String} array giving the value for the
      *         specified header
      * @see #setMimeHeader
      */
@@ -466,9 +465,9 @@
      *
      * Note that RFC822 headers can only contain US-ASCII characters.
      *
-     * @param   name    a <code>String</code> giving the name of the header
+     * @param   name    a {@code String} giving the name of the header
      *                  for which to search
-     * @param   value   a <code>String</code> giving the value to be set for
+     * @param   value   a {@code String} giving the value to be set for
      *                  the header whose name matches the given name
      *
      * @exception IllegalArgumentException if there was a problem with
@@ -479,13 +478,13 @@
 
     /**
      * Adds a MIME header with the specified name and value to this
-     * <code>AttachmentPart</code> object.
+     * {@code AttachmentPart} object.
      * <p>
      * Note that RFC822 headers can contain only US-ASCII characters.
      *
-     * @param   name    a <code>String</code> giving the name of the header
+     * @param   name    a {@code String} giving the name of the header
      *                  to be added
-     * @param   value   a <code>String</code> giving the value of the header
+     * @param   value   a {@code String} giving the value of the header
      *                  to be added
      *
      * @exception IllegalArgumentException if there was a problem with
@@ -494,35 +493,35 @@
     public abstract void addMimeHeader(String name, String value);
 
     /**
-     * Retrieves all the headers for this <code>AttachmentPart</code> object
-     * as an iterator over the <code>MimeHeader</code> objects.
+     * Retrieves all the headers for this {@code AttachmentPart} object
+     * as an iterator over the {@code MimeHeader} objects.
      *
-     * @return  an <code>Iterator</code> object with all of the Mime
-     *          headers for this <code>AttachmentPart</code> object
+     * @return  an {@code Iterator} object with all of the Mime
+     *          headers for this {@code AttachmentPart} object
      */
     public abstract Iterator getAllMimeHeaders();
 
     /**
-     * Retrieves all <code>MimeHeader</code> objects that match a name in
+     * Retrieves all {@code MimeHeader} objects that match a name in
      * the given array.
      *
-     * @param names a <code>String</code> array with the name(s) of the
+     * @param names a {@code String} array with the name(s) of the
      *        MIME headers to be returned
      * @return  all of the MIME headers that match one of the names in the
-     *           given array as an <code>Iterator</code> object
+     *           given array as an {@code Iterator} object
      */
     public abstract Iterator getMatchingMimeHeaders(String[] names);
 
     /**
-     * Retrieves all <code>MimeHeader</code> objects whose name does
+     * Retrieves all {@code MimeHeader} objects whose name does
      * not match a name in the given array.
      *
-     * @param names a <code>String</code> array with the name(s) of the
+     * @param names a {@code String} array with the name(s) of the
      *        MIME headers not to be returned
-     * @return  all of the MIME headers in this <code>AttachmentPart</code> object
+     * @return  all of the MIME headers in this {@code AttachmentPart} object
      *          except those that match one of the names in the
      *           given array.  The nonmatching MIME headers are returned as an
-     *           <code>Iterator</code> object.
+     *           {@code Iterator} object.
      */
     public abstract Iterator getNonMatchingMimeHeaders(String[] names);
 }
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Name.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Name.java	Wed Jul 05 20:30:08 2017 +0200
@@ -32,52 +32,50 @@
  * to get the URI of the namespace.
  * <P>
  * The following is an example of a namespace declaration in an element.
- * <PRE>
- *   &lt;wombat:GetLastTradePrice xmlns:wombat="http://www.wombat.org/trader"&gt;
- * </PRE>
+ * {@code <wombat:GetLastTradePrice xmlns:wombat="http://www.wombat.org/trader">}
  * ("xmlns" stands for "XML namespace".)
  * The following
- * shows what the methods in the <code>Name</code> interface will return.
+ * shows what the methods in the {@code Name} interface will return.
  * <UL>
- *  <LI><code>getQualifiedName</code> will return "prefix:LocalName" =
+ *  <LI>{@code getQualifiedName} will return "prefix:LocalName" =
  *      "WOMBAT:GetLastTradePrice"
- *  <LI><code>getURI</code> will return "http://www.wombat.org/trader"
- *  <LI><code>getLocalName</code> will return "GetLastTracePrice"
- *  <LI><code>getPrefix</code> will return "WOMBAT"
+ *  <LI>{@code getURI} will return "http://www.wombat.org/trader"
+ *  <LI>{@code getLocalName} will return "GetLastTracePrice"
+ *  <LI>{@code getPrefix} will return "WOMBAT"
  * </UL>
  * <P>
  * XML namespaces are used to disambiguate SOAP identifiers from
  * application-specific identifiers.
  * <P>
- * <code>Name</code> objects are created using the method
- * <code>SOAPEnvelope.createName</code>, which has two versions.
- * One method creates <code>Name</code> objects with
+ * {@code Name} objects are created using the method
+ * {@code SOAPEnvelope.createName}, which has two versions.
+ * One method creates {@code Name} objects with
  * a local name, a namespace prefix, and a namespace URI.
- *  and the second creates <code>Name</code> objects with just a local name.
+ *  and the second creates {@code Name} objects with just a local name.
  * The following line of
- * code, in which <i>se</i> is a <code>SOAPEnvelope</code> object, creates a new
- * <code>Name</code> object with all three.
+ * code, in which <i>se</i> is a {@code SOAPEnvelope} object, creates a new
+ * {@code Name} object with all three.
  * <PRE>
  *     Name name = se.createName("GetLastTradePrice", "WOMBAT",
  *                                "http://www.wombat.org/trader");
  * </PRE>
- * The following line of code gives an example of how a <code>Name</code> object
- * can be used. The variable <i>element</i> is a <code>SOAPElement</code> object.
- * This code creates a new <code>SOAPElement</code> object with the given name and
+ * The following line of code gives an example of how a {@code Name} object
+ * can be used. The variable <i>element</i> is a {@code SOAPElement} object.
+ * This code creates a new {@code SOAPElement} object with the given name and
  * adds it to <i>element</i>.
  * <PRE>
  *     element.addChildElement(name);
  * </PRE>
  * <P>
- * The <code>Name</code> interface may be deprecated in a future release of SAAJ
- * in favor of <code>javax.xml.namespace.QName<code>
+ * The {@code Name} interface may be deprecated in a future release of SAAJ
+ * in favor of {@code javax.xml.namespace.QName}
  * @see SOAPEnvelope#createName(String, String, String) SOAPEnvelope.createName
  * @see SOAPFactory#createName(String, String, String) SOAPFactory.createName
  * @since 1.6
  */
 public interface Name {
     /**
-     * Gets the local name part of the XML name that this <code>Name</code>
+     * Gets the local name part of the XML name that this {@code Name}
      * object represents.
      *
      * @return a string giving the local name
@@ -86,16 +84,16 @@
 
     /**
      * Gets the namespace-qualified name of the XML name that this
-     * <code>Name</code> object represents.
+     * {@code Name} object represents.
      *
      * @return the namespace-qualified name as a string
      */
     String getQualifiedName();
 
     /**
-     * Returns the prefix that was specified when this <code>Name</code> object
+     * Returns the prefix that was specified when this {@code Name} object
      * was initialized. This prefix is associated with the namespace for the XML
-     * name that this <code>Name</code> object represents.
+     * name that this {@code Name} object represents.
      *
      * @return the prefix as a string
      */
@@ -103,7 +101,7 @@
 
     /**
      * Returns the URI of the namespace for the XML
-     * name that this <code>Name</code> object represents.
+     * name that this {@code Name} object represents.
      *
      * @return the URI as a string
      */
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBody.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBody.java	Wed Jul 05 20:30:08 2017 +0200
@@ -36,10 +36,10 @@
  * element in a SOAP message. A SOAP body element consists of XML data
  * that affects the way the application-specific content is processed.
  * <P>
- * A <code>SOAPBody</code> object contains <code>SOAPBodyElement</code>
+ * A {@code SOAPBody} object contains {@code SOAPBodyElement}
  * objects, which have the content for the SOAP body.
- * A <code>SOAPFault</code> object, which carries status and/or
- * error information, is an example of a <code>SOAPBodyElement</code> object.
+ * A {@code SOAPFault} object, which carries status and/or
+ * error information, is an example of a {@code SOAPBodyElement} object.
  *
  * @see SOAPFault
  * @since 1.6
@@ -47,47 +47,47 @@
 public interface SOAPBody extends SOAPElement {
 
     /**
-     * Creates a new <code>SOAPFault</code> object and adds it to
-     * this <code>SOAPBody</code> object. The new <code>SOAPFault</code> will
+     * Creates a new {@code SOAPFault} object and adds it to
+     * this {@code SOAPBody} object. The new {@code SOAPFault} will
      * have default values set for the mandatory child elements. The type of
-     * the <code>SOAPFault</code> will be a SOAP 1.1 or a SOAP 1.2 <code>SOAPFault</code>
-     * depending on the <code>protocol</code> specified while creating the
-     * <code>MessageFactory</code> instance.
+     * the {@code SOAPFault} will be a SOAP 1.1 or a SOAP 1.2 {@code SOAPFault}
+     * depending on the {@code protocol} specified while creating the
+     * {@code MessageFactory} instance.
      * <p>
-     * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
+     * A {@code SOAPBody} may contain at most one {@code SOAPFault}
      * child element.
      *
-     * @return the new <code>SOAPFault</code> object
+     * @return the new {@code SOAPFault} object
      * @exception SOAPException if there is a SOAP error
      */
     public SOAPFault addFault() throws SOAPException;
 
 
     /**
-     * Creates a new <code>SOAPFault</code> object and adds it to
-     * this <code>SOAPBody</code> object. The type of the
-     * <code>SOAPFault</code> will be a SOAP 1.1  or a SOAP 1.2
-     * <code>SOAPFault</code> depending on the <code>protocol</code>
-     * specified while creating the <code>MessageFactory</code> instance.
+     * Creates a new {@code SOAPFault} object and adds it to
+     * this {@code SOAPBody} object. The type of the
+     * {@code SOAPFault} will be a SOAP 1.1  or a SOAP 1.2
+     * {@code SOAPFault} depending on the {@code protocol}
+     * specified while creating the {@code MessageFactory} instance.
      * <p>
-     * For SOAP 1.2 the <code>faultCode</code> parameter is the value of the
-     * <i>Fault/Code/Value</i> element  and the <code>faultString</code> parameter
+     * For SOAP 1.2 the {@code faultCode} parameter is the value of the
+     * <i>Fault/Code/Value</i> element  and the {@code faultString} parameter
      * is the value of the <i>Fault/Reason/Text</i> element. For SOAP 1.1
-     * the <code>faultCode</code> parameter is the value of the <code>faultcode</code>
-     * element and the <code>faultString</code> parameter is the value of the <code>faultstring</code>
+     * the {@code faultCode} parameter is the value of the {@code faultcode}
+     * element and the {@code faultString} parameter is the value of the {@code faultstring}
      * element.
      * <p>
-     * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
+     * A {@code SOAPBody} may contain at most one {@code SOAPFault}
      * child element.
      *
-     * @param faultCode a <code>Name</code> object giving the fault
+     * @param faultCode a {@code Name} object giving the fault
      *         code to be set; must be one of the fault codes defined in the Version
      *         of SOAP specification in use
-     * @param faultString a <code>String</code> giving an explanation of
+     * @param faultString a {@code String} giving an explanation of
      *         the fault
      * @param locale a {@link java.util.Locale} object indicating
-     *         the native language of the <code>faultString</code>
-     * @return the new <code>SOAPFault</code> object
+     *         the native language of the {@code faultString}
+     * @return the new {@code SOAPFault} object
      * @exception SOAPException if there is a SOAP error
      * @see SOAPFault#setFaultCode
      * @see SOAPFault#setFaultString
@@ -96,32 +96,32 @@
     public SOAPFault addFault(Name faultCode, String faultString, Locale locale) throws SOAPException;
 
     /**
-     * Creates a new <code>SOAPFault</code> object and adds it to this
-     * <code>SOAPBody</code> object. The type of the <code>SOAPFault</code>
-     * will be a SOAP 1.1 or a SOAP 1.2 <code>SOAPFault</code> depending on
-     * the <code>protocol</code> specified while creating the <code>MessageFactory</code>
+     * Creates a new {@code SOAPFault} object and adds it to this
+     * {@code SOAPBody} object. The type of the {@code SOAPFault}
+     * will be a SOAP 1.1 or a SOAP 1.2 {@code SOAPFault} depending on
+     * the {@code protocol} specified while creating the {@code MessageFactory}
      * instance.
      * <p>
-     * For SOAP 1.2 the <code>faultCode</code> parameter is the value of the
-     * <i>Fault/Code/Value</i> element  and the <code>faultString</code> parameter
+     * For SOAP 1.2 the {@code faultCode} parameter is the value of the
+     * <i>Fault/Code/Value</i> element  and the {@code faultString} parameter
      * is the value of the <i>Fault/Reason/Text</i> element. For SOAP 1.1
-     * the <code>faultCode</code> parameter is the value of the <code>faultcode</code>
-     * element and the <code>faultString</code> parameter is the value of the <code>faultstring</code>
+     * the {@code faultCode} parameter is the value of the {@code faultcode}
+     * element and the {@code faultString} parameter is the value of the {@code faultstring}
      * element.
      * <p>
-     * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
+     * A {@code SOAPBody} may contain at most one {@code SOAPFault}
      * child element.
      *
      * @param faultCode
-     *            a <code>QName</code> object giving the fault code to be
+     *            a {@code QName} object giving the fault code to be
      *            set; must be one of the fault codes defined in the version
      *            of SOAP specification in use.
      * @param faultString
-     *            a <code>String</code> giving an explanation of the fault
+     *            a {@code String} giving an explanation of the fault
      * @param locale
      *            a {@link java.util.Locale Locale} object indicating the
-     *            native language of the <code>faultString</code>
-     * @return the new <code>SOAPFault</code> object
+     *            native language of the {@code faultString}
+     * @return the new {@code SOAPFault} object
      * @exception SOAPException
      *                if there is a SOAP error
      * @see SOAPFault#setFaultCode
@@ -134,33 +134,33 @@
         throws SOAPException;
 
     /**
-     * Creates a new  <code>SOAPFault</code> object and adds it to this
-     * <code>SOAPBody</code> object. The type of the <code>SOAPFault</code>
-     * will be a SOAP 1.1 or a SOAP 1.2 <code>SOAPFault</code> depending on
-     * the <code>protocol</code> specified while creating the <code>MessageFactory</code>
+     * Creates a new  {@code SOAPFault} object and adds it to this
+     * {@code SOAPBody} object. The type of the {@code SOAPFault}
+     * will be a SOAP 1.1 or a SOAP 1.2 {@code SOAPFault} depending on
+     * the {@code protocol} specified while creating the {@code MessageFactory}
      * instance.
      * <p>
-     * For SOAP 1.2 the <code>faultCode</code> parameter is the value of the
-     * <i>Fault/Code/Value</i> element  and the <code>faultString</code> parameter
+     * For SOAP 1.2 the {@code faultCode} parameter is the value of the
+     * <i>Fault/Code/Value</i> element  and the {@code faultString} parameter
      * is the value of the <i>Fault/Reason/Text</i> element. For SOAP 1.1
-     * the <code>faultCode</code> parameter is the value of the <i>faultcode</i>
-     * element and the <code>faultString</code> parameter is the value of the <i>faultstring</i>
+     * the {@code faultCode} parameter is the value of the <i>faultcode</i>
+     * element and the {@code faultString} parameter is the value of the <i>faultstring</i>
      * element.
      * <p>
-     * In case of a SOAP 1.2 fault, the default value for the mandatory <code>xml:lang</code>
+     * In case of a SOAP 1.2 fault, the default value for the mandatory {@code xml:lang}
      * attribute on the <i>Fault/Reason/Text</i> element will be set to
-     * <code>java.util.Locale.getDefault()</code>
+     * {@code java.util.Locale.getDefault()}
      * <p>
-     * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
+     * A {@code SOAPBody} may contain at most one {@code SOAPFault}
      * child element.
      *
      * @param faultCode
-     *            a <code>Name</code> object giving the fault code to be set;
+     *            a {@code Name} object giving the fault code to be set;
      *            must be one of the fault codes defined in the version of SOAP
      *            specification in use
      * @param faultString
-     *            a <code>String</code> giving an explanation of the fault
-     * @return the new <code>SOAPFault</code> object
+     *            a {@code String} giving an explanation of the fault
+     * @return the new {@code SOAPFault} object
      * @exception SOAPException
      *                if there is a SOAP error
      * @see SOAPFault#setFaultCode
@@ -171,33 +171,33 @@
         throws SOAPException;
 
     /**
-     * Creates a new <code>SOAPFault</code> object and adds it to this <code>SOAPBody</code>
-     * object. The type of the <code>SOAPFault</code>
-     * will be a SOAP 1.1 or a SOAP 1.2 <code>SOAPFault</code> depending on
-     * the <code>protocol</code> specified while creating the <code>MessageFactory</code>
+     * Creates a new {@code SOAPFault} object and adds it to this {@code SOAPBody}
+     * object. The type of the {@code SOAPFault}
+     * will be a SOAP 1.1 or a SOAP 1.2 {@code SOAPFault} depending on
+     * the {@code protocol} specified while creating the {@code MessageFactory}
      * instance.
      * <p>
-     * For SOAP 1.2 the <code>faultCode</code> parameter is the value of the
-     * <i>Fault/Code/Value</i> element  and the <code>faultString</code> parameter
+     * For SOAP 1.2 the {@code faultCode} parameter is the value of the
+     * <i>Fault/Code/Value</i> element  and the {@code faultString} parameter
      * is the value of the <i>Fault/Reason/Text</i> element. For SOAP 1.1
-     * the <code>faultCode</code> parameter is the value of the <i>faultcode</i>
-     * element and the <code>faultString</code> parameter is the value of the <i>faultstring</i>
+     * the {@code faultCode} parameter is the value of the <i>faultcode</i>
+     * element and the {@code faultString} parameter is the value of the <i>faultstring</i>
      * element.
      * <p>
-     * In case of a SOAP 1.2 fault, the default value for the mandatory <code>xml:lang</code>
+     * In case of a SOAP 1.2 fault, the default value for the mandatory {@code xml:lang}
      * attribute on the <i>Fault/Reason/Text</i> element will be set to
-     * <code>java.util.Locale.getDefault()</code>
+     * {@code java.util.Locale.getDefault()}
      * <p>
-     * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
+     * A {@code SOAPBody} may contain at most one {@code SOAPFault}
      * child element
      *
      * @param faultCode
-     *            a <code>QName</code> object giving the fault code to be
+     *            a {@code QName} object giving the fault code to be
      *            set; must be one of the fault codes defined in the version
      *            of  SOAP specification in use
      * @param faultString
-     *            a <code>String</code> giving an explanation of the fault
-     * @return the new <code>SOAPFault</code> object
+     *            a {@code String} giving an explanation of the fault
+     * @return the new {@code SOAPFault} object
      * @exception SOAPException
      *                if there is a SOAP error
      * @see SOAPFault#setFaultCode
@@ -209,32 +209,32 @@
         throws SOAPException;
 
     /**
-     * Indicates whether a <code>SOAPFault</code> object exists in this
-     * <code>SOAPBody</code> object.
+     * Indicates whether a {@code SOAPFault} object exists in this
+     * {@code SOAPBody} object.
      *
-     * @return <code>true</code> if a <code>SOAPFault</code> object exists
-     *         in this <code>SOAPBody</code> object; <code>false</code>
+     * @return {@code true} if a {@code SOAPFault} object exists
+     *         in this {@code SOAPBody} object; {@code false}
      *         otherwise
      */
     public boolean hasFault();
 
     /**
-     * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+     * Returns the {@code SOAPFault} object in this {@code SOAPBody}
      * object.
      *
-     * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+     * @return the {@code SOAPFault} object in this {@code SOAPBody}
      *         object if present, null otherwise.
      */
     public SOAPFault getFault();
 
     /**
-     * Creates a new <code>SOAPBodyElement</code> object with the specified
-     * name and adds it to this <code>SOAPBody</code> object.
+     * Creates a new {@code SOAPBodyElement} object with the specified
+     * name and adds it to this {@code SOAPBody} object.
      *
      * @param name
-     *            a <code>Name</code> object with the name for the new <code>SOAPBodyElement</code>
+     *            a {@code Name} object with the name for the new {@code SOAPBodyElement}
      *            object
-     * @return the new <code>SOAPBodyElement</code> object
+     * @return the new {@code SOAPBodyElement} object
      * @exception SOAPException
      *                if a SOAP error occurs
      * @see SOAPBody#addBodyElement(javax.xml.namespace.QName)
@@ -243,13 +243,13 @@
 
 
     /**
-     * Creates a new <code>SOAPBodyElement</code> object with the specified
-     * QName and adds it to this <code>SOAPBody</code> object.
+     * Creates a new {@code SOAPBodyElement} object with the specified
+     * QName and adds it to this {@code SOAPBody} object.
      *
      * @param qname
-     *            a <code>QName</code> object with the qname for the new
-     *            <code>SOAPBodyElement</code> object
-     * @return the new <code>SOAPBodyElement</code> object
+     *            a {@code QName} object with the qname for the new
+     *            {@code SOAPBodyElement} object
+     * @return the new {@code SOAPBodyElement} object
      * @exception SOAPException
      *                if a SOAP error occurs
      * @see SOAPBody#addBodyElement(Name)
@@ -259,20 +259,20 @@
 
     /**
      * Adds the root node of the DOM <code>{@link org.w3c.dom.Document}</code>
-     * to this <code>SOAPBody</code> object.
+     * to this {@code SOAPBody} object.
      * <p>
-     * Calling this method invalidates the <code>document</code> parameter.
-     * The client application should discard all references to this <code>Document</code>
-     * and its contents upon calling <code>addDocument</code>. The behavior
+     * Calling this method invalidates the {@code document} parameter.
+     * The client application should discard all references to this {@code Document}
+     * and its contents upon calling {@code addDocument}. The behavior
      * of an application that continues to use such references is undefined.
      *
      * @param document
-     *            the <code>Document</code> object whose root node will be
-     *            added to this <code>SOAPBody</code>.
-     * @return the <code>SOAPBodyElement</code> that represents the root node
+     *            the {@code Document} object whose root node will be
+     *            added to this {@code SOAPBody}.
+     * @return the {@code SOAPBodyElement} that represents the root node
      *         that was added.
      * @exception SOAPException
-     *                if the <code>Document</code> cannot be added
+     *                if the {@code Document} cannot be added
      * @since 1.6, SAAJ 1.2
      */
     public SOAPBodyElement addDocument(org.w3c.dom.Document document)
@@ -280,16 +280,16 @@
 
     /**
      * Creates a new DOM <code>{@link org.w3c.dom.Document}</code> and sets
-     * the first child of this <code>SOAPBody</code> as it's document
-     * element. The child <code>SOAPElement</code> is removed as part of the
+     * the first child of this {@code SOAPBody} as it's document
+     * element. The child {@code SOAPElement} is removed as part of the
      * process.
      *
      * @return the <code>{@link org.w3c.dom.Document}</code> representation
-     *         of the <code>SOAPBody</code> content.
+     *         of the {@code SOAPBody} content.
      *
      * @exception SOAPException
-     *                if there is not exactly one child <code>SOAPElement</code> of the <code>
-     *              <code>SOAPBody</code>.
+     *            if there is not exactly one child {@code SOAPElement} of the
+     *            {@code SOAPBody}.
      *
      * @since 1.6, SAAJ 1.3
      */
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java	Wed Jul 05 20:30:08 2017 +0200
@@ -38,7 +38,7 @@
  * Methods in this interface that are required to return SAAJ specific objects
  * may "silently" replace nodes in the tree as required to successfully return
  * objects of the correct type. See {@link #getChildElements()} and
- * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
+ * {@link <a HREF="package-summary.html#package_description">javax.xml.soap</a>}
  * for details.
  *
  * @since 1.6
@@ -46,115 +46,115 @@
 public interface SOAPElement extends Node, org.w3c.dom.Element {
 
     /**
-     * Creates a new <code>SOAPElement</code> object initialized with the
-     * given <code>Name</code> object and adds the new element to this
-     * <code>SOAPElement</code> object.
+     * Creates a new {@code SOAPElement} object initialized with the
+     * given {@code Name} object and adds the new element to this
+     * {@code SOAPElement} object.
      * <P>
      * This method may be deprecated in a future release of SAAJ in favor of
      * addChildElement(javax.xml.namespace.QName)
      *
-     * @param name a <code>Name</code> object with the XML name for the
+     * @param name a {@code Name} object with the XML name for the
      *        new element
      *
-     * @return the new <code>SOAPElement</code> object that was created
+     * @return the new {@code SOAPElement} object that was created
      * @exception SOAPException if there is an error in creating the
-     *                          <code>SOAPElement</code> object
+     *                          {@code SOAPElement} object
      * @see SOAPElement#addChildElement(javax.xml.namespace.QName)
      */
     public SOAPElement addChildElement(Name name) throws SOAPException;
 
     /**
-     * Creates a new <code>SOAPElement</code> object initialized with the given
-     * <code>QName</code> object and adds the new element to this <code>SOAPElement</code>
+     * Creates a new {@code SOAPElement} object initialized with the given
+     * {@code QName} object and adds the new element to this {@code SOAPElement}
      *  object. The  <i>namespace</i>, <i>localname</i> and <i>prefix</i> of the new
-     * <code>SOAPElement</code> are all taken  from the <code>qname</code> argument.
+     * {@code SOAPElement} are all taken  from the {@code qname} argument.
      *
-     * @param qname a <code>QName</code> object with the XML name for the
+     * @param qname a {@code QName} object with the XML name for the
      *        new element
      *
-     * @return the new <code>SOAPElement</code> object that was created
+     * @return the new {@code SOAPElement} object that was created
      * @exception SOAPException if there is an error in creating the
-     *                          <code>SOAPElement</code> object
+     *                          {@code SOAPElement} object
      * @see SOAPElement#addChildElement(Name)
      * @since 1.6, SAAJ 1.3
      */
     public SOAPElement addChildElement(QName qname) throws SOAPException;
 
     /**
-     * Creates a new <code>SOAPElement</code> object initialized with the
+     * Creates a new {@code SOAPElement} object initialized with the
      * specified local name and adds the new element to this
-     * <code>SOAPElement</code> object.
-     * The new  <code>SOAPElement</code> inherits any in-scope default namespace.
+     * {@code SOAPElement} object.
+     * The new  {@code SOAPElement} inherits any in-scope default namespace.
      *
-     * @param localName a <code>String</code> giving the local name for
+     * @param localName a {@code String} giving the local name for
      *          the element
-     * @return the new <code>SOAPElement</code> object that was created
+     * @return the new {@code SOAPElement} object that was created
      * @exception SOAPException if there is an error in creating the
-     *                          <code>SOAPElement</code> object
+     *                          {@code SOAPElement} object
      */
     public SOAPElement addChildElement(String localName) throws SOAPException;
 
     /**
-     * Creates a new <code>SOAPElement</code> object initialized with the
+     * Creates a new {@code SOAPElement} object initialized with the
      * specified local name and prefix and adds the new element to this
-     * <code>SOAPElement</code> object.
+     * {@code SOAPElement} object.
      *
-     * @param localName a <code>String</code> giving the local name for
+     * @param localName a {@code String} giving the local name for
      *        the new element
-     * @param prefix a <code>String</code> giving the namespace prefix for
+     * @param prefix a {@code String} giving the namespace prefix for
      *        the new element
      *
-     * @return the new <code>SOAPElement</code> object that was created
-     * @exception SOAPException if the <code>prefix</code> is not valid in the
-     *         context of this <code>SOAPElement</code> or  if there is an error in creating the
-     *                          <code>SOAPElement</code> object
+     * @return the new {@code SOAPElement} object that was created
+     * @exception SOAPException if the {@code prefix} is not valid in the
+     *         context of this {@code SOAPElement} or  if there is an error in creating the
+     *                          {@code SOAPElement} object
      */
     public SOAPElement addChildElement(String localName, String prefix)
         throws SOAPException;
 
     /**
-     * Creates a new <code>SOAPElement</code> object initialized with the
+     * Creates a new {@code SOAPElement} object initialized with the
      * specified local name, prefix, and URI and adds the new element to this
-     * <code>SOAPElement</code> object.
+     * {@code SOAPElement} object.
      *
-     * @param localName a <code>String</code> giving the local name for
+     * @param localName a {@code String} giving the local name for
      *        the new element
-     * @param prefix a <code>String</code> giving the namespace prefix for
+     * @param prefix a {@code String} giving the namespace prefix for
      *        the new element
-     * @param uri a <code>String</code> giving the URI of the namespace
+     * @param uri a {@code String} giving the URI of the namespace
      *        to which the new element belongs
      *
-     * @return the new <code>SOAPElement</code> object that was created
+     * @return the new {@code SOAPElement} object that was created
      * @exception SOAPException if there is an error in creating the
-     *                          <code>SOAPElement</code> object
+     *                          {@code SOAPElement} object
      */
     public SOAPElement addChildElement(String localName, String prefix,
                                        String uri)
         throws SOAPException;
 
     /**
-     * Add a <code>SOAPElement</code> as a child of this
-     * <code>SOAPElement</code> instance. The <code>SOAPElement</code>
+     * Add a {@code SOAPElement} as a child of this
+     * {@code SOAPElement} instance. The {@code SOAPElement}
      * is expected to be created by a
-     * <code>SOAPFactory</code>. Callers should not rely on the
+     * {@code SOAPFactory}. Callers should not rely on the
      * element instance being added as is into the XML
      * tree. Implementations could end up copying the content
-     * of the <code>SOAPElement</code> passed into an instance of
-     * a different <code>SOAPElement</code> implementation. For
-     * instance if <code>addChildElement()</code> is called on a
-     * <code>SOAPHeader</code>, <code>element</code> will be copied
-     * into an instance of a <code>SOAPHeaderElement</code>.
+     * of the {@code SOAPElement} passed into an instance of
+     * a different {@code SOAPElement} implementation. For
+     * instance if {@code addChildElement()} is called on a
+     * {@code SOAPHeader}, {@code element} will be copied
+     * into an instance of a {@code SOAPHeaderElement}.
      *
-     * <P>The fragment rooted in <code>element</code> is either added
+     * <P>The fragment rooted in {@code element} is either added
      * as a whole or not at all, if there was an error.
      *
-     * <P>The fragment rooted in <code>element</code> cannot contain
+     * <P>The fragment rooted in {@code element} cannot contain
      * elements named "Envelope", "Header" or "Body" and in the SOAP
      * namespace. Any namespace prefixes present in the fragment
      * should be fully resolved using appropriate namespace
      * declarations within the fragment itself.
      *
-     * @param element the <code>SOAPElement</code> to be added as a
+     * @param element the {@code SOAPElement} to be added as a
      *                new child
      *
      * @exception SOAPException if there was an error in adding this
@@ -167,10 +167,10 @@
         throws SOAPException;
 
     /**
-     * Detaches all children of this <code>SOAPElement</code>.
+     * Detaches all children of this {@code SOAPElement}.
      * <p>
      * This method is useful for rolling back the construction of partially
-     * completed <code>SOAPHeaders</code> and <code>SOAPBodys</code> in
+     * completed {@code SOAPHeaders} and {@code SOAPBodys} in
      * preparation for sending a fault when an error condition is detected. It
      * is also useful for recycling portions of a document within a SOAP
      * message.
@@ -180,33 +180,33 @@
     public abstract void removeContents();
 
     /**
-     * Creates a new <code>Text</code> object initialized with the given
-     * <code>String</code> and adds it to this <code>SOAPElement</code> object.
+     * Creates a new {@code Text} object initialized with the given
+     * {@code String} and adds it to this {@code SOAPElement} object.
      *
-     * @param text a <code>String</code> object with the textual content to be added
+     * @param text a {@code String} object with the textual content to be added
      *
-     * @return the <code>SOAPElement</code> object into which
-     *         the new <code>Text</code> object was inserted
+     * @return the {@code SOAPElement} object into which
+     *         the new {@code Text} object was inserted
      * @exception SOAPException if there is an error in creating the
-     *                    new <code>Text</code> object or if it is not legal to
+     *                    new {@code Text} object or if it is not legal to
      *                      attach it as a child to this
-     *                      <code>SOAPElement</code>
+     *                      {@code SOAPElement}
      */
     public SOAPElement addTextNode(String text) throws SOAPException;
 
     /**
      * Adds an attribute with the specified name and value to this
-     * <code>SOAPElement</code> object.
+     * {@code SOAPElement} object.
      *
-     * @param name a <code>Name</code> object with the name of the attribute
-     * @param value a <code>String</code> giving the value of the attribute
-     * @return the <code>SOAPElement</code> object into which the attribute was
+     * @param name a {@code Name} object with the name of the attribute
+     * @param value a {@code String} giving the value of the attribute
+     * @return the {@code SOAPElement} object into which the attribute was
      *         inserted
      *
      * @exception SOAPException if there is an error in creating the
      *                          Attribute, or it is invalid to set
-                                an attribute with <code>Name</code>
-                                 <code>name</code> on this SOAPElement.
+                                an attribute with {@code Name}
+                                 {@code name} on this SOAPElement.
      * @see SOAPElement#addAttribute(javax.xml.namespace.QName, String)
      */
     public SOAPElement addAttribute(Name name, String value)
@@ -214,17 +214,17 @@
 
     /**
      * Adds an attribute with the specified name and value to this
-     * <code>SOAPElement</code> object.
+     * {@code SOAPElement} object.
      *
-     * @param qname a <code>QName</code> object with the name of the attribute
-     * @param value a <code>String</code> giving the value of the attribute
-     * @return the <code>SOAPElement</code> object into which the attribute was
+     * @param qname a {@code QName} object with the name of the attribute
+     * @param value a {@code String} giving the value of the attribute
+     * @return the {@code SOAPElement} object into which the attribute was
      *         inserted
      *
      * @exception SOAPException if there is an error in creating the
      *                          Attribute, or it is invalid to set
-                                an attribute with <code>QName</code>
-                                <code>qname</code> on this SOAPElement.
+                                an attribute with {@code QName}
+                                {@code qname} on this SOAPElement.
      * @see SOAPElement#addAttribute(Name, String)
      * @since 1.6, SAAJ 1.3
      */
@@ -233,11 +233,11 @@
 
     /**
      * Adds a namespace declaration with the specified prefix and URI to this
-     * <code>SOAPElement</code> object.
+     * {@code SOAPElement} object.
      *
-     * @param prefix a <code>String</code> giving the prefix of the namespace
-     * @param uri a <code>String</code> giving the uri of the namespace
-     * @return the <code>SOAPElement</code> object into which this
+     * @param prefix a {@code String} giving the prefix of the namespace
+     * @param uri a {@code String} giving the uri of the namespace
+     * @return the {@code SOAPElement} object into which this
      *          namespace declaration was inserted.
      *
      * @exception SOAPException if there is an error in creating the
@@ -249,8 +249,8 @@
     /**
      * Returns the value of the attribute with the specified name.
      *
-     * @param name a <code>Name</code> object with the name of the attribute
-     * @return a <code>String</code> giving the value of the specified
+     * @param name a {@code Name} object with the name of the attribute
+     * @return a {@code String} giving the value of the specified
      *         attribute, Null if there is no such attribute
      * @see SOAPElement#getAttributeValue(javax.xml.namespace.QName)
      */
@@ -259,8 +259,8 @@
     /**
      * Returns the value of the attribute with the specified qname.
      *
-     * @param qname a <code>QName</code> object with the qname of the attribute
-     * @return a <code>String</code> giving the value of the specified
+     * @param qname a {@code QName} object with the qname of the attribute
+     * @return a {@code String} giving the value of the specified
      *         attribute, Null if there is no such attribute
      * @see SOAPElement#getAttributeValue(Name)
      * @since 1.6, SAAJ 1.3
@@ -268,11 +268,11 @@
     public String getAttributeValue(QName qname);
 
     /**
-     * Returns an <code>Iterator</code> over all of the attribute
-     * <code>Name</code> objects in this
-     * <code>SOAPElement</code> object. The iterator can be used to get
+     * Returns an {@code Iterator} over all of the attribute
+     * {@code Name} objects in this
+     * {@code SOAPElement} object. The iterator can be used to get
      * the attribute names, which can then be passed to the method
-     * <code>getAttributeValue</code> to retrieve the value of each
+     * {@code getAttributeValue} to retrieve the value of each
      * attribute.
      *
      * @see SOAPElement#getAllAttributesAsQNames()
@@ -281,10 +281,10 @@
     public Iterator getAllAttributes();
 
     /**
-     * Returns an <code>Iterator</code> over all of the attributes
-     * in this <code>SOAPElement</code>  as <code>QName</code> objects.
+     * Returns an {@code Iterator} over all of the attributes
+     * in this {@code SOAPElement}  as {@code QName} objects.
      * The iterator can be used to get the attribute QName, which can then
-     * be passed to the method <code>getAttributeValue</code> to retrieve
+     * be passed to the method {@code getAttributeValue} to retrieve
      * the value of each attribute.
      *
      * @return an iterator over the QNames of the attributes
@@ -297,94 +297,94 @@
     /**
      * Returns the URI of the namespace that has the given prefix.
      *
-     * @param prefix a <code>String</code> giving the prefix of the namespace
+     * @param prefix a {@code String} giving the prefix of the namespace
      *        for which to search
-     * @return a <code>String</code> with the uri of the namespace that has
+     * @return a {@code String} with the uri of the namespace that has
      *        the given prefix
      */
     public String getNamespaceURI(String prefix);
 
     /**
-     * Returns an <code>Iterator</code> over the namespace prefix
-     * <code>String</code>s declared by this element. The prefixes returned by
+     * Returns an {@code Iterator} over the namespace prefix
+     * {@code String}s declared by this element. The prefixes returned by
      * this iterator can be passed to the method
-     * <code>getNamespaceURI</code> to retrieve the URI of each namespace.
+     * {@code getNamespaceURI} to retrieve the URI of each namespace.
      *
      * @return an iterator over the namespace prefixes in this
-     *         <code>SOAPElement</code> object
+     *         {@code SOAPElement} object
      */
     public Iterator getNamespacePrefixes();
 
     /**
-     * Returns an <code>Iterator</code> over the namespace prefix
-     * <code>String</code>s visible to this element. The prefixes returned by
+     * Returns an {@code Iterator} over the namespace prefix
+     * {@code String}s visible to this element. The prefixes returned by
      * this iterator can be passed to the method
-     * <code>getNamespaceURI</code> to retrieve the URI of each namespace.
+     * {@code getNamespaceURI} to retrieve the URI of each namespace.
      *
      * @return an iterator over the namespace prefixes are within scope of this
-     *         <code>SOAPElement</code> object
+     *         {@code SOAPElement} object
      *
      * @since 1.6, SAAJ 1.2
      */
     public Iterator getVisibleNamespacePrefixes();
 
     /**
-     * Creates a <code>QName</code> whose namespace URI is the one associated
-     * with the parameter, <code>prefix</code>, in the context of this
-     * <code>SOAPElement</code>. The remaining elements of the new
-     * <code>QName</code> are taken directly from the parameters,
-     * <code>localName</code> and <code>prefix</code>.
+     * Creates a {@code QName} whose namespace URI is the one associated
+     * with the parameter, {@code prefix}, in the context of this
+     * {@code SOAPElement}. The remaining elements of the new
+     * {@code QName} are taken directly from the parameters,
+     * {@code localName} and {@code prefix}.
      *
      * @param localName
-     *          a <code>String</code> containing the local part of the name.
+     *          a {@code String} containing the local part of the name.
      * @param prefix
-     *          a <code>String</code> containing the prefix for the name.
+     *          a {@code String} containing the prefix for the name.
      *
-     * @return a <code>QName</code> with the specified <code>localName</code>
-     *          and <code>prefix</code>, and with a namespace that is associated
-     *          with the <code>prefix</code> in the context of this
-     *          <code>SOAPElement</code>. This namespace will be the same as
+     * @return a {@code QName} with the specified {@code localName}
+     *          and {@code prefix}, and with a namespace that is associated
+     *          with the {@code prefix} in the context of this
+     *          {@code SOAPElement}. This namespace will be the same as
      *          the one that would be returned by
      *          <code>{@link #getNamespaceURI(String)}</code> if it were given
-     *          <code>prefix</code> as it's parameter.
+     *          {@code prefix} as it's parameter.
      *
-     * @exception SOAPException if the <code>QName</code> cannot be created.
+     * @exception SOAPException if the {@code QName} cannot be created.
      *
      * @since 1.6, SAAJ 1.3
      */
     public QName createQName(String localName, String prefix)
         throws SOAPException;
     /**
-     * Returns the name of this <code>SOAPElement</code> object.
+     * Returns the name of this {@code SOAPElement} object.
      *
-     * @return a <code>Name</code> object with the name of this
-     *         <code>SOAPElement</code> object
+     * @return a {@code Name} object with the name of this
+     *         {@code SOAPElement} object
      */
     public Name getElementName();
 
     /**
-     * Returns the qname of this <code>SOAPElement</code> object.
+     * Returns the qname of this {@code SOAPElement} object.
      *
-     * @return a <code>QName</code> object with the qname of this
-     *         <code>SOAPElement</code> object
+     * @return a {@code QName} object with the qname of this
+     *         {@code SOAPElement} object
      * @see SOAPElement#getElementName()
      * @since 1.6, SAAJ 1.3
      */
     public QName getElementQName();
 
     /**
-    * Changes the name of this <code>Element</code> to <code>newName</code> if
+    * Changes the name of this {@code Element} to {@code newName} if
     * possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody
     * etc. cannot have their names changed using this method. Any attempt to do
     * so will result in a  SOAPException being thrown.
     *<P>
     * Callers should not rely on the element instance being renamed as is.
     * Implementations could end up copying the content of the
-    * <code>SOAPElement</code> to a renamed instance.
+    * {@code SOAPElement} to a renamed instance.
     *
-    * @param newName the new name for the <code>Element</code>.
+    * @param newName the new name for the {@code Element}.
     *
-    * @exception SOAPException if changing the name of this <code>Element</code>
+    * @exception SOAPException if changing the name of this {@code Element}
     *                          is not allowed.
     * @return The renamed Node
     *
@@ -395,10 +395,10 @@
    /**
      * Removes the attribute with the specified name.
      *
-     * @param name the <code>Name</code> object with the name of the
+     * @param name the {@code Name} object with the name of the
      *        attribute to be removed
-     * @return <code>true</code> if the attribute was
-     *         removed successfully; <code>false</code> if it was not
+     * @return {@code true} if the attribute was
+     *         removed successfully; {@code false} if it was not
      * @see SOAPElement#removeAttribute(javax.xml.namespace.QName)
      */
     public boolean removeAttribute(Name name);
@@ -406,10 +406,10 @@
     /**
      * Removes the attribute with the specified qname.
      *
-     * @param qname the <code>QName</code> object with the qname of the
+     * @param qname the {@code QName} object with the qname of the
      *        attribute to be removed
-     * @return <code>true</code> if the attribute was
-     *         removed successfully; <code>false</code> if it was not
+     * @return {@code true} if the attribute was
+     *         removed successfully; {@code false} if it was not
      * @see SOAPElement#removeAttribute(Name)
      * @since 1.6, SAAJ 1.3
      */
@@ -418,84 +418,84 @@
     /**
      * Removes the namespace declaration corresponding to the given prefix.
      *
-     * @param prefix a <code>String</code> giving the prefix for which
+     * @param prefix a {@code String} giving the prefix for which
      *        to search
-     * @return <code>true</code> if the namespace declaration was
-     *         removed successfully; <code>false</code> if it was not
+     * @return {@code true} if the namespace declaration was
+     *         removed successfully; {@code false} if it was not
      */
     public boolean removeNamespaceDeclaration(String prefix);
 
     /**
-     * Returns an <code>Iterator</code> over all the immediate child
-     * {@link Node}s of this element. This includes <code>javax.xml.soap.Text</code>
-     * objects as well as <code>SOAPElement</code> objects.
+     * Returns an {@code Iterator} over all the immediate child
+     * {@link Node}s of this element. This includes {@code javax.xml.soap.Text}
+     * objects as well as {@code SOAPElement} objects.
      * <p>
-     * Calling this method may cause child <code>Element</code>,
-     * <code>SOAPElement</code> and <code>org.w3c.dom.Text</code> nodes to be
-     * replaced by <code>SOAPElement</code>, <code>SOAPHeaderElement</code>,
-     * <code>SOAPBodyElement</code> or <code>javax.xml.soap.Text</code> nodes as
+     * Calling this method may cause child {@code Element},
+     * {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be
+     * replaced by {@code SOAPElement}, {@code SOAPHeaderElement},
+     * {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as
      * appropriate for the type of this parent node. As a result the calling
      * application must treat any existing references to these child nodes that
      * have been obtained through DOM APIs as invalid and either discard them or
-     * refresh them with the values returned by this <code>Iterator</code>. This
+     * refresh them with the values returned by this {@code Iterator}. This
      * behavior can be avoided by calling the equivalent DOM APIs. See
-     * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
+     * {@link <a HREF="package-summary.html#package_description">javax.xml.soap</a>}
      * for more details.
      *
-     * @return an iterator with the content of this <code>SOAPElement</code>
+     * @return an iterator with the content of this {@code SOAPElement}
      *         object
      */
     public Iterator getChildElements();
 
     /**
-     * Returns an <code>Iterator</code> over all the immediate child
+     * Returns an {@code Iterator} over all the immediate child
      * {@link Node}s of this element with the specified name. All of these
-     * children will be <code>SOAPElement</code> nodes.
+     * children will be {@code SOAPElement} nodes.
      * <p>
-     * Calling this method may cause child <code>Element</code>,
-     * <code>SOAPElement</code> and <code>org.w3c.dom.Text</code> nodes to be
-     * replaced by <code>SOAPElement</code>, <code>SOAPHeaderElement</code>,
-     * <code>SOAPBodyElement</code> or <code>javax.xml.soap.Text</code> nodes as
+     * Calling this method may cause child {@code Element},
+     * {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be
+     * replaced by {@code SOAPElement}, {@code SOAPHeaderElement},
+     * {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as
      * appropriate for the type of this parent node. As a result the calling
      * application must treat any existing references to these child nodes that
      * have been obtained through DOM APIs as invalid and either discard them or
-     * refresh them with the values returned by this <code>Iterator</code>. This
+     * refresh them with the values returned by this {@code Iterator}. This
      * behavior can be avoided by calling the equivalent DOM APIs. See
-     * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
+     * {@link <a HREF="package-summary.html#package_description">javax.xml.soap</a>}
      * for more details.
      *
-     * @param name a <code>Name</code> object with the name of the child
+     * @param name a {@code Name} object with the name of the child
      *        elements to be returned
      *
-     * @return an <code>Iterator</code> object over all the elements
-     *         in this <code>SOAPElement</code> object with the
+     * @return an {@code Iterator} object over all the elements
+     *         in this {@code SOAPElement} object with the
      *         specified name
      * @see SOAPElement#getChildElements(javax.xml.namespace.QName)
      */
     public Iterator getChildElements(Name name);
 
     /**
-     * Returns an <code>Iterator</code> over all the immediate child
+     * Returns an {@code Iterator} over all the immediate child
      * {@link Node}s of this element with the specified qname. All of these
-     * children will be <code>SOAPElement</code> nodes.
+     * children will be {@code SOAPElement} nodes.
      * <p>
-     * Calling this method may cause child <code>Element</code>,
-     * <code>SOAPElement</code> and <code>org.w3c.dom.Text</code> nodes to be
-     * replaced by <code>SOAPElement</code>, <code>SOAPHeaderElement</code>,
-     * <code>SOAPBodyElement</code> or <code>javax.xml.soap.Text</code> nodes as
+     * Calling this method may cause child {@code Element},
+     * {@code SOAPElement} and {@code org.w3c.dom.Text} nodes to be
+     * replaced by {@code SOAPElement}, {@code SOAPHeaderElement},
+     * {@code SOAPBodyElement} or {@code javax.xml.soap.Text} nodes as
      * appropriate for the type of this parent node. As a result the calling
      * application must treat any existing references to these child nodes that
      * have been obtained through DOM APIs as invalid and either discard them or
-     * refresh them with the values returned by this <code>Iterator</code>. This
+     * refresh them with the values returned by this {@code Iterator}. This
      * behavior can be avoided by calling the equivalent DOM APIs. See
-     * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
+     * {@link <a HREF="package-summary.html#package_description">javax.xml.soap</a>}
      * for more details.
      *
-     * @param qname a <code>QName</code> object with the qname of the child
+     * @param qname a {@code QName} object with the qname of the child
      *        elements to be returned
      *
-     * @return an <code>Iterator</code> object over all the elements
-     *         in this <code>SOAPElement</code> object with the
+     * @return an {@code Iterator} object over all the elements
+     *         in this {@code SOAPElement} object with the
      *         specified qname
      * @see SOAPElement#getChildElements(Name)
      * @since 1.6, SAAJ 1.3
@@ -503,10 +503,10 @@
     public Iterator getChildElements(QName qname);
 
     /**
-     * Sets the encoding style for this <code>SOAPElement</code> object
+     * Sets the encoding style for this {@code SOAPElement} object
      * to one specified.
      *
-     * @param encodingStyle a <code>String</code> giving the encoding style
+     * @param encodingStyle a {@code String} giving the encoding style
      *
      * @exception IllegalArgumentException if there was a problem in the
      *            encoding style being set.
@@ -516,9 +516,9 @@
     public void setEncodingStyle(String encodingStyle)
         throws SOAPException;
     /**
-     * Returns the encoding style for this <code>SOAPElement</code> object.
+     * Returns the encoding style for this {@code SOAPElement} object.
      *
-     * @return a <code>String</code> giving the encoding style
+     * @return a {@code String} giving the encoding style
      *
      * @see #setEncodingStyle
      */
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java	Wed Jul 05 20:30:08 2017 +0200
@@ -36,24 +36,24 @@
  * message is an XML document or a MIME message whose first body part is an
  * XML/SOAP document.
  * <P>
- * A <code>SOAPMessage</code> object consists of a SOAP part and optionally
- * one or more attachment parts. The SOAP part for a <code>SOAPMessage</code>
- * object is a <code>SOAPPart</code> object, which contains information used
+ * A {@code SOAPMessage} object consists of a SOAP part and optionally
+ * one or more attachment parts. The SOAP part for a {@code SOAPMessage}
+ * object is a {@code SOAPPart} object, which contains information used
  * for message routing and identification, and which can contain
  * application-specific content. All data in the SOAP Part of a message must be
  * in XML format.
  * <P>
- * A new <code>SOAPMessage</code> object contains the following by default:
+ * A new {@code SOAPMessage} object contains the following by default:
  * <UL>
- *   <LI>A <code>SOAPPart</code> object
- *   <LI>A <code>SOAPEnvelope</code> object
- *   <LI>A <code>SOAPBody</code> object
- *   <LI>A <code>SOAPHeader</code> object
+ *   <LI>A {@code SOAPPart} object
+ *   <LI>A {@code SOAPEnvelope} object
+ *   <LI>A {@code SOAPBody} object
+ *   <LI>A {@code SOAPHeader} object
  * </UL>
- * The SOAP part of a message can be retrieved by calling the method <code>SOAPMessage.getSOAPPart()</code>.
- * The <code>SOAPEnvelope</code> object is retrieved from the <code>SOAPPart</code>
- * object, and the <code>SOAPEnvelope</code> object is used to retrieve the
- * <code>SOAPBody</code> and <code>SOAPHeader</code> objects.
+ * The SOAP part of a message can be retrieved by calling the method {@code SOAPMessage.getSOAPPart()}.
+ * The {@code SOAPEnvelope} object is retrieved from the {@code SOAPPart}
+ * object, and the {@code SOAPEnvelope} object is used to retrieve the
+ * {@code SOAPBody} and {@code SOAPHeader} objects.
  *
  * <PRE>
  *     SOAPPart sp = message.getSOAPPart();
@@ -63,32 +63,32 @@
  * </PRE>
  *
  * <P>
- * In addition to the mandatory <code>SOAPPart</code> object, a <code>SOAPMessage</code>
- * object may contain zero or more <code>AttachmentPart</code> objects, each
- * of which contains application-specific data. The <code>SOAPMessage</code>
- * interface provides methods for creating <code>AttachmentPart</code>
- * objects and also for adding them to a <code>SOAPMessage</code> object. A
- * party that has received a <code>SOAPMessage</code> object can examine its
+ * In addition to the mandatory {@code SOAPPart} object, a {@code SOAPMessage}
+ * object may contain zero or more {@code AttachmentPart} objects, each
+ * of which contains application-specific data. The {@code SOAPMessage}
+ * interface provides methods for creating {@code AttachmentPart}
+ * objects and also for adding them to a {@code SOAPMessage} object. A
+ * party that has received a {@code SOAPMessage} object can examine its
  * contents by retrieving individual attachment parts.
  * <P>
  * Unlike the rest of a SOAP message, an attachment is not required to be in
  * XML format and can therefore be anything from simple text to an image file.
  * Consequently, any message content that is not in XML format must be in an
- * <code>AttachmentPart</code> object.
+ * {@code AttachmentPart} object.
  * <P>
- * A <code>MessageFactory</code> object may create <code>SOAPMessage</code>
+ * A {@code MessageFactory} object may create {@code SOAPMessage}
  * objects with behavior that is specialized to a particular implementation or
- * application of SAAJ. For instance, a <code>MessageFactory</code> object
- * may produce <code>SOAPMessage</code> objects that conform to a particular
- * Profile such as ebXML. In this case a <code>MessageFactory</code> object
- * might produce <code>SOAPMessage</code> objects that are initialized with
+ * application of SAAJ. For instance, a {@code MessageFactory} object
+ * may produce {@code SOAPMessage} objects that conform to a particular
+ * Profile such as ebXML. In this case a {@code MessageFactory} object
+ * might produce {@code SOAPMessage} objects that are initialized with
  * ebXML headers.
  * <P>
  * In order to ensure backward source compatibility, methods that are added to
  * this class after version 1.1 of the SAAJ specification are all concrete
  * instead of abstract and they all have default implementations. Unless
  * otherwise noted in the JavaDocs for those methods the default
- * implementations simply throw an <code>UnsupportedOperationException</code>
+ * implementations simply throw an {@code UnsupportedOperationException}
  * and the SAAJ implementation code must override them with methods that
  * provide the specified behavior. Legacy client code does not have this
  * restriction, however, so long as there is no claim made that it conforms to
@@ -126,41 +126,40 @@
         "javax.xml.soap.write-xml-declaration";
 
     /**
-     * Sets the description of this <code>SOAPMessage</code> object's
+     * Sets the description of this {@code SOAPMessage} object's
      * content with the given description.
      *
-     * @param description a <code>String</code> describing the content of this
+     * @param description a {@code String} describing the content of this
      *         message
      * @see #getContentDescription
      */
     public abstract void setContentDescription(String description);
 
     /**
-     * Retrieves a description of this <code>SOAPMessage</code> object's
+     * Retrieves a description of this {@code SOAPMessage} object's
      * content.
      *
-     * @return a <code>String</code> describing the content of this
-     *         message or <code>null</code> if no description has been set
+     * @return a {@code String} describing the content of this
+     *         message or {@code null} if no description has been set
      * @see #setContentDescription
      */
     public abstract String getContentDescription();
 
     /**
-         * Gets the SOAP part of this <code>SOAPMessage</code> object.
+         * Gets the SOAP part of this {@code SOAPMessage} object.
          * <P>
-         * <code>SOAPMessage</code> object contains one or more attachments, the
+         * {@code SOAPMessage} object contains one or more attachments, the
          * SOAP Part must be the first MIME body part in the message.
          *
-         * @return the <code>SOAPPart</code> object for this <code>SOAPMessage</code>
+         * @return the {@code SOAPPart} object for this {@code SOAPMessage}
          *         object
          */
     public abstract SOAPPart getSOAPPart();
 
     /**
-         * Gets the SOAP Body contained in this <code>SOAPMessage</code> object.
-         * <p>
+         * Gets the SOAP Body contained in this {@code SOAPMessage} object.
          *
-         * @return the <code>SOAPBody</code> object contained by this <code>SOAPMessage</code>
+         * @return the {@code SOAPBody} object contained by this {@code SOAPMessage}
          *         object
          * @exception SOAPException
          *               if the SOAP Body does not exist or cannot be retrieved
@@ -171,23 +170,21 @@
     }
 
     /**
-         * Gets the SOAP Header contained in this <code>SOAPMessage</code>
-         * object.
-         * <p>
-         *
-         * @return the <code>SOAPHeader</code> object contained by this <code>SOAPMessage</code>
-         *         object
-         * @exception SOAPException
-         *               if the SOAP Header does not exist or cannot be retrieved
-         * @since 1.6, SAAJ 1.2
-         */
+     * Gets the SOAP Header contained in this {@code SOAPMessage} object.
+     *
+     * @return the {@code SOAPHeader} object contained
+     *         by this {@code SOAPMessage} object
+     * @exception SOAPException
+     *               if the SOAP Header does not exist or cannot be retrieved
+     * @since 1.6, SAAJ 1.2
+     */
     public SOAPHeader getSOAPHeader() throws SOAPException {
         throw new UnsupportedOperationException("getSOAPHeader must be overridden by all subclasses of SOAPMessage");
     }
 
     /**
-         * Removes all <code>AttachmentPart</code> objects that have been added
-         * to this <code>SOAPMessage</code> object.
+         * Removes all {@code AttachmentPart} objects that have been added
+         * to this {@code SOAPMessage} object.
          * <P>
          * This method does not touch the SOAP part.
          */
@@ -197,26 +194,26 @@
          * Gets a count of the number of attachments in this message. This count
          * does not include the SOAP part.
          *
-         * @return the number of <code>AttachmentPart</code> objects that are
-         *         part of this <code>SOAPMessage</code> object
+         * @return the number of {@code AttachmentPart} objects that are
+         *         part of this {@code SOAPMessage} object
          */
     public abstract int countAttachments();
 
     /**
-         * Retrieves all the <code>AttachmentPart</code> objects that are part of
-         * this <code>SOAPMessage</code> object.
+         * Retrieves all the {@code AttachmentPart} objects that are part of
+         * this {@code SOAPMessage} object.
          *
          * @return an iterator over all the attachments in this message
          */
     public abstract Iterator getAttachments();
 
     /**
-         * Retrieves all the <code>AttachmentPart</code> objects that have header
+         * Retrieves all the {@code AttachmentPart} objects that have header
          * entries that match the specified headers. Note that a returned
          * attachment could have headers in addition to those specified.
          *
          * @param headers
-         *           a <code>MimeHeaders</code> object containing the MIME
+         *           a {@code MimeHeaders} object containing the MIME
          *           headers for which to search
          * @return an iterator over all attachments that have a header that matches
          *         one of the given headers
@@ -224,12 +221,12 @@
     public abstract Iterator getAttachments(MimeHeaders headers);
 
     /**
-     * Removes all the <code>AttachmentPart</code> objects that have header
+     * Removes all the {@code AttachmentPart} objects that have header
      * entries that match the specified headers. Note that the removed
      * attachment could have headers in addition to those specified.
      *
      * @param headers
-     *           a <code>MimeHeaders</code> object containing the MIME
+     *           a {@code MimeHeaders} object containing the MIME
      *           headers for which to search
      * @since 1.6, SAAJ 1.3
      */
@@ -237,25 +234,26 @@
 
 
     /**
-     * Returns an <code>AttachmentPart</code> object that is associated with an
-     * attachment that is referenced by this <code>SOAPElement</code> or
-     * <code>null</code> if no such attachment exists. References can be made
-     * via an <code>href</code> attribute as described in
-     * {@link <a href="http://www.w3.org/TR/SOAP-attachments#SOAPReferenceToAttachements">SOAP Messages with Attachments</a>},
-     * or via a single <code>Text</code> child node containing a URI as
+     * Returns an {@code AttachmentPart} object that is associated with an
+     * attachment that is referenced by this {@code SOAPElement} or
+     * {@code null} if no such attachment exists. References can be made
+     * via an {@code href} attribute as described in
+     * <a href="http://www.w3.org/TR/SOAP-attachments#SOAPReferenceToAttachements">SOAP Messages with Attachments</a>,
+     * or via a single {@code Text} child node containing a URI as
      * described in the WS-I Attachments Profile 1.0 for elements of schema
-     * type {@link <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html">ref:swaRef</a>}.  These two mechanisms must be supported.
-     * The support for references via <code>href</code> attribute also implies that
+     * type <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html">ref:swaRef</a>.
+     * These two mechanisms must be supported.
+     * The support for references via {@code href} attribute also implies that
      * this method should also be supported on an element that is an
      * <i>xop:Include</i> element (
-     * {@link <a  href="http://www.w3.org/2000/xp/Group/3/06/Attachments/XOP.html">XOP</a>}).
+     * <a href="http://www.w3.org/2000/xp/Group/3/06/Attachments/XOP.html">XOP</a>).
      * other reference mechanisms may be supported by individual
      * implementations of this standard. Contact your vendor for details.
      *
-     * @param  element The <code>SOAPElement</code> containing the reference to an Attachment
-     * @return the referenced <code>AttachmentPart</code> or null if no such
-     *          <code>AttachmentPart</code> exists or no reference can be
-     *          found in this <code>SOAPElement</code>.
+     * @param  element The {@code SOAPElement} containing the reference to an Attachment
+     * @return the referenced {@code AttachmentPart} or null if no such
+     *          {@code AttachmentPart} exists or no reference can be
+     *          found in this {@code SOAPElement}.
      * @throws SOAPException if there is an error in the attempt to access the
      *          attachment
      *
@@ -265,40 +263,40 @@
 
 
     /**
-     * Adds the given <code>AttachmentPart</code> object to this <code>SOAPMessage</code>
-     * object. An <code>AttachmentPart</code> object must be created before
+     * Adds the given {@code AttachmentPart} object to this {@code SOAPMessage}
+     * object. An {@code AttachmentPart} object must be created before
      * it can be added to a message.
      *
      * @param AttachmentPart
-     *           an <code>AttachmentPart</code> object that is to become part
-     *           of this <code>SOAPMessage</code> object
+     *           an {@code AttachmentPart} object that is to become part
+     *           of this {@code SOAPMessage} object
      * @exception IllegalArgumentException
      */
     public abstract void addAttachmentPart(AttachmentPart AttachmentPart);
 
     /**
-     * Creates a new empty <code>AttachmentPart</code> object. Note that the
-     * method <code>addAttachmentPart</code> must be called with this new
-     * <code>AttachmentPart</code> object as the parameter in order for it to
-     * become an attachment to this <code>SOAPMessage</code> object.
+     * Creates a new empty {@code AttachmentPart} object. Note that the
+     * method {@code addAttachmentPart} must be called with this new
+     * {@code AttachmentPart} object as the parameter in order for it to
+     * become an attachment to this {@code SOAPMessage} object.
      *
-     * @return a new <code>AttachmentPart</code> object that can be populated
-     *         and added to this <code>SOAPMessage</code> object
+     * @return a new {@code AttachmentPart} object that can be populated
+     *         and added to this {@code SOAPMessage} object
      */
     public abstract AttachmentPart createAttachmentPart();
 
     /**
-     * Creates an <code>AttachmentPart</code> object and populates it using
-     * the given <code>DataHandler</code> object.
+     * Creates an {@code AttachmentPart} object and populates it using
+     * the given {@code DataHandler} object.
      *
      * @param dataHandler
-     *           the <code>javax.activation.DataHandler</code> object that
-     *           will generate the content for this <code>SOAPMessage</code>
+     *           the {@code javax.activation.DataHandler} object that
+     *           will generate the content for this {@code SOAPMessage}
      *           object
-     * @return a new <code>AttachmentPart</code> object that contains data
-     *         generated by the given <code>DataHandler</code> object
+     * @return a new {@code AttachmentPart} object that contains data
+     *         generated by the given {@code DataHandler} object
      * @exception IllegalArgumentException
-     *               if there was a problem with the specified <code>DataHandler</code>
+     *               if there was a problem with the specified {@code DataHandler}
      *               object
      * @see javax.activation.DataHandler
      * @see javax.activation.DataContentHandler
@@ -310,32 +308,32 @@
     }
 
     /**
-     * Returns all the transport-specific MIME headers for this <code>SOAPMessage</code>
+     * Returns all the transport-specific MIME headers for this {@code SOAPMessage}
      * object in a transport-independent fashion.
      *
-     * @return a <code>MimeHeaders</code> object containing the <code>MimeHeader</code>
+     * @return a {@code MimeHeaders} object containing the {@code MimeHeader}
      *         objects
      */
     public abstract MimeHeaders getMimeHeaders();
 
     /**
-     * Creates an <code>AttachmentPart</code> object and populates it with
+     * Creates an {@code AttachmentPart} object and populates it with
      * the specified data of the specified content type. The type of the
-     * <code>Object</code> should correspond to the value given for the
-     * <code>Content-Type</code>.
+     * {@code Object} should correspond to the value given for the
+     * {@code Content-Type}.
      *
      * @param content
-     *           an <code>Object</code> containing the content for the
-     *           <code>AttachmentPart</code> object to be created
+     *           an {@code Object} containing the content for the
+     *           {@code AttachmentPart} object to be created
      * @param contentType
-     *           a <code>String</code> object giving the type of content;
+     *           a {@code String} object giving the type of content;
      *           examples are "text/xml", "text/plain", and "image/jpeg"
-     * @return a new <code>AttachmentPart</code> object that contains the
+     * @return a new {@code AttachmentPart} object that contains the
      *         given data
      * @exception IllegalArgumentException
      *               may be thrown if the contentType does not match the type
      *               of the content object, or if there was no
-     *               <code>DataContentHandler</code> object for the given
+     *               {@code DataContentHandler} object for the given
      *               content object
      * @see javax.activation.DataHandler
      * @see javax.activation.DataContentHandler
@@ -349,50 +347,49 @@
     }
 
     /**
-     * Updates this <code>SOAPMessage</code> object with all the changes that
+     * Updates this {@code SOAPMessage} object with all the changes that
      * have been made to it. This method is called automatically when
      * {@link SOAPMessage#writeTo(OutputStream)} is  called. However, if
      * changes are made to a message that was received or to one that has
-     * already been sent, the method <code>saveChanges</code> needs to be
-     * called explicitly in order to save the changes. The method <code>saveChanges</code>
+     * already been sent, the method {@code saveChanges} needs to be
+     * called explicitly in order to save the changes. The method {@code saveChanges}
      * also generates any changes that can be read back (for example, a
      * MessageId in profiles that support a message id). All MIME headers in a
      * message that is created for sending purposes are guaranteed to have
-     * valid values only after <code>saveChanges</code> has been called.
+     * valid values only after {@code saveChanges} has been called.
      * <P>
      * In addition, this method marks the point at which the data from all
-     * constituent <code>AttachmentPart</code> objects are pulled into the
+     * constituent {@code AttachmentPart} objects are pulled into the
      * message.
-     * <P>
      *
-     * @exception <code>SOAPException</code> if there was a problem saving
-     *               changes to this message.
+     * @exception SOAPException if there was a problem saving
+     *            changes to this message.
      */
     public abstract void saveChanges() throws SOAPException;
 
     /**
-     * Indicates whether this <code>SOAPMessage</code> object needs to have
-     * the method <code>saveChanges</code> called on it.
+     * Indicates whether this {@code SOAPMessage} object needs to have
+     * the method {@code saveChanges} called on it.
      *
-     * @return <code>true</code> if <code>saveChanges</code> needs to be
-     *         called; <code>false</code> otherwise.
+     * @return {@code true} if {@code saveChanges} needs to be
+     *         called; {@code false} otherwise.
      */
     public abstract boolean saveRequired();
 
     /**
-     * Writes this <code>SOAPMessage</code> object to the given output
+     * Writes this {@code SOAPMessage} object to the given output
      * stream. The externalization format is as defined by the SOAP 1.1 with
      * Attachments specification.
      * <P>
      * If there are no attachments, just an XML stream is written out. For
-     * those messages that have attachments, <code>writeTo</code> writes a
+     * those messages that have attachments, {@code writeTo} writes a
      * MIME-encoded byte stream.
      * <P>
      * Note that this method does not write the transport-specific MIME Headers
      * of the Message
      *
      * @param out
-     *           the <code>OutputStream</code> object to which this <code>SOAPMessage</code>
+     *           the {@code OutputStream} object to which this {@code SOAPMessage}
      *           object will be written
      * @exception IOException
      *               if an I/O error occurs
@@ -414,13 +411,13 @@
      * implementation specific properties. These properties must be prefixed
      * with package names that are unique to the vendor.
      * <p>
-     * Setting the property <code>WRITE_XML_DECLARATION</code> to <code>"true"</code>
+     * Setting the property {@code WRITE_XML_DECLARATION} to {@code "true"}
      * will cause an XML Declaration to be written out at the start of the SOAP
      * message. The default value of "false" suppresses this declaration.
      * <p>
-     * The property <code>CHARACTER_SET_ENCODING</code> defaults to the value
-     * <code>"utf-8"</code> which causes the SOAP message to be encoded using
-     * UTF-8. Setting <code>CHARACTER_SET_ENCODING</code> to <code>"utf-16"</code>
+     * The property {@code CHARACTER_SET_ENCODING} defaults to the value
+     * {@code "utf-8"} which causes the SOAP message to be encoded using
+     * UTF-8. Setting {@code CHARACTER_SET_ENCODING} to {@code "utf-16"}
      * causes the SOAP message to be encoded using UTF-16.
      * <p>
      * Some implementations may allow encodings in addition to UTF-8 and
@@ -445,7 +442,7 @@
      *
      * @param property
      *           the name of the property to retrieve
-     * @return the value associated with the named property or <code>null</code>
+     * @return the value associated with the named property or {@code null}
      *         if no such property exists.
      * @exception SOAPException
      *               if the property name is not recognized.
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java	Wed Jul 05 20:30:08 2017 +0200
@@ -30,52 +30,51 @@
 import javax.xml.transform.Source;
 
 /**
- * The container for the SOAP-specific portion of a <code>SOAPMessage</code>
+ * The container for the SOAP-specific portion of a {@code SOAPMessage}
  * object. All messages are required to have a SOAP part, so when a
- * <code>SOAPMessage</code> object is created, it will automatically
- * have a <code>SOAPPart</code> object.
- *<P>
- * A <code>SOAPPart</code> object is a MIME part and has the MIME headers
+ * {@code SOAPMessage} object is created, it will automatically
+ * have a {@code SOAPPart} object.
+ * <P>
+ * A {@code SOAPPart} object is a MIME part and has the MIME headers
  * Content-Id, Content-Location, and Content-Type.  Because the value of
- * Content-Type must be "text/xml", a <code>SOAPPart</code> object automatically
+ * Content-Type must be "text/xml", a {@code SOAPPart} object automatically
  * has a MIME header of Content-Type with its value set to "text/xml".
  * The value must be "text/xml" because content in the SOAP part of a
  * message must be in XML format.  Content that is not of type "text/xml"
- * must be in an <code>AttachmentPart</code> object rather than in the
- * <code>SOAPPart</code> object.
+ * must be in an {@code AttachmentPart} object rather than in the
+ * {@code SOAPPart} object.
  * <P>
  * When a message is sent, its SOAP part must have the MIME header Content-Type
  * set to "text/xml". Or, from the other perspective, the SOAP part of any
  * message that is received must have the MIME header Content-Type with a
  * value of "text/xml".
  * <P>
- * A client can access the <code>SOAPPart</code> object of a
- * <code>SOAPMessage</code> object by
- * calling the method <code>SOAPMessage.getSOAPPart</code>. The
- * following  line of code, in which <code>message</code> is a
- * <code>SOAPMessage</code> object, retrieves the SOAP part of a message.
+ * A client can access the {@code SOAPPart} object of a
+ * {@code SOAPMessage} object by
+ * calling the method {@code SOAPMessage.getSOAPPart}. The
+ * following  line of code, in which {@code message} is a
+ * {@code SOAPMessage} object, retrieves the SOAP part of a message.
  * <PRE>
  *   SOAPPart soapPart = message.getSOAPPart();
  * </PRE>
  * <P>
- * A <code>SOAPPart</code> object contains a <code>SOAPEnvelope</code> object,
- * which in turn contains a <code>SOAPBody</code> object and a
- * <code>SOAPHeader</code> object.
- * The <code>SOAPPart</code> method <code>getEnvelope</code> can be used
- * to retrieve the <code>SOAPEnvelope</code> object.
- * <P>
+ * A {@code SOAPPart} object contains a {@code SOAPEnvelope} object,
+ * which in turn contains a {@code SOAPBody} object and a
+ * {@code SOAPHeader} object.
+ * The {@code SOAPPart} method {@code getEnvelope} can be used
+ * to retrieve the {@code SOAPEnvelope} object.
  *
  * @since 1.6
  */
 public abstract class SOAPPart implements org.w3c.dom.Document, Node {
 
     /**
-     * Gets the <code>SOAPEnvelope</code> object associated with this
-     * <code>SOAPPart</code> object. Once the SOAP envelope is obtained, it
+     * Gets the {@code SOAPEnvelope} object associated with this
+     * {@code SOAPPart} object. Once the SOAP envelope is obtained, it
      * can be used to get its contents.
      *
-     * @return the <code>SOAPEnvelope</code> object for this
-     *           <code>SOAPPart</code> object
+     * @return the {@code SOAPEnvelope} object for this
+     *           {@code SOAPPart} object
      * @exception SOAPException if there is a SOAP error
      */
     public abstract SOAPEnvelope getEnvelope() throws SOAPException;
@@ -83,7 +82,7 @@
     /**
      * Retrieves the value of the MIME header whose name is "Content-Id".
      *
-     * @return a <code>String</code> giving the value of the MIME header
+     * @return a {@code String} giving the value of the MIME header
      *         named "Content-Id"
      * @see #setContentId
      */
@@ -97,7 +96,7 @@
     /**
      * Retrieves the value of the MIME header whose name is "Content-Location".
      *
-     * @return a <code>String</code> giving the value of the MIME header whose
+     * @return a {@code String} giving the value of the MIME header whose
      *          name is "Content-Location"
      * @see #setContentLocation
      */
@@ -110,9 +109,9 @@
 
     /**
      * Sets the value of the MIME header named "Content-Id"
-     * to the given <code>String</code>.
+     * to the given {@code String}.
      *
-     * @param contentId a <code>String</code> giving the value of the MIME
+     * @param contentId a {@code String} giving the value of the MIME
      *        header "Content-Id"
      *
      * @exception IllegalArgumentException if there is a problem in
@@ -125,9 +124,9 @@
     }
     /**
      * Sets the value of the MIME header "Content-Location"
-     * to the given <code>String</code>.
+     * to the given {@code String}.
      *
-     * @param contentLocation a <code>String</code> giving the value
+     * @param contentLocation a {@code String} giving the value
      *        of the MIME
      *        header "Content-Location"
      * @exception IllegalArgumentException if there is a problem in
@@ -141,24 +140,24 @@
     /**
      * Removes all MIME headers that match the given name.
      *
-     * @param header a <code>String</code> giving the name of the MIME header(s) to
+     * @param header a {@code String} giving the name of the MIME header(s) to
      *               be removed
      */
     public abstract void removeMimeHeader(String header);
 
     /**
-     * Removes all the <code>MimeHeader</code> objects for this
-     * <code>SOAPEnvelope</code> object.
+     * Removes all the {@code MimeHeader} objects for this
+     * {@code SOAPEnvelope} object.
      */
     public abstract void removeAllMimeHeaders();
 
     /**
-     * Gets all the values of the <code>MimeHeader</code> object
-     * in this <code>SOAPPart</code> object that
-     * is identified by the given <code>String</code>.
+     * Gets all the values of the {@code MimeHeader} object
+     * in this {@code SOAPPart} object that
+     * is identified by the given {@code String}.
      *
      * @param name the name of the header; example: "Content-Type"
-     * @return a <code>String</code> array giving all the values for the
+     * @return a {@code String} array giving all the values for the
      *         specified header
      * @see #setMimeHeader
      */
@@ -176,13 +175,13 @@
      * <P>
      * Note that RFC822 headers can contain only US-ASCII characters.
      *
-     * @param   name    a <code>String</code> giving the header name
+     * @param   name    a {@code String} giving the header name
      *                  for which to search
-     * @param   value   a <code>String</code> giving the value to be set.
+     * @param   value   a {@code String} giving the value to be set.
      *                  This value will be substituted for the current value(s)
      *                  of the first header that is a match if there is one.
      *                  If there is no match, this value will be the value for
-     *                  a new <code>MimeHeader</code> object.
+     *                  a new {@code MimeHeader} object.
      *
      * @exception IllegalArgumentException if there was a problem with
      *            the specified mime header name or value
@@ -191,16 +190,16 @@
     public abstract void setMimeHeader(String name, String value);
 
     /**
-     * Creates a <code>MimeHeader</code> object with the specified
-     * name and value and adds it to this <code>SOAPPart</code> object.
-     * If a <code>MimeHeader</code> with the specified name already
+     * Creates a {@code MimeHeader} object with the specified
+     * name and value and adds it to this {@code SOAPPart} object.
+     * If a {@code MimeHeader} with the specified name already
      * exists, this method adds the specified value to the already
      * existing value(s).
      * <P>
      * Note that RFC822 headers can contain only US-ASCII characters.
      *
-     * @param   name    a <code>String</code> giving the header name
-     * @param   value   a <code>String</code> giving the value to be set
+     * @param   name    a {@code String} giving the header name
+     * @param   value   a {@code String} giving the value to be set
      *                  or added
      * @exception IllegalArgumentException if there was a problem with
      *            the specified mime header name or value
@@ -208,44 +207,44 @@
     public abstract void addMimeHeader(String name, String value);
 
     /**
-     * Retrieves all the headers for this <code>SOAPPart</code> object
-     * as an iterator over the <code>MimeHeader</code> objects.
+     * Retrieves all the headers for this {@code SOAPPart} object
+     * as an iterator over the {@code MimeHeader} objects.
      *
-     * @return  an <code>Iterator</code> object with all of the Mime
-     *          headers for this <code>SOAPPart</code> object
+     * @return  an {@code Iterator} object with all of the Mime
+     *          headers for this {@code SOAPPart} object
      */
     public abstract Iterator getAllMimeHeaders();
 
     /**
-     * Retrieves all <code>MimeHeader</code> objects that match a name in
+     * Retrieves all {@code MimeHeader} objects that match a name in
      * the given array.
      *
-     * @param names a <code>String</code> array with the name(s) of the
+     * @param names a {@code String} array with the name(s) of the
      *        MIME headers to be returned
      * @return  all of the MIME headers that match one of the names in the
-     *           given array, returned as an <code>Iterator</code> object
+     *           given array, returned as an {@code Iterator} object
      */
     public abstract Iterator getMatchingMimeHeaders(String[] names);
 
     /**
-     * Retrieves all <code>MimeHeader</code> objects whose name does
+     * Retrieves all {@code MimeHeader} objects whose name does
      * not match a name in the given array.
      *
-     * @param names a <code>String</code> array with the name(s) of the
+     * @param names a {@code String} array with the name(s) of the
      *        MIME headers not to be returned
-     * @return  all of the MIME headers in this <code>SOAPPart</code> object
+     * @return  all of the MIME headers in this {@code SOAPPart} object
      *          except those that match one of the names in the
      *           given array.  The nonmatching MIME headers are returned as an
-     *           <code>Iterator</code> object.
+     *           {@code Iterator} object.
      */
     public abstract Iterator getNonMatchingMimeHeaders(String[] names);
 
     /**
-     * Sets the content of the <code>SOAPEnvelope</code> object with the data
-     * from the given <code>Source</code> object. This <code>Source</code>
+     * Sets the content of the {@code SOAPEnvelope} object with the data
+     * from the given {@code Source} object. This {@code Source}
      * must contain a valid SOAP document.
      *
-     * @param source the <code>javax.xml.transform.Source</code> object with the
+     * @param source the {@code javax.xml.transform.Source} object with the
      *        data to be set
      *
      * @exception SOAPException if there is a problem in setting the source
@@ -254,13 +253,13 @@
     public abstract void setContent(Source source) throws SOAPException;
 
     /**
-     * Returns the content of the SOAPEnvelope as a JAXP <code>Source</code>
+     * Returns the content of the SOAPEnvelope as a JAXP {@code Source}
      * object.
      *
-     * @return the content as a <code>javax.xml.transform.Source</code> object
+     * @return the content as a {@code javax.xml.transform.Source} object
      *
      * @exception SOAPException if the implementation cannot convert
-     *                          the specified <code>Source</code> object
+     *                          the specified {@code Source} object
      * @see #setContent
      */
     public abstract Source getContent() throws SOAPException;
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Action.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Action.java	Wed Jul 05 20:30:08 2017 +0200
@@ -32,89 +32,90 @@
 import java.lang.annotation.Target;
 
 /**
- * The <code>Action</code> annotation allows explicit association of a
- * WS-Addressing <code>Action</code> message addressing property with
- * <code>input</code>, <code>output</code>, and
- * <code>fault</code> messages of the mapped WSDL operation.
+ * The {@code Action} annotation allows explicit association of a
+ * WS-Addressing {@code Action} message addressing property with
+ * {@code input}, {@code output}, and
+ * {@code fault} messages of the mapped WSDL operation.
  * <p>
  * This annotation can be specified on each method of a service endpoint interface.
  * For such a method, the mapped operation in the generated WSDL's
- * <code>wsam:Action</code> attribute on the WSDL <code>input</code>,
- * <code>output</code> and <code>fault</code> messages of the WSDL <code>operation</code>
- * is based upon which attributes of the <code>Action</code> annotation have been specified.
- * For the exact computation of <code>wsam:Action</code> values for the messages, refer
+ * {@code wsam:Action} attribute on the WSDL {@code input},
+ * {@code output} and {@code fault} messages of the WSDL {@code operation}
+ * is based upon which attributes of the {@code Action} annotation have been specified.
+ * For the exact computation of {@code wsam:Action} values for the messages, refer
  * to the algorithm in the JAX-WS specification.
  * <p>
- * <b>Example 1</b>: Specify explicit values for <code>Action</code> message addressing property
- * for <code>input</code> and <code>output</code> messages.
+ * <b>Example 1</b>: Specify explicit values for {@code Action} message addressing property
+ * for {@code input} and {@code output} messages.
  *
  * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- *     <b>&#64;Action(
- *         input="http://example.com/inputAction",
- *         output="http://example.com/outputAction")</b>
- *     public int addNumbers(int number1, int number2) {
- *         return number1 + number2;
- *     }
- * }
+ * {@literal @}WebService(targetNamespace="http://example.com/numbers")
+ *  public class AddNumbersImpl {
+ *     <b>{@literal @}Action(
+ *          input="http://example.com/inputAction",
+ *          output="http://example.com/outputAction")</b>
+ *      public int addNumbers(int number1, int number2) {
+ *          return number1 + number2;
+ *      }
+ *  }
  * </pre>
  *
  * The generated WSDL looks like:
- * <pre>
- *   &lt;definitions targetNamespace="http://example.com/numbers" ...>
+ * <pre> {@code
+ *   <definitions targetNamespace="http://example.com/numbers" ...>
  *     ...
- *     &lt;portType name="AddNumbersPortType">
- *       &lt;operation name="AddNumbers">
- *         &lt;input message="tns:AddNumbersInput" name="foo"
+ *     <portType name="AddNumbersPortType">
+ *       <operation name="AddNumbers">
+ *         <input message="tns:AddNumbersInput" name="foo"
  *           <b>wsam:Action="http://example.com/inputAction"</b>/>
- *         &lt;output message="tns:AddNumbersOutput" name="bar"
+ *         <output message="tns:AddNumbersOutput" name="bar"
  *           <b>wsam:Action="http://example.com/outputAction"</b>/>
- *       &lt;/operation>
- *     &lt;/portType>
+ *       </operation>
+ *     </portType>
  *     ...
- *   &lt;/definitions>
+ *   </definitions>
+ * }
  * </pre>
  *
  * <p>
- * <b>Example 2</b>: Specify explicit value for <code>Action</code> message addressing property
- * for only the <code>input</code> message. The <code>wsam:Action</code> values for the
- * WSDL <code>output</code> message are computed using the algorithm in the JAX-WS specification.
+ * <b>Example 2</b>: Specify explicit value for {@code Action} message addressing property
+ * for only the {@code input} message. The {@code wsam:Action} values for the
+ * WSDL {@code output} message are computed using the algorithm in the JAX-WS specification.
  *
  * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- *     <b>&#64;Action(input="http://example.com/inputAction")</b>
- *     public int addNumbers(int number1, int number2) {
- *         return number1 + number2;
- *     }
- * }
+ * {@literal @}WebService(targetNamespace="http://example.com/numbers")
+ *  public class AddNumbersImpl {
+ *     <b>{@literal @}Action(input="http://example.com/inputAction")</b>
+ *      public int addNumbers(int number1, int number2) {
+ *          return number1 + number2;
+ *      }
+ *  }
  * </pre>
  *
  * The generated WSDL looks like:
- * <pre>
- *   &lt;definitions targetNamespace="http://example.com/numbers" ...>
+ * <pre> {@code
+ *   <definitions targetNamespace="http://example.com/numbers" ...>
  *     ...
- *     &lt;portType name="AddNumbersPortType">
- *       &lt;operation name="AddNumbers">
- *         &lt;input message="tns:AddNumbersInput" name="foo"
- *           <b>wsam:Action="http://example.com/inputAction"</b> />
- *         &lt;output message="tns:AddNumbersOutput" name="bar"
+ *     <portType name="AddNumbersPortType">
+ *       <operation name="AddNumbers">
+ *         <input message="tns:AddNumbersInput" name="foo"
+ *           <b>wsam:Action="http://example.com/inputAction"</b>/>
+ *         <output message="tns:AddNumbersOutput" name="bar"
  *           <b>wsam:Action="http://example.com/numbers/AddNumbersPortType/AddNumbersResponse"</b>/>
- *       &lt;/operation>
- *     &lt;/portType>
+ *       </operation>
+ *     </portType>
  *     ...
- *   &lt;/definitions>
- * </pre>
+ *   </definitions>
+ * }</pre>
  *
- * It is legitimate to specify an explicit value for <code>Action</code> message addressing property for
- * <code>output</code> message only. In this case, <code>wsam:Action</code> value for the
- * WSDL <code>input</code> message is computed using the algorithm in the JAX-WS specification.
+ * It is legitimate to specify an explicit value for {@code Action} message addressing property for
+ * {@code output} message only. In this case, {@code wsam:Action} value for the
+ * WSDL {@code input} message is computed using the algorithm in the JAX-WS specification.
  *
  * <p>
  * <b>Example 3</b>: See {@link FaultAction} annotation for an example of
- * how to specify an explicit value for <code>Action</code> message addressing property for the
- * <code>fault</code> message.
+ * how to specify an explicit value for {@code Action} message addressing property for the
+ * {@code fault} message.
  *
  * @see FaultAction
  *
@@ -126,21 +127,21 @@
 @Target(ElementType.METHOD)
 public @interface Action {
     /**
-     * Explicit value of the WS-Addressing <code>Action</code> message addressing property for the <code>input</code>
+     * Explicit value of the WS-Addressing {@code Action} message addressing property for the {@code input}
      * message of the operation.
      */
     String input() default "";
 
     /**
-     * Explicit value of the WS-Addressing <code>Action</code> message addressing property for the <code>output</code>
+     * Explicit value of the WS-Addressing {@code Action} message addressing property for the {@code output}
      * message of the operation.
      */
     String output() default "";
 
     /**
-     * Explicit value of the WS-Addressing <code>Action</code> message addressing property for the <code>fault</code>
+     * Explicit value of the WS-Addressing {@code Action} message addressing property for the {@code fault}
      * message(s) of the operation. Each exception that is mapped to a fault and requires an explicit WS-Addressing
-     * <code>Action</code> message addressing property, needs to be specified as a value in this property
+     * {@code Action} message addressing property, needs to be specified as a value in this property
      * using {@link FaultAction} annotation.
      */
     FaultAction[] fault() default { };
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Binding.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Binding.java	Wed Jul 05 20:30:08 2017 +0200
@@ -26,7 +26,7 @@
 package javax.xml.ws;
 
 
-/** The <code>Binding</code> interface is the base interface
+/** The {@code Binding} interface is the base interface
  *  for JAX-WS protocol bindings.
  *
  *  @since 1.6, JAX-WS 2.0
@@ -35,10 +35,10 @@
 
    /**
     * Gets a copy of the handler chain for a protocol binding instance.
-    * If the returned chain is modified a call to <code>setHandlerChain</code>
+    * If the returned chain is modified a call to {@code setHandlerChain}
     * is required to configure the binding instance with the new chain.
     *
-    *  @return java.util.List&lt;Handler> Handler chain
+    *  @return {@code java.util.List<Handler>} Handler chain
     */
     public java.util.List<javax.xml.ws.handler.Handler> getHandlerChain();
 
@@ -59,7 +59,7 @@
      * Get the URI for this binding instance.
      *
      * @return String The binding identifier for the port.
-     *    Never returns <code>null</code>
+     *    Never returns {@code null}
      *
      * @since 1.6, JAX-WS 2.1
      */
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Dispatch.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/Dispatch.java	Wed Jul 05 20:30:08 2017 +0200
@@ -27,10 +27,10 @@
 
 import java.util.concurrent.Future;
 
-/** The <code>Dispatch</code> interface provides support
+/** The {@code Dispatch} interface provides support
  *  for the dynamic invocation of a service endpoint operations. The
- *  <code>javax.xml.ws.Service</code>
- *  class acts as a factory for the creation of <code>Dispatch</code>
+ *  {@code javax.xml.ws.Service}
+ *  class acts as a factory for the creation of {@code Dispatch}
  *  instances.
  *
  *  @since 1.6, JAX-WS 2.0
@@ -39,7 +39,7 @@
 
     /** Invoke a service operation synchronously.
      *
-     * The client is responsible for ensuring that the <code>msg</code> object
+     * The client is responsible for ensuring that the {@code msg} object
      * when marshalled is formed according to the requirements of the protocol
      * binding in use.
      *
@@ -50,16 +50,16 @@
      * @throws WebServiceException If a fault occurs during communication with
      *     the service
      * @throws WebServiceException If there is any error in the configuration of
-     *     the <code>Dispatch</code> instance
+     *     the {@code Dispatch} instance
     **/
     public T invoke(T msg);
 
     /** Invoke a service operation asynchronously.  The
      *  method returns without waiting for the response to the operation
      *  invocation, the results of the operation are obtained by polling the
-     *  returned <code>Response</code>.
+     *  returned {@code Response}.
      * <p>
-     * The client is responsible for ensuring that the <code>msg</code> object
+     * The client is responsible for ensuring that the {@code msg} object
      * when marshalled is formed according to the requirements of the protocol
      * binding in use.
      *
@@ -68,16 +68,16 @@
      * @return The response message or message payload to the
      *     operation invocation.
      * @throws WebServiceException If there is any error in the configuration of
-     *     the <code>Dispatch</code> instance
+     *     the {@code Dispatch} instance
     **/
     public Response<T> invokeAsync(T msg);
 
     /** Invoke a service operation asynchronously. The
      *  method returns without waiting for the response to the operation
      *  invocation, the results of the operation are communicated to the client
-     *  via the passed in <code>handler</code>.
+     *  via the passed in {@code handler}.
      * <p>
-     * The client is responsible for ensuring that the <code>msg</code> object
+     * The client is responsible for ensuring that the {@code msg} object
      * when marshalled is formed according to the requirements of the protocol
      * binding in use.
      *
@@ -85,13 +85,13 @@
      *     the message used to invoke the operation.
      * @param handler The handler object that will receive the
      *     response to the operation invocation.
-     * @return A <code>Future</code> object that may be used to check the status
+     * @return A {@code Future} object that may be used to check the status
      *     of the operation invocation. This object MUST NOT be used to try to
      *     obtain the results of the operation - the object returned from
-     *     <code>Future&lt;?>.get()</code> is implementation dependent
+     *     {@code Future<?>.get()} is implementation dependent
      *     and any use of it will result in non-portable behaviour.
      * @throws WebServiceException If there is any error in the configuration of
-     *     the <code>Dispatch</code> instance
+     *     the {@code Dispatch} instance
     **/
     public Future<?> invokeAsync(T msg, AsyncHandler<T> handler);
 
@@ -102,14 +102,14 @@
      *  the protocol in use is SOAP/HTTP, this method MUST block until
      *  an HTTP response code has been received or an error occurs.
      * <p>
-     * The client is responsible for ensuring that the <code>msg</code> object
+     * The client is responsible for ensuring that the {@code msg} object
      * when marshalled is formed according to the requirements of the protocol
      * binding in use.
      *
      * @param msg An object that will form the message or payload of
      *     the message used to invoke the operation.
      * @throws WebServiceException If there is any error in the configuration of
-     *     the <code>Dispatch</code> instance or if an error occurs during the
+     *     the {@code Dispatch} instance or if an error occurs during the
      *     invocation.
     **/
     public void invokeOneWay(T msg);
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/FaultAction.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/FaultAction.java	Wed Jul 05 20:30:08 2017 +0200
@@ -32,28 +32,28 @@
 import java.lang.annotation.Target;
 
 /**
- * The <code>FaultAction</code> annotation is used inside an {@link Action}
+ * The {@code FaultAction} annotation is used inside an {@link Action}
  * annotation to allow an explicit association of a WS-Addressing
- * <code>Action</code> message addressing property with the <code>fault</code>
+ * {@code Action} message addressing property with the {@code fault}
  * messages of the WSDL operation mapped from the exception class.
  * <p>
- * The <code>wsam:Action</code> attribute value in the <code>fault</code>
- * message in the generated WSDL operation mapped for <code>className</code>
- * class is equal to the corresponding value in the <code>FaultAction</code>.
- * For the exact computation of <code>wsam:Action</code> values for the
+ * The {@code wsam:Action} attribute value in the {@code fault}
+ * message in the generated WSDL operation mapped for {@code className}
+ * class is equal to the corresponding value in the {@code FaultAction}.
+ * For the exact computation of {@code wsam:Action} values for the
  * fault messages, refer to the algorithm in the JAX-WS specification.
  *
  * <p>
- * <b>Example 1</b>: Specify explicit values for <code>Action</code> message addressing
- * property for the <code>input</code>, <code>output</code> and <code>fault</code> message
+ * <b>Example 1</b>: Specify explicit values for {@code Action} message addressing
+ * property for the {@code input}, {@code output} and {@code fault} message
  * if the Java method throws only one service specific exception.
  *
  * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- *     &#64;Action(
+ * {@literal @}WebService(targetNamespace="http://example.com/numbers")
+ *  public class AddNumbersImpl {
+ *    {@literal @}Action(
  *         fault = {
- *             <b>&#64;FaultAction(className=AddNumbersException.class, value="http://example.com/faultAction")</b>
+ *             <b>{@literal @}FaultAction(className=AddNumbersException.class, value="http://example.com/faultAction")</b>
  *         })
  *     public int addNumbers(int number1, int number2)
  *         throws AddNumbersException {
@@ -64,86 +64,86 @@
  *
  * The generated WSDL looks like:
  *
- * <pre>
- *   &lt;definitions targetNamespace="http://example.com/numbers" ...>
+ * <pre> {@code
+ *   <definitions targetNamespace="http://example.com/numbers" ...>
  *     ...
- *     &lt;portType name="AddNumbersPortType">
- *       &lt;operation name="AddNumbers">
+ *     <portType name="AddNumbersPortType">
+ *       <operation name="AddNumbers">
  *         ...
- *         &lt;fault message="tns:AddNumbersException" name="AddNumbersException"
- *           <b>wsam:Action="http://example.com/faultAction"</b>/>
- *       &lt;/operation>
- *     &lt;/portType>
+ *         <fault message="tns:AddNumbersException" name="AddNumbersException"}
+ *           <b>wsam:Action="http://example.com/faultAction"</b>{@code />
+ *       </operation>
+ *     </portType>
  *     ...
- *   &lt;/definitions>
+ *   </definitions> }
  * </pre>
  *
  * <p>
- * Example 2: Here is an example that shows if the explicit value for <code>Action</code>
+ * Example 2: Here is an example that shows if the explicit value for {@code Action}
  * message addressing property for the service specific exception is not present.
  *
  * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
+ * {@literal @}WebService(targetNamespace="http://example.com/numbers")
+ *  public class AddNumbersImpl {
  *     public int addNumbers(int number1, int number2)
  *         throws AddNumbersException {
  *         return number1 + number2;
  *     }
- * }
+ *  }
  * </pre>
  *
  * The generated WSDL looks like:
  *
- * <pre>
- *   &lt;definitions targetNamespace="http://example.com/numbers" ...>
+ * <pre>{@code
+ *   <definitions targetNamespace="http://example.com/numbers" ...>
  *     ...
- *     &lt;portType name="AddNumbersPortType">
- *       &lt;operation name="AddNumbers">
+ *     <portType name="AddNumbersPortType">
+ *       <operation name="AddNumbers">
  *         ...
- *         &lt;fault message="tns:addNumbersFault" name="InvalidNumbers"
- *           <b>wsam:Action="http://example.com/numbers/AddNumbersPortType/AddNumbers/Fault/AddNumbersException"</b>/>
- *       &lt;/operation>
- *     &lt;/portType>
+ *         <fault message="tns:addNumbersFault" name="InvalidNumbers"}
+ *           <b>wsam:Action="http://example.com/numbers/AddNumbersPortType/AddNumbers/Fault/AddNumbersException"</b>{@code />
+ *       </operation>
+ *     </portType>
  *     ...
- *   &lt;/definitions>
- * </pre>
+ *   </definitions>
+ * }</pre>
  *
  * <p>
- * Example 3: Here is an example that shows how to specify explicit values for <code>Action</code>
+ * Example 3: Here is an example that shows how to specify explicit values for {@code Action}
  * message addressing property if the Java method throws more than one service specific exception.
  *
  * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- *     &#64;Action(
+ * {@literal @}WebService(targetNamespace="http://example.com/numbers")
+ *  public class AddNumbersImpl {
+ *    {@literal @}Action(
  *         fault = {
- *             <b>&#64;FaultAction(className=AddNumbersException.class, value="http://example.com/addFaultAction"),
- *             &#64;FaultAction(className=TooBigNumbersException.class, value="http://example.com/toobigFaultAction")</b>
+ *             <b>{@literal @}FaultAction(className=AddNumbersException.class, value="http://example.com/addFaultAction"),
+ *             {@literal @}FaultAction(className=TooBigNumbersException.class, value="http://example.com/toobigFaultAction")</b>
  *         })
  *     public int addNumbers(int number1, int number2)
  *         throws AddNumbersException, TooBigNumbersException {
  *         return number1 + number2;
  *     }
- * }
+ *  }
  * </pre>
  *
  * The generated WSDL looks like:
  *
- * <pre>
- *   &lt;definitions targetNamespace="http://example.com/numbers" ...>
+ * <pre> {@code
+ *   <definitions targetNamespace="http://example.com/numbers" ...>
  *     ...
- *     &lt;portType name="AddNumbersPortType">
- *       &lt;operation name="AddNumbers">
+ *     <portType name="AddNumbersPortType">
+ *       <operation name="AddNumbers">
  *         ...
- *         &lt;fault message="tns:addNumbersFault" name="AddNumbersException"
- *           <b>wsam:Action="http://example.com/addFaultAction"</b>/>
- *         &lt;fault message="tns:tooBigNumbersFault" name="TooBigNumbersException"
- *           <b>wsam:Action="http://example.com/toobigFaultAction"</b>/>
- *       &lt;/operation>
- *     &lt;/portType>
+ *         <fault message="tns:addNumbersFault" name="AddNumbersException"}
+ *           <b>wsam:Action="http://example.com/addFaultAction"</b>{@code />
+ *         <fault message="tns:tooBigNumbersFault" name="TooBigNumbersException"}
+ *           <b>wsam:Action="http://example.com/toobigFaultAction"</b>{@code />
+ *       </operation>
+ *     </portType>
  *     ...
- *   &lt;/definitions>
- * </pre>
+ *   </definitions>
+ * }</pre>
  *
  * @since 1.6, JAX-WS 2.1
  */
@@ -158,7 +158,7 @@
     Class<? extends Exception> className();
 
     /**
-     * Value of WS-Addressing <code>Action</code> message addressing property for the exception
+     * Value of WS-Addressing {@code Action} message addressing property for the exception
      */
     String value() default "";
 }
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServicePermission.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/WebServicePermission.java	Wed Jul 05 20:30:08 2017 +0200
@@ -35,16 +35,14 @@
  * with them.
  * <p>
  * The following permission target name is defined:
- * <p>
  * <dl>
  *   <dt>publishEndpoint
  * </dl>
+ * The {@code publishEndpoint} permission allows publishing a
+ * web service endpoint using the {@code publish} methods
+ * defined by the {@code javax.xml.ws.Endpoint} class.
  * <p>
- * The <code>publishEndpoint</code> permission allows publishing a
- * web service endpoint using the <code>publish</code> methods
- * defined by the <code>javax.xml.ws.Endpoint</code> class.
- * <p>
- * Granting <code>publishEndpoint</code> allows the application to be
+ * Granting {@code publishEndpoint} allows the application to be
  * exposed as a network service. Depending on the security of the runtime and
  * the security of the application, this may introduce a security hole that
  * is remotely exploitable.
@@ -64,7 +62,7 @@
     /**
      * Creates a new permission with the specified name.
      *
-     * @param name the name of the <code>WebServicePermission</code>
+     * @param name the name of the {@code WebServicePermission}
      */
     public WebServicePermission(String name) {
         super(name);
@@ -73,11 +71,11 @@
     /**
      * Creates a new permission with the specified name and actions.
      *
-     * The <code>actions</code> parameter is currently unused and
-     * it should be <code>null</code>.
+     * The {@code actions} parameter is currently unused and
+     * it should be {@code null}.
      *
-     * @param name the name of the <code>WebServicePermission</code>
-     * @param actions should be <code>null</code>
+     * @param name the name of the {@code WebServicePermission}
+     * @param actions should be {@code null}
      */
     public WebServicePermission(String name, String actions) {
         super(name, actions);
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/HandlerResolver.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/HandlerResolver.java	Wed Jul 05 20:30:08 2017 +0200
@@ -26,15 +26,15 @@
 package javax.xml.ws.handler;
 
 /**
- *  <code>HandlerResolver</code> is an interface implemented
+ *  {@code HandlerResolver} is an interface implemented
  *  by an application to get control over the handler chain
  *  set on proxy/dispatch objects at the time of their creation.
  *  <p>
- *  A <code>HandlerResolver</code> may be set on a <code>Service</code>
- *  using the <code>setHandlerResolver</code> method.
- * <p>
- *  When the runtime invokes a <code>HandlerResolver</code>, it will
- *  pass it a <code>PortInfo</code> object containing information
+ *  A {@code HandlerResolver} may be set on a {@code Service}
+ *  using the {@code setHandlerResolver} method.
+ *  <p>
+ *  When the runtime invokes a {@code HandlerResolver}, it will
+ *  pass it a {@code PortInfo} object containing information
  *  about the port that the proxy/dispatch object will be accessing.
  *
  *  @see javax.xml.ws.Service#setHandlerResolver
@@ -47,7 +47,7 @@
    *  Gets the handler chain for the specified port.
    *
    *  @param portInfo Contains information about the port being accessed.
-   *  @return java.util.List&lt;Handler> chain
+   *  @return {@code java.util.List<Handler>} chain
   **/
   public java.util.List<Handler> getHandlerChain(PortInfo portInfo);
 }
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/MessageContext.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/handler/MessageContext.java	Wed Jul 05 20:30:08 2017 +0200
@@ -27,12 +27,12 @@
 import java.util.Map;
 
 /**
- * The interface <code>MessageContext</code> abstracts the message
- * context that is processed by a handler in the <code>handle</code>
+ * The interface {@code MessageContext} abstracts the message
+ * context that is processed by a handler in the {@code handle}
  * method.
  *
- * <p>The <code>MessageContext</code> interface provides methods to
- * manage a property set. <code>MessageContext</code> properties
+ * <p>The {@code MessageContext} interface provides methods to
+ * manage a property set. {@code MessageContext} properties
  * enable handlers in a handler chain to share processing related
  * state.
  *
@@ -41,8 +41,8 @@
 public interface MessageContext extends Map<String, Object> {
 
     /**
-     * Standard property: message direction, <code>true</code> for
-     * outbound messages, <code>false</code> for inbound.
+     * Standard property: message direction, {@code true} for
+     * outbound messages, {@code false} for inbound.
      * <p>Type: boolean
      */
     public static final String MESSAGE_OUTBOUND_PROPERTY =
@@ -51,7 +51,7 @@
     /**
      * Standard property: Map of attachments to a message for the inbound
      * message, key is  the MIME Content-ID, value is a DataHandler.
-     * <p>Type: java.util.Map&lt;String,DataHandler>
+     * <p>Type: {@code java.util.Map<String, DataHandler>}
      */
     public static final String INBOUND_MESSAGE_ATTACHMENTS =
             "javax.xml.ws.binding.attachments.inbound";
@@ -59,7 +59,7 @@
     /**
      * Standard property: Map of attachments to a message for the outbound
      * message, key is the MIME Content-ID, value is a DataHandler.
-     * <p>Type: java.util.Map&lt;String,DataHandler>
+     * <p>Type: {@code java.util.Map<String, DataHandler>}
      */
     public static final String OUTBOUND_MESSAGE_ATTACHMENTS =
             "javax.xml.ws.binding.attachments.outbound";
@@ -108,14 +108,14 @@
 
     /**
      * Standard property: HTTP request headers.
-     * <p>Type: java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String>>
+     * <p>Type: {@code java.util.Map<java.lang.String, java.util.List<java.lang.String>>}
      */
     public static final String HTTP_REQUEST_HEADERS =
             "javax.xml.ws.http.request.headers";
 
     /**
      * Standard property: HTTP response headers.
-     * <p>Type: java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String>>
+     * <p>Type: {@code java.util.Map<java.lang.String, java.util.List<java.lang.String>>}
      */
     public static final String HTTP_RESPONSE_HEADERS =
             "javax.xml.ws.http.response.headers";
@@ -166,7 +166,7 @@
      * Standard property: WS Addressing Reference Parameters.
      * The list MUST include all SOAP headers marked with the
      * wsa:IsReferenceParameter="true" attribute.
-     * <p>Type: List&lt;Element>
+     * <p>Type: {@code List<Element>}
      *
      * @since 1.6, JAX-WS 2.1
      */
@@ -174,10 +174,10 @@
             "javax.xml.ws.reference.parameters";
 
     /**
-     * Property scope. Properties scoped as <code>APPLICATION</code> are
+     * Property scope. Properties scoped as {@code APPLICATION} are
      * visible to handlers,
      * client applications and service endpoints; properties scoped as
-     * <code>HANDLER</code>
+     * {@code HANDLER}
      * are only normally visible to handlers.
      */
     public enum Scope {APPLICATION, HANDLER};
@@ -186,7 +186,7 @@
      * Sets the scope of a property.
      *
      * @param name Name of the property associated with the
-     *             <code>MessageContext</code>
+     *             {@code MessageContext}
      * @param scope Desired scope of the property
      * @throws java.lang.IllegalArgumentException if an illegal
      *             property name is specified
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/AddressingFeature.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/AddressingFeature.java	Wed Jul 05 20:30:08 2017 +0200
@@ -52,10 +52,10 @@
  *       receiver.
  * </ul>
  * <p>
- * If the feature is enabled, the <code>required</code> property determines
+ * If the feature is enabled, the {@code required} property determines
  * whether the endpoint requires WS-Addressing. If it is set true,
  * WS-Addressing headers MUST be present on incoming and outgoing messages.
- * By default the <code>required</code> property is <code>false</code>.
+ * By default the {@code required} property is {@code false}.
  *
  * <p>
  * If the web service developer has not explicitly enabled this feature,
@@ -75,31 +75,31 @@
  *
  * <p>
  * <b>Example 1: </b>Possible Policy Assertion in the generated WSDL for
- * <code>&#64;Addressing</code>
- * <pre>
- *   &lt;wsam:Addressing wsp:Optional="true">
- *     &lt;wsp:Policy/>
- *   &lt;/wsam:Addressing>
+ * {@code @Addressing}
+ * <pre> {@code
+ *   <wsam:Addressing wsp:Optional="true">
+ *     <wsp:Policy/>
+ *   </wsam:Addressing> }
  * </pre>
  *
  * <p>
  * <b>Example 2: </b>Possible Policy Assertion in the generated WSDL for
- * <code>&#64;Addressing(required=true)</code>
- * <pre>
- *   &lt;wsam:Addressing>
- *     &lt;wsp:Policy/>
- *   &lt;/wsam:Addressing>
+ * {@code @Addressing(required=true)}
+ * <pre> {@code
+ *   <wsam:Addressing>
+ *     <wsp:Policy/>
+ *   </wsam:Addressing> }
  * </pre>
  *
  * <p>
  * <b>Example 3: </b>Possible Policy Assertion in the generated WSDL for
- * <code>&#64;Addressing(required=true, responses=Responses.ANONYMOUS)</code>
- * <pre>
- *   &lt;wsam:Addressing>
- *      &lt;wsp:Policy>
- *        &lt;wsam:AnonymousResponses/>
- *      &lt;/wsp:Policy>
- *   &lt;/wsam:Addressing>
+ * {@code @Addressing(required=true, responses=Responses.ANONYMOUS)}
+ * <pre> {@code
+ *   <wsam:Addressing>
+ *      <wsp:Policy>
+ *        <wsam:AnonymousResponses/>
+ *      </wsp:Policy>
+ *   </wsam:Addressing> }
  * </pre>
  *
  * <p>
@@ -181,7 +181,7 @@
     private final Responses responses;
 
     /**
-     * Creates and configures an <code>AddressingFeature</code> with the
+     * Creates and configures an {@code AddressingFeature} with the
      * use of addressing requirements. The created feature enables
      * ws-addressing i.e. supports ws-addressing but doesn't require
      * its use. It is also configured to accept all the response types.
@@ -191,8 +191,8 @@
     }
 
     /**
-     * Creates and configures an <code>AddressingFeature</code> with the
-     * use of addressing requirements. If <code>enabled</code> is true,
+     * Creates and configures an {@code AddressingFeature} with the
+     * use of addressing requirements. If {@code enabled} is true,
      * it enables ws-addressing i.e. supports ws-addressing but doesn't
      * require its use. It also configures to accept all the response types.
      *
@@ -204,9 +204,9 @@
     }
 
     /**
-     * Creates and configures an <code>AddressingFeature</code> with the
-     * use of addressing requirements. If <code>enabled</code> and
-     * <code>required</code> are true, it enables ws-addressing and
+     * Creates and configures an {@code AddressingFeature} with the
+     * use of addressing requirements. If {@code enabled} and
+     * {@code required} are true, it enables ws-addressing and
      * requires its use. It also configures to accept all the response types.
      *
      * @param enabled true enables ws-addressing i.e.ws-addressing
@@ -218,11 +218,11 @@
     }
 
     /**
-     * Creates and configures an <code>AddressingFeature</code> with the
-     * use of addressing requirements. If <code>enabled</code> and
-     * <code>required</code> are true, it enables ws-addressing and
+     * Creates and configures an {@code AddressingFeature} with the
+     * use of addressing requirements. If {@code enabled} and
+     * {@code required} are true, it enables ws-addressing and
      * requires its use. Also, the response types can be configured using
-     * <code>responses</code> parameter.
+     * {@code responses} parameter.
      *
      * @param enabled true enables ws-addressing i.e.ws-addressing
      * is supported but doesn't require its use
@@ -260,7 +260,6 @@
      * requires the use of anonymous responses, or non-anonymous responses,
      * or all responses.
      *
-     * <p>
      * @return {@link Responses#ALL} when endpoint supports all types of
      * responses,
      *         {@link Responses#ANONYMOUS} when endpoint requires the use of
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/MTOM.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/MTOM.java	Wed Jul 05 20:30:08 2017 +0200
@@ -40,14 +40,14 @@
  * web service.
  * <p>
  * This annotation MUST only be used in conjunction the
- * <code>javax.jws.WebService</code>, {@link WebServiceProvider},
+ * {@code javax.jws.WebService}, {@link WebServiceProvider},
  * {@link WebServiceRef} annotations.
- * When used with the <code>javax.jws.WebService</code> annotation this
+ * When used with the {@code javax.jws.WebService} annotation this
  * annotation MUST only be used on the service endpoint implementation
  * class.
- * When used with a <code>WebServiceRef</code> annotation, this annotation
+ * When used with a {@code WebServiceRef} annotation, this annotation
  * MUST only be used when a proxy instance is created. The injected SEI
- * proxy, and endpoint MUST honor the values of the <code>MTOM</code>
+ * proxy, and endpoint MUST honor the values of the {@code MTOM}
  * annotation.
  * <p>
  *
@@ -69,7 +69,7 @@
     /**
      * Property for MTOM threshold value. When MTOM is enabled, binary data above this
      * size in bytes will be XOP encoded or sent as attachment. The value of this property
-     * MUST always be >= 0. Default value is 0.
+     * MUST always be {@literal >=} 0. Default value is 0.
      */
     int threshold() default 0;
 }
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/MTOMFeature.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/MTOMFeature.java	Wed Jul 05 20:30:08 2017 +0200
@@ -67,14 +67,14 @@
      * Property for MTOM threshold value. This property serves as a hint when
      * MTOM is enabled, binary data above this size in bytes SHOULD be sent
      * as attachment.
-     * The value of this property MUST always be >= 0. Default value is 0.
+     * The value of this property MUST always be {@literal >=} 0. Default value is 0.
      */
     // should be changed to private final, keeping original modifier to keep backwards compatibility
     protected int threshold;
 
 
     /**
-     * Create an <code>MTOMFeature</code>.
+     * Create an {@code MTOMFeature}.
      * The instance created will be enabled.
      */
     public MTOMFeature() {
@@ -83,7 +83,7 @@
     }
 
     /**
-     * Creates an <code>MTOMFeature</code>.
+     * Creates a {@code MTOMFeature}.
      *
      * @param enabled specifies if this feature should be enabled or not
      */
@@ -94,13 +94,13 @@
 
 
     /**
-     * Creates an <code>MTOMFeature</code>.
+     * Creates a {@code MTOMFeature}.
      * The instance created will be enabled.
      *
      * @param threshold the size in bytes that binary data SHOULD be before
      * being sent as an attachment.
      *
-     * @throws WebServiceException if threshold is < 0
+     * @throws WebServiceException if threshold is {@literal <} 0
      */
     public MTOMFeature(int threshold) {
         if (threshold < 0)
@@ -110,13 +110,13 @@
     }
 
     /**
-     * Creates an <code>MTOMFeature</code>.
+     * Creates a {@code MTOMFeature}.
      *
      * @param enabled specifies if this feature should be enabled or not
      * @param threshold the size in bytes that binary data SHOULD be before
      * being sent as an attachment.
      *
-     * @throws WebServiceException if threshold is < 0
+     * @throws WebServiceException if threshold is {@literal <} 0
      */
     public MTOMFeature(boolean enabled, int threshold) {
         if (threshold < 0)
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/SOAPBinding.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/soap/SOAPBinding.java	Wed Jul 05 20:30:08 2017 +0200
@@ -31,7 +31,7 @@
 import javax.xml.soap.SOAPFactory;
 import javax.xml.soap.MessageFactory;
 
-/** The <code>SOAPBinding</code> interface is an abstraction for
+/** The {@code SOAPBinding} interface is an abstraction for
  *  the SOAP binding.
  *
  *  @since 1.6, JAX-WS 2.0
@@ -63,7 +63,7 @@
 
   /** Gets the roles played by the SOAP binding instance.
    *
-   *  @return Set&lt;String> The set of roles played by the binding instance.
+   *  @return {@code Set<String>} The set of roles played by the binding instance.
   **/
   public Set<String> getRoles();
 
@@ -76,9 +76,9 @@
   public void setRoles(Set<String> roles);
 
   /**
-   * Returns <code>true</code> if the use of MTOM is enabled.
+   * Returns {@code true} if the use of MTOM is enabled.
    *
-   * @return <code>true</code> if and only if the use of MTOM is enabled.
+   * @return {@code true} if and only if the use of MTOM is enabled.
   **/
 
   public boolean isMTOMEnabled();
@@ -86,7 +86,7 @@
   /**
    * Enables or disables use of MTOM.
    *
-   * @param flag   A <code>boolean</code> specifying whether the use of MTOM should
+   * @param flag   A {@code boolean} specifying whether the use of MTOM should
    *               be enabled or disabled.
    * @throws WebServiceException If the specified setting is not supported
    *                  by this binding instance.
@@ -95,14 +95,14 @@
   public void setMTOMEnabled(boolean flag);
 
   /**
-   * Gets the SAAJ <code>SOAPFactory</code> instance used by this SOAP binding.
+   * Gets the SAAJ {@code SOAPFactory} instance used by this SOAP binding.
    *
    * @return SOAPFactory instance used by this SOAP binding.
   **/
   public SOAPFactory getSOAPFactory();
 
   /**
-   * Gets the SAAJ <code>MessageFactory</code> instance used by this SOAP binding.
+   * Gets the SAAJ {@code MessageFactory} instance used by this SOAP binding.
    *
    * @return MessageFactory instance used by this SOAP binding.
   **/
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/Provider.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/Provider.java	Wed Jul 05 20:30:08 2017 +0200
@@ -37,9 +37,8 @@
 import org.w3c.dom.Element;
 
 /**
- * Service provider for <code>ServiceDelegate</code> and
- * <code>Endpoint</code> objects.
- * <p>
+ * Service provider for {@code ServiceDelegate} and
+ * {@code Endpoint} objects.
  *
  * @since 1.6, JAX-WS 2.0
  */
@@ -47,14 +46,14 @@
 
     /**
      * A constant representing the property used to lookup the
-     * name of a <code>Provider</code> implementation
+     * name of a {@code Provider} implementation
      * class.
      */
     static public final String JAXWSPROVIDER_PROPERTY = "javax.xml.ws.spi.Provider";
 
     /**
      * A constant representing the name of the default
-     * <code>Provider</code> implementation class.
+     * {@code Provider} implementation class.
      **/
     // Using two strings so that package renaming doesn't change it
     static final String DEFAULT_JAXWSPROVIDER
@@ -72,22 +71,21 @@
      * <p>
      * The algorithm used to locate the provider subclass to use consists
      * of the following steps:
-     * <p>
      * <ul>
      * <li>
      *   If a resource with the name of
-     *   <code>META-INF/services/javax.xml.ws.spi.Provider</code>
+     *   {@code META-INF/services/javax.xml.ws.spi.Provider}
      *   exists, then its first line, if present, is used as the UTF-8 encoded
      *   name of the implementation class.
      * </li>
      * <li>
      *   If the $java.home/lib/jaxws.properties file exists and it is readable by
-     *   the <code>java.util.Properties.load(InputStream)</code> method and it contains
-     *   an entry whose key is <code>javax.xml.ws.spi.Provider</code>, then the value of
+     *   the {@code java.util.Properties.load(InputStream)} method and it contains
+     *   an entry whose key is {@code javax.xml.ws.spi.Provider}, then the value of
      *   that entry is used as the name of the implementation class.
      * </li>
      * <li>
-     *   If a system property with the name <code>javax.xml.ws.spi.Provider</code>
+     *   If a system property with the name {@code javax.xml.ws.spi.Provider}
      *   is defined, then its value is used as the name of the implementation class.
      * </li>
      * <li>
@@ -136,12 +134,12 @@
 
     /**
      * Creates a service delegate object.
-     * <p>
+     *
      * @param wsdlDocumentLocation A URL pointing to the WSDL document
-     *        for the service, or <code>null</code> if there isn't one.
+     *        for the service, or {@code null} if there isn't one.
      * @param serviceName The qualified name of the service.
      * @param serviceClass The service class, which MUST be either
-     *        <code>javax.xml.ws.Service</code> or a subclass thereof.
+     *        {@code javax.xml.ws.Service} or a subclass thereof.
      * @return The newly created service delegate.
      */
     public abstract ServiceDelegate createServiceDelegate(
@@ -150,12 +148,12 @@
 
     /**
      * Creates a service delegate object.
-     * <p>
+     *
      * @param wsdlDocumentLocation A URL pointing to the WSDL document
-     *        for the service, or <code>null</code> if there isn't one.
+     *        for the service, or {@code null} if there isn't one.
      * @param serviceName The qualified name of the service.
      * @param serviceClass The service class, which MUST be either
-     *        <code>javax.xml.ws.Service</code> or a subclass thereof.
+     *        {@code javax.xml.ws.Service} or a subclass thereof.
      * @param features Web Service features that must be configured on
      *        the service. If the provider doesn't understand a feature,
      *        it must throw a WebServiceException.
@@ -205,18 +203,18 @@
 
     /**
      * read an EndpointReference from the infoset contained in
-     * <code>eprInfoset</code>.
+     * {@code eprInfoset}.
      *
      * @param eprInfoset infoset for EndpointReference
      *
-     * @return the <code>EndpointReference</code> unmarshalled from
-     * <code>eprInfoset</code>.  This method never returns <code>null</code>.
+     * @return the {@code EndpointReference} unmarshalled from
+     * {@code eprInfoset}.  This method never returns {@code null}.
      *
      * @throws WebServiceException If there is an error creating the
-     * <code>EndpointReference</code> from the specified <code>eprInfoset</code>.
+     * {@code EndpointReference} from the specified {@code eprInfoset}.
      *
-     * @throws NullPointerException If the <code>null</code>
-     * <code>eprInfoset</code> value is given.
+     * @throws NullPointerException If the {@code null}
+     * {@code eprInfoset} value is given.
      *
      * @since 1.6, JAX-WS 2.1
      **/
@@ -226,31 +224,31 @@
     /**
      * The getPort method returns a proxy.  If there
      * are any reference parameters in the
-     * <code>endpointReference</code>, then those reference
+     * {@code endpointReference}, then those reference
      * parameters MUST appear as SOAP headers, indicating them to be
      * reference parameters, on all messages sent to the endpoint.
-     * The parameter  <code>serviceEndpointInterface</code> specifies
+     * The parameter  {@code serviceEndpointInterface} specifies
      * the service endpoint interface that is supported by the
      * returned proxy.
-     * The parameter <code>endpointReference</code> specifies the
+     * The parameter {@code endpointReference} specifies the
      * endpoint that will be invoked by the returned proxy.
      * In the implementation of this method, the JAX-WS
      * runtime system takes the responsibility of selecting a protocol
      * binding (and a port) and configuring the proxy accordingly from
      * the WSDL metadata of the
-     * <code>serviceEndpointInterface</code> and the <code>EndpointReference</code>.
+     * {@code serviceEndpointInterface} and the {@code EndpointReference}.
      * For this method
      * to successfully return a proxy, WSDL metadata MUST be available and the
-     * <code>endpointReference</code> MUST contain an implementation understood
-     * <code>serviceName</code> metadata.
+     * {@code endpointReference} MUST contain an implementation understood
+     * {@code serviceName} metadata.
      *
      *
      * @param endpointReference the EndpointReference that will
      * be invoked by the returned proxy.
      * @param serviceEndpointInterface Service endpoint interface
      * @param features  A list of WebServiceFeatures to configure on the
-     *                proxy.  Supported features not in the <code>features
-     *                </code> parameter will have their default values.
+     *                proxy.  Supported features not in the {@code features
+     *                } parameter will have their default values.
      * @return Object Proxy instance that supports the
      *                  specified service endpoint interface
      * @throws WebServiceException
@@ -260,10 +258,10 @@
      *                  <LI>If there is any missing WSDL metadata
      *                      as required by this method}
      *                  <LI>If this
-     *                      <code>endpointReference</code>
+     *                      {@code endpointReference}
      *                      is illegal
      *                  <LI>If an illegal
-     *                      <code>serviceEndpointInterface</code>
+     *                      {@code serviceEndpointInterface}
      *                      is specified
      *                  <LI>If a feature is enabled that is not compatible with
      *                      this port or is unsupported.
@@ -278,60 +276,60 @@
             WebServiceFeature... features);
 
     /**
-     * Factory method to create a <code>W3CEndpointReference</code>.
+     * Factory method to create a {@code W3CEndpointReference}.
      *
      * <p>
-     * This method can be used to create a <code>W3CEndpointReference</code>
-     * for any endpoint by specifying the <code>address</code> property along
+     * This method can be used to create a {@code W3CEndpointReference}
+     * for any endpoint by specifying the {@code address} property along
      * with any other desired properties.  This method
-     * can also be used to create a <code>W3CEndpointReference</code> for
+     * can also be used to create a {@code W3CEndpointReference} for
      * an endpoint that is published by the same Java EE application.
-     * To do so the <code>address</code> property can be provided or this
-     * method can automatically determine the <code>address</code> of
+     * To do so the {@code address} property can be provided or this
+     * method can automatically determine the {@code address} of
      * an endpoint that is published by the same Java EE application and is
-     * identified by the <code>serviceName</code> and
-     * <code>portName</code> propeties.  If the <code>address</code> is
-     * <code>null</code> and the <code>serviceName</code> and
-     * <code>portName</code> do not identify an endpoint published by the
+     * identified by the {@code serviceName} and
+     * {@code portName} propeties.  If the {@code address} is
+     * {@code null} and the {@code serviceName} and
+     * {@code portName} do not identify an endpoint published by the
      * same Java EE application, a
-     * <code>javax.lang.IllegalStateException</code> MUST be thrown.
+     * {@code javax.lang.IllegalStateException} MUST be thrown.
      *
      * @param address Specifies the address of the target endpoint
      * @param serviceName Qualified name of the service in the WSDL.
      * @param portName Qualified name of the endpoint in the WSDL.
      * @param metadata A list of elements that should be added to the
-     * <code>W3CEndpointReference</code> instances <code>wsa:metadata</code>
+     * {@code W3CEndpointReference} instances {@code wsa:metadata}
      * element.
      * @param wsdlDocumentLocation URL for the WSDL document location for
      * the service.
      * @param referenceParameters Reference parameters to be associated
-     * with the returned <code>EndpointReference</code> instance.
+     * with the returned {@code EndpointReference} instance.
      *
-     * @return the <code>W3CEndpointReference</code> created from
-     *          <code>serviceName</code>, <code>portName</code>,
-     *          <code>metadata</code>, <code>wsdlDocumentLocation</code>
-     *          and <code>referenceParameters</code>. This method
-     *          never returns <code>null</code>.
+     * @return the {@code W3CEndpointReference} created from
+     *          {@code serviceName}, {@code portName},
+     *          {@code metadata}, {@code wsdlDocumentLocation}
+     *          and {@code referenceParameters}. This method
+     *          never returns {@code null}.
      *
      * @throws java.lang.IllegalStateException
      *     <ul>
-     *        <li>If the <code>address</code>, <code>serviceName</code> and
-     *            <code>portName</code> are all <code>null</code>.
-     *        <li>If the <code>serviceName</code> service is <code>null</code> and the
-     *            <code>portName</code> is NOT <code>null</code>.
-     *        <li>If the <code>address</code> property is <code>null</code> and
-     *            the <code>serviceName</code> and <code>portName</code> do not
+     *        <li>If the {@code address}, {@code serviceName} and
+     *            {@code portName} are all {@code null}.
+     *        <li>If the {@code serviceName} service is {@code null} and the
+     *            {@code portName} is NOT {@code null}.
+     *        <li>If the {@code address} property is {@code null} and
+     *            the {@code serviceName} and {@code portName} do not
      *            specify a valid endpoint published by the same Java EE
      *            application.
-     *        <li>If the <code>serviceName</code>is NOT <code>null</code>
+     *        <li>If the {@code serviceName}is NOT {@code null}
      *             and is not present in the specified WSDL.
-     *        <li>If the <code>portName</code> port is not <code>null</code> and it
-     *             is not present in <code>serviceName</code> service in the WSDL.
-     *        <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code>
+     *        <li>If the {@code portName} port is not {@code null} and it
+     *             is not present in {@code serviceName} service in the WSDL.
+     *        <li>If the {@code wsdlDocumentLocation} is NOT {@code null}
      *            and does not represent a valid WSDL.
      *     </ul>
      * @throws WebServiceException If an error occurs while creating the
-     *                             <code>W3CEndpointReference</code>.
+     *                             {@code W3CEndpointReference}.
      *
      * @since 1.6, JAX-WS 2.1
      */
@@ -340,73 +338,73 @@
 
 
     /**
-     * Factory method to create a <code>W3CEndpointReference</code>.
-     * Using this method, a <code>W3CEndpointReference</code> instance
+     * Factory method to create a {@code W3CEndpointReference}.
+     * Using this method, a {@code W3CEndpointReference} instance
      * can be created with extension elements, and attributes.
-     * <code>Provider</code> implementations must override the default
+     * {@code Provider} implementations must override the default
      * implementation.
      *
      * <p>
-     * This method can be used to create a <code>W3CEndpointReference</code>
-     * for any endpoint by specifying the <code>address</code> property along
+     * This method can be used to create a {@code W3CEndpointReference}
+     * for any endpoint by specifying the {@code address} property along
      * with any other desired properties.  This method
-     * can also be used to create a <code>W3CEndpointReference</code> for
+     * can also be used to create a {@code W3CEndpointReference} for
      * an endpoint that is published by the same Java EE application.
-     * To do so the <code>address</code> property can be provided or this
-     * method can automatically determine the <code>address</code> of
+     * To do so the {@code address} property can be provided or this
+     * method can automatically determine the {@code address} of
      * an endpoint that is published by the same Java EE application and is
-     * identified by the <code>serviceName</code> and
-     * <code>portName</code> propeties.  If the <code>address</code> is
-     * <code>null</code> and the <code>serviceName</code> and
-     * <code>portName</code> do not identify an endpoint published by the
+     * identified by the {@code serviceName} and
+     * {@code portName} propeties.  If the {@code address} is
+     * {@code null} and the {@code serviceName} and
+     * {@code portName} do not identify an endpoint published by the
      * same Java EE application, a
-     * <code>javax.lang.IllegalStateException</code> MUST be thrown.
+     * {@code javax.lang.IllegalStateException} MUST be thrown.
      *
      * @param address Specifies the address of the target endpoint
-     * @param interfaceName the <code>wsam:InterfaceName</code> element in the
-     * <code>wsa:Metadata</code> element.
+     * @param interfaceName the {@code wsam:InterfaceName} element in the
+     * {@code wsa:Metadata} element.
      * @param serviceName Qualified name of the service in the WSDL.
      * @param portName Qualified name of the endpoint in the WSDL.
      * @param metadata A list of elements that should be added to the
-     * <code>W3CEndpointReference</code> instances <code>wsa:metadata</code>
+     * {@code W3CEndpointReference} instances {@code wsa:metadata}
      * element.
      * @param wsdlDocumentLocation URL for the WSDL document location for
      * the service.
      * @param referenceParameters Reference parameters to be associated
-     * with the returned <code>EndpointReference</code> instance.
+     * with the returned {@code EndpointReference} instance.
      * @param elements extension elements to be associated
-     * with the returned <code>EndpointReference</code> instance.
+     * with the returned {@code EndpointReference} instance.
      * @param attributes extension attributes to be associated
-     * with the returned <code>EndpointReference</code> instance.
+     * with the returned {@code EndpointReference} instance.
      *
-     * @return the <code>W3CEndpointReference</code> created from
-     *          <code>serviceName</code>, <code>portName</code>,
-     *          <code>metadata</code>, <code>wsdlDocumentLocation</code>
-     *          and <code>referenceParameters</code>. This method
-     *          never returns <code>null</code>.
+     * @return the {@code W3CEndpointReference} created from
+     *          {@code serviceName}, {@code portName},
+     *          {@code metadata}, {@code wsdlDocumentLocation}
+     *          and {@code referenceParameters}. This method
+     *          never returns {@code null}.
      *
      * @throws java.lang.IllegalStateException
      *     <ul>
-     *        <li>If the <code>address</code>, <code>serviceName</code> and
-     *            <code>portName</code> are all <code>null</code>.
-     *        <li>If the <code>serviceName</code> service is <code>null</code> and the
-     *            <code>portName</code> is NOT <code>null</code>.
-     *        <li>If the <code>address</code> property is <code>null</code> and
-     *            the <code>serviceName</code> and <code>portName</code> do not
+     *        <li>If the {@code address}, {@code serviceName} and
+     *            {@code portName} are all {@code null}.
+     *        <li>If the {@code serviceName} service is {@code null} and the
+     *            {@code portName} is NOT {@code null}.
+     *        <li>If the {@code address} property is {@code null} and
+     *            the {@code serviceName} and {@code portName} do not
      *            specify a valid endpoint published by the same Java EE
      *            application.
-     *        <li>If the <code>serviceName</code>is NOT <code>null</code>
+     *        <li>If the {@code serviceName}is NOT {@code null}
      *             and is not present in the specified WSDL.
-     *        <li>If the <code>portName</code> port is not <code>null</code> and it
-     *             is not present in <code>serviceName</code> service in the WSDL.
-     *        <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code>
+     *        <li>If the {@code portName} port is not {@code null} and it
+     *             is not present in {@code serviceName} service in the WSDL.
+     *        <li>If the {@code wsdlDocumentLocation} is NOT {@code null}
      *            and does not represent a valid WSDL.
-     *        <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> but
+     *        <li>If the {@code wsdlDocumentLocation} is NOT {@code null} but
      *            wsdli:wsdlLocation's namespace name cannot be got from the available
      *            metadata.
      *     </ul>
      * @throws WebServiceException If an error occurs while creating the
-     *                             <code>W3CEndpointReference</code>.
+     *                             {@code W3CEndpointReference}.
      * @since 1.7, JAX-WS 2.2
      */
     public W3CEndpointReference createW3CEndpointReference(String address,
@@ -419,7 +417,7 @@
     /**
      * Creates and publishes an endpoint object with the specified
      * address, implementation object and web service features.
-     * <code>Provider</code> implementations must override the
+     * {@code Provider} implementations must override the
      * default implementation.
      *
      * @param address A URI specifying the address and transport/protocol
@@ -431,8 +429,8 @@
      *        class MUST be annotated with all the necessary Web service
      *        annotations.
      * @param features A list of WebServiceFeatures to configure on the
-     *        endpoint.  Supported features not in the <code>features
-     *        </code> parameter will have their default values.
+     *        endpoint.  Supported features not in the {@code features}
+     *        parameter will have their default values.
      * @return The newly created endpoint.
      * @since 1.7, JAX-WS 2.2
      */
@@ -443,7 +441,7 @@
 
     /**
      * Creates an endpoint object with the provided binding, implementation
-     * object and web service features. <code>Provider</code> implementations
+     * object and web service features. {@code Provider} implementations
      * must override the default implementation.
      *
      * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP)
@@ -452,8 +450,8 @@
      *        class MUST be annotated with all the necessary Web service
      *        annotations.
      * @param features A list of WebServiceFeatures to configure on the
-     *        endpoint.  Supported features not in the <code>features
-     *        </code> parameter will have their default values.
+     *        endpoint.  Supported features not in the {@code features}
+     *        parameter will have their default values.
      * @return The newly created endpoint.
      * @since 1.7, JAX-WS 2.2
      */
@@ -465,7 +463,7 @@
     /**
      * Creates an endpoint object with the provided binding, implementation
      * class, invoker and web service features. Containers typically use
-     * this to create Endpoint objects. <code>Provider</code>
+     * this to create Endpoint objects. {@code Provider}
      * implementations must override the default implementation.
      *
      * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP).
@@ -475,8 +473,8 @@
      *        annotations.
      * @param invoker that does the actual invocation on the service instance.
      * @param features A list of WebServiceFeatures to configure on the
-     *        endpoint.  Supported features not in the <code>features
-     *        </code> parameter will have their default values.
+     *        endpoint.  Supported features not in the {@code features
+     *        } parameter will have their default values.
      * @return The newly created endpoint.
      * @since 1.7, JAX-WS 2.2
      */
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java	Wed Jul 05 20:30:08 2017 +0200
@@ -39,27 +39,26 @@
 
 /**
  * Annotation used to identify other annotations
- * as a <code>WebServiceFeature</code>.
+ * as a {@code WebServiceFeature}.
  * <p>
- * Each <code>WebServiceFeature</code> annotation annotated with
+ * Each {@code WebServiceFeature} annotation annotated with
  * this annotation MUST contain an
- * <code>enabled</code> property of type
- * <code>boolean</code> with a default value of <code>true</code>.
+ * {@code enabled} property of type
+ * {@code boolean} with a default value of {@code true}.
  * <p>
  * JAX-WS defines the following
- * <code>WebServiceFeature</code> annotations (<code>Addressing</code>,
- * <code>MTOM</code>, <code>RespectBinding</code>), however, an implementation
+ * {@code WebServiceFeature} annotations ({@code Addressing},
+ * {@code MTOM}, {@code RespectBinding}), however, an implementation
  * may define vendors specific annotations for other features.
  * <p>
- * Annotations annotated with <code>WebServiceFeatureAnnotation</code> MUST
+ * Annotations annotated with {@code WebServiceFeatureAnnotation} MUST
  * have the same @Target of {@link WebServiceRef} annotation, so that the resulting
  * feature annotation can be used in conjunction with the {@link WebServiceRef}
  * annotation if necessary.
  * <p>
  * If a JAX-WS implementation encounters an annotation annotated
- * with the <code>WebServiceFeatureAnnotation</code> that it does not
+ * with the {@code WebServiceFeatureAnnotation} that it does not
  * recognize/support an error MUST be given.
- * <p>
  *
  * @see Addressing
  * @see MTOM
@@ -79,8 +78,8 @@
     String id();
 
     /**
-     * The <code>WebServiceFeature</code> bean that is associated
-     * with the <code>WebServiceFeature</code> annotation
+     * The {@code WebServiceFeature} bean that is associated
+     * with the {@code WebServiceFeature} annotation
      */
     Class<? extends WebServiceFeature> bean();
 }
--- a/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/http/package-info.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/ws/spi/http/package-info.java	Wed Jul 05 20:30:08 2017 +0200
@@ -47,7 +47,7 @@
   object encapsulates a HTTP request and a response.
   </ol>
 
-  <pre>
+  <pre>{@literal
   Container                               JAX-WS runtime
   ---------                               --------------
   1. Creates Invoker1, ... InvokerN
@@ -64,10 +64,10 @@
  10. EndpointN.publish(HttpContextN)  --> 11. creates HttpHandlerN
                                          HttpContextN.setHandler(HttpHandlerN)
 
-  </pre>
+  }</pre>
 
   The request processing is done as below(for every request):
-  <pre>
+  <pre>{@literal
   Container                               JAX-WS runtime
   ---------                               --------------
   1. Creates a HttpExchange
@@ -76,14 +76,14 @@
                                       <-- 5. Calls Invoker
   6. Invokes the actual instance
                                           7. Writes the response to HttpExchange
-  </pre>
+  }</pre>
 
   <p>
   The portable undeployment is done as below:
   <pre>
   Container
   ---------
-  1. @preDestroy on instances
+  1. {@literal @}preDestroy on instances
   2. Endpoint1.stop()
   ...
   3. EndpointN.stop()
--- a/jdk/.hgtags	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/.hgtags	Wed Jul 05 20:30:08 2017 +0200
@@ -303,3 +303,4 @@
 36fc65e80d811ee43aedfc69284224b86a403662 jdk9-b58
 48ee960f29df93a9b2a895621321358a86909086 jdk9-b59
 84c5527f742bc64562e47d3149c16197fe1c4c1a jdk9-b60
+da84dcac1b0b12c5b836b05ac75ecbfadee0cd32 jdk9-b61
--- a/jdk/make/src/classes/build/tools/module/ext.modules	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/make/src/classes/build/tools/module/ext.modules	Wed Jul 05 20:30:08 2017 +0200
@@ -12,4 +12,5 @@
 jdk.localedata
 jdk.naming.dns
 jdk.scripting.nashorn
+jdk.xml.dom
 jdk.zipfs
--- a/jdk/src/java.base/linux/classes/sun/nio/ch/EPollPort.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/linux/classes/sun/nio/ch/EPollPort.java	Wed Jul 05 20:30:08 2017 +0200
@@ -105,7 +105,7 @@
 
         // create the queue and offer the special event to ensure that the first
         // threads polls
-        this.queue = new ArrayBlockingQueue<Event>(MAX_EPOLL_EVENTS);
+        this.queue = new ArrayBlockingQueue<>(MAX_EPOLL_EVENTS);
         this.queue.offer(NEED_TO_POLL);
     }
 
--- a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java	Wed Jul 05 20:30:08 2017 +0200
@@ -121,7 +121,7 @@
     private static native void init();
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java	Wed Jul 05 20:30:08 2017 +0200
@@ -190,7 +190,7 @@
             this.watcher = watcher;
             this.ifd = ifd;
             this.socketpair = sp;
-            this.wdToKey = new HashMap<Integer,LinuxWatchKey>();
+            this.wdToKey = new HashMap<>();
             this.address = unsafe.allocateMemory(BUFFER_SIZE);
         }
 
@@ -457,7 +457,7 @@
     private static native int poll(int fd1, int fd2) throws UnixException;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/jdk/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java	Wed Jul 05 20:30:08 2017 +0200
@@ -68,7 +68,7 @@
     private static native byte[] probe0(long pathAddress);
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 System.loadLibrary("nio");
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Wed Jul 05 20:30:08 2017 +0200
@@ -87,7 +87,7 @@
         // If loading from stand alone build uncomment this.
         // System.loadLibrary("unpack");
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("unpack");
                     return null;
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1210,7 +1210,7 @@
         // This keeps files of similar format near each other.
         // Put class files at the end, keeping their fixed order.
         // Be sure the JAR file's required manifest stays at the front. (4893051)
-        Collections.sort(files, new Comparator<File>() {
+        Collections.sort(files, new Comparator<>() {
                 public int compare(File r0, File r1) {
                     // Get the file name.
                     String f0 = r0.nameString;
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1151,7 +1151,7 @@
         return -1;
     }
 
-    Comparator<Entry> entryOutputOrder = new Comparator<Entry>() {
+    Comparator<Entry> entryOutputOrder = new Comparator<>() {
         public int compare(Entry e0, Entry e1) {
             int k0 = getOutputIndex(e0);
             int k1 = getOutputIndex(e1);
--- a/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Wed Jul 05 20:30:08 2017 +0200
@@ -829,7 +829,7 @@
         maxFlags = new int[ATTR_CONTEXT_LIMIT];
         allLayouts = new FixedList<>(ATTR_CONTEXT_LIMIT);
         for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) {
-            allLayouts.set(i, new HashMap<Attribute.Layout, int[]>());
+            allLayouts.set(i, new HashMap<>());
         }
         // Collect maxFlags and allLayouts.
         for (Class cls : pkg.classes) {
@@ -892,7 +892,7 @@
             // Sort by count, most frequent first.
             // Predefs. participate in this sort, though it does not matter.
             Arrays.sort(layoutsAndCounts,
-                        new Comparator<Map.Entry<Attribute.Layout, int[]>>() {
+                        new Comparator<>() {
                 public int compare(Map.Entry<Attribute.Layout, int[]> e0,
                                    Map.Entry<Attribute.Layout, int[]> e1) {
                     // Primary sort key is count, reversed.
@@ -1010,7 +1010,7 @@
         int numAttrDefs = defList.size();
         Object[][] defs = new Object[numAttrDefs][];
         defList.toArray(defs);
-        Arrays.sort(defs, new Comparator<Object[]>() {
+        Arrays.sort(defs, new Comparator<>() {
             public int compare(Object[] a0, Object[] a1) {
                 // Primary sort key is attr def header.
                 @SuppressWarnings("unchecked")
--- a/jdk/src/java.base/share/classes/java/io/ExpiringCache.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/ExpiringCache.java	Wed Jul 05 20:30:08 2017 +0200
@@ -64,7 +64,7 @@
     @SuppressWarnings("serial")
     ExpiringCache(long millisUntilExpiration) {
         this.millisUntilExpiration = millisUntilExpiration;
-        map = new LinkedHashMap<String,Entry>() {
+        map = new LinkedHashMap<>() {
             protected boolean removeEldestEntry(Map.Entry<String,Entry> eldest) {
               return size() > MAX_ENTRIES;
             }
--- a/jdk/src/java.base/share/classes/java/io/FilePermission.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/FilePermission.java	Wed Jul 05 20:30:08 2017 +0200
@@ -201,7 +201,7 @@
         }
 
         // store only the canonical cpath if possible
-        cpath = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        cpath = AccessController.doPrivileged(new PrivilegedAction<>() {
             public String run() {
                 try {
                     String path = cpath;
--- a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1263,7 +1263,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != ObjectInputStream.class;
@@ -2255,7 +2255,7 @@
             try {
                 while (list != null) {
                     AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<Void>()
+                        new PrivilegedExceptionAction<>()
                     {
                         public Void run() throws InvalidObjectException {
                             list.obj.validateObject();
--- a/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1066,7 +1066,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != ObjectOutputStream.class;
--- a/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java	Wed Jul 05 20:30:08 2017 +0200
@@ -367,7 +367,7 @@
                 entry = th;
             }
             if (future.set(entry)) {
-                Caches.localDescs.put(key, new SoftReference<Object>(entry));
+                Caches.localDescs.put(key, new SoftReference<>(entry));
             } else {
                 // nested lookup call already set future
                 entry = future.get();
@@ -430,7 +430,7 @@
             }
             if (interrupted) {
                 AccessController.doPrivileged(
-                    new PrivilegedAction<Void>() {
+                    new PrivilegedAction<>() {
                         public Void run() {
                             Thread.currentThread().interrupt();
                             return null;
@@ -465,7 +465,7 @@
         localDesc = this;
 
         if (serializable) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     if (isEnum) {
                         suid = Long.valueOf(0);
@@ -1733,7 +1733,7 @@
             for (int i = 0; i < fields.length; i++) {
                 fieldSigs[i] = new MemberSignature(fields[i]);
             }
-            Arrays.sort(fieldSigs, new Comparator<MemberSignature>() {
+            Arrays.sort(fieldSigs, new Comparator<>() {
                 public int compare(MemberSignature ms1, MemberSignature ms2) {
                     return ms1.name.compareTo(ms2.name);
                 }
@@ -1764,7 +1764,7 @@
             for (int i = 0; i < cons.length; i++) {
                 consSigs[i] = new MemberSignature(cons[i]);
             }
-            Arrays.sort(consSigs, new Comparator<MemberSignature>() {
+            Arrays.sort(consSigs, new Comparator<>() {
                 public int compare(MemberSignature ms1, MemberSignature ms2) {
                     return ms1.signature.compareTo(ms2.signature);
                 }
@@ -1787,7 +1787,7 @@
             for (int i = 0; i < methods.length; i++) {
                 methSigs[i] = new MemberSignature(methods[i]);
             }
-            Arrays.sort(methSigs, new Comparator<MemberSignature>() {
+            Arrays.sort(methSigs, new Comparator<>() {
                 public int compare(MemberSignature ms1, MemberSignature ms2) {
                     int comp = ms1.name.compareTo(ms2.name);
                     if (comp == 0) {
@@ -2164,7 +2164,7 @@
                 entry = th;
             }
             future.set(entry);
-            Caches.reflectors.put(key, new SoftReference<Object>(entry));
+            Caches.reflectors.put(key, new SoftReference<>(entry));
         }
 
         if (entry instanceof FieldReflector) {
--- a/jdk/src/java.base/share/classes/java/lang/CharacterName.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/CharacterName.java	Wed Jul 05 20:30:08 2017 +0200
@@ -45,7 +45,7 @@
         DataInputStream dis = null;
         try {
             dis = new DataInputStream(new InflaterInputStream(
-                AccessController.doPrivileged(new PrivilegedAction<InputStream>()
+                AccessController.doPrivileged(new PrivilegedAction<>()
                 {
                     public InputStream run() {
                         return getClass().getResourceAsStream("uniName.dat");
--- a/jdk/src/java.base/share/classes/java/lang/Class.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Class.java	Wed Jul 05 20:30:08 2017 +0200
@@ -437,7 +437,7 @@
                 // (the stack depth is wrong for the Constructor's
                 // security check to work)
                 java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<Void>() {
+                    new java.security.PrivilegedAction<>() {
                         public Void run() {
                                 c.setAccessible(true);
                                 return null;
@@ -1068,7 +1068,7 @@
                                                  Reflection.getCallerClass(), true);
             // Client is ok to access declared methods but j.l.Class might not be.
             Method[] candidates = AccessController.doPrivileged(
-                    new PrivilegedAction<Method[]>() {
+                    new PrivilegedAction<>() {
                         @Override
                         public Method[] run() {
                             return enclosingCandidate.getDeclaredMethods();
@@ -1228,7 +1228,7 @@
                                                  Reflection.getCallerClass(), true);
             // Client is ok to access declared methods but j.l.Class might not be.
             Constructor<?>[] candidates = AccessController.doPrivileged(
-                    new PrivilegedAction<Constructor<?>[]>() {
+                    new PrivilegedAction<>() {
                         @Override
                         public Constructor<?>[] run() {
                             return enclosingCandidate.getDeclaredConstructors();
@@ -1542,7 +1542,7 @@
         // has already been ok'd by the SecurityManager.
 
         return java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Class<?>[]>() {
+            new java.security.PrivilegedAction<>() {
                 public Class<?>[] run() {
                     List<Class<?>> list = new ArrayList<>();
                     Class<?> currentClass = Class.this;
@@ -3293,7 +3293,7 @@
     private static boolean initted = false;
     private static void checkInitted() {
         if (initted) return;
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     // Tests to ensure the system properties table is fully
                     // initialized. This is needed because reflection code is
@@ -3349,7 +3349,7 @@
             try {
                 final Method values = getMethod("values");
                 java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<Void>() {
+                    new java.security.PrivilegedAction<>() {
                         public Void run() {
                                 values.setAccessible(true);
                                 return null;
--- a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java	Wed Jul 05 20:30:08 2017 +0200
@@ -496,7 +496,7 @@
             final String name = cls.getName();
             final int i = name.lastIndexOf('.');
             if (i != -1) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         sm.checkPackageAccess(name.substring(0, i));
                         return null;
@@ -1265,7 +1265,7 @@
     {
         final Enumeration<Resource> e =
             getBootstrapClassPath().getResources(name);
-        return new Enumeration<URL> () {
+        return new Enumeration<> () {
             public URL nextElement() {
                 return e.nextElement().getURL();
             }
@@ -1867,7 +1867,7 @@
         boolean isBuiltin = (name != null);
         if (!isBuiltin) {
             name = AccessController.doPrivileged(
-                new PrivilegedAction<String>() {
+                new PrivilegedAction<>() {
                     public String run() {
                         try {
                             return file.exists() ? file.getCanonicalPath() : null;
--- a/jdk/src/java.base/share/classes/java/lang/Package.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Package.java	Wed Jul 05 20:30:08 2017 +0200
@@ -595,7 +595,7 @@
 
         CachedManifest(final String fileName) {
             this.fileName = fileName;
-            this.url = AccessController.doPrivileged(new PrivilegedAction<URL>() {
+            this.url = AccessController.doPrivileged(new PrivilegedAction<>() {
                 public URL run() {
                     final File file = new File(fileName);
                     if (file.isFile()) {
@@ -626,7 +626,7 @@
                 if (m != null) {
                     return m;
                 }
-                m = AccessController.doPrivileged(new PrivilegedAction<Manifest>() {
+                m = AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Manifest run() {
                         try (FileInputStream fis = new FileInputStream(fileName);
                              JarInputStream jis = new JarInputStream(fis, false)) {
--- a/jdk/src/java.base/share/classes/java/lang/SecurityManager.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/SecurityManager.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1455,7 +1455,7 @@
             if (!packageAccessValid) {
                 String tmpPropertyStr =
                     AccessController.doPrivileged(
-                        new PrivilegedAction<String>() {
+                        new PrivilegedAction<>() {
                             public String run() {
                                 return java.security.Security.getProperty(
                                     "package.access");
@@ -1524,7 +1524,7 @@
             if (!packageDefinitionValid) {
                 String tmpPropertyStr =
                     AccessController.doPrivileged(
-                        new PrivilegedAction<String>() {
+                        new PrivilegedAction<>() {
                             public String run() {
                                 return java.security.Security.getProperty(
                                     "package.definition");
--- a/jdk/src/java.base/share/classes/java/lang/StringBuffer.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/StringBuffer.java	Wed Jul 05 20:30:08 2017 +0200
@@ -206,6 +206,7 @@
     }
 
     /**
+     * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since      1.5
      */
     @Override
@@ -214,6 +215,7 @@
     }
 
     /**
+     * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since     1.5
      */
     @Override
@@ -222,6 +224,7 @@
     }
 
     /**
+     * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since     1.5
      */
     @Override
@@ -230,6 +233,7 @@
     }
 
     /**
+     * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since     1.5
      */
     @Override
--- a/jdk/src/java.base/share/classes/java/lang/System.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/System.java	Wed Jul 05 20:30:08 2017 +0200
@@ -309,7 +309,7 @@
             // calls the installed security manager's checkPermission method
             // which will loop infinitely if there is a non-system class
             // (in this case: the new security manager class) on the stack).
-            AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Object run() {
                     s.getClass().getProtectionDomain().implies
                         (SecurityConstants.ALL_PERMISSION);
--- a/jdk/src/java.base/share/classes/java/lang/Thread.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Thread.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1661,7 +1661,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != Thread.class;
--- a/jdk/src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java	Wed Jul 05 20:30:08 2017 +0200
@@ -87,7 +87,7 @@
             // For more information see comments on {@link MethodHandleNatives#linkMethod}.
             throw new IllegalArgumentException("cannot reflect signature polymorphic method");
         }
-        Member mem = AccessController.doPrivileged(new PrivilegedAction<Member>() {
+        Member mem = AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Member run() {
                     try {
                         return reflectUnchecked();
--- a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -194,7 +194,7 @@
         final Class<?> innerClass = spinInnerClass();
         if (invokedType.parameterCount() == 0) {
             final Constructor<?>[] ctrs = AccessController.doPrivileged(
-                    new PrivilegedAction<Constructor<?>[]>() {
+                    new PrivilegedAction<>() {
                 @Override
                 public Constructor<?>[] run() {
                     Constructor<?>[] ctrs = innerClass.getDeclaredConstructors();
@@ -311,7 +311,7 @@
 
         // If requested, dump out to a file for debugging purposes
         if (dumper != null) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 @Override
                 public Void run() {
                     dumper.dumpClass(lambdaClassName, classBytes);
--- a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Jul 05 20:30:08 2017 +0200
@@ -167,7 +167,7 @@
     static void maybeDump(final String className, final byte[] classFile) {
         if (DUMP_CLASS_FILES) {
             java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     try {
                         String dumpName = className;
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -51,7 +51,7 @@
     private static final int MAX_ARITY;
     static {
         final Object[] values = { 255 };
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 values[0] = Integer.getInteger(MethodHandleImpl.class.getName()+".MAX_ARITY", 255);
@@ -1234,7 +1234,7 @@
         private static final byte[] T_BYTES;
         static {
             final Object[] values = {null};
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         try {
                             Class<T> tClass = T.class;
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java	Wed Jul 05 20:30:08 2017 +0200
@@ -199,7 +199,7 @@
             // sun.invoke.WrapperInstance is a restricted interface not accessible
             // by any non-null class loader.
             final ClassLoader loader = proxyLoader;
-            proxy = AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            proxy = AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Object run() {
                     return Proxy.newProxyInstance(
                             loader,
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Wed Jul 05 20:30:08 2017 +0200
@@ -53,7 +53,7 @@
 
     static {
         final Object[] values = new Object[9];
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     values[0] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DEBUG_NAMES");
                     values[1] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DUMP_CLASS_FILES");
--- a/jdk/src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java	Wed Jul 05 20:30:08 2017 +0200
@@ -64,7 +64,7 @@
         try {
             path = path.trim();
             final Path dir = Paths.get(path.length() == 0 ? "." : path);
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     @Override
                     public Void run() {
                         validateDumpDir(dir);
--- a/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java	Wed Jul 05 20:30:08 2017 +0200
@@ -218,7 +218,7 @@
 
     private Object readResolve() throws ReflectiveOperationException {
         try {
-            Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() {
+            Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<>() {
                 @Override
                 public Method run() throws Exception {
                     Method m = capturingClass.getDeclaredMethod("$deserializeLambda$", SerializedLambda.class);
--- a/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java	Wed Jul 05 20:30:08 2017 +0200
@@ -121,7 +121,7 @@
      */
     private static void forkSecondaryFinalizer(final Runnable proc) {
         AccessController.doPrivileged(
-            new PrivilegedAction<Void>() {
+            new PrivilegedAction<>() {
                 public Void run() {
                     ThreadGroup tg = Thread.currentThread().getThreadGroup();
                     for (ThreadGroup tgn = tg;
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java	Wed Jul 05 20:30:08 2017 +0200
@@ -728,7 +728,7 @@
 
             final Constructor<?> cons = cl.getConstructor(constructorParams);
             if (!Modifier.isPublic(cl.getModifiers())) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         cons.setAccessible(true);
                         return null;
--- a/jdk/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -62,7 +62,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -79,7 +79,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/jdk/src/java.base/share/classes/java/net/CookieManager.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/CookieManager.java	Wed Jul 05 20:30:08 2017 +0200
@@ -201,14 +201,13 @@
             throw new IllegalArgumentException("Argument is null");
         }
 
-        Map<String, List<String>> cookieMap =
-                        new java.util.HashMap<String, List<String>>();
+        Map<String, List<String>> cookieMap = new java.util.HashMap<>();
         // if there's no default CookieStore, no way for us to get any cookie
         if (cookieJar == null)
             return Collections.unmodifiableMap(cookieMap);
 
         boolean secureLink = "https".equalsIgnoreCase(uri.getScheme());
-        List<HttpCookie> cookies = new java.util.ArrayList<HttpCookie>();
+        List<HttpCookie> cookies = new java.util.ArrayList<>();
         String path = uri.getPath();
         if (path == null || path.isEmpty()) {
             path = "/";
@@ -411,7 +410,7 @@
     private List<String> sortByPath(List<HttpCookie> cookies) {
         Collections.sort(cookies, new CookiePathComparator());
 
-        List<String> cookieHeader = new java.util.ArrayList<String>();
+        List<String> cookieHeader = new java.util.ArrayList<>();
         for (HttpCookie cookie : cookies) {
             // Netscape cookie spec and RFC 2965 have different format of Cookie
             // header; RFC 2965 requires a leading $Version="1" string while Netscape
--- a/jdk/src/java.base/share/classes/java/net/DatagramPacket.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/DatagramPacket.java	Wed Jul 05 20:30:08 2017 +0200
@@ -47,7 +47,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/jdk/src/java.base/share/classes/java/net/DatagramSocket.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/DatagramSocket.java	Wed Jul 05 20:30:08 2017 +0200
@@ -308,7 +308,7 @@
         // getDeclaredMethod, therefore we need permission to access the member
         try {
             AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Void>() {
+                new PrivilegedExceptionAction<>() {
                     public Void run() throws NoSuchMethodException {
                         Class<?>[] cl = new Class<?>[1];
                         cl[0] = DatagramPacket.class;
--- a/jdk/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -64,7 +64,7 @@
             serverSocketField = netClientClazz.getDeclaredField("serverSocket");
 
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
+                new java.security.PrivilegedAction<>() {
                     public Void run() {
                         httpField.setAccessible(true);
                         serverSocketField.setAccessible(true);
@@ -146,7 +146,7 @@
     {
         try {
             return java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Socket>() {
+                new java.security.PrivilegedExceptionAction<>() {
                     public Socket run() throws IOException {
                         return doTunnel(urlString, timeout);
                 }
--- a/jdk/src/java.base/share/classes/java/net/HttpCookie.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/HttpCookie.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1125,7 +1125,7 @@
      * @return  list of strings; never null
      */
     private static List<String> splitMultiCookies(String header) {
-        List<String> cookies = new java.util.ArrayList<String>();
+        List<String> cookies = new java.util.ArrayList<>();
         int quoteCount = 0;
         int p, q;
 
--- a/jdk/src/java.base/share/classes/java/net/IDN.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/IDN.java	Wed Jul 05 20:30:08 2017 +0200
@@ -228,7 +228,7 @@
         try {
             final String IDN_PROFILE = "uidna.spp";
             if (System.getSecurityManager() != null) {
-                stream = AccessController.doPrivileged(new PrivilegedAction<InputStream>() {
+                stream = AccessController.doPrivileged(new PrivilegedAction<>() {
                     public InputStream run() {
                         return StringPrep.class.getResourceAsStream(IDN_PROFILE);
                     }
--- a/jdk/src/java.base/share/classes/java/net/InMemoryCookieStore.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/InMemoryCookieStore.java	Wed Jul 05 20:30:08 2017 +0200
@@ -62,9 +62,9 @@
      * The default ctor
      */
     public InMemoryCookieStore() {
-        cookieJar = new ArrayList<HttpCookie>();
-        domainIndex = new HashMap<String, List<HttpCookie>>();
-        uriIndex = new HashMap<URI, List<HttpCookie>>();
+        cookieJar = new ArrayList<>();
+        domainIndex = new HashMap<>();
+        uriIndex = new HashMap<>();
 
         lock = new ReentrantLock(false);
     }
@@ -115,7 +115,7 @@
             throw new NullPointerException("uri is null");
         }
 
-        List<HttpCookie> cookies = new ArrayList<HttpCookie>();
+        List<HttpCookie> cookies = new ArrayList<>();
         boolean secureLink = "https".equalsIgnoreCase(uri.getScheme());
         lock.lock();
         try {
@@ -157,7 +157,7 @@
      * of this cookie store.
      */
     public List<URI> getURIs() {
-        List<URI> uris = new ArrayList<URI>();
+        List<URI> uris = new ArrayList<>();
 
         lock.lock();
         try {
@@ -281,7 +281,7 @@
             String host, boolean secureLink) {
         // Use a separate list to handle cookies that need to be removed so
         // that there is no conflict with iterators.
-        ArrayList<HttpCookie> toRemove = new ArrayList<HttpCookie>();
+        ArrayList<HttpCookie> toRemove = new ArrayList<>();
         for (Map.Entry<String, List<HttpCookie>> entry : cookieIndex.entrySet()) {
             String domain = entry.getKey();
             List<HttpCookie> lst = entry.getValue();
@@ -368,7 +368,7 @@
 
                 cookies.add(cookie);
             } else {
-                cookies = new ArrayList<HttpCookie>();
+                cookies = new ArrayList<>();
                 cookies.add(cookie);
                 indexStore.put(index, cookies);
             }
--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java	Wed Jul 05 20:30:08 2017 +0200
@@ -270,7 +270,7 @@
         preferIPv6Address = java.security.AccessController.doPrivileged(
             new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
@@ -852,7 +852,7 @@
             final String providerName = provider;
             try {
                 nameService = java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedExceptionAction<NameService>() {
+                    new java.security.PrivilegedExceptionAction<>() {
                         public NameService run() {
                             Iterator<NameServiceDescriptor> itr =
                                 ServiceLoader.load(NameServiceDescriptor.class)
@@ -892,7 +892,7 @@
         String provider = null;;
         String propPrefix = "sun.net.spi.nameservice.provider.";
         int n = 1;
-        nameServices = new ArrayList<NameService>();
+        nameServices = new ArrayList<>();
         provider = AccessController.doPrivileged(
                 new GetPropertyAction(propPrefix + n));
         while (provider != null) {
--- a/jdk/src/java.base/share/classes/java/net/NetworkInterface.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/NetworkInterface.java	Wed Jul 05 20:30:08 2017 +0200
@@ -54,7 +54,7 @@
 
     static {
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
@@ -167,7 +167,7 @@
      * @since 1.6
      */
     public java.util.List<InterfaceAddress> getInterfaceAddresses() {
-        java.util.List<InterfaceAddress> lst = new java.util.ArrayList<InterfaceAddress>(1);
+        java.util.List<InterfaceAddress> lst = new java.util.ArrayList<>(1);
         SecurityManager sec = System.getSecurityManager();
         for (int j=0; j<bindings.length; j++) {
             try {
@@ -346,7 +346,7 @@
         if (netifs == null)
             return null;
 
-        return new Enumeration<NetworkInterface>() {
+        return new Enumeration<>() {
             private int i = 0;
             public NetworkInterface nextElement() {
                 if (netifs != null && i < netifs.length) {
--- a/jdk/src/java.base/share/classes/java/net/Socket.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/Socket.java	Wed Jul 05 20:30:08 2017 +0200
@@ -470,7 +470,7 @@
         // getDeclaredMethod, therefore we need permission to access the member
 
         oldImpl = AccessController.doPrivileged
-                                (new PrivilegedAction<Boolean>() {
+                                (new PrivilegedAction<>() {
             public Boolean run() {
                 Class<?> clazz = impl.getClass();
                 while (true) {
@@ -911,7 +911,7 @@
         InputStream is = null;
         try {
             is = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<InputStream>() {
+                new PrivilegedExceptionAction<>() {
                     public InputStream run() throws IOException {
                         return impl.getInputStream();
                     }
@@ -951,7 +951,7 @@
         OutputStream os = null;
         try {
             os = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<OutputStream>() {
+                new PrivilegedExceptionAction<>() {
                     public OutputStream run() throws IOException {
                         return impl.getOutputStream();
                     }
--- a/jdk/src/java.base/share/classes/java/net/SocketPermission.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/SocketPermission.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1194,7 +1194,7 @@
      */
     private static int initEphemeralPorts(String suffix, int defval) {
         return AccessController.doPrivileged(
-            new PrivilegedAction<Integer>(){
+            new PrivilegedAction<>(){
                 public Integer run() {
                     int val = Integer.getInteger(
                             "jdk.net.ephemeralPortRange."+suffix, -1
@@ -1328,7 +1328,7 @@
      */
 
     public SocketPermissionCollection() {
-        perms = new ArrayList<SocketPermission>();
+        perms = new ArrayList<>();
     }
 
     /**
@@ -1466,7 +1466,7 @@
         // Get the one we want
         @SuppressWarnings("unchecked")
         Vector<SocketPermission> permissions = (Vector<SocketPermission>)gfields.get("permissions", null);
-        perms = new ArrayList<SocketPermission>(permissions.size());
+        perms = new ArrayList<>(permissions.size());
         perms.addAll(permissions);
     }
 }
--- a/jdk/src/java.base/share/classes/java/net/SocksSocketImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/SocksSocketImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -82,7 +82,7 @@
     {
         try {
             AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Void>() {
+                new java.security.PrivilegedExceptionAction<>() {
                     public Void run() throws IOException {
                               superConnectServer(host, port, timeout);
                               cmdIn = getInputStream();
@@ -157,7 +157,7 @@
             final InetAddress addr = InetAddress.getByName(server);
             PasswordAuthentication pw =
                 java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<PasswordAuthentication>() {
+                    new java.security.PrivilegedAction<>() {
                         public PasswordAuthentication run() {
                                 return Authenticator.requestPasswordAuthentication(
                                        server, addr, serverPort, "SOCKS5", "SOCKS authentication", null);
@@ -351,7 +351,7 @@
             // server is not null only when the socket was created with a
             // specified proxy in which case it does bypass the ProxySelector
             ProxySelector sel = java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<ProxySelector>() {
+                new java.security.PrivilegedAction<>() {
                     public ProxySelector run() {
                             return ProxySelector.getDefault();
                         }
@@ -595,7 +595,7 @@
         InetAddress naddr = baddr;
         if (naddr.isAnyLocalAddress()) {
             naddr = AccessController.doPrivileged(
-                        new PrivilegedAction<InetAddress>() {
+                        new PrivilegedAction<>() {
                             public InetAddress run() {
                                 return cmdsock.getLocalAddress();
 
@@ -671,7 +671,7 @@
             // server is not null only when the socket was created with a
             // specified proxy in which case it does bypass the ProxySelector
             ProxySelector sel = java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<ProxySelector>() {
+                new java.security.PrivilegedAction<>() {
                     public ProxySelector run() {
                             return ProxySelector.getDefault();
                         }
@@ -724,7 +724,7 @@
                 // Connects to the SOCKS server
                 try {
                     AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<Void>() {
+                        new PrivilegedExceptionAction<>() {
                             public Void run() throws Exception {
                                 cmdsock = new Socket(new PlainSocketImpl());
                                 cmdsock.connect(new InetSocketAddress(server, serverPort));
@@ -755,7 +755,7 @@
         } else {
             try {
                 AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<Void>() {
+                    new PrivilegedExceptionAction<>() {
                         public Void run() throws Exception {
                             cmdsock = new Socket(new PlainSocketImpl());
                             cmdsock.connect(new InetSocketAddress(server, serverPort));
--- a/jdk/src/java.base/share/classes/java/net/URL.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/URL.java	Wed Jul 05 20:30:08 2017 +0200
@@ -268,6 +268,23 @@
      *     createURLStreamHandler} method of each provider, if instantiated, is
      *     invoked, with the protocol string, until a provider returns non-null,
      *     or all providers have been exhausted.
+     * <li>If the previous step fails to find a protocol handler, the
+     *     constructor reads the value of the system property:
+     *     <blockquote>{@code
+     *         java.protocol.handler.pkgs
+     *     }</blockquote>
+     *     If the value of that system property is not {@code null},
+     *     it is interpreted as a list of packages separated by a vertical
+     *     slash character '{@code |}'. The constructor tries to load
+     *     the class named:
+     *     <blockquote>{@code
+     *         <package>.<protocol>.Handler
+     *     }</blockquote>
+     *     where {@code <package>} is replaced by the name of the package
+     *     and {@code <protocol>} is replaced by the name of the protocol.
+     *     If this class does not exist, or if the class exists but it is not
+     *     a subclass of {@code URLStreamHandler}, then the next package
+     *     in the list is tried.
      * <li>If the previous step fails to find a protocol handler, then the
      *     constructor tries to load a built-in protocol handler.
      *     If this class does not exist, or if the class exists but it is not a
@@ -1139,8 +1156,41 @@
         }
     }
 
+    private static URLStreamHandler lookupViaProperty(String protocol) {
+        String packagePrefixList = java.security.AccessController.doPrivileged(
+                new PrivilegedAction<>() {
+                    public String run() {
+                        return System.getProperty(protocolPathProp, "");
+                    }
+                });
+        String[] packagePrefixes = packagePrefixList.split("\\|");
+
+        URLStreamHandler handler = null;
+        for (int i=0; handler == null && i<packagePrefixes.length; i++) {
+            String packagePrefix = packagePrefixes[i].trim();
+            try {
+                String clsName = packagePrefix + "." + protocol + ".Handler";
+                Class<?> cls = null;
+                try {
+                    cls = Class.forName(clsName);
+                } catch (ClassNotFoundException e) {
+                    ClassLoader cl = ClassLoader.getSystemClassLoader();
+                    if (cl != null) {
+                        cls = cl.loadClass(clsName);
+                    }
+                }
+                if (cls != null) {
+                    handler = (URLStreamHandler)cls.newInstance();
+                }
+            } catch (Exception e) {
+                // any number of exceptions can get thrown here
+            }
+        }
+        return handler;
+    }
+
     private static Iterator<URLStreamHandlerProvider> providers() {
-        return new Iterator<URLStreamHandlerProvider>() {
+        return new Iterator<>() {
 
             ClassLoader cl = ClassLoader.getSystemClassLoader();
             ServiceLoader<URLStreamHandlerProvider> sl =
@@ -1193,7 +1243,7 @@
         gate.set(gate);
         try {
             return AccessController.doPrivileged(
-                new PrivilegedAction<URLStreamHandler>() {
+                new PrivilegedAction<>() {
                     public URLStreamHandler run() {
                         Iterator<URLStreamHandlerProvider> itr = providers();
                         while (itr.hasNext()) {
@@ -1251,6 +1301,10 @@
             if (handler == null && !protocol.equalsIgnoreCase("jar")) {
                 handler = lookupViaProviders(protocol);
             }
+
+            if (handler == null) {
+                handler = lookupViaProperty(protocol);
+            }
         }
 
         synchronized (streamHandlerLock) {
--- a/jdk/src/java.base/share/classes/java/net/URLClassLoader.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/net/URLClassLoader.java	Wed Jul 05 20:30:08 2017 +0200
@@ -359,7 +359,7 @@
         final Class<?> result;
         try {
             result = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Class<?>>() {
+                new PrivilegedExceptionAction<>() {
                     public Class<?> run() throws ClassNotFoundException {
                         String path = name.replace('.', '/').concat(".class");
                         Resource res = ucp.getResource(path, false);
@@ -564,7 +564,7 @@
          * The same restriction to finding classes applies to resources
          */
         URL url = AccessController.doPrivileged(
-            new PrivilegedAction<URL>() {
+            new PrivilegedAction<>() {
                 public URL run() {
                     return ucp.findResource(name, true);
                 }
@@ -587,7 +587,7 @@
     {
         final Enumeration<URL> e = ucp.findResources(name, true);
 
-        return new Enumeration<URL>() {
+        return new Enumeration<>() {
             private URL url = null;
 
             private boolean next() {
@@ -596,7 +596,7 @@
                 }
                 do {
                     URL u = AccessController.doPrivileged(
-                        new PrivilegedAction<URL>() {
+                        new PrivilegedAction<>() {
                             public URL run() {
                                 if (!e.hasMoreElements())
                                     return null;
@@ -704,7 +704,7 @@
             final SecurityManager sm = System.getSecurityManager();
             if (sm != null) {
                 final Permission fp = p;
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() throws SecurityException {
                         sm.checkPermission(fp);
                         return null;
@@ -735,7 +735,7 @@
         final AccessControlContext acc = AccessController.getContext();
         // Need a privileged block to create the class loader
         URLClassLoader ucl = AccessController.doPrivileged(
-            new PrivilegedAction<URLClassLoader>() {
+            new PrivilegedAction<>() {
                 public URLClassLoader run() {
                     return new FactoryURLClassLoader(urls, parent, acc);
                 }
@@ -760,7 +760,7 @@
         final AccessControlContext acc = AccessController.getContext();
         // Need a privileged block to create the class loader
         URLClassLoader ucl = AccessController.doPrivileged(
-            new PrivilegedAction<URLClassLoader>() {
+            new PrivilegedAction<>() {
                 public URLClassLoader run() {
                     return new FactoryURLClassLoader(urls, acc);
                 }
--- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java	Wed Jul 05 20:30:08 2017 +0200
@@ -296,7 +296,7 @@
     public static AsynchronousFileChannel open(Path file, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> set = new HashSet<>(options.length);
         Collections.addAll(set, options);
         return open(file, set, null, NO_ATTRIBUTES);
     }
--- a/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java	Wed Jul 05 20:30:08 2017 +0200
@@ -330,7 +330,7 @@
     public static FileChannel open(Path path, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> set = new HashSet<>(options.length);
         Collections.addAll(set, options);
         return open(path, set, NO_ATTRIBUTES);
     }
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java	Wed Jul 05 20:30:08 2017 +0200
@@ -76,7 +76,7 @@
 
         private static AsynchronousChannelProvider load() {
             return AccessController
-                .doPrivileged(new PrivilegedAction<AsynchronousChannelProvider>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     public AsynchronousChannelProvider run() {
                         AsynchronousChannelProvider p;
                         p = loadProviderFromProperty();
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java	Wed Jul 05 20:30:08 2017 +0200
@@ -172,7 +172,7 @@
             if (provider != null)
                 return provider;
             return AccessController.doPrivileged(
-                new PrivilegedAction<SelectorProvider>() {
+                new PrivilegedAction<>() {
                     public SelectorProvider run() {
                             if (loadProviderFromProperty())
                                 return provider;
--- a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java	Wed Jul 05 20:30:08 2017 +0200
@@ -335,7 +335,7 @@
     // thrown.  Should be invoked with full privileges.
     //
     private static Iterator<CharsetProvider> providers() {
-        return new Iterator<CharsetProvider>() {
+        return new Iterator<>() {
 
                 ClassLoader cl = ClassLoader.getSystemClassLoader();
                 ServiceLoader<CharsetProvider> sl =
@@ -404,7 +404,7 @@
             gate.set(gate);
 
             return AccessController.doPrivileged(
-                new PrivilegedAction<Charset>() {
+                new PrivilegedAction<>() {
                     public Charset run() {
                         for (Iterator<CharsetProvider> i = providers();
                              i.hasNext();) {
@@ -428,7 +428,7 @@
         // returns ExtendedProvider, if installed
         private static CharsetProvider extendedProvider() {
             return AccessController.doPrivileged(
-                       new PrivilegedAction<CharsetProvider>() {
+                       new PrivilegedAction<>() {
                            public CharsetProvider run() {
                                 try {
                                     Class<?> epc
@@ -570,10 +570,10 @@
      */
     public static SortedMap<String,Charset> availableCharsets() {
         return AccessController.doPrivileged(
-            new PrivilegedAction<SortedMap<String,Charset>>() {
+            new PrivilegedAction<>() {
                 public SortedMap<String,Charset> run() {
                     TreeMap<String,Charset> m =
-                        new TreeMap<String,Charset>(
+                        new TreeMap<>(
                             ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                     put(standardProvider.charsets(), m);
                     CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
@@ -663,7 +663,7 @@
         if (aliasSet != null)
             return aliasSet;
         int n = aliases.length;
-        HashSet<String> hs = new HashSet<String>(n);
+        HashSet<String> hs = new HashSet<>(n);
         for (int i = 0; i < n; i++)
             hs.add(aliases[i]);
         aliasSet = Collections.unmodifiableSet(hs);
--- a/jdk/src/java.base/share/classes/java/nio/charset/CoderResult.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/charset/CoderResult.java	Wed Jul 05 20:30:08 2017 +0200
@@ -204,13 +204,13 @@
             WeakReference<CoderResult> w;
             CoderResult e = null;
             if (cache == null) {
-                cache = new HashMap<Integer,WeakReference<CoderResult>>();
+                cache = new HashMap<>();
             } else if ((w = cache.get(k)) != null) {
                 e = w.get();
             }
             if (e == null) {
                 e = create(len);
-                cache.put(k, new WeakReference<CoderResult>(e));
+                cache.put(k, new WeakReference<>(e));
             }
             return e;
         }
--- a/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java	Wed Jul 05 20:30:08 2017 +0200
@@ -93,7 +93,7 @@
         private static FileSystem defaultFileSystem() {
             // load default provider
             FileSystemProvider provider = AccessController
-                .doPrivileged(new PrivilegedAction<FileSystemProvider>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     public FileSystemProvider run() {
                         return getDefaultProvider();
                     }
--- a/jdk/src/java.base/share/classes/java/nio/file/Files.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java	Wed Jul 05 20:30:08 2017 +0200
@@ -402,7 +402,7 @@
     public static SeekableByteChannel newByteChannel(Path path, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> set = new HashSet<>(options.length);
         Collections.addAll(set, options);
         return newByteChannel(path, set);
     }
@@ -516,7 +516,7 @@
         // create a matcher and return a filter that uses it.
         FileSystem fs = dir.getFileSystem();
         final PathMatcher matcher = fs.getPathMatcher("glob:" + glob);
-        DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() {
+        DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<>() {
             @Override
             public boolean accept(Path entry)  {
                 return matcher.matches(entry.getFileName());
@@ -1541,7 +1541,7 @@
         // creates the default file type detector
         private static FileTypeDetector createDefaultFileTypeDetector() {
             return AccessController
-                .doPrivileged(new PrivilegedAction<FileTypeDetector>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     @Override public FileTypeDetector run() {
                         return sun.nio.fs.DefaultFileTypeDetector.create();
                 }});
@@ -1550,7 +1550,7 @@
         // loads all installed file type detectors
         private static List<FileTypeDetector> loadInstalledDetectors() {
             return AccessController
-                .doPrivileged(new PrivilegedAction<List<FileTypeDetector>>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     @Override public List<FileTypeDetector> run() {
                         List<FileTypeDetector> list = new ArrayList<>();
                         ServiceLoader<FileTypeDetector> loader = ServiceLoader
@@ -3468,7 +3468,7 @@
             final Iterator<Path> delegate = ds.iterator();
 
             // Re-wrap DirectoryIteratorException to UncheckedIOException
-            Iterator<Path> iterator = new Iterator<Path>() {
+            Iterator<Path> iterator = new Iterator<>() {
                 @Override
                 public boolean hasNext() {
                     try {
--- a/jdk/src/java.base/share/classes/java/nio/file/Path.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/Path.java	Wed Jul 05 20:30:08 2017 +0200
@@ -801,7 +801,7 @@
      */
     @Override
     default Iterator<Path> iterator() {
-        return new Iterator<Path>() {
+        return new Iterator<>() {
             private int i = 0;
 
             @Override
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/AclEntry.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/AclEntry.java	Wed Jul 05 20:30:08 2017 +0200
@@ -306,7 +306,7 @@
      * @return the permissions component
      */
     public Set<AclEntryPermission> permissions() {
-        return new HashSet<AclEntryPermission>(perms);
+        return new HashSet<>(perms);
     }
 
     /**
@@ -317,7 +317,7 @@
      * @return the flags component
      */
     public Set<AclEntryFlag> flags() {
-        return new HashSet<AclEntryFlag>(flags);
+        return new HashSet<>(flags);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java	Wed Jul 05 20:30:08 2017 +0200
@@ -160,13 +160,13 @@
     {
         // copy set and check for nulls (CCE will be thrown if an element is not
         // a PosixFilePermission)
-        perms = new HashSet<PosixFilePermission>(perms);
+        perms = new HashSet<>(perms);
         for (PosixFilePermission p: perms) {
             if (p == null)
                 throw new NullPointerException();
         }
         final Set<PosixFilePermission> value = perms;
-        return new FileAttribute<Set<PosixFilePermission>>() {
+        return new FileAttribute<>() {
             @Override
             public String name() {
                 return "posix:permissions";
--- a/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Wed Jul 05 20:30:08 2017 +0200
@@ -110,7 +110,7 @@
 
     // loads all installed providers
     private static List<FileSystemProvider> loadInstalledProviders() {
-        List<FileSystemProvider> list = new ArrayList<FileSystemProvider>();
+        List<FileSystemProvider> list = new ArrayList<>();
 
         ServiceLoader<FileSystemProvider> sl = ServiceLoader
             .load(FileSystemProvider.class, ClassLoader.getSystemClassLoader());
@@ -163,7 +163,7 @@
                     loadingProviders = true;
 
                     List<FileSystemProvider> list = AccessController
-                        .doPrivileged(new PrivilegedAction<List<FileSystemProvider>>() {
+                        .doPrivileged(new PrivilegedAction<>() {
                             @Override
                             public List<FileSystemProvider> run() {
                                 return loadInstalledProviders();
@@ -419,7 +419,7 @@
         throws IOException
     {
         int len = options.length;
-        Set<OpenOption> opts = new HashSet<OpenOption>(len + 3);
+        Set<OpenOption> opts = new HashSet<>(len + 3);
         if (len == 0) {
             opts.add(StandardOpenOption.CREATE);
             opts.add(StandardOpenOption.TRUNCATE_EXISTING);
--- a/jdk/src/java.base/share/classes/java/time/format/DateTimeParseContext.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeParseContext.java	Wed Jul 05 20:30:08 2017 +0200
@@ -399,7 +399,7 @@
      */
     void addChronoChangedListener(Consumer<Chronology> listener) {
         if (chronoListeners == null) {
-            chronoListeners = new ArrayList<Consumer<Chronology>>();
+            chronoListeners = new ArrayList<>();
         }
         chronoListeners.add(listener);
     }
--- a/jdk/src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java	Wed Jul 05 20:30:08 2017 +0200
@@ -141,7 +141,7 @@
         // if the property java.time.zone.DefaultZoneRulesProvider is
         // set then its value is the class name of the default provider
         final List<ZoneRulesProvider> loaded = new ArrayList<>();
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Object run() {
                 String prop = System.getProperty("java.time.zone.DefaultZoneRulesProvider");
                 if (prop != null) {
--- a/jdk/src/java.base/share/classes/java/util/Calendar.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/Calendar.java	Wed Jul 05 20:30:08 2017 +0200
@@ -3579,7 +3579,7 @@
         ZoneInfo zi = null;
         try {
             zi = AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<ZoneInfo>() {
+                    new PrivilegedExceptionAction<>() {
                         @Override
                         public ZoneInfo run() throws Exception {
                             return (ZoneInfo) input.readObject();
--- a/jdk/src/java.base/share/classes/java/util/Currency.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/Currency.java	Wed Jul 05 20:30:08 2017 +0200
@@ -212,7 +212,7 @@
     private static final int VALID_FORMAT_VERSION = 2;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 try {
--- a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java	Wed Jul 05 20:30:08 2017 +0200
@@ -2655,7 +2655,7 @@
                 InputStream stream = null;
                 try {
                     stream = AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<InputStream>() {
+                        new PrivilegedExceptionAction<>() {
                             public InputStream run() throws IOException {
                                 InputStream is = null;
                                 if (reloadFlag) {
--- a/jdk/src/java.base/share/classes/java/util/TimeZone.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/TimeZone.java	Wed Jul 05 20:30:08 2017 +0200
@@ -678,7 +678,7 @@
         assert tz != null;
 
         final String id = zoneID;
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
                 public Void run() {
                     System.setProperty("user.timezone", id);
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Wed Jul 05 20:30:08 2017 +0200
@@ -593,7 +593,7 @@
         if (includeUnsigned) {
             return unsignedEntryNames();
         } else {
-            return new Enumeration<String>() {
+            return new Enumeration<>() {
 
                 public boolean hasMoreElements() {
                     return false;
@@ -619,7 +619,7 @@
 
         // screen out entries which are never signed
         final Enumeration<? extends ZipEntry> enum_ = super.entries();
-        return new Enumeration<JarEntry>() {
+        return new Enumeration<>() {
 
             ZipEntry entry;
 
@@ -669,7 +669,7 @@
 
     private Enumeration<String> unsignedEntryNames() {
         final Enumeration<JarEntry> entries = entries();
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
--- a/jdk/src/java.base/share/classes/java/util/jar/JarVerifier.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarVerifier.java	Wed Jul 05 20:30:08 2017 +0200
@@ -684,7 +684,7 @@
         final List<CodeSigner[]> signersReq = req;
         final Enumeration<String> enum2 = (matchUnsigned) ? unsignedEntryNames(jar) : emptyEnumeration;
 
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
@@ -726,7 +726,7 @@
         final Map<String, CodeSigner[]> map = new HashMap<>();
         map.putAll(signerMap());
         final Enumeration<? extends ZipEntry> enum_ = e;
-        return new Enumeration<JarEntry>() {
+        return new Enumeration<>() {
 
             Enumeration<String> signers = null;
             JarEntry entry;
@@ -786,7 +786,7 @@
     private Enumeration<String> unsignedEntryNames(JarFile jar) {
         final Map<String, CodeSigner[]> map = signerMap();
         final Enumeration<JarEntry> entries = jar.entries();
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
--- a/jdk/src/java.base/share/classes/sun/misc/Cleaner.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/misc/Cleaner.java	Wed Jul 05 20:30:08 2017 +0200
@@ -142,7 +142,7 @@
         try {
             thunk.run();
         } catch (final Throwable x) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         if (System.err != null)
                             new Error("Cleaner terminated abnormally", x)
--- a/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/misc/URLClassPath.java	Wed Jul 05 20:30:08 2017 +0200
@@ -97,16 +97,16 @@
     }
 
     /* The original search path of URLs. */
-    private ArrayList<URL> path = new ArrayList<URL>();
+    private ArrayList<URL> path = new ArrayList<>();
 
     /* The stack of unopened URLs */
-    Stack<URL> urls = new Stack<URL>();
+    Stack<URL> urls = new Stack<>();
 
     /* The resulting search path of Loaders */
-    ArrayList<Loader> loaders = new ArrayList<Loader>();
+    ArrayList<Loader> loaders = new ArrayList<>();
 
     /* Map of each URL opened to its corresponding Loader */
-    HashMap<String, Loader> lmap = new HashMap<String, Loader>();
+    HashMap<String, Loader> lmap = new HashMap<>();
 
     /* The jar protocol handler to use when creating new URLs */
     private URLStreamHandler jarHandler;
@@ -142,7 +142,7 @@
         if (closed) {
             return Collections.emptyList();
         }
-        List<IOException> result = new LinkedList<IOException>();
+        List<IOException> result = new LinkedList<>();
         for (Loader loader : loaders) {
             try {
                 loader.close();
@@ -234,7 +234,7 @@
      */
     public Enumeration<URL> findResources(final String name,
                                      final boolean check) {
-        return new Enumeration<URL>() {
+        return new Enumeration<>() {
             private int index = 0;
             private URL url = null;
 
@@ -281,7 +281,7 @@
      */
     public Enumeration<Resource> getResources(final String name,
                                     final boolean check) {
-        return new Enumeration<Resource>() {
+        return new Enumeration<>() {
             private int index = 0;
             private Resource res = null;
 
@@ -374,7 +374,7 @@
     private Loader getLoader(final URL url) throws IOException {
         try {
             return java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Loader>() {
+                new java.security.PrivilegedExceptionAction<>() {
                 public Loader run() throws IOException {
                     String file = url.getFile();
                     if (file != null && file.endsWith("/")) {
@@ -689,7 +689,7 @@
             if (jar == null) {
                 try {
                     java.security.AccessController.doPrivileged(
-                        new java.security.PrivilegedExceptionAction<Void>() {
+                        new java.security.PrivilegedExceptionAction<>() {
                             public Void run() throws IOException {
                                 if (DEBUG) {
                                     System.err.println("Opening " + csu);
@@ -870,7 +870,7 @@
             if (index == null)
                 return null;
 
-            HashSet<String> visited = new HashSet<String>();
+            HashSet<String> visited = new HashSet<>();
             return getResource(name, check, visited);
         }
 
@@ -912,7 +912,7 @@
                              * before
                              */
                             newLoader = AccessController.doPrivileged(
-                                new PrivilegedExceptionAction<JarLoader>() {
+                                new PrivilegedExceptionAction<>() {
                                     public JarLoader run() throws IOException {
                                         return new JarLoader(url, handler,
                                             lmap);
--- a/jdk/src/java.base/share/classes/sun/net/NetworkClient.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/NetworkClient.java	Wed Jul 05 20:30:08 2017 +0200
@@ -69,7 +69,7 @@
         final String encs[] = { null };
 
         AccessController.doPrivileged(
-                new PrivilegedAction<Void>() {
+                new PrivilegedAction<>() {
                     public Void run() {
                         vals[0] = Integer.getInteger("sun.net.client.defaultReadTimeout", 0).intValue();
                         vals[1] = Integer.getInteger("sun.net.client.defaultConnectTimeout", 0).intValue();
@@ -154,7 +154,7 @@
         if (proxy != null) {
             if (proxy.type() == Proxy.Type.SOCKS) {
                 s = AccessController.doPrivileged(
-                    new PrivilegedAction<Socket>() {
+                    new PrivilegedAction<>() {
                         public Socket run() {
                                        return new Socket(proxy);
                                    }});
@@ -201,7 +201,7 @@
         if (serverSocket == null)
             throw new IOException("not connected");
         return  AccessController.doPrivileged(
-                        new PrivilegedAction<InetAddress>() {
+                        new PrivilegedAction<>() {
                             public InetAddress run() {
                                 return serverSocket.getLocalAddress();
 
--- a/jdk/src/java.base/share/classes/sun/net/ProgressMonitor.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/ProgressMonitor.java	Wed Jul 05 20:30:08 2017 +0200
@@ -64,7 +64,7 @@
      * Return a snapshot of the ProgressSource list
      */
     public ArrayList<ProgressSource> getProgressSources()    {
-        ArrayList<ProgressSource> snapshot = new ArrayList<ProgressSource>();
+        ArrayList<ProgressSource> snapshot = new ArrayList<>();
 
         try {
             synchronized(progressSourceList)    {
@@ -114,7 +114,7 @@
         if (progressListenerList.size() > 0)
         {
             // Notify progress listener if there is progress change
-            ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> listeners = new ArrayList<>();
 
             // Copy progress listeners to another list to avoid holding locks
             synchronized(progressListenerList) {
@@ -151,7 +151,7 @@
         if (progressListenerList.size() > 0)
         {
             // Notify progress listener if there is progress change
-            ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> listeners = new ArrayList<>();
 
             // Copy progress listeners to another list to avoid holding locks
             synchronized(progressListenerList) {
@@ -183,7 +183,7 @@
         if (progressListenerList.size() > 0)
         {
             // Notify progress listener if there is progress change
-            ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> listeners = new ArrayList<>();
 
             // Copy progress listeners to another list to avoid holding locks
             synchronized(progressListenerList)  {
--- a/jdk/src/java.base/share/classes/sun/net/www/MessageHeader.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/MessageHeader.java	Wed Jul 05 20:30:08 2017 +0200
@@ -244,7 +244,7 @@
     public synchronized Map<String, List<String>> filterAndAddHeaders(
             String[] excludeList, Map<String, List<String>>  include) {
         boolean skipIt = false;
-        Map<String, List<String>> m = new HashMap<String, List<String>>();
+        Map<String, List<String>> m = new HashMap<>();
         for (int i = nkeys; --i >= 0;) {
             if (excludeList != null) {
                 // check if the key is in the excludeList.
@@ -260,7 +260,7 @@
             if (!skipIt) {
                 List<String> l = m.get(keys[i]);
                 if (l == null) {
-                    l = new ArrayList<String>();
+                    l = new ArrayList<>();
                     m.put(keys[i], l);
                 }
                 l.add(values[i]);
@@ -274,7 +274,7 @@
                 for (Map.Entry<String,List<String>> entry: include.entrySet()) {
                 List<String> l = m.get(entry.getKey());
                 if (l == null) {
-                    l = new ArrayList<String>();
+                    l = new ArrayList<>();
                     m.put(entry.getKey(), l);
                 }
                 l.addAll(entry.getValue());
--- a/jdk/src/java.base/share/classes/sun/net/www/http/HttpCapture.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/http/HttpCapture.java	Wed Jul 05 20:30:08 2017 +0200
@@ -64,7 +64,7 @@
     private static synchronized void init() {
         initialized = true;
         String rulesFile = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<String>() {
+            new java.security.PrivilegedAction<>() {
                 public String run() {
                     return NetProperties.get("sun.net.http.captureRules");
                 }
@@ -85,8 +85,8 @@
                         String[] s = line.split(",");
                         if (s.length == 2) {
                             if (patterns == null) {
-                                patterns = new ArrayList<Pattern>();
-                                capFiles = new ArrayList<String>();
+                                patterns = new ArrayList<>();
+                                capFiles = new ArrayList<>();
                             }
                             patterns.add(Pattern.compile(s[0].trim()));
                             capFiles.add(s[1].trim());
--- a/jdk/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Wed Jul 05 20:30:08 2017 +0200
@@ -479,7 +479,7 @@
     {
         try {
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Void>() {
+                new java.security.PrivilegedExceptionAction<>() {
                     public Void run() throws IOException {
                     openServer(server.getHostString(), server.getPort());
                     return null;
--- a/jdk/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java	Wed Jul 05 20:30:08 2017 +0200
@@ -94,7 +94,7 @@
              */
             final KeepAliveCache cache = this;
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
+                new java.security.PrivilegedAction<>() {
                 public Void run() {
                     keepAliveTimer = new InnocuousThread(cache, "Keep-Alive-Timer");
                     keepAliveTimer.setDaemon(true);
@@ -178,7 +178,7 @@
                 long currentTime = System.currentTimeMillis();
 
                 ArrayList<KeepAliveKey> keysToRemove
-                    = new ArrayList<KeepAliveKey>();
+                    = new ArrayList<>();
 
                 for (KeepAliveKey key : keySet()) {
                     ClientVector v = get(key);
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java	Wed Jul 05 20:30:08 2017 +0200
@@ -122,7 +122,7 @@
         this.dontUseNegotiate = dontUseNegotiate;
         rsp = response;
         this.hdrname = hdrname;
-        schemes = new HashMap<String,SchemeMapValue>();
+        schemes = new HashMap<>();
         parse();
     }
 
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Wed Jul 05 20:30:08 2017 +0200
@@ -62,7 +62,7 @@
 
     static {
         Boolean b = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     return NetProperties.getBoolean(compatPropName);
                 }
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Jul 05 20:30:08 2017 +0200
@@ -244,7 +244,7 @@
                 new sun.security.action.GetBooleanAction(
                     "sun.net.http.allowRestrictedHeaders")).booleanValue();
         if (!allowRestrictedHeaders) {
-            restrictedHeaderSet = new HashSet<String>(restrictedHeaders.length);
+            restrictedHeaderSet = new HashSet<>(restrictedHeaders.length);
             for (int i=0; i < restrictedHeaders.length; i++) {
                 restrictedHeaderSet.add(restrictedHeaders[i].toLowerCase());
             }
@@ -413,7 +413,7 @@
                             final URL url,
                             final RequestorType authType) {
         return java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<PasswordAuthentication>() {
+            new java.security.PrivilegedAction<>() {
                 public PasswordAuthentication run() {
                     if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
                         logger.finest("Requesting Authentication: host =" + host + " url = " + url);
@@ -817,14 +817,14 @@
             } catch (SecurityException se) { /* swallow exception */ }
         } else {
             cookieHandler = java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<CookieHandler>() {
+                new java.security.PrivilegedAction<>() {
                 public CookieHandler run() {
                     return CookieHandler.getDefault();
                 }
             });
         }
         cacheHandler = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<ResponseCache>() {
+            new java.security.PrivilegedAction<>() {
                 public ResponseCache run() {
                 return ResponseCache.getDefault();
             }
@@ -909,7 +909,7 @@
         final boolean result[] = {false};
 
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                 try {
                     InetAddress a1 = InetAddress.getByName(h1);
@@ -954,7 +954,7 @@
         try {
             // lookup hostname and use IP address if available
             host = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<String>() {
+                new PrivilegedExceptionAction<>() {
                     public String run() throws IOException {
                             InetAddress addr = InetAddress.getByName(hostarg);
                             return addr.getHostAddress();
@@ -984,7 +984,7 @@
         if (p != null) {
             try {
                 AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<Void>() {
+                    new PrivilegedExceptionAction<>() {
                         public Void run() throws IOException {
                             plainConnect0();
                             return null;
@@ -1086,7 +1086,7 @@
                  */
                 ProxySelector sel =
                     java.security.AccessController.doPrivileged(
-                        new java.security.PrivilegedAction<ProxySelector>() {
+                        new java.security.PrivilegedAction<>() {
                             public ProxySelector run() {
                                      return ProxySelector.getDefault();
                                  }
@@ -1245,7 +1245,7 @@
         if (p != null) {
             try {
                 return AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<OutputStream>() {
+                    new PrivilegedExceptionAction<>() {
                         public OutputStream run() throws IOException {
                             return getOutputStream0();
                         }
@@ -1423,7 +1423,7 @@
         if (p != null) {
             try {
                 return AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<InputStream>() {
+                    new PrivilegedExceptionAction<>() {
                         public InputStream run() throws IOException {
                             return getInputStream0();
                         }
@@ -1877,7 +1877,7 @@
             final Object[] args = { rememberedException.getMessage() };
             IOException chainedException =
                 java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedExceptionAction<IOException>() {
+                    new java.security.PrivilegedExceptionAction<>() {
                         public IOException run() throws Exception {
                             return (IOException)
                                 rememberedException.getClass()
@@ -2204,7 +2204,7 @@
                     try {
                         final String finalHost = host;
                         addr = java.security.AccessController.doPrivileged(
-                            new java.security.PrivilegedExceptionAction<InetAddress>() {
+                            new java.security.PrivilegedExceptionAction<>() {
                                 public InetAddress run()
                                     throws java.net.UnknownHostException {
                                     return InetAddress.getByName(finalHost);
@@ -2566,7 +2566,7 @@
         if (p != null) {
             try {
                 return AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<Boolean>() {
+                    new PrivilegedExceptionAction<>() {
                         public Boolean run() throws IOException {
                             return followRedirect0(loc, stat, locUrl0);
                         }
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Wed Jul 05 20:30:08 2017 +0200
@@ -213,7 +213,7 @@
             /* get the stream before asserting privileges */
             try (final InputStream in = url.openConnection().getInputStream()) {
                 result = AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<JarFile>() {
+                    new PrivilegedExceptionAction<>() {
                         public JarFile run() throws IOException {
                             Path tmpFile = Files.createTempFile("jar_cache", null);
                             try {
--- a/jdk/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -76,7 +76,7 @@
         this.pool = pool;
 
         if (pool.isFixedThreadPool()) {
-            taskQueue = new ConcurrentLinkedQueue<Runnable>();
+            taskQueue = new ConcurrentLinkedQueue<>();
         } else {
             taskQueue = null;   // not used
         }
@@ -115,7 +115,7 @@
     }
 
     private void startInternalThread(final Runnable task) {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 // internal threads should not be visible to application so
@@ -246,7 +246,7 @@
     abstract void shutdownHandlerTasks();
 
     private void shutdownExecutors() {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 pool.executor().shutdown();
                 timeoutExecutor.shutdown();
@@ -323,7 +323,7 @@
             task = new Runnable() {
                 @Override
                 public void run() {
-                    AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                    AccessController.doPrivileged(new PrivilegedAction<>() {
                         @Override
                         public Void run() {
                             delegate.run();
--- a/jdk/src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -228,7 +228,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(2);
+            HashSet<SocketOption<?>> set = new HashSet<>(2);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
             return Collections.unmodifiableSet(set);
--- a/jdk/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -503,7 +503,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(5);
+            HashSet<SocketOption<?>> set = new HashSet<>(5);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_KEEPALIVE);
--- a/jdk/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -294,7 +294,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
+            HashSet<SocketOption<?>> set = new HashSet<>(8);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
--- a/jdk/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -184,7 +184,7 @@
 
             // created blocked set if required and add source address
             if (blockedSet == null)
-                blockedSet = new HashSet<InetAddress>();
+                blockedSet = new HashSet<>();
             blockedSet.add(toBlock);
         }
         return this;
--- a/jdk/src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java	Wed Jul 05 20:30:08 2017 +0200
@@ -84,13 +84,13 @@
         InetAddress group = key.group();
         List<MembershipKeyImpl> keys;
         if (groups == null) {
-            groups = new HashMap<InetAddress,List<MembershipKeyImpl>>();
+            groups = new HashMap<>();
             keys = null;
         } else {
             keys = groups.get(group);
         }
         if (keys == null) {
-            keys = new LinkedList<MembershipKeyImpl>();
+            keys = new LinkedList<>();
             groups.put(group, keys);
         }
         keys.add(key);
--- a/jdk/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -52,8 +52,8 @@
 
     protected SelectorImpl(SelectorProvider sp) {
         super(sp);
-        keys = new HashSet<SelectionKey>();
-        selectedKeys = new HashSet<SelectionKey>();
+        keys = new HashSet<>();
+        selectedKeys = new HashSet<>();
         if (Util.atBugLevel("1.4")) {
             publicKeys = keys;
             publicSelectedKeys = selectedKeys;
--- a/jdk/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -182,7 +182,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(2);
+            HashSet<SocketOption<?>> set = new HashSet<>(2);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
             set.add(StandardSocketOptions.IP_TOS);
--- a/jdk/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -229,7 +229,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
+            HashSet<SocketOption<?>> set = new HashSet<>(8);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_KEEPALIVE);
--- a/jdk/src/java.base/share/classes/sun/nio/cs/CharsetMapping.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/cs/CharsetMapping.java	Wed Jul 05 20:30:08 2017 +0200
@@ -135,7 +135,7 @@
 
     // init the CharsetMapping object from the .dat binary file
     public static CharsetMapping get(final InputStream is) {
-        return AccessController.doPrivileged(new PrivilegedAction<CharsetMapping>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
             public CharsetMapping run() {
                 return new CharsetMapping().load(is);
             }
--- a/jdk/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java	Wed Jul 05 20:30:08 2017 +0200
@@ -48,7 +48,7 @@
     private boolean shutdown;
 
     protected AbstractPoller() {
-        this.requestList = new LinkedList<Request>();
+        this.requestList = new LinkedList<>();
         this.shutdown = false;
     }
 
@@ -57,7 +57,7 @@
      */
     public void start() {
         final Runnable thisRunnable = this;
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Object run() {
                 Thread thr = new ManagedLocalsThread(thisRunnable);
--- a/jdk/src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java	Wed Jul 05 20:30:08 2017 +0200
@@ -70,8 +70,8 @@
         this.watcher = watcher;
         this.dir = dir;
         this.state = State.READY;
-        this.events = new ArrayList<WatchEvent<?>>();
-        this.lastModifyEvents = new HashMap<Object,WatchEvent<?>>();
+        this.events = new ArrayList<>();
+        this.lastModifyEvents = new HashMap<>();
     }
 
     final AbstractWatchService watcher() {
@@ -146,7 +146,7 @@
 
             // non-repeated event
             Event<Object> ev =
-                new Event<Object>((WatchEvent.Kind<Object>)kind, context);
+                new Event<>((WatchEvent.Kind<Object>)kind, context);
             if (isModify) {
                 lastModifyEvents.put(context, ev);
             } else if (kind == StandardWatchEventKinds.OVERFLOW) {
@@ -163,7 +163,7 @@
     public final List<WatchEvent<?>> pollEvents() {
         synchronized (this) {
             List<WatchEvent<?>> result = events;
-            events = new ArrayList<WatchEvent<?>>();
+            events = new ArrayList<>();
             lastModifyEvents.clear();
             return result;
         }
--- a/jdk/src/java.base/share/classes/sun/reflect/ReflectionFactory.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/reflect/ReflectionFactory.java	Wed Jul 05 20:30:08 2017 +0200
@@ -375,7 +375,7 @@
     private static void checkInitted() {
         if (initted) return;
         AccessController.doPrivileged(
-            new PrivilegedAction<Void>() {
+            new PrivilegedAction<>() {
                 public Void run() {
                     // Tests to ensure the system properties table is fully
                     // initialized. This is needed because reflection code is
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Wed Jul 05 20:30:08 2017 +0200
@@ -106,16 +106,16 @@
             throw new IllegalArgumentException("Not an annotation type");
 
         Method[] methods =
-            AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Method[] run() {
                     // Initialize memberTypes and defaultValues
                     return annotationClass.getDeclaredMethods();
                 }
             });
 
-        memberTypes = new HashMap<String,Class<?>>(methods.length+1, 1.0f);
-        memberDefaults = new HashMap<String, Object>(0);
-        members = new HashMap<String, Method>(methods.length+1, 1.0f);
+        memberTypes = new HashMap<>(methods.length+1, 1.0f);
+        memberDefaults = new HashMap<>(0);
+        members = new HashMap<>(methods.length+1, 1.0f);
 
         for (Method method : methods) {
             if (method.getParameterTypes().length != 0)
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/Builder.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/Builder.java	Wed Jul 05 20:30:08 2017 +0200
@@ -102,8 +102,8 @@
 
     /**
      * Verifies whether the input certificate completes the path.
-     * When building forward, a trust anchor will complete the path.
-     * When building reverse, the target certificate will complete the path.
+     * When building in the forward direction, a trust anchor will
+     * complete the path.
      *
      * @param cert the certificate to test
      * @return a boolean value indicating whether the cert completes the path.
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 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
@@ -25,7 +25,6 @@
 package sun.security.provider.certpath;
 
 import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyStore;
 import java.security.PublicKey;
 import java.security.cert.*;
 import java.security.interfaces.DSAPublicKey;
@@ -194,7 +193,6 @@
 
     static class BuilderParams extends ValidatorParams {
         private PKIXBuilderParameters params;
-        private boolean buildForward = true;
         private List<CertStore> stores;
         private X500Principal targetSubject;
 
@@ -213,10 +211,6 @@
                     + "targetCertConstraints parameter must be an "
                     + "X509CertSelector");
             }
-            if (params instanceof SunCertPathBuilderParameters) {
-                buildForward =
-                    ((SunCertPathBuilderParameters)params).getBuildForward();
-            }
             this.params = params;
             this.targetSubject = getTargetSubject(
                 certStores(), (X509CertSelector)targetCertConstraints());
@@ -230,7 +224,6 @@
             return stores;
         }
         int maxPathLength() { return params.getMaxPathLength(); }
-        boolean buildForward() { return buildForward; }
         PKIXBuilderParameters params() { return params; }
         X500Principal targetSubject() { return targetSubject; }
 
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/ReverseBuilder.java	Thu Apr 23 18:21:26 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,551 +0,0 @@
-/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.provider.certpath;
-
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-import java.security.Principal;
-import java.security.cert.CertificateException;
-import java.security.cert.CertPathValidatorException;
-import java.security.cert.CertStore;
-import java.security.cert.CertStoreException;
-import java.security.cert.PKIXBuilderParameters;
-import java.security.cert.PKIXCertPathChecker;
-import java.security.cert.PKIXParameters;
-import java.security.cert.PKIXReason;
-import java.security.cert.TrustAnchor;
-import java.security.cert.X509Certificate;
-import java.security.cert.X509CertSelector;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.LinkedList;
-import java.util.Set;
-
-import javax.security.auth.x500.X500Principal;
-
-import sun.security.provider.certpath.PKIX.BuilderParams;
-import sun.security.util.Debug;
-import sun.security.x509.Extension;
-import static sun.security.x509.PKIXExtensions.*;
-import sun.security.x509.X500Name;
-import sun.security.x509.X509CertImpl;
-import sun.security.x509.PolicyMappingsExtension;
-
-/**
- * This class represents a reverse builder, which is able to retrieve
- * matching certificates from CertStores and verify a particular certificate
- * against a ReverseState.
- *
- * @since       1.4
- * @author      Sean Mullan
- * @author      Yassir Elley
- */
-
-class ReverseBuilder extends Builder {
-
-    private Debug debug = Debug.getInstance("certpath");
-
-    private final Set<String> initPolicies;
-
-    /**
-     * Initialize the builder with the input parameters.
-     *
-     * @param params the parameter set used to build a certification path
-     */
-    ReverseBuilder(BuilderParams buildParams) {
-        super(buildParams);
-
-        Set<String> initialPolicies = buildParams.initialPolicies();
-        initPolicies = new HashSet<String>();
-        if (initialPolicies.isEmpty()) {
-            // if no initialPolicies are specified by user, set
-            // initPolicies to be anyPolicy by default
-            initPolicies.add(PolicyChecker.ANY_POLICY);
-        } else {
-            initPolicies.addAll(initialPolicies);
-        }
-    }
-
-    /**
-     * Retrieves all certs from the specified CertStores that satisfy the
-     * requirements specified in the parameters and the current
-     * PKIX state (name constraints, policy constraints, etc).
-     *
-     * @param currentState the current state.
-     *        Must be an instance of <code>ReverseState</code>
-     * @param certStores list of CertStores
-     */
-    @Override
-    Collection<X509Certificate> getMatchingCerts
-        (State currState, List<CertStore> certStores)
-        throws CertStoreException, CertificateException, IOException
-    {
-        ReverseState currentState = (ReverseState) currState;
-
-        if (debug != null)
-            debug.println("In ReverseBuilder.getMatchingCerts.");
-
-        /*
-         * The last certificate could be an EE or a CA certificate
-         * (we may be building a partial certification path or
-         * establishing trust in a CA).
-         *
-         * Try the EE certs before the CA certs. It will be more
-         * common to build a path to an end entity.
-         */
-        Collection<X509Certificate> certs =
-            getMatchingEECerts(currentState, certStores);
-        certs.addAll(getMatchingCACerts(currentState, certStores));
-
-        return certs;
-    }
-
-    /*
-     * Retrieves all end-entity certificates which satisfy constraints
-     * and requirements specified in the parameters and PKIX state.
-     */
-    private Collection<X509Certificate> getMatchingEECerts
-        (ReverseState currentState, List<CertStore> certStores)
-        throws CertStoreException, CertificateException, IOException {
-
-        /*
-         * Compose a CertSelector to filter out
-         * certs which do not satisfy requirements.
-         *
-         * First, retrieve clone of current target cert constraints, and
-         * then add more selection criteria based on current validation state.
-         */
-        X509CertSelector sel = (X509CertSelector) targetCertConstraints.clone();
-
-        /*
-         * Match on issuer (subject of previous cert)
-         */
-        sel.setIssuer(currentState.subjectDN);
-
-        /*
-         * Match on certificate validity date.
-         */
-        sel.setCertificateValid(buildParams.date());
-
-        /*
-         * Policy processing optimizations
-         */
-        if (currentState.explicitPolicy == 0)
-            sel.setPolicy(getMatchingPolicies());
-
-        /*
-         * If previous cert has a subject key identifier extension,
-         * use it to match on authority key identifier extension.
-         */
-        /*if (currentState.subjKeyId != null) {
-          AuthorityKeyIdentifierExtension authKeyId = new AuthorityKeyIdentifierExtension(
-                (KeyIdentifier) currentState.subjKeyId.get(SubjectKeyIdentifierExtension.KEY_ID),
-                null, null);
-        sel.setAuthorityKeyIdentifier(authKeyId.getExtensionValue());
-        }*/
-
-        /*
-         * Require EE certs
-         */
-        sel.setBasicConstraints(-2);
-
-        /* Retrieve matching certs from CertStores */
-        HashSet<X509Certificate> eeCerts = new HashSet<>();
-        addMatchingCerts(sel, certStores, eeCerts, true);
-
-        if (debug != null) {
-            debug.println("ReverseBuilder.getMatchingEECerts got "
-                          + eeCerts.size() + " certs.");
-        }
-        return eeCerts;
-    }
-
-    /*
-     * Retrieves all CA certificates which satisfy constraints
-     * and requirements specified in the parameters and PKIX state.
-     */
-    private Collection<X509Certificate> getMatchingCACerts
-        (ReverseState currentState, List<CertStore> certStores)
-        throws CertificateException, CertStoreException, IOException {
-
-        /*
-         * Compose a CertSelector to filter out
-         * certs which do not satisfy requirements.
-         */
-        X509CertSelector sel = new X509CertSelector();
-
-        /*
-         * Match on issuer (subject of previous cert)
-         */
-        sel.setIssuer(currentState.subjectDN);
-
-        /*
-         * Match on certificate validity date.
-         */
-        sel.setCertificateValid(buildParams.date());
-
-        /*
-         * Match on target subject name (checks that current cert's
-         * name constraints permit it to certify target).
-         * (4 is the integer type for DIRECTORY name).
-         */
-        byte[] subject = targetCertConstraints.getSubjectAsBytes();
-        if (subject != null) {
-            sel.addPathToName(4, subject);
-        } else {
-            X509Certificate cert = targetCertConstraints.getCertificate();
-            if (cert != null) {
-                sel.addPathToName(4,
-                                  cert.getSubjectX500Principal().getEncoded());
-            }
-        }
-
-        /*
-         * Policy processing optimizations
-         */
-        if (currentState.explicitPolicy == 0)
-            sel.setPolicy(getMatchingPolicies());
-
-        /*
-         * If previous cert has a subject key identifier extension,
-         * use it to match on authority key identifier extension.
-         */
-        /*if (currentState.subjKeyId != null) {
-          AuthorityKeyIdentifierExtension authKeyId = new AuthorityKeyIdentifierExtension(
-                (KeyIdentifier) currentState.subjKeyId.get(SubjectKeyIdentifierExtension.KEY_ID),
-                                null, null);
-          sel.setAuthorityKeyIdentifier(authKeyId.getExtensionValue());
-        }*/
-
-        /*
-         * Require CA certs
-         */
-        sel.setBasicConstraints(0);
-
-        /* Retrieve matching certs from CertStores */
-        ArrayList<X509Certificate> reverseCerts = new ArrayList<>();
-        addMatchingCerts(sel, certStores, reverseCerts, true);
-
-        /* Sort remaining certs using name constraints */
-        Collections.sort(reverseCerts, new PKIXCertComparator());
-
-        if (debug != null)
-            debug.println("ReverseBuilder.getMatchingCACerts got " +
-                          reverseCerts.size() + " certs.");
-        return reverseCerts;
-    }
-
-    /*
-     * This inner class compares 2 PKIX certificates according to which
-     * should be tried first when building a path to the target. For
-     * now, the algorithm is to look at name constraints in each cert and those
-     * which constrain the path closer to the target should be
-     * ranked higher. Later, we may want to consider other components,
-     * such as key identifiers.
-     */
-    class PKIXCertComparator implements Comparator<X509Certificate> {
-
-        private Debug debug = Debug.getInstance("certpath");
-
-        @Override
-        public int compare(X509Certificate cert1, X509Certificate cert2) {
-
-            /*
-             * if either cert certifies the target, always
-             * put at head of list.
-             */
-            X500Principal targetSubject = buildParams.targetSubject();
-            if (cert1.getSubjectX500Principal().equals(targetSubject)) {
-                return -1;
-            }
-            if (cert2.getSubjectX500Principal().equals(targetSubject)) {
-                return 1;
-            }
-
-            int targetDist1;
-            int targetDist2;
-            try {
-                X500Name targetSubjectName = X500Name.asX500Name(targetSubject);
-                targetDist1 = Builder.targetDistance(
-                    null, cert1, targetSubjectName);
-                targetDist2 = Builder.targetDistance(
-                    null, cert2, targetSubjectName);
-            } catch (IOException e) {
-                if (debug != null) {
-                    debug.println("IOException in call to Builder.targetDistance");
-                    e.printStackTrace();
-                }
-                throw new ClassCastException
-                    ("Invalid target subject distinguished name");
-            }
-
-            if (targetDist1 == targetDist2)
-                return 0;
-
-            if (targetDist1 == -1)
-                return 1;
-
-            if (targetDist1 < targetDist2)
-                return -1;
-
-            return 1;
-        }
-    }
-
-    /**
-     * Verifies a matching certificate.
-     *
-     * This method executes any of the validation steps in the PKIX path validation
-     * algorithm which were not satisfied via filtering out non-compliant
-     * certificates with certificate matching rules.
-     *
-     * If the last certificate is being verified (the one whose subject
-     * matches the target subject, then the steps in Section 6.1.4 of the
-     * Certification Path Validation algorithm are NOT executed,
-     * regardless of whether or not the last cert is an end-entity
-     * cert or not. This allows callers to certify CA certs as
-     * well as EE certs.
-     *
-     * @param cert the certificate to be verified
-     * @param currentState the current state against which the cert is verified
-     * @param certPathList the certPathList generated thus far
-     */
-    @Override
-    void verifyCert(X509Certificate cert, State currState,
-        List<X509Certificate> certPathList)
-        throws GeneralSecurityException
-    {
-        if (debug != null) {
-            debug.println("ReverseBuilder.verifyCert(SN: "
-                + Debug.toHexString(cert.getSerialNumber())
-                + "\n  Subject: " + cert.getSubjectX500Principal() + ")");
-        }
-
-        ReverseState currentState = (ReverseState) currState;
-
-        /* we don't perform any validation of the trusted cert */
-        if (currentState.isInitial()) {
-            return;
-        }
-
-        // Don't bother to verify untrusted certificate more.
-        currentState.untrustedChecker.check(cert,
-                                    Collections.<String>emptySet());
-
-        /*
-         * check for looping - abort a loop if
-         * ((we encounter the same certificate twice) AND
-         * ((policyMappingInhibited = true) OR (no policy mapping
-         * extensions can be found between the occurrences of the same
-         * certificate)))
-         * in order to facilitate the check to see if there are
-         * any policy mapping extensions found between the occurrences
-         * of the same certificate, we reverse the certpathlist first
-         */
-        if ((certPathList != null) && (!certPathList.isEmpty())) {
-            List<X509Certificate> reverseCertList = new ArrayList<>();
-            for (X509Certificate c : certPathList) {
-                reverseCertList.add(0, c);
-            }
-
-            boolean policyMappingFound = false;
-            for (X509Certificate cpListCert : reverseCertList) {
-                X509CertImpl cpListCertImpl = X509CertImpl.toImpl(cpListCert);
-                PolicyMappingsExtension policyMappingsExt =
-                        cpListCertImpl.getPolicyMappingsExtension();
-                if (policyMappingsExt != null) {
-                    policyMappingFound = true;
-                }
-                if (debug != null)
-                    debug.println("policyMappingFound = " + policyMappingFound);
-                if (cert.equals(cpListCert)) {
-                    if ((buildParams.policyMappingInhibited()) ||
-                        (!policyMappingFound)){
-                        if (debug != null)
-                            debug.println("loop detected!!");
-                        throw new CertPathValidatorException("loop detected");
-                    }
-                }
-            }
-        }
-
-        /* check if target cert */
-        boolean finalCert = cert.getSubjectX500Principal().equals(buildParams.targetSubject());
-
-        /* check if CA cert */
-        boolean caCert = (cert.getBasicConstraints() != -1 ? true : false);
-
-        /* if there are more certs to follow, verify certain constraints */
-        if (!finalCert) {
-
-            /* check if CA cert */
-            if (!caCert)
-                throw new CertPathValidatorException("cert is NOT a CA cert");
-
-            /* If the certificate was not self-issued, verify that
-             * remainingCerts is greater than zero
-             */
-            if ((currentState.remainingCACerts <= 0) && !X509CertImpl.isSelfIssued(cert)) {
-                    throw new CertPathValidatorException
-                        ("pathLenConstraint violated, path too long", null,
-                         null, -1, PKIXReason.PATH_TOO_LONG);
-            }
-
-            /*
-             * Check keyUsage extension (only if CA cert and not final cert)
-             */
-            KeyChecker.verifyCAKeyUsage(cert);
-
-        } else {
-
-            /*
-             * If final cert, check that it satisfies specified target
-             * constraints
-             */
-            if (targetCertConstraints.match(cert) == false) {
-                throw new CertPathValidatorException("target certificate " +
-                    "constraints check failed");
-            }
-        }
-
-        /*
-         * Check revocation.
-         */
-        if (buildParams.revocationEnabled() && currentState.revChecker != null) {
-            currentState.revChecker.check(cert, Collections.<String>emptySet());
-        }
-
-        /* Check name constraints if this is not a self-issued cert */
-        if (finalCert || !X509CertImpl.isSelfIssued(cert)){
-            if (currentState.nc != null) {
-                try {
-                    if (!currentState.nc.verify(cert)){
-                        throw new CertPathValidatorException
-                            ("name constraints check failed", null, null, -1,
-                             PKIXReason.INVALID_NAME);
-                    }
-                } catch (IOException ioe) {
-                    throw new CertPathValidatorException(ioe);
-                }
-            }
-        }
-
-        /*
-         * Check policy
-         */
-        X509CertImpl certImpl = X509CertImpl.toImpl(cert);
-        currentState.rootNode = PolicyChecker.processPolicies
-            (currentState.certIndex, initPolicies,
-            currentState.explicitPolicy, currentState.policyMapping,
-            currentState.inhibitAnyPolicy,
-            buildParams.policyQualifiersRejected(), currentState.rootNode,
-            certImpl, finalCert);
-
-        /*
-         * Check CRITICAL private extensions
-         */
-        Set<String> unresolvedCritExts = cert.getCriticalExtensionOIDs();
-        if (unresolvedCritExts == null) {
-            unresolvedCritExts = Collections.<String>emptySet();
-        }
-
-        /*
-         * Check that the signature algorithm is not disabled.
-         */
-        currentState.algorithmChecker.check(cert, unresolvedCritExts);
-
-        for (PKIXCertPathChecker checker : currentState.userCheckers) {
-            checker.check(cert, unresolvedCritExts);
-        }
-
-        /*
-         * Look at the remaining extensions and remove any ones we have
-         * already checked. If there are any left, throw an exception!
-         */
-        if (!unresolvedCritExts.isEmpty()) {
-            unresolvedCritExts.remove(BasicConstraints_Id.toString());
-            unresolvedCritExts.remove(NameConstraints_Id.toString());
-            unresolvedCritExts.remove(CertificatePolicies_Id.toString());
-            unresolvedCritExts.remove(PolicyMappings_Id.toString());
-            unresolvedCritExts.remove(PolicyConstraints_Id.toString());
-            unresolvedCritExts.remove(InhibitAnyPolicy_Id.toString());
-            unresolvedCritExts.remove(SubjectAlternativeName_Id.toString());
-            unresolvedCritExts.remove(KeyUsage_Id.toString());
-            unresolvedCritExts.remove(ExtendedKeyUsage_Id.toString());
-
-            if (!unresolvedCritExts.isEmpty())
-                throw new CertPathValidatorException
-                    ("Unrecognized critical extension(s)", null, null, -1,
-                     PKIXReason.UNRECOGNIZED_CRIT_EXT);
-        }
-
-        /*
-         * Check signature.
-         */
-        if (buildParams.sigProvider() != null) {
-            cert.verify(currentState.pubKey, buildParams.sigProvider());
-        } else {
-            cert.verify(currentState.pubKey);
-        }
-    }
-
-    /**
-     * Verifies whether the input certificate completes the path.
-     * This checks whether the cert is the target certificate.
-     *
-     * @param cert the certificate to test
-     * @return a boolean value indicating whether the cert completes the path.
-     */
-    @Override
-    boolean isPathCompleted(X509Certificate cert) {
-        return cert.getSubjectX500Principal().equals(buildParams.targetSubject());
-    }
-
-    /** Adds the certificate to the certPathList
-     *
-     * @param cert the certificate to be added
-     * @param certPathList the certification path list
-     */
-    @Override
-    void addCertToPath(X509Certificate cert,
-        LinkedList<X509Certificate> certPathList) {
-        certPathList.addLast(cert);
-    }
-
-    /** Removes final certificate from the certPathList
-     *
-     * @param certPathList the certification path list
-     */
-    @Override
-    void removeFinalCertFromPath(LinkedList<X509Certificate> certPathList) {
-        certPathList.removeLast();
-    }
-}
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/ReverseState.java	Thu Apr 23 18:21:26 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,406 +0,0 @@
-/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.provider.certpath;
-
-import java.io.IOException;
-import java.security.PublicKey;
-import java.security.cert.CertificateException;
-import java.security.cert.CertPathValidatorException;
-import java.security.cert.PKIXCertPathChecker;
-import java.security.cert.PKIXRevocationChecker;
-import java.security.cert.TrustAnchor;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-import javax.security.auth.x500.X500Principal;
-
-import sun.security.provider.certpath.PKIX.BuilderParams;
-import sun.security.util.Debug;
-import sun.security.x509.NameConstraintsExtension;
-import sun.security.x509.SubjectKeyIdentifierExtension;
-import sun.security.x509.X509CertImpl;
-
-/**
- * A specification of a reverse PKIX validation state
- * which is initialized by each build and updated each time a
- * certificate is added to the current path.
- * @since       1.4
- * @author      Sean Mullan
- * @author      Yassir Elley
- */
-
-class ReverseState implements State {
-
-    private static final Debug debug = Debug.getInstance("certpath");
-
-    /* The subject DN of the last cert in the path */
-    X500Principal subjectDN;
-
-    /* The subject public key of the last cert */
-    PublicKey pubKey;
-
-    /* The subject key identifier extension (if any) of the last cert */
-    SubjectKeyIdentifierExtension subjKeyId;
-
-    /* The PKIX constrained/excluded subtrees state variable */
-    NameConstraintsExtension nc;
-
-    /* The PKIX explicit policy, policy mapping, and inhibit_any-policy
-       state variables */
-    int explicitPolicy;
-    int policyMapping;
-    int inhibitAnyPolicy;
-    int certIndex;
-    PolicyNodeImpl rootNode;
-
-    /* The number of remaining CA certs which may follow in the path.
-     * -1: previous cert was an EE cert
-     * 0: only EE certs may follow.
-     * >0 and <Integer.MAX_VALUE:no more than this number of CA certs may follow
-     * Integer.MAX_VALUE: unlimited
-     */
-    int remainingCACerts;
-
-    /* The list of user-defined checkers retrieved from the PKIXParameters
-     * instance */
-    ArrayList<PKIXCertPathChecker> userCheckers;
-
-    /* Flag indicating if state is initial (path is just starting) */
-    private boolean init = true;
-
-    /* the checker used for revocation status */
-    RevocationChecker revChecker;
-
-    /* the algorithm checker */
-    AlgorithmChecker algorithmChecker;
-
-    /* the untrusted certificates checker */
-    UntrustedChecker untrustedChecker;
-
-    /* the trust anchor used to validate the path */
-    TrustAnchor trustAnchor;
-
-    /* Flag indicating if current cert can vouch for the CRL for
-     * the next cert
-     */
-    boolean crlSign = true;
-
-    /**
-     * Returns a boolean flag indicating if the state is initial
-     * (just starting)
-     *
-     * @return boolean flag indicating if the state is initial (just starting)
-     */
-    @Override
-    public boolean isInitial() {
-        return init;
-    }
-
-    /**
-     * Display state for debugging purposes
-     */
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("State [");
-        sb.append("\n  subjectDN of last cert: ").append(subjectDN);
-        sb.append("\n  subjectKeyIdentifier: ").append
-                 (String.valueOf(subjKeyId));
-        sb.append("\n  nameConstraints: ").append(String.valueOf(nc));
-        sb.append("\n  certIndex: ").append(certIndex);
-        sb.append("\n  explicitPolicy: ").append(explicitPolicy);
-        sb.append("\n  policyMapping:  ").append(policyMapping);
-        sb.append("\n  inhibitAnyPolicy:  ").append(inhibitAnyPolicy);
-        sb.append("\n  rootNode: ").append(rootNode);
-        sb.append("\n  remainingCACerts: ").append(remainingCACerts);
-        sb.append("\n  crlSign: ").append(crlSign);
-        sb.append("\n  init: ").append(init);
-        sb.append("\n]\n");
-        return sb.toString();
-    }
-
-    /**
-     * Initialize the state.
-     *
-     * @param buildParams builder parameters
-     */
-    public void initState(BuilderParams buildParams)
-        throws CertPathValidatorException
-    {
-        /*
-         * Initialize number of remainingCACerts.
-         * Note that -1 maxPathLen implies unlimited.
-         * 0 implies only an EE cert is acceptable.
-         */
-        int maxPathLen = buildParams.maxPathLength();
-        remainingCACerts = (maxPathLen == -1) ? Integer.MAX_VALUE
-                                              : maxPathLen;
-
-        /* Initialize explicit policy state variable */
-        if (buildParams.explicitPolicyRequired()) {
-            explicitPolicy = 0;
-        } else {
-            // unconstrained if maxPathLen is -1,
-            // otherwise, we want to initialize this to the value of the
-            // longest possible path + 1 (i.e. maxpathlen + finalcert + 1)
-            explicitPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2;
-        }
-
-        /* Initialize policy mapping state variable */
-        if (buildParams.policyMappingInhibited()) {
-            policyMapping = 0;
-        } else {
-            policyMapping = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2;
-        }
-
-        /* Initialize inhibit any policy state variable */
-        if (buildParams.anyPolicyInhibited()) {
-            inhibitAnyPolicy = 0;
-        } else {
-            inhibitAnyPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2;
-        }
-
-        /* Initialize certIndex */
-        certIndex = 1;
-
-        /* Initialize policy tree */
-        Set<String> initExpPolSet = new HashSet<>(1);
-        initExpPolSet.add(PolicyChecker.ANY_POLICY);
-
-        rootNode = new PolicyNodeImpl(null, PolicyChecker.ANY_POLICY, null,
-                                      false, initExpPolSet, false);
-
-        /*
-         * Initialize each user-defined checker
-         * Shallow copy the checkers
-         */
-        userCheckers = new ArrayList<>(buildParams.certPathCheckers());
-        /* initialize each checker (just in case) */
-        for (PKIXCertPathChecker checker : userCheckers) {
-            checker.init(false);
-        }
-
-        /* Start by trusting the cert to sign CRLs */
-        crlSign = true;
-
-        init = true;
-    }
-
-    /**
-     * Update the state with the specified trust anchor.
-     *
-     * @param anchor the most-trusted CA
-     * @param buildParams builder parameters
-     */
-    public void updateState(TrustAnchor anchor, BuilderParams buildParams)
-        throws CertificateException, IOException, CertPathValidatorException
-    {
-        trustAnchor = anchor;
-        X509Certificate trustedCert = anchor.getTrustedCert();
-        if (trustedCert != null) {
-            updateState(trustedCert);
-        } else {
-            X500Principal caName = anchor.getCA();
-            updateState(anchor.getCAPublicKey(), caName);
-        }
-
-        // The user specified AlgorithmChecker and RevocationChecker may not be
-        // able to set the trust anchor until now.
-        boolean revCheckerAdded = false;
-        for (PKIXCertPathChecker checker : userCheckers) {
-            if (checker instanceof AlgorithmChecker) {
-                ((AlgorithmChecker)checker).trySetTrustAnchor(anchor);
-            } else if (checker instanceof PKIXRevocationChecker) {
-                if (revCheckerAdded) {
-                    throw new CertPathValidatorException(
-                        "Only one PKIXRevocationChecker can be specified");
-                }
-                // if it's our own, initialize it
-                if (checker instanceof RevocationChecker) {
-                    ((RevocationChecker)checker).init(anchor, buildParams);
-                }
-                ((PKIXRevocationChecker)checker).init(false);
-                revCheckerAdded = true;
-            }
-        }
-
-        // only create a RevocationChecker if revocation is enabled and
-        // a PKIXRevocationChecker has not already been added
-        if (buildParams.revocationEnabled() && !revCheckerAdded) {
-            revChecker = new RevocationChecker(anchor, buildParams);
-            revChecker.init(false);
-        }
-
-        init = false;
-    }
-
-    /**
-     * Update the state. This method is used when the most-trusted CA is
-     * a trusted public-key and caName, instead of a trusted cert.
-     *
-     * @param pubKey the public key of the trusted CA
-     * @param subjectDN the subject distinguished name of the trusted CA
-     */
-    private void updateState(PublicKey pubKey, X500Principal subjectDN) {
-
-        /* update subject DN */
-        this.subjectDN = subjectDN;
-
-        /* update subject public key */
-        this.pubKey = pubKey;
-    }
-
-    /**
-     * Update the state with the next certificate added to the path.
-     *
-     * @param cert the certificate which is used to update the state
-     */
-    public void updateState(X509Certificate cert)
-        throws CertificateException, IOException, CertPathValidatorException {
-
-        if (cert == null) {
-            return;
-        }
-
-        /* update subject DN */
-        subjectDN = cert.getSubjectX500Principal();
-
-        /* check for key needing to inherit alg parameters */
-        X509CertImpl icert = X509CertImpl.toImpl(cert);
-        PublicKey newKey = cert.getPublicKey();
-        if (PKIX.isDSAPublicKeyWithoutParams(newKey)) {
-            newKey = BasicChecker.makeInheritedParamsKey(newKey, pubKey);
-        }
-
-        /* update subject public key */
-        pubKey = newKey;
-
-        /*
-         * if this is a trusted cert (init == true), then we
-         * don't update any of the remaining fields
-         */
-        if (init) {
-            init = false;
-            return;
-        }
-
-        /* update subject key identifier */
-        subjKeyId = icert.getSubjectKeyIdentifierExtension();
-
-        /* update crlSign */
-        crlSign = RevocationChecker.certCanSignCrl(cert);
-
-        /* update current name constraints */
-        if (nc != null) {
-            nc.merge(icert.getNameConstraintsExtension());
-        } else {
-            nc = icert.getNameConstraintsExtension();
-            if (nc != null) {
-                // Make sure we do a clone here, because we're probably
-                // going to modify this object later and we don't want to
-                // be sharing it with a Certificate object!
-                nc = (NameConstraintsExtension) nc.clone();
-            }
-        }
-
-        /* update policy state variables */
-        explicitPolicy =
-            PolicyChecker.mergeExplicitPolicy(explicitPolicy, icert, false);
-        policyMapping =
-            PolicyChecker.mergePolicyMapping(policyMapping, icert);
-        inhibitAnyPolicy =
-            PolicyChecker.mergeInhibitAnyPolicy(inhibitAnyPolicy, icert);
-        certIndex++;
-
-        /*
-         * Update remaining CA certs
-         */
-        remainingCACerts =
-            ConstraintsChecker.mergeBasicConstraints(cert, remainingCACerts);
-
-        init = false;
-    }
-
-    /**
-     * Returns a boolean flag indicating if a key lacking necessary key
-     * algorithm parameters has been encountered.
-     *
-     * @return boolean flag indicating if key lacking parameters encountered.
-     */
-    @Override
-    public boolean keyParamsNeeded() {
-        /* when building in reverse, we immediately get parameters needed
-         * or else throw an exception
-         */
-        return false;
-    }
-
-    /*
-     * Clone current state. The state is cloned as each cert is
-     * added to the path. This is necessary if backtracking occurs,
-     * and a prior state needs to be restored.
-     *
-     * Note that this is a SMART clone. Not all fields are fully copied,
-     * because some of them (e.g., subjKeyId) will
-     * not have their contents modified by subsequent calls to updateState.
-     */
-    @Override
-    @SuppressWarnings("unchecked") // Safe casts assuming clone() works correctly
-    public Object clone() {
-        try {
-            ReverseState clonedState = (ReverseState) super.clone();
-
-            /* clone checkers, if cloneable */
-            clonedState.userCheckers =
-                        (ArrayList<PKIXCertPathChecker>)userCheckers.clone();
-            ListIterator<PKIXCertPathChecker> li =
-                        clonedState.userCheckers.listIterator();
-            while (li.hasNext()) {
-                PKIXCertPathChecker checker = li.next();
-                if (checker instanceof Cloneable) {
-                    li.set((PKIXCertPathChecker)checker.clone());
-                }
-            }
-
-            /* make copy of name constraints */
-            if (nc != null) {
-                clonedState.nc = (NameConstraintsExtension) nc.clone();
-            }
-
-            /* make copy of policy tree */
-            if (rootNode != null) {
-                clonedState.rootNode = rootNode.copyTree();
-            }
-
-            return clonedState;
-        } catch (CloneNotSupportedException e) {
-            throw new InternalError(e.toString(), e);
-        }
-    }
-}
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java	Wed Jul 05 20:30:08 2017 +0200
@@ -35,8 +35,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.LinkedList;
 import java.util.Set;
@@ -47,8 +45,7 @@
 import sun.security.util.Debug;
 
 /**
- * This class is able to build certification paths in either the forward
- * or reverse directions.
+ * This class builds certification paths in the forward direction.
  *
  * <p> If successful, it returns a certification path which has successfully
  * satisfied all the constraints and requirements specified in the
@@ -102,10 +99,8 @@
     /**
      * Attempts to build a certification path using the Sun build
      * algorithm from a trusted anchor(s) to a target subject, which must both
-     * be specified in the input parameter set. By default, this method will
-     * attempt to build in the forward direction. In order to build in the
-     * reverse direction, the caller needs to pass in an instance of
-     * SunCertPathBuilderParameters with the buildForward flag set to false.
+     * be specified in the input parameter set. This method will
+     * attempt to build in the forward direction: from the target to the CA.
      *
      * <p>The certification path that is constructed is validated
      * according to the PKIX specification.
@@ -162,11 +157,7 @@
         policyTreeResult = null;
         LinkedList<X509Certificate> certPathList = new LinkedList<>();
         try {
-            if (buildParams.buildForward()) {
-                buildForward(adjList, certPathList, searchAllCertStores);
-            } else {
-                buildReverse(adjList, certPathList);
-            }
+            buildForward(adjList, certPathList, searchAllCertStores);
         } catch (GeneralSecurityException | IOException e) {
             if (debug != null) {
                 debug.println("SunCertPathBuilder.engineBuild() exception in "
@@ -210,81 +201,6 @@
     }
 
     /*
-     * Private build reverse method.
-     */
-    private void buildReverse(List<List<Vertex>> adjacencyList,
-                              LinkedList<X509Certificate> certPathList)
-        throws GeneralSecurityException, IOException
-    {
-        if (debug != null) {
-            debug.println("SunCertPathBuilder.buildReverse()...");
-            debug.println("SunCertPathBuilder.buildReverse() InitialPolicies: "
-                + buildParams.initialPolicies());
-        }
-
-        ReverseState currentState = new ReverseState();
-        /* Initialize adjacency list */
-        adjacencyList.clear();
-        adjacencyList.add(new LinkedList<Vertex>());
-
-        /*
-         * Perform a search using each trust anchor, until a valid
-         * path is found
-         */
-        Iterator<TrustAnchor> iter = buildParams.trustAnchors().iterator();
-        while (iter.hasNext()) {
-            TrustAnchor anchor = iter.next();
-
-            /* check if anchor satisfies target constraints */
-            if (anchorIsTarget(anchor, buildParams.targetCertConstraints())) {
-                this.trustAnchor = anchor;
-                this.pathCompleted = true;
-                this.finalPublicKey = anchor.getTrustedCert().getPublicKey();
-                break;
-            }
-
-            // skip anchor if it contains a DSA key with no DSA params
-            X509Certificate trustedCert = anchor.getTrustedCert();
-            PublicKey pubKey = trustedCert != null ? trustedCert.getPublicKey()
-                                                   : anchor.getCAPublicKey();
-
-            if (PKIX.isDSAPublicKeyWithoutParams(pubKey)) {
-                continue;
-            }
-
-            /* Initialize current state */
-            currentState.initState(buildParams);
-            currentState.updateState(anchor, buildParams);
-
-            currentState.algorithmChecker = new AlgorithmChecker(anchor);
-            currentState.untrustedChecker = new UntrustedChecker();
-            try {
-                depthFirstSearchReverse(null, currentState,
-                                        new ReverseBuilder(buildParams),
-                                        adjacencyList, certPathList);
-            } catch (GeneralSecurityException | IOException e) {
-                // continue on error if more anchors to try
-                if (iter.hasNext())
-                    continue;
-                else
-                    throw e;
-            }
-
-            // break out of loop if search is successful
-            if (pathCompleted) {
-                break;
-            }
-        }
-
-        if (debug != null) {
-            debug.println("SunCertPathBuilder.buildReverse() returned from "
-                + "depthFirstSearchReverse()");
-            debug.println("SunCertPathBuilder.buildReverse() "
-                + "certPathList.size: " + certPathList.size());
-        }
-    }
-
-    /*
      * Private build forward method.
      */
     private void buildForward(List<List<Vertex>> adjacencyList,
@@ -632,147 +548,6 @@
     }
 
     /*
-     * This method performs a depth first search for a certification
-     * path while building reverse which meets the requirements set in
-     * the parameters object.
-     * It uses an adjacency list to store all certificates which were
-     * tried (i.e. at one time added to the path - they may not end up in
-     * the final path if backtracking occurs). This information can
-     * be used later to debug or demo the build.
-     *
-     * See "Data Structure and Algorithms, by Aho, Hopcroft, and Ullman"
-     * for an explanation of the DFS algorithm.
-     *
-     * @param dN the distinguished name being currently searched for certs
-     * @param currentState the current PKIX validation state
-     */
-    private void depthFirstSearchReverse(X500Principal dN,
-                                         ReverseState currentState,
-                                         ReverseBuilder builder,
-                                         List<List<Vertex>> adjList,
-                                         LinkedList<X509Certificate> cpList)
-        throws GeneralSecurityException, IOException
-    {
-        if (debug != null)
-            debug.println("SunCertPathBuilder.depthFirstSearchReverse(" + dN
-                + ", " + currentState.toString() + ")");
-
-        /*
-         * Find all the certificates issued by dN which
-         * satisfy the PKIX certification path constraints.
-         */
-        Collection<X509Certificate> certs =
-            builder.getMatchingCerts(currentState, buildParams.certStores());
-        List<Vertex> vertices = addVertices(certs, adjList);
-        if (debug != null)
-            debug.println("SunCertPathBuilder.depthFirstSearchReverse(): "
-                + "certs.size=" + vertices.size());
-
-        /*
-         * For each cert in the collection, verify anything
-         * that hasn't been checked yet (signature, revocation, etc)
-         * and check for loops. Call depthFirstSearchReverse()
-         * recursively for each good cert.
-         */
-        for (Vertex vertex : vertices) {
-            /**
-             * Restore state to currentState each time through the loop.
-             * This is important because some of the user-defined
-             * checkers modify the state, which MUST be restored if
-             * the cert eventually fails to lead to the target and
-             * the next matching cert is tried.
-             */
-            ReverseState nextState = (ReverseState) currentState.clone();
-            X509Certificate cert = vertex.getCertificate();
-            try {
-                builder.verifyCert(cert, nextState, cpList);
-            } catch (GeneralSecurityException gse) {
-                if (debug != null)
-                    debug.println("SunCertPathBuilder.depthFirstSearchReverse()"
-                        + ": validation failed: " + gse);
-                vertex.setThrowable(gse);
-                continue;
-            }
-
-            /*
-             * Certificate is good, add it to the path (if it isn't a
-             * self-signed cert) and update state
-             */
-            if (!currentState.isInitial())
-                builder.addCertToPath(cert, cpList);
-            // save trust anchor
-            this.trustAnchor = currentState.trustAnchor;
-
-            /*
-             * Check if path is completed, return ASAP if so.
-             */
-            if (builder.isPathCompleted(cert)) {
-                if (debug != null)
-                    debug.println("SunCertPathBuilder.depthFirstSearchReverse()"
-                        + ": path completed!");
-                pathCompleted = true;
-
-                PolicyNodeImpl rootNode = nextState.rootNode;
-
-                if (rootNode == null)
-                    policyTreeResult = null;
-                else {
-                    policyTreeResult = rootNode.copyTree();
-                    ((PolicyNodeImpl)policyTreeResult).setImmutable();
-                }
-
-                /*
-                 * Extract and save the final target public key
-                 */
-                finalPublicKey = cert.getPublicKey();
-                if (PKIX.isDSAPublicKeyWithoutParams(finalPublicKey)) {
-                    finalPublicKey =
-                        BasicChecker.makeInheritedParamsKey
-                            (finalPublicKey, currentState.pubKey);
-                }
-
-                return;
-            }
-
-            /* Update the PKIX state */
-            nextState.updateState(cert);
-
-            /*
-             * Append an entry for cert in adjacency list and
-             * set index for current vertex.
-             */
-            adjList.add(new LinkedList<Vertex>());
-            vertex.setIndex(adjList.size() - 1);
-
-            /* recursively search for matching certs at next dN */
-            depthFirstSearchReverse(cert.getSubjectX500Principal(), nextState,
-                                    builder, adjList, cpList);
-
-            /*
-             * If path has been completed, return ASAP!
-             */
-            if (pathCompleted) {
-                return;
-            } else {
-                /*
-                 * If we get here, it means we have searched all possible
-                 * certs issued by the dN w/o finding any matching certs. This
-                 * means we have to backtrack to the previous cert in the path
-                 * and try some other paths.
-                 */
-                if (debug != null)
-                    debug.println("SunCertPathBuilder.depthFirstSearchReverse()"
-                        + ": backtracking");
-                if (!currentState.isInitial())
-                    builder.removeFinalCertFromPath(cpList);
-            }
-        }
-        if (debug != null)
-            debug.println("SunCertPathBuilder.depthFirstSearchReverse() all "
-                + "certs in this adjacency list checked");
-    }
-
-    /*
      * Adds a collection of matching certificates to the
      * adjacency list.
      */
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilderParameters.java	Thu Apr 23 18:21:26 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.provider.certpath;
-
-import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.cert.*;
-import java.util.Set;
-
-/**
- * This class specifies the set of parameters used as input for the Sun
- * certification path build algorithm. It is identical to PKIXBuilderParameters
- * with the addition of a <code>buildForward</code> parameter which allows
- * the caller to specify whether or not the path should be constructed in
- * the forward direction.
- *
- * The default for the <code>buildForward</code> parameter is
- * true, which means that the build algorithm should construct paths
- * from the target subject back to the trusted anchor.
- *
- * @since       1.4
- * @author      Sean Mullan
- * @author      Yassir Elley
- */
-public class SunCertPathBuilderParameters extends PKIXBuilderParameters {
-
-    private boolean buildForward = true;
-
-    /**
-     * Creates an instance of <code>SunCertPathBuilderParameters</code> with the
-     * specified parameter values.
-     *
-     * @param trustAnchors a <code>Set</code> of <code>TrustAnchor</code>s
-     * @param targetConstraints a <code>CertSelector</code> specifying the
-     * constraints on the target certificate
-     * @throws InvalidAlgorithmParameterException if the specified
-     * <code>Set</code> is empty <code>(trustAnchors.isEmpty() == true)</code>
-     * @throws NullPointerException if the specified <code>Set</code> is
-     * <code>null</code>
-     * @throws ClassCastException if any of the elements in the <code>Set</code>
-     * are not of type <code>java.security.cert.TrustAnchor</code>
-     */
-    public SunCertPathBuilderParameters(Set<TrustAnchor> trustAnchors,
-        CertSelector targetConstraints) throws InvalidAlgorithmParameterException
-    {
-        super(trustAnchors, targetConstraints);
-        setBuildForward(true);
-    }
-
-    /**
-     * Creates an instance of <code>SunCertPathBuilderParameters</code> that
-     * uses the specified <code>KeyStore</code> to populate the set
-     * of most-trusted CA certificates.
-     *
-     * @param keystore A keystore from which the set of most-trusted
-     * CA certificates will be populated.
-     * @param targetConstraints a <code>CertSelector</code> specifying the
-     * constraints on the target certificate
-     * @throws KeyStoreException if the keystore has not been initialized.
-     * @throws InvalidAlgorithmParameterException if the keystore does
-     * not contain at least one trusted certificate entry
-     * @throws NullPointerException if the keystore is <code>null</code>
-     */
-    public SunCertPathBuilderParameters(KeyStore keystore,
-        CertSelector targetConstraints)
-        throws KeyStoreException, InvalidAlgorithmParameterException
-    {
-        super(keystore, targetConstraints);
-        setBuildForward(true);
-    }
-
-    /**
-     * Returns the value of the buildForward flag.
-     *
-     * @return the value of the buildForward flag
-     */
-    public boolean getBuildForward() {
-        return this.buildForward;
-    }
-
-    /**
-     * Sets the value of the buildForward flag. If true, paths
-     * are built from the target subject to the trusted anchor.
-     * If false, paths are built from the trusted anchor to the
-     * target subject. The default value if not specified is true.
-     *
-     * @param buildForward the value of the buildForward flag
-     */
-    public void setBuildForward(boolean buildForward) {
-        this.buildForward = buildForward;
-    }
-
-    /**
-     * Returns a formatted string describing the parameters.
-     *
-     * @return a formatted string describing the parameters.
-     */
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("[\n");
-        sb.append(super.toString());
-        sb.append("  Build Forward Flag: " + String.valueOf(buildForward) + "\n");
-        sb.append("]\n");
-        return sb.toString();
-    }
-}
--- a/jdk/src/java.base/share/classes/sun/util/PreHashedMap.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/PreHashedMap.java	Wed Jul 05 20:30:08 2017 +0200
@@ -166,14 +166,14 @@
     }
 
     public Set<String> keySet() {
-        return new AbstractSet<String> () {
+        return new AbstractSet<> () {
 
             public int size() {
                 return size;
             }
 
             public Iterator<String> iterator() {
-                return new Iterator<String>() {
+                return new Iterator<>() {
                     private int i = -1;
                     Object[] a = null;
                     String cur = null;
--- a/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Wed Jul 05 20:30:08 2017 +0200
@@ -161,7 +161,7 @@
     private static boolean loggingEnabled;
     static {
         loggingEnabled = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     String cname = System.getProperty("java.util.logging.config.class");
                     String fname = System.getProperty("java.util.logging.config.file");
--- a/jdk/src/java.base/share/classes/sun/util/resources/LocaleData.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/resources/LocaleData.java	Wed Jul 05 20:30:08 2017 +0200
@@ -159,7 +159,7 @@
     }
 
     public static ResourceBundle getBundle(final String baseName, final Locale locale) {
-        return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public ResourceBundle run() {
                 return ResourceBundle
@@ -169,7 +169,7 @@
     }
 
     private static OpenListResourceBundle getSupplementary(final String baseName, final Locale locale) {
-        return AccessController.doPrivileged(new PrivilegedAction<OpenListResourceBundle>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
            @Override
            public OpenListResourceBundle run() {
                OpenListResourceBundle rb = null;
--- a/jdk/src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java	Wed Jul 05 20:30:08 2017 +0200
@@ -213,7 +213,7 @@
             if (parent == null) {
                 return set.iterator();
             }
-            return new Iterator<String>() {
+            return new Iterator<>() {
                 private Iterator<String> itr = set.iterator();
                 private boolean usingParent;
 
--- a/jdk/src/java.base/unix/classes/java/lang/ProcessEnvironment.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/java/lang/ProcessEnvironment.java	Wed Jul 05 20:30:08 2017 +0200
@@ -99,7 +99,7 @@
 
     /* Only for use by Runtime.exec(...String[]envp...) */
     static Map<String,String> emptyEnvironment(int capacity) {
-        return new StringEnvironment(new HashMap<Variable,Value>(capacity));
+        return new StringEnvironment(new HashMap<>(capacity));
     }
 
     private static native byte[][] environ();
--- a/jdk/src/java.base/unix/classes/sun/net/PortConfig.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/net/PortConfig.java	Wed Jul 05 20:30:08 2017 +0200
@@ -42,7 +42,7 @@
 
     static {
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     String os = System.getProperty("os.name");
--- a/jdk/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -85,6 +85,15 @@
                     if (val.charAt(0) == '#' || val.charAt(0) == ';') {
                         break;
                     }
+                    if ("nameserver".equals(keyword)) {
+                        if (val.indexOf(':') >= 0 &&
+                            val.indexOf('.') < 0 && // skip for IPv4 literals with port
+                            val.indexOf('[') < 0 &&
+                            val.indexOf(']') < 0 ) {
+                            // IPv6 literal, in non-BSD-style.
+                            val = "[" + val + "]";
+                        }
+                    }
                     ll.add(val);
                     if (--maxvalues == 0) {
                         break;
@@ -122,7 +131,7 @@
         // get the name servers from /etc/resolv.conf
         nameservers =
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<LinkedList<String>>() {
+                new java.security.PrivilegedAction<>() {
                     public LinkedList<String> run() {
                         // typically MAXNS is 3 but we've picked 5 here
                         // to allow for additional servers if required.
@@ -147,7 +156,7 @@
         // first try the search keyword in /etc/resolv.conf
 
         sl = java.security.AccessController.doPrivileged(
-                 new java.security.PrivilegedAction<LinkedList<String>>() {
+                 new java.security.PrivilegedAction<>() {
                     public LinkedList<String> run() {
                         LinkedList<String> ll;
 
@@ -173,7 +182,7 @@
 
         String localDomain = localDomain0();
         if (localDomain != null && localDomain.length() > 0) {
-            sl = new LinkedList<String>();
+            sl = new LinkedList<>();
             sl.add(localDomain);
             return sl;
         }
@@ -181,7 +190,7 @@
         // try domain keyword in /etc/resolv.conf
 
         sl = java.security.AccessController.doPrivileged(
-                 new java.security.PrivilegedAction<LinkedList<String>>() {
+                 new java.security.PrivilegedAction<>() {
                     public LinkedList<String> run() {
                         LinkedList<String> ll;
 
@@ -251,7 +260,7 @@
 
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/jdk/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java	Wed Jul 05 20:30:08 2017 +0200
@@ -198,7 +198,7 @@
     {
         Scanner scanner = new Scanner(new File(file));
         try {
-            List<Rule> result = new ArrayList<Rule>();
+            List<Rule> result = new ArrayList<>();
             while (scanner.hasNextLine()) {
                 String line = scanner.nextLine().trim();
 
--- a/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Wed Jul 05 20:30:08 2017 +0200
@@ -95,7 +95,7 @@
     private void init0() {
 
         hostname = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<String>() {
+            new java.security.PrivilegedAction<>() {
             public String run() {
                 String localhost;
                 try {
--- a/jdk/src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Wed Jul 05 20:30:08 2017 +0200
@@ -216,7 +216,7 @@
         // permission check must always be in initiator's context
         try {
             if (acc != null) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         SecurityManager sm = System.getSecurityManager();
                         if (sm != null) {
@@ -287,7 +287,7 @@
                 synchronized (updateLock) {
                     if (handler == null) {
                         this.acceptHandler = null;
-                        result = new PendingFuture<AsynchronousSocketChannel,Object>(this);
+                        result = new PendingFuture<>(this);
                         this.acceptFuture = result;
                     } else {
                         this.acceptHandler = handler;
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Wed Jul 05 20:30:08 2017 +0200
@@ -93,7 +93,7 @@
     private static native byte[] probeUsingGnomeVfs(long pathAddress);
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Wed Jul 05 20:30:08 2017 +0200
@@ -106,7 +106,7 @@
             synchronized (this) {
                 if (!loaded) {
                     List<String> lines = AccessController.doPrivileged(
-                        new PrivilegedAction<List<String>>() {
+                        new PrivilegedAction<>() {
                             @Override
                             public List<String> run() {
                                 try {
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java	Wed Jul 05 20:30:08 2017 +0200
@@ -606,7 +606,7 @@
         throws UnixException;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 System.loadLibrary("nio");
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java	Wed Jul 05 20:30:08 2017 +0200
@@ -222,7 +222,7 @@
             synchronized (loadLock) {
                 if (props == null) {
                     props = AccessController.doPrivileged(
-                        new PrivilegedAction<Properties>() {
+                        new PrivilegedAction<>() {
                             @Override
                             public Properties run() {
                                 return loadProperties();
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java	Wed Jul 05 20:30:08 2017 +0200
@@ -152,7 +152,7 @@
     public final Iterable<Path> getRootDirectories() {
         final List<Path> allowedList =
            Collections.unmodifiableList(Arrays.asList((Path)rootDirectory));
-        return new Iterable<Path>() {
+        return new Iterable<>() {
             public Iterator<Path> iterator() {
                 try {
                     SecurityManager sm = System.getSecurityManager();
@@ -254,7 +254,7 @@
                 return Collections.emptyList();
             }
         }
-        return new Iterable<FileStore>() {
+        return new Iterable<>() {
             public Iterator<FileStore> iterator() {
                 return new FileStoreIterator();
             }
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java	Wed Jul 05 20:30:08 2017 +0200
@@ -568,7 +568,7 @@
 
     private static native int init();
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixPath.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixPath.java	Wed Jul 05 20:30:08 2017 +0200
@@ -121,7 +121,7 @@
             ce = Util.jnuEncoding().newEncoder()
                 .onMalformedInput(CodingErrorAction.REPORT)
                 .onUnmappableCharacter(CodingErrorAction.REPORT);
-            encoder.set(new SoftReference<CharsetEncoder>(ce));
+            encoder.set(new SoftReference<>(ce));
         }
 
         char[] ca = fs.normalizeNativePath(input.toCharArray());
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java	Wed Jul 05 20:30:08 2017 +0200
@@ -26,9 +26,6 @@
 package com.sun.jndi.ldap;
 
 import javax.naming.*;
-import javax.naming.directory.*;
-import javax.naming.spi.*;
-import java.net.URL;
 import java.net.MalformedURLException;
 import java.io.UnsupportedEncodingException;
 import java.util.StringTokenizer;
@@ -211,43 +208,52 @@
 
         // query begins with a '?' or is null
 
-        if (query == null) {
+        if (query == null || query.length() < 2) {
+            return;
+        }
+
+        int currentIndex = 1;
+        int nextQmark;
+        int endIndex;
+
+        // attributes:
+        nextQmark = query.indexOf('?', currentIndex);
+        endIndex = nextQmark == -1 ? query.length() : nextQmark;
+        if (endIndex - currentIndex > 0) {
+            attributes = query.substring(currentIndex, endIndex);
+        }
+        currentIndex = endIndex + 1;
+        if (currentIndex >= query.length()) {
             return;
         }
 
-        int qmark2 = query.indexOf('?', 1);
-
-        if (qmark2 < 0) {
-            attributes = query.substring(1);
+        // scope:
+        nextQmark = query.indexOf('?', currentIndex);
+        endIndex = nextQmark == -1 ? query.length() : nextQmark;
+        if (endIndex - currentIndex > 0) {
+            scope = query.substring(currentIndex, endIndex);
+        }
+        currentIndex = endIndex + 1;
+        if (currentIndex >= query.length()) {
             return;
-        } else if (qmark2 != 1) {
-            attributes = query.substring(1, qmark2);
         }
 
-        int qmark3 = query.indexOf('?', qmark2 + 1);
-
-        if (qmark3 < 0) {
-            scope = query.substring(qmark2 + 1);
+        // filter:
+        nextQmark = query.indexOf('?', currentIndex);
+        endIndex = nextQmark == -1 ? query.length() : nextQmark;
+        if (endIndex - currentIndex > 0) {
+            filter = query.substring(currentIndex, endIndex);
+            filter = UrlUtil.decode(filter, "UTF8");
+        }
+        currentIndex = endIndex + 1;
+        if (currentIndex >= query.length()) {
             return;
-        } else if (qmark3 != qmark2 + 1) {
-            scope = query.substring(qmark2 + 1, qmark3);
         }
 
-        int qmark4 = query.indexOf('?', qmark3 + 1);
-
-        if (qmark4 < 0) {
-            filter = query.substring(qmark3 + 1);
-        } else {
-            if (qmark4 != qmark3 + 1) {
-                filter = query.substring(qmark3 + 1, qmark4);
-            }
-            extensions = query.substring(qmark4 + 1);
-            if (extensions.length() > 0) {
-                extensions = UrlUtil.decode(extensions, "UTF8");
-            }
-        }
-        if (filter != null && filter.length() > 0) {
-            filter = UrlUtil.decode(filter, "UTF8");
+        // extensions:
+        if (query.length() - currentIndex > 0) {
+            extensions = query.substring(currentIndex);
+            extensions = UrlUtil.decode(extensions, "UTF8");
         }
     }
 
--- a/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/GSSCredential.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/GSSCredential.java	Wed Jul 05 20:30:08 2017 +0200
@@ -35,7 +35,7 @@
  * may be used to perform context initiation, acceptance, or both.<p>
  *
  * Credentials are instantiated using one of the
- * <code>createCredential</code> methods in the {@link GSSManager
+ * {@code createCredential} methods in the {@link GSSManager
  * GSSManager} class. GSS-API credential creation is not
  * intended to provide a "login to the network" function, as such a
  * function would involve the creation of new credentials rather than
@@ -75,7 +75,7 @@
  *
  *    Oid [] mechs = cred.getMechs();
  *    if (mechs != null) {
- *            for (int i = 0; i < mechs.length; i++)
+ *            for (int i = 0; i{@literal <} mechs.length; i++)
  *                    System.out.println(mechs[i].toString());
  *    }
  *
@@ -297,8 +297,8 @@
      * with a variety of clients using different security mechanisms.<p>
      *
      * This routine adds the new credential element "in-place".  To add the
-     * element in a new credential, first call <code>clone</code> to obtain a
-     * copy of this credential, then call its <code>add</code> method.<p>
+     * element in a new credential, first call {@code clone} to obtain a
+     * copy of this credential, then call its {@code add} method.<p>
      *
      * As always, GSS-API implementations must impose a local access-control
      * policy on callers to prevent unauthorized callers from acquiring
@@ -311,7 +311,7 @@
      * getRemainingAcceptLifetime} on the credential.
      *
      * @param name the name of the principal for whom this credential is to
-     * be acquired.  Use <code>null</code> to specify the default
+     * be acquired.  Use {@code null} to specify the default
      * principal.
      * @param initLifetime the number of seconds that the credential element
      * should remain valid for initiating of security contexts. Use {@link
@@ -354,8 +354,8 @@
      * object.  The two credentials must be acquired over the same
      * mechanisms and must refer to the same principal.
      *
-     * @return <code>true</code> if the two GSSCredentials assert the same
-     * entity; <code>false</code> otherwise.
+     * @return {@code true} if the two GSSCredentials assert the same
+     * entity; {@code false} otherwise.
      * @param another another GSSCredential for comparison to this one
      */
     public boolean equals(Object another);
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dom/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dom/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -44,11 +44,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/dom/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/dom/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -44,11 +44,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/keyinfo/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/keyinfo/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -55,11 +55,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -65,11 +65,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/spec/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/spec/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -49,11 +49,7 @@
 XPath Filter 2.0 Transform Algorithm: W3C Recommendation</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/package.html	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/javax/xml/crypto/package.html	Wed Jul 05 20:30:08 2017 +0200
@@ -42,11 +42,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/jdk/test/com/sun/jdi/JdbReadTwiceTest.sh	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/test/com/sun/jdi/JdbReadTwiceTest.sh	Wed Jul 05 20:30:08 2017 +0200
@@ -206,39 +206,6 @@
 
 echo
 echo "+++++++++++++++++++++++++++++++++++"
-echo "Read an unreadable file - verify the read fails."
-
-canMakeUnreadable=No
-id > $HOME/jdb.ini
-if chmod a-r $HOME/jdb.ini 
-then
-  grep -q 'uid=0(' $HOME/jdb.ini 2> /dev/null
-  case $? in
-    0)
-      echo "Error! Can't make file unreadable running as root"
-    ;;
-    1)
-      echo "Error! Can't make file unreadable for some other reason (windows?)"
-    ;;
-    *)
-      echo "OK. the file is unreadable"
-      canMakeUnreadable=Yes 
-    ;;
-   esac
-else    
-  echo "Error! Can't create or chmod file"
-fi  
-
-if [ "$canMakeUnreadable" = "Yes" ]
-then
-    doit
-    failIfNot 1 "open: $HOME/jdb.ini"
-fi
-clean
-
-
-echo
-echo "+++++++++++++++++++++++++++++++++++"
 echo "Read a directory - verify the read fails"
 # If the file (IE. directory) exists, we try to read it.  The
 # read will fail.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/jndi/dns/IPv6NameserverPlatformParsingTest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -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.lang.reflect.Field;
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.spi.NamingManager;
+
+import com.sun.jndi.dns.DnsContext;
+
+/**
+ * @test
+ * @bug 6991580
+ * @summary IPv6 Nameservers in resolv.conf throws NumberFormatException
+ * @run main/manual IPv6NameserverPlatformParsingTest
+ *
+ * In order to run this test be sure to place, for example, the following
+ * snippet into your platform's {@code /etc/resolv.conf}:
+ * <pre>
+ * nameserver 127.0.0.1
+ * nameserver 2001:4860:4860::8888
+ * nameserver [::1]:5353
+ * nameserver 127.0.0.1:5353
+ * </pre>
+ *
+ * Then, run this test as manual jtreg test.
+ *
+ * @author Severin Gehwolf
+ *
+ */
+public class IPv6NameserverPlatformParsingTest {
+
+    private static boolean foundIPv6 = false;
+
+    public static void main(String[] args) {
+        Hashtable<String, String> env = new Hashtable<>();
+        env.put(Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.dns.DnsContextFactory.class.getName());
+
+        String[] servers;
+        try {
+            Context ctx = NamingManager.getInitialContext(env);
+            if (!com.sun.jndi.dns.DnsContextFactory.platformServersAvailable()) {
+                throw new RuntimeException("FAIL: no platform servers available, test does not make sense");
+            }
+            DnsContext context = (DnsContext)ctx;
+            servers = getServersFromContext(context);
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+        for (String server: servers) {
+            System.out.println("DEBUG: 'nameserver = " + server + "'");
+            if (server.indexOf(':') >= 0 && server.indexOf('.') < 0) {
+                System.out.println("DEBUG: ==> Found IPv6 address in servers list: " + server);
+                foundIPv6 = true;
+            }
+        }
+        try {
+            new com.sun.jndi.dns.DnsClient(servers, 100, 1);
+        } catch (NumberFormatException e) {
+            throw new RuntimeException("FAIL: Tried to parse non-[]-encapsulated IPv6 address.", e);
+        } catch (Exception e) {
+            throw new RuntimeException("ERROR: Something unexpected happened.");
+        }
+        if (!foundIPv6) {
+            // This is a manual test, since it requires changing /etc/resolv.conf on Linux/Unix
+            // platforms. See comment as to how to run this test.
+            throw new RuntimeException("ERROR: No IPv6 address returned from platform.");
+        }
+        System.out.println("PASS: Found IPv6 address and DnsClient parsed it correctly.");
+    }
+
+    private static String[] getServersFromContext(DnsContext context) {
+        try {
+            Field serversField = DnsContext.class.getDeclaredField("servers");
+            serversField.setAccessible(true);
+            return (String[])serversField.get(context);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/jndi/ldap/LdapURLOptionalFields.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2015, Red Hat, Inc.
+ * 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 8074761
+ * @summary RFC-2255 allows attribute, scope and filter to be empty.
+ */
+
+import com.sun.jndi.ldap.LdapURL;
+
+public class LdapURLOptionalFields {
+
+    private static final String[] TEST_URLS = {
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com",
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com?",
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com??",
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com???",
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com????"
+    };
+
+    public static void main(String[] args) throws Exception {
+        for (int i = 0; i < TEST_URLS.length; i++) {
+            String url = TEST_URLS[i];
+            checkEmptyAttributes(url);
+        }
+    }
+
+    private static void checkEmptyAttributes(String urlString) throws Exception {
+        LdapURL url = new LdapURL(urlString);
+        if (url.getAttributes() != null) {
+            throw new Exception("Expected null attributes for url: '" + urlString + "'");
+        }
+        if (url.getScope() != null) {
+            throw new Exception("Expected null scope for url: '" + urlString + "'");
+        }
+        if (url.getFilter() != null) {
+            throw new Exception("Expected null filter for url: '" + urlString + "'");
+        }
+    }
+
+}
--- a/jdk/test/com/sun/security/auth/login/ConfigFile/InconsistentError.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/test/com/sun/security/auth/login/ConfigFile/InconsistentError.java	Wed Jul 05 20:30:08 2017 +0200
@@ -26,6 +26,7 @@
  * @bug 4406033
  * @summary     ConfigFile throws an inconsistent error message
  *              when the configuration file is not found
+ * @run main/othervm -Duser.language=en InconsistentError
  */
 
 import com.sun.security.auth.login.*;
--- a/jdk/test/com/sun/security/auth/module/KeyStoreLoginModule/OptionTest.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/test/com/sun/security/auth/module/KeyStoreLoginModule/OptionTest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -25,6 +25,7 @@
  * @test
  * @bug 4919147
  * @summary Support for token-based KeyStores
+ * @run main/othervm -Duser.language=en OptionTest
  */
 
 import java.io.File;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/URL/HandlersPkgPrefix/HandlersPkgPrefix.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,95 @@
+/*
+ * 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.net.MalformedURLException;
+import java.net.URL;
+import java.util.function.Consumer;
+
+/*
+ * @test
+ * @bug 8075139
+ * @summary Basic test for java.protocol.handler.pkgs
+ * @compile handlers/foo/Handler.java handlers/bar/Handler.java HandlersPkgPrefix.java
+ * @run main/othervm HandlersPkgPrefix
+ */
+
+public class HandlersPkgPrefix {
+    static final Consumer<Result> KNOWN = r -> {
+        if (r.exception != null)
+            throw new RuntimeException("Unexpected exception " + r.exception);
+        String p = r.url.getProtocol();
+        if (!r.protocol.equals(p))
+            throw new RuntimeException("Expected:" + r.protocol + ", got:" + p);
+    };
+    static final Consumer<Result> UNKNOWN = r -> {
+        if (r.url != null)
+            throw new RuntimeException("Unexpected url:" + r.url);
+        if (!(r.exception instanceof MalformedURLException))
+            throw new RuntimeException("Expected MalformedURLException, got:"
+                                       + r.exception);
+    };
+
+    public static void main(String[] args) {
+        withPrefix("unknown", "", UNKNOWN);
+        withPrefix("unknown", "handlers", UNKNOWN);
+
+        withPrefix("foo", "", UNKNOWN);
+        withPrefix("foo", "xxx|yyy|zzz", UNKNOWN);
+        withPrefix("foo", "||||", UNKNOWN);
+        withPrefix("foo", "|a|b|c|handlers", KNOWN);
+
+        withPrefix("bar", "", UNKNOWN);
+        withPrefix("bar", "x.y.z|y.y.y|z.z.z", UNKNOWN);
+        withPrefix("bar", " x.y.z | y.y.y | z.z.z| |  ", UNKNOWN);
+        withPrefix("bar", "| a | b | c | handlers | d | e", KNOWN);
+    }
+
+    static void withPrefix(String protocol, String pkgPrefix,
+                           Consumer<Result> resultChecker) {
+        System.out.println("Testing, " + protocol + ", " + pkgPrefix);
+
+        // The long standing implementation behavior is that the
+        // property is read multiple times, not cached.
+        System.setProperty("java.protocol.handler.pkgs", pkgPrefix);
+        URL url = null;
+        Exception exception = null;
+        try {
+            url = new URL(protocol + "://");
+        } catch (MalformedURLException x) {
+            exception = x;
+        }
+        resultChecker.accept(new Result(protocol, url, exception));
+    }
+
+    static class Result {
+        final String protocol;
+        final URL url;
+        final Exception exception;
+        Result(String protocol, URL url, Exception exception) {
+            this.protocol = protocol;
+            this.url = url;
+            this.exception = exception;
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/URL/HandlersPkgPrefix/handlers/bar/Handler.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+package handlers.bar;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+public class Handler extends URLStreamHandler {
+    @Override
+    protected URLConnection openConnection(URL u) throws IOException {
+        return null;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/URL/HandlersPkgPrefix/handlers/foo/Handler.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+package handlers.foo;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+public class Handler extends URLStreamHandler {
+    @Override
+    protected URLConnection openConnection(URL u) throws IOException {
+        return null;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/security/auth/login/LoginContext/CustomLoginModule.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,275 @@
+/*
+ * 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.IOException;
+import java.security.Principal;
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.Map;
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.ChoiceCallback;
+import javax.security.auth.callback.ConfirmationCallback;
+import javax.security.auth.callback.LanguageCallback;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.TextInputCallback;
+import javax.security.auth.callback.TextOutputCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.auth.login.FailedLoginException;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.spi.LoginModule;
+
+public class CustomLoginModule implements LoginModule {
+
+    static final String HELLO = "Hello";
+
+    private Subject subject;
+    private CallbackHandler callbackHandler;
+    private boolean loginSucceeded = false;
+    private String username;
+    private char[] password;
+
+    /*
+     * Initialize this LoginModule.
+     */
+    @Override
+    public void initialize(Subject subject, CallbackHandler callbackHandler,
+            Map<String, ?> sharedState, Map<String, ?> options) {
+        this.subject = subject;
+        this.callbackHandler = callbackHandler;
+
+        // check if custom parameter is passed from comfiguration
+        if (options == null) {
+            throw new RuntimeException("options is null");
+        }
+
+        // read username/password from configuration
+        Object o = options.get("username");
+        if (o == null) {
+            throw new RuntimeException("Custom parameter not passed");
+        }
+        if (!(o instanceof String)) {
+            throw new RuntimeException("Password is not a string");
+        }
+        username = (String) o;
+
+        o = options.get("password");
+        if (o == null) {
+            throw new RuntimeException("Custom parameter not passed");
+        }
+        if (!(o instanceof String)) {
+            throw new RuntimeException("Password is not a string");
+        }
+        password = ((String) o).toCharArray();
+    }
+
+    /*
+     * Authenticate the user.
+     */
+    @Override
+    public boolean login() throws LoginException {
+        // prompt for a user name and password
+        if (callbackHandler == null) {
+            throw new LoginException("No CallbackHandler available");
+        }
+
+        // standard callbacks
+        NameCallback name = new NameCallback("username: ", "default");
+        PasswordCallback passwd = new PasswordCallback("password: ", false);
+
+        LanguageCallback language = new LanguageCallback();
+
+        TextOutputCallback error = new TextOutputCallback(
+                TextOutputCallback.ERROR, "This is an error");
+        TextOutputCallback warning = new TextOutputCallback(
+                TextOutputCallback.WARNING, "This is a warning");
+        TextOutputCallback info = new TextOutputCallback(
+                TextOutputCallback.INFORMATION, "This is a FYI");
+
+        TextInputCallback text = new TextInputCallback("Please type " + HELLO,
+                "Bye");
+
+        ChoiceCallback choice = new ChoiceCallback("Choice: ",
+                new String[] { "pass", "fail" }, 1, true);
+
+        ConfirmationCallback confirmation = new ConfirmationCallback(
+                "confirmation: ", ConfirmationCallback.INFORMATION,
+                ConfirmationCallback.YES_NO_OPTION, ConfirmationCallback.NO);
+
+        CustomCallback custom = new CustomCallback();
+
+        Callback[] callbacks = new Callback[] {
+            choice, info, warning, error, name, passwd, text, language,
+            confirmation, custom
+        };
+
+        boolean uce = false;
+        try {
+            callbackHandler.handle(callbacks);
+        } catch (UnsupportedCallbackException e) {
+            Callback callback = e.getCallback();
+            if (custom.equals(callback)) {
+                uce = true;
+                System.out.println("CustomLoginModule: "
+                        + "custom callback not supported as expected");
+            } else {
+                throw new LoginException("Unsupported callback: " + callback);
+            }
+        } catch (IOException ioe) {
+            throw new LoginException(ioe.toString());
+        }
+
+        if (!uce) {
+            throw new RuntimeException("UnsupportedCallbackException "
+                    + "not thrown");
+        }
+
+        if (!HELLO.equals(text.getText())) {
+            System.out.println("Text: " + text.getText());
+            throw new FailedLoginException("No hello");
+        }
+
+        if (!Locale.GERMANY.equals(language.getLocale())) {
+            System.out.println("Selected locale: " + language.getLocale());
+            throw new FailedLoginException("Achtung bitte");
+        }
+
+        String readUsername = name.getName();
+        char[] readPassword = passwd.getPassword();
+        if (readPassword == null) {
+            // treat a NULL password as an empty password
+            readPassword = new char[0];
+        }
+        passwd.clearPassword();
+
+        // verify the username/password
+        if (!username.equals(readUsername)
+                || !Arrays.equals(password, readPassword)) {
+            loginSucceeded = false;
+            throw new FailedLoginException("Username/password is not correct");
+        }
+
+        // check chosen option
+        int[] selected = choice.getSelectedIndexes();
+        if (selected == null || selected.length == 0) {
+            throw new FailedLoginException("Nothing selected");
+        }
+
+        if (selected[0] != 0) {
+            throw new FailedLoginException("Wrong choice: " + selected[0]);
+        }
+
+        // check confirmation
+        if (confirmation.getSelectedIndex() != ConfirmationCallback.YES) {
+            throw new FailedLoginException("Not confirmed: "
+                    + confirmation.getSelectedIndex());
+        }
+
+        loginSucceeded = true;
+        System.out.println("CustomLoginModule: authentication succeeded");
+        return true;
+    }
+
+    /*
+     * This method is called if the LoginContext's overall authentication
+     * succeeded.
+     */
+    @Override
+    public boolean commit() throws LoginException {
+        if (loginSucceeded) {
+            // add a Principal to the Subject
+            Principal principal = new TestPrincipal(username);
+            if (!subject.getPrincipals().contains(principal)) {
+                subject.getPrincipals().add(principal);
+            }
+            return true;
+        }
+
+        return false;
+    }
+
+    /*
+     * This method is called if the LoginContext's overall authentication
+     * failed.
+     */
+    @Override
+    public boolean abort() throws LoginException {
+        loginSucceeded = false;
+        return true;
+    }
+
+    /*
+     * Logout the user.
+     */
+    @Override
+    public boolean logout() throws LoginException {
+        loginSucceeded = false;
+        boolean removed = subject.getPrincipals().remove(
+                new TestPrincipal(username));
+        if (!removed) {
+            throw new LoginException("Coundn't remove a principal: "
+                    + username);
+        }
+        return true;
+    }
+
+    static class TestPrincipal implements Principal {
+
+        private final String name;
+
+        public TestPrincipal(String name) {
+            this.name = name;
+        }
+
+        @Override
+        public String getName() {
+            return name;
+        }
+
+        @Override
+        public String toString() {
+            return("TestPrincipal [name =" + name + "]");
+        }
+
+        @Override
+        public int hashCode() {
+            return name.hashCode();
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (o == null) {
+                return false;
+            }
+            if (!(o instanceof TestPrincipal)) {
+                return false;
+            }
+            TestPrincipal other = (TestPrincipal) o;
+            return name != null ? name.equals(other.name) : other.name == null;
+        }
+    }
+
+    static class CustomCallback implements Callback {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/security/auth/login/LoginContext/SharedState.java	Wed Jul 05 20:30:08 2017 +0200
@@ -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.
+ */
+
+import java.util.Map;
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.spi.LoginModule;
+
+/**
+ * @test
+ * @bug 8048138
+ * @summary Check if shared state is passed to login module
+ * @run main/othervm SharedState
+ */
+public class SharedState {
+
+    static final String NAME = "name";
+    static final String VALUE = "shared";
+
+    public static void main(String[] args) throws LoginException {
+        System.setProperty("java.security.auth.login.config",
+                System.getProperty("test.src")
+                        + System.getProperty("file.separator")
+                        + "shared.config");
+
+        new LoginContext("SharedState").login();
+    }
+
+    public static abstract class Module implements LoginModule {
+
+        @Override
+        public boolean login() throws LoginException {
+            return true;
+        }
+
+        @Override
+        public boolean commit() throws LoginException {
+            return true;
+        }
+
+        @Override
+        public boolean abort() throws LoginException {
+            return true;
+        }
+
+        @Override
+        public boolean logout() throws LoginException {
+            return true;
+        }
+    }
+
+    public static class FirstModule extends Module {
+
+        @Override
+        public void initialize(Subject subject, CallbackHandler callbackHandler,
+                            Map<String,?> sharedState, Map<String,?> options) {
+            ((Map)sharedState).put(NAME, VALUE);
+        }
+
+    }
+
+    public static class SecondModule extends Module {
+
+        @Override
+        public void initialize(Subject subject, CallbackHandler callbackHandler,
+                            Map<String,?> sharedState, Map<String,?> options) {
+            // check shared object
+            Object shared = sharedState.get(NAME);
+            if (!VALUE.equals(shared)) {
+                throw new RuntimeException("Unexpected shared object: "
+                        + shared);
+            }
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/security/auth/login/LoginContext/StandardCallbacks.java	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,189 @@
+/*
+ * 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.security.Principal;
+import java.util.Arrays;
+import java.util.Locale;
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.ChoiceCallback;
+import javax.security.auth.callback.ConfirmationCallback;
+import javax.security.auth.callback.LanguageCallback;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.TextInputCallback;
+import javax.security.auth.callback.TextOutputCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+/*
+ * @test
+ * @bug 8048138
+ * @summary Checks if JAAS login works fine with standard callbacks
+ * @compile DefaultHandlerModule.java
+ * @run main/othervm StandardCallbacks
+ */
+public class StandardCallbacks {
+
+    private static final String USERNAME = "username";
+    private static final char[] PASSWORD = "password".toCharArray();
+
+    public static void main(String[] args) throws LoginException {
+        System.setProperty("java.security.auth.login.config",
+                System.getProperty("test.src")
+                        + System.getProperty("file.separator")
+                        + "custom.config");
+
+        CustomCallbackHandler handler = new CustomCallbackHandler(USERNAME);
+        LoginContext context = new LoginContext("StandardCallbacks", handler);
+
+        handler.setPassword(PASSWORD);
+        System.out.println("Try to login with correct password, "
+                + "successful authentication is expected");
+        context.login();
+        System.out.println("Authentication succeeded!");
+
+        Subject subject = context.getSubject();
+        System.out.println("Authenticated user has the following principals ["
+                + subject.getPrincipals().size() + " ]:");
+        boolean found = true;
+        for (Principal principal : subject.getPrincipals()) {
+            System.out.println("principal: " + principal);
+            if (principal instanceof CustomLoginModule.TestPrincipal) {
+                CustomLoginModule.TestPrincipal testPrincipal =
+                        (CustomLoginModule.TestPrincipal) principal;
+                if (USERNAME.equals(testPrincipal.getName())) {
+                    System.out.println("Found test principal: "
+                            + testPrincipal);
+                    found = true;
+                    break;
+                }
+            }
+        }
+
+        if (!found) {
+            throw new RuntimeException("TestPrincipal not found");
+        }
+
+        // check if all expected text output callbacks have been called
+        if (!handler.info) {
+            throw new RuntimeException("TextOutputCallback.INFO not called");
+        }
+
+        if (!handler.warning) {
+            throw new RuntimeException("TextOutputCallback.WARNING not called");
+        }
+
+        if (!handler.error) {
+            throw new RuntimeException("TextOutputCallback.ERROR not called");
+        }
+
+        System.out.println("Authenticated user has the following public "
+                + "credentials [" + subject.getPublicCredentials().size()
+                + "]:");
+        subject.getPublicCredentials().stream().
+                forEach((o) -> {
+                    System.out.println("public credential: " + o);
+        });
+
+        context.logout();
+
+        System.out.println("Test passed");
+    }
+
+    private static class CustomCallbackHandler implements CallbackHandler {
+
+        private final String username;
+        private char[] password;
+        private boolean info = false;
+        private boolean warning = false;
+        private boolean error = false;
+
+        CustomCallbackHandler(String username) {
+            this.username = username;
+        }
+
+        void setPassword(char[] password) {
+            this.password = password;
+        }
+
+        @Override
+        public void handle(Callback[] callbacks)
+                throws UnsupportedCallbackException {
+            for (Callback callback : callbacks) {
+                if (callback instanceof TextOutputCallback) {
+                    TextOutputCallback toc = (TextOutputCallback) callback;
+                    switch (toc.getMessageType()) {
+                        case TextOutputCallback.INFORMATION:
+                            System.out.println("INFO: " + toc.getMessage());
+                            info = true;
+                            break;
+                        case TextOutputCallback.ERROR:
+                            System.out.println("ERROR: " + toc.getMessage());
+                            error = true;
+                            break;
+                        case TextOutputCallback.WARNING:
+                            System.out.println("WARNING: " + toc.getMessage());
+                            warning = true;
+                            break;
+                        default:
+                            throw new UnsupportedCallbackException(toc,
+                                    "Unsupported message type: "
+                                            + toc.getMessageType());
+                    }
+                } else if (callback instanceof TextInputCallback) {
+                    TextInputCallback tic = (TextInputCallback) callback;
+                    System.out.println(tic.getPrompt());
+                    tic.setText(CustomLoginModule.HELLO);
+                } else if (callback instanceof LanguageCallback) {
+                    LanguageCallback lc = (LanguageCallback) callback;
+                    lc.setLocale(Locale.GERMANY);
+                } else if (callback instanceof ConfirmationCallback) {
+                    ConfirmationCallback cc = (ConfirmationCallback) callback;
+                    System.out.println(cc.getPrompt());
+                    cc.setSelectedIndex(ConfirmationCallback.YES);
+                } else if (callback instanceof ChoiceCallback) {
+                    ChoiceCallback cc = (ChoiceCallback) callback;
+                    System.out.println(cc.getPrompt()
+                            + Arrays.toString(cc.getChoices()));
+                    cc.setSelectedIndex(0);
+                } else if (callback instanceof NameCallback) {
+                    NameCallback nc = (NameCallback) callback;
+                    System.out.println(nc.getPrompt());
+                    nc.setName(username);
+                } else if (callback instanceof PasswordCallback) {
+                    PasswordCallback pc = (PasswordCallback) callback;
+                    System.out.println(pc.getPrompt());
+                    pc.setPassword(password);
+                } else {
+                    throw new UnsupportedCallbackException(callback,
+                            "Unknown callback");
+                }
+            }
+        }
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/security/auth/login/LoginContext/custom.config	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,4 @@
+StandardCallbacks {
+    DefaultHandlerModule required;
+    CustomLoginModule required username="username" password="password";
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/security/auth/login/LoginContext/shared.config	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,4 @@
+SharedState {
+    SharedState$FirstModule required;
+    SharedState$SecondModule required;
+};
\ No newline at end of file
--- a/jdk/test/javax/xml/ws/8046817/GenerateEnumSchema.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/test/javax/xml/ws/8046817/GenerateEnumSchema.java	Wed Jul 05 20:30:08 2017 +0200
@@ -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
@@ -23,57 +23,83 @@
 
 /*
  * @test
- * @bug 8046817
- * @summary schemagen fails to generate xsd for enum types
+ * @bug 8046817 8073357
+ * @summary schemagen fails to generate xsd for enum types.
+ * Check that order of Enum values is preserved.
  * @run main/othervm GenerateEnumSchema
  */
 import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.nio.file.Files;
 import java.nio.file.Paths;
-import java.util.Scanner;
+import java.util.stream.Collectors;
 
 public class GenerateEnumSchema {
 
     private static final String SCHEMA_OUTPUT_FILENAME = "schema1.xsd";
     private static final File schemaOutputFile = new File(SCHEMA_OUTPUT_FILENAME);
+    private static final String[] expectedEnums = {
+        "\"FIRST\"", "\"ONE\"", "\"TWO\"", "\"THREE\"",
+        "\"FOUR\"", "\"FIVE\"", "\"SIX\"", "\"LAST\""};
+    private static String schemaContent = "";
 
-    public static void main(String[] args) throws Exception, IOException {
+    public static void main(String[] args) throws Exception {
+
         //Check schema generation for class type
         runSchemaGen("TestClassType.java");
         checkIfSchemaGenerated();
+        readSchemaContent();
         checkSchemaContent("<xs:complexType name=\"testClassType\">");
         checkSchemaContent("<xs:element name=\"a\" type=\"xs:int\"/>");
-        schemaOutputFile.delete();
+
         //Check schema generation for enum type
         runSchemaGen("TestEnumType.java");
         checkIfSchemaGenerated();
+        readSchemaContent();
+        //Check if Enum type schema is generated
         checkSchemaContent("<xs:simpleType name=\"testEnumType\">");
-        checkSchemaContent("<xs:enumeration value=\"ONE\"/>");
-        checkSchemaContent("<xs:enumeration value=\"TWO\"/>");
-        checkSchemaContent("<xs:enumeration value=\"THREE\"/>");
+        //Check the sequence of enum values order
+        checkEnumOrder();
         schemaOutputFile.delete();
     }
 
+    // Check if schema file successfully generated by schemagen
     private static void checkIfSchemaGenerated() {
         if (!schemaOutputFile.exists()) {
             throw new RuntimeException("FAIL:" + SCHEMA_OUTPUT_FILENAME + " was not generated by schemagen tool");
         }
     }
 
-    private static void checkSchemaContent(String exp_token) throws FileNotFoundException {
-        System.out.print("Check if generated schema contains '" + exp_token + "' string: ");
-        try (Scanner scanner = new Scanner(schemaOutputFile)) {
-            if (scanner.findWithinHorizon(exp_token, 0) != null) {
-                System.out.println("OK");
-                return;
-            }
+    //Read schema content from file
+    private static void readSchemaContent() throws Exception {
+        schemaContent = Files.lines(schemaOutputFile.toPath()).collect(Collectors.joining(""));
+    }
+
+    // Check if schema file contains specific string
+    private static void checkSchemaContent(String expContent) {
+        System.out.print("Check if generated schema contains '" + expContent + "' string: ");
+        if (schemaContent.contains(expContent)) {
+            System.out.println("OK");
+            return;
         }
         System.out.println("FAIL");
-        throw new RuntimeException("The '" + exp_token + "' is not found in generated schema");
+        throw new RuntimeException("The '" + expContent + "' is not found in generated schema");
+    }
 
+    // Check if the generated schema contains all enum constants
+    // and their order is preserved
+    private static void checkEnumOrder() throws Exception {
+        int prevElem = -1;
+        for (String elem : expectedEnums) {
+            int curElem = schemaContent.indexOf(elem);
+            System.out.println(elem + " position = " + curElem);
+            if (curElem < prevElem) {
+                throw new RuntimeException("FAIL: Enum values order is incorrect or " + elem + " element is not found");
+            }
+            prevElem = curElem;
+        }
     }
 
     private static String getClassFilePath(String filename) {
--- a/jdk/test/javax/xml/ws/8046817/TestEnumType.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/test/javax/xml/ws/8046817/TestEnumType.java	Wed Jul 05 20:30:08 2017 +0200
@@ -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
@@ -25,5 +25,5 @@
 
 @XmlEnum(String.class)
 public enum TestEnumType {
-    ONE, TWO, THREE
+    FIRST, ONE, TWO, THREE, FOUR, FIVE, SIX, LAST
 }
--- a/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/test/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh	Wed Jul 05 20:30:08 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2004, 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
@@ -29,6 +29,7 @@
 # @library /lib/testlibrary
 # @build jdk.testlibrary.* TestLogger Utils RmiBootstrapTest
 # @run shell/timeout=300  RmiSslBootstrapTest.sh
+# @ignore 8077924
 
 # Define the Java class test name
 TESTCLASS="RmiBootstrapTest"
--- a/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,7 +45,7 @@
 public class CipherTest {
 
     // use any available port for the server socket
-    static int serverPort = 0;
+    static volatile int serverPort = 0;
 
     final int THREADS;
 
--- a/jdk/test/sun/security/pkcs11/sslecc/JSSEServer.java	Thu Apr 23 18:21:26 2015 -0700
+++ b/jdk/test/sun/security/pkcs11/sslecc/JSSEServer.java	Wed Jul 05 20:30:08 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@
         serverContext.init(new KeyManager[] {cipherTest.keyManager}, new TrustManager[] {cipherTest.trustManager}, cipherTest.secureRandom);
 
         SSLServerSocketFactory factory = (SSLServerSocketFactory)serverContext.getServerSocketFactory();
-        serverSocket = (SSLServerSocket)factory.createServerSocket(cipherTest.serverPort);
+        serverSocket = (SSLServerSocket)factory.createServerSocket(0);
         cipherTest.serverPort = serverSocket.getLocalPort();
         serverSocket.setEnabledCipherSuites(factory.getSupportedCipherSuites());
         serverSocket.setWantClientAuth(true);
--- a/jdk/test/sun/security/provider/certpath/ReverseBuilder/BuildPath.java	Thu Apr 23 18:21:26 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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 6511784
- * @summary Make sure that building a path to a CRL issuer works in the
- *          reverse direction
- * @library ../../../../../java/security/testlibrary
- * @build CertUtils
- * @run main BuildPath
- */
-import java.security.cert.*;
-import java.util.Collections;
-import sun.security.provider.certpath.SunCertPathBuilderParameters;
-
-public class BuildPath {
-
-    public static void main(String[] args) throws Exception {
-
-        TrustAnchor anchor =
-            new TrustAnchor(CertUtils.getCertFromFile("mgrM2mgrM"), null);
-        X509Certificate target = CertUtils.getCertFromFile("mgrM2leadMA");
-        X509CertSelector xcs = new X509CertSelector();
-        xcs.setSubject("CN=leadMA,CN=mgrM,OU=prjM,OU=divE,OU=Comp,O=sun,C=us");
-        xcs.setCertificate(target);
-        SunCertPathBuilderParameters params =
-            new SunCertPathBuilderParameters(Collections.singleton(anchor),xcs);
-        params.setBuildForward(false);
-        CertStore cs = CertUtils.createStore(new String[]
-            {"mgrM2prjM", "prjM2mgrM", "prjM2divE", "mgrM2leadMA" });
-        params.addCertStore(cs);
-        CertStore cs2 = CertUtils.createCRLStore
-            (new String[] {"mgrMcrl", "prjMcrl"});
-        params.addCertStore(cs2);
-        PKIXCertPathBuilderResult res = CertUtils.build(params);
-    }
-}
--- a/jdk/test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java	Thu Apr 23 18:21:26 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// Security properties, once set, cannot revert to unset.  To avoid
-// conflicts with tests running in the same VM isolate this test by
-// running it in otherVM mode.
-//
-
-/*
- * @test
- * @bug 7167988
- * @summary PKIX CertPathBuilder in reverse mode doesn't work if more than
- *          one trust anchor is specified
- * @run main/othervm ReverseBuild
- */
-import java.io.*;
-import java.util.*;
-import java.security.cert.*;
-import java.security.Security;
-
-import sun.security.provider.certpath.SunCertPathBuilderParameters;
-
-public class ReverseBuild {
-    // Certificate information:
-    // Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org
-    // Validity
-    //     Not Before: Dec  8 02:43:36 2008 GMT
-    //     Not After : Aug 25 02:43:36 2028 GMT
-    // Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org
-    // X509v3 Subject Key Identifier:
-    //     FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
-    // X509v3 Authority Key Identifier:
-    //     keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
-    //     DirName:/C=US/ST=Some-State/L=Some-City/O=Some-Org
-    //     serial:00
-    static String NoiceTrusedCertStr =
-        "-----BEGIN CERTIFICATE-----\n" +
-        "MIICrDCCAhWgAwIBAgIBADANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" +
-        "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" +
-        "EwhTb21lLU9yZzAeFw0wODEyMDgwMjQzMzZaFw0yODA4MjUwMjQzMzZaMEkxCzAJ\n" +
-        "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" +
-        "dHkxETAPBgNVBAoTCFNvbWUtT3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB\n" +
-        "gQDLxDggB76Ip5OwoUNRLdeOha9U3a2ieyNbz5kTU5lFfe5tui2/461uPZ8a+QOX\n" +
-        "4BdVrhEmV94BKY4FPyH35zboLjfXSKxT1mAOx1Bt9sWF94umxZE1cjyU7vEX8HHj\n" +
-        "7BvOyk5AQrBt7moO1uWtPA/JuoJPePiJl4kqlRJM2Akq6QIDAQABo4GjMIGgMB0G\n" +
-        "A1UdDgQWBBT6uVG/TOfZhpgz+efLHvEzSfeoFDBxBgNVHSMEajBogBT6uVG/TOfZ\n" +
-        "hpgz+efLHvEzSfeoFKFNpEswSTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUt\n" +
-        "U3RhdGUxEjAQBgNVBAcTCVNvbWUtQ2l0eTERMA8GA1UEChMIU29tZS1PcmeCAQAw\n" +
-        "DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBcIm534U123Hz+rtyYO5uA\n" +
-        "ofd81G6FnTfEAV8Kw9fGyyEbQZclBv34A9JsFKeMvU4OFIaixD7nLZ/NZ+IWbhmZ\n" +
-        "LovmJXyCkOufea73pNiZ+f/4/ScZaIlM/PRycQSqbFNd4j9Wott+08qxHPLpsf3P\n" +
-        "6Mvf0r1PNTY2hwTJLJmKtg==\n" +
-        "-----END CERTIFICATE-----";
-
-    // Certificate information:
-    // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce
-    // Validity
-    //     Not Before: Aug 19 01:52:19 2011 GMT
-    //     Not After : Jul 29 01:52:19 2032 GMT
-    // Subject: C=US, O=Java, OU=SunJSSE Test Serivce
-
-    // X509v3 Subject Key Identifier:
-    //     B9:7C:D5:D9:DF:A7:4C:03:AE:FD:0E:27:5B:31:95:6C:C7:F3:75:E1
-    // X509v3 Authority Key Identifier:
-    //     keyid:B9:7C:D5:D9:DF:A7:4C:03:AE:FD:0E:27:5B:31:95:6C:C7:F3:75:E1
-    //     DirName:/C=US/O=Java/OU=SunJSSE Test Serivce
-    //     serial:00
-    static String NoiceTrusedCertStr_2nd =
-        "-----BEGIN CERTIFICATE-----\n" +
-        "MIICkjCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" +
-        "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
-        "MTEwODE5MDE1MjE5WhcNMzIwNzI5MDE1MjE5WjA7MQswCQYDVQQGEwJVUzENMAsG\n" +
-        "A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwgZ8wDQYJ\n" +
-        "KoZIhvcNAQEBBQADgY0AMIGJAoGBAM8orG08DtF98TMSscjGsidd1ZoN4jiDpi8U\n" +
-        "ICz+9dMm1qM1d7O2T+KH3/mxyox7Rc2ZVSCaUD0a3CkhPMnlAx8V4u0H+E9sqso6\n" +
-        "iDW3JpOyzMExvZiRgRG/3nvp55RMIUV4vEHOZ1QbhuqG4ebN0Vz2DkRft7+flthf\n" +
-        "vDld6f5JAgMBAAGjgaUwgaIwHQYDVR0OBBYEFLl81dnfp0wDrv0OJ1sxlWzH83Xh\n" +
-        "MGMGA1UdIwRcMFqAFLl81dnfp0wDrv0OJ1sxlWzH83XhoT+kPTA7MQswCQYDVQQG\n" +
-        "EwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2\n" +
-        "Y2WCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEE\n" +
-        "BQADgYEALlgaH1gWtoBZ84EW8Hu6YtGLQ/L9zIFmHonUPZwn3Pr//icR9Sqhc3/l\n" +
-        "pVTxOINuFHLRz4BBtEylzRIOPzK3tg8XwuLb1zd0db90x3KBCiAL6E6cklGEPwLe\n" +
-        "XYMHDn9eDsaq861Tzn6ZwzMgw04zotPMoZN0mVd/3Qca8UJFucE=\n" +
-        "-----END CERTIFICATE-----";
-
-
-    // Certificate information:
-    // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce
-    // Validity
-    //     Not Before: May  5 02:40:50 2012 GMT
-    //     Not After : Apr 15 02:40:50 2033 GMT
-    // Subject: C=US, O=Java, OU=SunJSSE Test Serivce
-    // X509v3 Subject Key Identifier:
-    //     DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B
-    // X509v3 Authority Key Identifier:
-    //     keyid:DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B
-    //     DirName:/C=US/O=Java/OU=SunJSSE Test Serivce
-    //     serial:00
-    static String trustedCertStr =
-        "-----BEGIN CERTIFICATE-----\n" +
-        "MIICkjCCAfugAwIBAgIBADANBgkqhkiG9w0BAQIFADA7MQswCQYDVQQGEwJVUzEN\n" +
-        "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
-        "MTIwNTA1MDI0MDUwWhcNMzMwNDE1MDI0MDUwWjA7MQswCQYDVQQGEwJVUzENMAsG\n" +
-        "A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwgZ8wDQYJ\n" +
-        "KoZIhvcNAQEBBQADgY0AMIGJAoGBANtiq0AIJK+iVRwFrqcD7fYXTCbMYC5Qz/k6\n" +
-        "AXBy7/1rI8wDhEJLE3m/+NSqiJwZcmdq2dNh/1fJFrwvzuURbc9+paOBWeHbN+Sc\n" +
-        "x3huw91oPZme385VpoK3G13rSE114S/rF4DM9mz4EStFhSHXATjtdbskNOAYGLTV\n" +
-        "x8uEy9GbAgMBAAGjgaUwgaIwHQYDVR0OBBYEFN1OjSoRwIMD8Kzror/58n3IaR+b\n" +
-        "MGMGA1UdIwRcMFqAFN1OjSoRwIMD8Kzror/58n3IaR+boT+kPTA7MQswCQYDVQQG\n" +
-        "EwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2\n" +
-        "Y2WCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEC\n" +
-        "BQADgYEAjjkJesQrkbr36N40egybaIxw7RcqT6iy5fkAGS1JYlBDk8uSCK1o6bCH\n" +
-        "ls5EpYcGeEoabSS73WRdkO1lgeyWDduO4ef8cCCSpmpT6/YdZG0QS1PtcREeVig+\n" +
-        "Zr25jNemS4ADHX0aaXP4kiV/G80cR7nX5t5XCUm4bYdbwM07NgI=\n" +
-        "-----END CERTIFICATE-----";
-    static String trustedPrivateKey = // Private key in the format of PKCS#8
-        "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBANtiq0AIJK+iVRwF\n" +
-        "rqcD7fYXTCbMYC5Qz/k6AXBy7/1rI8wDhEJLE3m/+NSqiJwZcmdq2dNh/1fJFrwv\n" +
-        "zuURbc9+paOBWeHbN+Scx3huw91oPZme385VpoK3G13rSE114S/rF4DM9mz4EStF\n" +
-        "hSHXATjtdbskNOAYGLTVx8uEy9GbAgMBAAECgYEA2VjHkIiA0ABjkX+PqKeb+VLb\n" +
-        "fxS7tSca5C8zfdRhLxAWRui0/3ihst0eCJNrBDuxvAOACovsDWyLuaUjtI2v2ysz\n" +
-        "vz6SPyGy82PhQOFzyKQuQ814N6EpothpiZzF0yFchfKIGhUsdY89UrGs9nM7m6NT\n" +
-        "rztYvgIu4avg2VPR2AECQQD+pFAqipR2BplQRIuuRSZfHRxvoEyDjT1xnHJsC6WP\n" +
-        "I5hCLghL91MhQGWbP4EJMKYQOTRVukWlcp2Kycpf+P5hAkEA3I43gmVUAPEdyZdY\n" +
-        "fatW7OaLlbbYJb6qEtpCZ1Rwe/BIvm6H6E3qSi/lpz7Ia7WDulpbF6BawHH3pRFq\n" +
-        "CUY5ewJBAP3pUDqrRpBN0jB0uSeDslhjSciQ+dqvSpZv3rSYBHUvlBJhnkpJiy37\n" +
-        "7ZUZhIxqYxyIPgRBolLwb+FFh7OdL+ECQCtldDic9WVmC+VheRDpCKZ+SlK/8lGi\n" +
-        "7VXeShiIvcU1JysJFoa35fSI7hf1O3wt7+hX5PqGG7Un94EsJwACKEcCQQC1TWt6\n" +
-        "ArKH6tRxKjOxFtqfs8fgEVYUaOr3j1jF4KBUuX2mtQtddZe3VfJ2wPsuKMMxmhkB\n" +
-        "e7xWWZnJsErt2e+E";
-
-    // Certificate information:
-    // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce
-    // Validity
-    //     Not Before: May  5 02:40:53 2012 GMT
-    //     Not After : Jan 21 02:40:53 2032 GMT
-    // Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=casigner
-    // X509v3 Subject Key Identifier:
-    //     13:07:E0:11:07:DB:EB:33:23:87:31:D0:DB:7E:16:56:BE:11:90:0A
-    // X509v3 Authority Key Identifier:
-    //     keyid:DD:4E:8D:2A:11:C0:83:03:F0:AC:EB:A2:BF:F9:F2:7D:C8:69:1F:9B
-    //     DirName:/C=US/O=Java/OU=SunJSSE Test Serivce
-    //     serial:00
-    static String caSignerStr =
-        "-----BEGIN CERTIFICATE-----\n" +
-        "MIICqDCCAhGgAwIBAgIBAjANBgkqhkiG9w0BAQQFADA7MQswCQYDVQQGEwJVUzEN\n" +
-        "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UwHhcN\n" +
-        "MTIwNTA1MDI0MDUzWhcNMzIwMTIxMDI0MDUzWjBOMQswCQYDVQQGEwJVUzENMAsG\n" +
-        "A1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxETAPBgNV\n" +
-        "BAMTCGNhc2lnbmVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+x8+o7oM0\n" +
-        "ct/LZmZLXBL4CQ8jrULD5P7NtEW0hg/zxBFZfBHf+44Oo2eMPYZj+7xaREOH5BmV\n" +
-        "KRYlzRtONAaC5Ng4Mrm5UKNPcMIIUjUOvm7vWM4oSTMSfoEcSX+vp99uUAkw3w7Z\n" +
-        "+frYDm1M4At/j0b+lLij71GFN2L8drpgPQIDAQABo4GoMIGlMB0GA1UdDgQWBBQT\n" +
-        "B+ARB9vrMyOHMdDbfhZWvhGQCjBjBgNVHSMEXDBagBTdTo0qEcCDA/Cs66K/+fJ9\n" +
-        "yGkfm6E/pD0wOzELMAkGA1UEBhMCVVMxDTALBgNVBAoTBEphdmExHTAbBgNVBAsT\n" +
-        "FFN1bkpTU0UgVGVzdCBTZXJpdmNlggEAMBIGA1UdEwEB/wQIMAYBAf8CAQEwCwYD\n" +
-        "VR0PBAQDAgEGMA0GCSqGSIb3DQEBBAUAA4GBAI+LXA/UCPkTANablUkt80JNPWsl\n" +
-        "pS4XLNgPxWaN0bkRDs5oI4ooWAz1rwpeJ/nfetOvWlpmrVjSeovBFja5Hl+dUHTf\n" +
-        "VfuyzkxXbhuNiJIpo1mVBpNsjwu9YRxuwX6UA2LTUQpgvtVJEE012x3zRvxBCbu2\n" +
-        "Y/v1R5fZ4c+hXDfC\n" +
-        "-----END CERTIFICATE-----";
-    static String caSignerPrivateKey = // Private key in the format of PKCS#8
-        "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAL7Hz6jugzRy38tm\n" +
-        "ZktcEvgJDyOtQsPk/s20RbSGD/PEEVl8Ed/7jg6jZ4w9hmP7vFpEQ4fkGZUpFiXN\n" +
-        "G040BoLk2DgyublQo09wwghSNQ6+bu9YzihJMxJ+gRxJf6+n325QCTDfDtn5+tgO\n" +
-        "bUzgC3+PRv6UuKPvUYU3Yvx2umA9AgMBAAECgYBYvu30cW8LONyt62Zua9hPFTe7\n" +
-        "qt9B7QYyfkdmoG5PQMepTrOp84SzfoOukvgvDm0huFuJnSvhXQl2cCDhkgXskvFj\n" +
-        "Hh7KBCFViVXokGdq5YoS0/KYMyQV0TZfJUvILBl51uc4/siQ2tClC/N4sa+1JhgW\n" +
-        "a6dFGfRjiUKSSlmMwQJBAPWpIz3Q/c+DYMvoQr5OD8EaYwYIevlTdXb97RnJJh2b\n" +
-        "UnhB9jrqesJiHYVzPmP0ukyPOXOwlp2T5Am4Kw0LFOkCQQDGz150NoHOp28Mvyc4\n" +
-        "CTqz/zYzUhy2eCJESl196uyP4N65Y01VYQ3JDww4DlsXiU17tVSbgA9TCcfTYOzy\n" +
-        "vyw1AkARUky+1hafZCcWGZljK8PmnMKwsTZikCTvL/Zg5BMA8Wu+OQBwpQnk3OAy\n" +
-        "Aa87gw0DyvGFG8Vy9POWT9sRP1/JAkBqP0hrMvYMSs6+MSn0eHo2151PsAJIQcuO\n" +
-        "U2/Da1khSzu8N6WMi2GiobgV/RYRbf9KrY2ZzMZjykZQYOxAjopBAkEAghCu38cN\n" +
-        "aOsW6ueo24uzsWI1FTdE+qWNVEi3RSP120xXBCyhaBjIq4WVSlJK9K2aBaJpit3j\n" +
-        "iQ5tl6zrLlxQhg==";
-
-    // Certificate information:
-    // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce, CN=casigner
-    // Validity
-    //     Not Before: May  5 02:40:57 2012 GMT
-    //     Not After : Jan 21 02:40:57 2032 GMT
-    // Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=certissuer
-    // X509v3 Subject Key Identifier:
-    //     39:0E:C6:33:B1:50:BC:73:07:31:E5:D8:04:F7:BB:97:55:CF:9B:C8
-    // X509v3 Authority Key Identifier:
-    //     keyid:13:07:E0:11:07:DB:EB:33:23:87:31:D0:DB:7E:16:56:BE:11:90:0A
-    //     DirName:/C=US/O=Java/OU=SunJSSE Test Serivce
-    //     serial:02
-    static String certIssuerStr =
-        "-----BEGIN CERTIFICATE-----\n" +
-        "MIICvjCCAiegAwIBAgIBAzANBgkqhkiG9w0BAQQFADBOMQswCQYDVQQGEwJVUzEN\n" +
-        "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxETAP\n" +
-        "BgNVBAMTCGNhc2lnbmVyMB4XDTEyMDUwNTAyNDA1N1oXDTMyMDEyMTAyNDA1N1ow\n" +
-        "UDELMAkGA1UEBhMCVVMxDTALBgNVBAoTBEphdmExHTAbBgNVBAsTFFN1bkpTU0Ug\n" +
-        "VGVzdCBTZXJpdmNlMRMwEQYDVQQDEwpjZXJ0aXNzdWVyMIGfMA0GCSqGSIb3DQEB\n" +
-        "AQUAA4GNADCBiQKBgQCyz55zinU6kNL/LeiTNiBI0QWYmDG0YTotuC4D75liBNqs\n" +
-        "7Mmladsh2mTtQUAwmuGaGzaZV25a+cUax0DXZoyBwdbTI09u1bUYsZcaUUKbPoCC\n" +
-        "HH26e4jLFL4olW13Sv4ZAd57tIYevMw+Fp5f4fLPFGegCJTFlv2Qjpmic/cuvQID\n" +
-        "AQABo4GpMIGmMB0GA1UdDgQWBBQ5DsYzsVC8cwcx5dgE97uXVc+byDBjBgNVHSME\n" +
-        "XDBagBQTB+ARB9vrMyOHMdDbfhZWvhGQCqE/pD0wOzELMAkGA1UEBhMCVVMxDTAL\n" +
-        "BgNVBAoTBEphdmExHTAbBgNVBAsTFFN1bkpTU0UgVGVzdCBTZXJpdmNlggECMBMG\n" +
-        "A1UdEwEB/wQJMAcBAf8CAgQAMAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQQFAAOB\n" +
-        "gQCQTagenCdClT98C+oTJGJrw/dUBD9K3tE6ZJKPMc/2bUia8G5ei1C0eXj4mWG2\n" +
-        "lu9umR6C90/A6qB050QB2h50qtqxSrkpu+ym1yypauZpg7U3nUY9wZWJNI1vqrQZ\n" +
-        "pqUMRcXY3iQIVKx+Qj+4/Za1wwFQzpEoGmqRW31V1SdMEw==\n" +
-        "-----END CERTIFICATE-----";
-    static String certIssuerPrivateKey = // Private key in the format of PKCS#8
-        "MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBALLPnnOKdTqQ0v8t\n" +
-        "6JM2IEjRBZiYMbRhOi24LgPvmWIE2qzsyaVp2yHaZO1BQDCa4ZobNplXblr5xRrH\n" +
-        "QNdmjIHB1tMjT27VtRixlxpRQps+gIIcfbp7iMsUviiVbXdK/hkB3nu0hh68zD4W\n" +
-        "nl/h8s8UZ6AIlMWW/ZCOmaJz9y69AgMBAAECgYEAjtew2tgm4gxDojqIauF4VPM1\n" +
-        "pzsdqd1p3pAdomNLgrQiBLZ8N7oiph6TNb1EjA+OXc+ThFgF/oM9ZDD8qZZwcvjN\n" +
-        "qDZlpTkFs2TaGcyEZfUaMB45NHVs6Nn+pSkagSNwwy3xeyAct7sQEzGNTDlEwVv5\n" +
-        "7V9LQutQtBd6xT48KzkCQQDpNRfv2OFNG/6GtzJoO68oJhpnpl2MsYNi4ntRkre/\n" +
-        "6uXpiCYaDskcrPMRwOOs0m7mxG+Ev+uKnLnSoEMm1GCbAkEAxEmDtiD0Psb8Z9BL\n" +
-        "ZRb83Jqho3xe2MCAh3xUfz9b/Mhae9dZ44o4OCgQZuwvW1mczF0NtpgZl93BmYa2\n" +
-        "hTwHhwJBAKHrEj6ep/fA6x0gD2idoATRR94VfbiU+7NpqtO9ecVP0+gsdr/66hn1\n" +
-        "3yLBeZLh3MxvMTrLgkAQh1i9m0JXjOcCQQClLXAHHegrw+u3uNMZeKTFR+Lp3sk6\n" +
-        "AZSnbvr0Me9I45kxSeG81x3ENALJecvIRbrrRws5MvmmkNhQR8rkh8WVAkEAk6b+\n" +
-        "aVtmBgUaTS5+FFlHGHJY9HFrfT1a1C/dwyMuqlmbC3YsBmZaMOlKli5TXNybLff8\n" +
-        "5KMeGEpXMzgC7AscGA==";
-
-    // Certificate information:
-    // Issuer: C=US, O=Java, OU=SunJSSE Test Serivce, CN=certissuer
-    // Validity
-    //     Not Before: May  5 02:41:01 2012 GMT
-    //     Not After : Jan 21 02:41:01 2032 GMT
-    // Subject: C=US, O=Java, OU=SunJSSE Test Serivce, CN=localhost
-    // X509v3 Subject Key Identifier:
-    //     AD:C0:2C:4C:E4:C2:2E:A1:BB:5D:92:BE:66:E0:4E:E0:0D:2F:11:EF
-    // X509v3 Authority Key Identifier:
-    //     keyid:39:0E:C6:33:B1:50:BC:73:07:31:E5:D8:04:F7:BB:97:55:CF:9B:C8
-    static String targetCertStr =
-        "-----BEGIN CERTIFICATE-----\n" +
-        "MIICjTCCAfagAwIBAgIBBDANBgkqhkiG9w0BAQQFADBQMQswCQYDVQQGEwJVUzEN\n" +
-        "MAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNTRSBUZXN0IFNlcml2Y2UxEzAR\n" +
-        "BgNVBAMTCmNlcnRpc3N1ZXIwHhcNMTIwNTA1MDI0MTAxWhcNMzIwMTIxMDI0MTAx\n" +
-        "WjBPMQswCQYDVQQGEwJVUzENMAsGA1UEChMESmF2YTEdMBsGA1UECxMUU3VuSlNT\n" +
-        "RSBUZXN0IFNlcml2Y2UxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0B\n" +
-        "AQEFAAOBjQAwgYkCgYEAvwaUd7wmBSKqycEstYLWD26vkU08DM39EtaT8wL9HnQ0\n" +
-        "fgPblwBFI4zdLa2cuYXRZcFUb04N8nrkcpR0D6kkE+AlFAoRWrrZF80B7JTbtEK4\n" +
-        "1PIeurihXvUT+4MpzGLOojIihMfvM4ufelblD56SInso4WFHm7t4qCln88J1gjkC\n" +
-        "AwEAAaN4MHYwCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBStwCxM5MIuobtdkr5m4E7g\n" +
-        "DS8R7zAfBgNVHSMEGDAWgBQ5DsYzsVC8cwcx5dgE97uXVc+byDAnBgNVHSUEIDAe\n" +
-        "BggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDMA0GCSqGSIb3DQEBBAUAA4GB\n" +
-        "AGfwcfdvEG/nSCiAn2MGbYHp34mgF3OA1SJLWUW0LvWJhwm2cn4AXlSoyvbwrkaB\n" +
-        "IDDCwhJvvc0vUyL2kTx7sqVaFTq3mDs+ktlB/FfH0Pb+i8FE+g+7T42Iw/j0qxHL\n" +
-        "YmgbrjBQf5WYN1AvBE/rrPt9aOtS3UsqtVGW574b0shW\n" +
-        "-----END CERTIFICATE-----";
-    static String targetPrivateKey = // Private key in the format of PKCS#8
-        "MIICdAIBADANBgkqhkiG9w0BAQEFAASCAl4wggJaAgEAAoGBAL8GlHe8JgUiqsnB\n" +
-        "LLWC1g9ur5FNPAzN/RLWk/MC/R50NH4D25cARSOM3S2tnLmF0WXBVG9ODfJ65HKU\n" +
-        "dA+pJBPgJRQKEVq62RfNAeyU27RCuNTyHrq4oV71E/uDKcxizqIyIoTH7zOLn3pW\n" +
-        "5Q+ekiJ7KOFhR5u7eKgpZ/PCdYI5AgMBAAECf3CscOYvFD3zNMnMJ5LomVqA7w3F\n" +
-        "gKYM2jlCWAH+wU41PMEXhW6Lujw92jgXL1o+lERwxFzirVdZJWZwKgUSvzP1G0h3\n" +
-        "fkucq1/UWnToK+8NSXNM/yS8hXbBgSEoJo5f7LKcIi1Ev6doBVofMxs+njzyWKbM\n" +
-        "Nb7rOLHadghoon0CQQDgQzbzzSN8Dc1YmmylhI5v+0sQRHH0DL7D24k4Weh4vInG\n" +
-        "EAbt4x8M7ZKEo8/dv0s4hbmNmAnJl93/RRxIyEqLAkEA2g87DiswSQam2pZ8GlrO\n" +
-        "+w4Qg9mH8uxx8ou2rl0XlHzH1XiTNbkjfY0EZoL7L31BHFk9n11Fb2P85g6ws+Hy\n" +
-        "ywJAM/xgyLNM/nzUlS128geAXUULaYH0SHaL4isJ7B4rXZGW/mrIsGxtzjlkNYsj\n" +
-        "rGujrD6TfNc5rZmexIXowJZtcQJBAIww+pCzZ4mrgx5JXWQ8OZHiiu+ZrPOa2+9J\n" +
-        "r5sOMpi+WGN/73S8oHqZbNjTINZ5OqEVJq8MchWZPQBTNXuQql0CQHEjUzzkCQa3\n" +
-        "j6JTa2KAdqyvLOx0XF9zcc1gA069uNQI2gPUHS8V215z57f/gMGnDNhVfLs/vMKz\n" +
-        "sFkVZ3zg7As=";
-
-
-    public static void main(String args[]) throws Exception {
-        // MD5 is used in this test case, don't disable MD5 algorithm.
-        Security.setProperty(
-                "jdk.certpath.disabledAlgorithms", "MD2, RSA keySize < 1024");
-
-        // generate certificate from cert string
-        CertificateFactory cf = CertificateFactory.getInstance("X.509");
-
-        // create a set of trust anchors
-        LinkedHashSet<TrustAnchor> trustAnchors = new LinkedHashSet<>();
-
-        ByteArrayInputStream is =
-            new ByteArrayInputStream(NoiceTrusedCertStr.getBytes());
-        Certificate trustedCert = cf.generateCertificate(is);
-        is.close();
-        TrustAnchor anchor =
-            new TrustAnchor((X509Certificate)trustedCert, null);
-        trustAnchors.add(anchor);
-
-        is = new ByteArrayInputStream(trustedCertStr.getBytes());
-        trustedCert = cf.generateCertificate(is);
-        is.close();
-        anchor = new TrustAnchor((X509Certificate)trustedCert, null);
-        trustAnchors.add(anchor);
-
-        is = new ByteArrayInputStream(NoiceTrusedCertStr_2nd.getBytes());
-        trustedCert = cf.generateCertificate(is);
-        is.close();
-        anchor = new TrustAnchor((X509Certificate)trustedCert, null);
-        trustAnchors.add(anchor);
-
-        // create a list of certificates
-        List<Certificate> chainList = new ArrayList<>();
-
-        is = new ByteArrayInputStream(targetCertStr.getBytes());
-        Certificate cert = cf.generateCertificate(is);
-        is.close();
-        chainList.add(cert);
-
-        is = new ByteArrayInputStream(certIssuerStr.getBytes());
-        cert = cf.generateCertificate(is);
-        is.close();
-        chainList.add(cert);
-
-        is = new ByteArrayInputStream(caSignerStr.getBytes());
-        cert = cf.generateCertificate(is);
-        is.close();
-        chainList.add(cert);
-
-        // create a certificate selector
-        X509CertSelector xcs = new X509CertSelector();
-        X509Certificate eeCert = (X509Certificate)chainList.get(0);
-        xcs.setSubject(eeCert.getSubjectX500Principal());
-
-        // reverse build
-        SunCertPathBuilderParameters params =
-            new SunCertPathBuilderParameters(trustAnchors, xcs);
-        params.setBuildForward(false);
-        params.setRevocationEnabled(false);
-
-        CollectionCertStoreParameters ccsp =
-            new CollectionCertStoreParameters(chainList);
-        params.addCertStore(CertStore.getInstance("Collection", ccsp));
-
-        CertPathBuilder cpb = CertPathBuilder.getInstance("PKIX");
-        CertPathBuilderResult res = cpb.build(params);
-    }
-}
Binary file jdk/test/sun/security/provider/certpath/ReverseBuilder/mgrM2leadMA has changed
Binary file jdk/test/sun/security/provider/certpath/ReverseBuilder/mgrM2mgrM has changed
Binary file jdk/test/sun/security/provider/certpath/ReverseBuilder/mgrM2prjM has changed
Binary file jdk/test/sun/security/provider/certpath/ReverseBuilder/mgrMcrl has changed
Binary file jdk/test/sun/security/provider/certpath/ReverseBuilder/prjM2divE has changed
Binary file jdk/test/sun/security/provider/certpath/ReverseBuilder/prjM2mgrM has changed
Binary file jdk/test/sun/security/provider/certpath/ReverseBuilder/prjMcrl has changed
--- a/make/Images.gmk	Thu Apr 23 18:21:26 2015 -0700
+++ b/make/Images.gmk	Wed Jul 05 20:30:08 2017 +0200
@@ -38,7 +38,7 @@
 ############################################################################
 
 MAIN_MODULES += java.se java.smartcardio jdk.httpserver jdk.sctp \
-               jdk.security.auth jdk.security.jgss jdk.pack200
+               jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom
 
 # providers
 PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.localedata \
--- a/nashorn/.hgtags	Thu Apr 23 18:21:26 2015 -0700
+++ b/nashorn/.hgtags	Wed Jul 05 20:30:08 2017 +0200
@@ -294,3 +294,4 @@
 5096a7cca5f0fda814832ac777966bea893f837e jdk9-b58
 ea4e794c3927df4e03f53202e15a3248375b7902 jdk9-b59
 c55ce3738888b6c7596780b7b2ad1aa0f9ebccd7 jdk9-b60
+89937bee80bd28826de8cf60aa63a21edab63f79 jdk9-b61
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/clickcounter.fxml	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,65 @@
+<!-- simple self-contained .fxml file -->
+
+<!--
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<?import javafx.scene.*?>
+<?import javafx.scene.control.*?>
+<?import javafx.scene.layout.*?>
+<?language javascript?>
+
+<VBox xmlns:fx="http://javafx.com/fxml">
+    <!-- script to handle events -->
+
+    <fx:script>
+
+    // button click handler
+    var clickCount = 0;
+    function onButtonClick(event) {
+        // get another control via scene object
+        var scene = event.source.scene;
+        var textField = scene.lookup("#nameText");
+
+        print(textField.text + ", you clicked " + ++clickCount + " times!");
+    }
+
+    </fx:script>
+
+    <!-- GUI description -->
+    <children>
+    <HBox>
+        <Label text="Your name please:"/>
+        <TextField fx:id="nameText" text="Nashorn"/>
+    </HBox>
+    <Button text="Click!" onAction="onButtonClick(event)"/>
+    </children>
+</VBox>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/colorfulcircles.js	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Nashorn port of ColorfulCircles.java JavaFX animation example at
+// https://docs.oracle.com/javafx/2/get_started/ColorfulCircles.java.html
+// ColorfulCircles.java is under the following license terms:
+ 
+/*
+* Copyright (c) 2011, 2012 Oracle and/or its affiliates.
+* All rights reserved. Use is subject to license terms.
+*
+* This file is available and licensed under the following license:
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* - Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in
+* the documentation and/or other materials provided with the distribution.
+* - Neither the name of Oracle nor the names of its
+* contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+ 
+// Usage: jjs -fx colorfulcircles.fx
+ 
+// Porting note: No imports - just load these fx scripts!
+load("fx:controls.js");
+load("fx:graphics.js");
+ 
+// Porting note: whatever is inside
+// public void start(Stage primaryStage)
+// goes into "start" function
+ 
+function start(primaryStage) {
+    // Porting note: Replace types with 'var'. "Group root" becomes "var root".
+    // and so on..
+ 
+    var root = new Group();
+    var scene = new Scene(root, 800, 600, Color.BLACK);
+    primaryStage.setScene(scene);
+    var circles = new Group();
+    // Porting note: for (int i = 0....) becomes for (var i = 0...)
+ 
+    for (var i = 0; i < 30; i++) {
+        var circle = new Circle(150, Color.web("white", 0.05));
+        circle.setStrokeType(StrokeType.OUTSIDE);
+        circle.setStroke(Color.web("white", 0.16));
+        circle.setStrokeWidth(4);
+        circles.getChildren().add(circle);
+    }
+ 
+    // Porting note: There is no "f" suffix for float literals in JS.
+    // LinearGradient(0f, 1f, 1f, 0f,..) becomes just
+    // LinearGradient(0, 1, 1, 0,..)
+ 
+    // Porting note: LinearGradient's constructor is a varargs method
+    // No need to create Stop[] just pass more Stop objects at the end!
+    var colors = new Rectangle(scene.getWidth(), scene.getHeight(),
+       new LinearGradient(0, 1, 1, 0, true, CycleMethod.NO_CYCLE,
+       new Stop(0, Color.web("#f8bd55")),
+       new Stop(0.14, Color.web("#c0fe56")),
+       new Stop(0.28, Color.web("#5dfbc1")),
+       new Stop(0.43, Color.web("#64c2f8")),
+       new Stop(0.57, Color.web("#be4af7")),
+       new Stop(0.71, Color.web("#ed5fc2")),
+       new Stop(0.85, Color.web("#ef504c")),
+       new Stop(1, Color.web("#f2660f"))));
+    colors.widthProperty().bind(scene.widthProperty());
+    colors.heightProperty().bind(scene.heightProperty());
+    var blendModeGroup =
+       new Group(new Group(new Rectangle(scene.getWidth(), scene.getHeight(),
+         Color.BLACK), circles), colors);
+    colors.setBlendMode(BlendMode.OVERLAY);
+    root.getChildren().add(blendModeGroup);
+    circles.setEffect(new BoxBlur(10, 10, 3));
+ 
+    // Porting note: Java code uses static import of
+    // java.lang.Math.random. Just use JS Math.random here
+    var random = Math.random;
+ 
+    var timeline = new Timeline();
+    // Porting note: Java enhanced for loop
+    // for (Node circle : circles.getChildren())
+    // becomes
+    // for each (var circle: circles.getChildren())
+  
+    for each (var circle in circles.getChildren()) {
+        timeline.getKeyFrames().addAll(
+            new KeyFrame(Duration.ZERO, // set start position at 0
+            new KeyValue(circle.translateXProperty(), random() * 800),
+            new KeyValue(circle.translateYProperty(), random() * 600)),
+            new KeyFrame(new Duration(40000), // set end position at 40s
+            new KeyValue(circle.translateXProperty(), random() * 800),
+            new KeyValue(circle.translateYProperty(), random() * 600)));
+    }
+
+    // play 40s of animation
+    timeline.play();
+    primaryStage.show();
+} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/colorpick.js	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,52 @@
+#simple color picker example
+
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ 
+if (! $OPTIONS._fx) {
+    print("Usage: jjs -fx colorpick.js");
+    exit(1);
+}
+ 
+var ColorPicker = Java.type("javafx.scene.control.ColorPicker");
+var Scene = Java.type("javafx.scene.Scene");
+ 
+function start(stage) {
+    var picker = new ColorPicker();
+    // just print color details in stdout for fun!
+    picker.onAction = function(evt) {
+        var ld = Object.bindProperties({}, picker.value);
+        print(JSON.stringify(ld));
+    }
+    var scene = new Scene(picker, 200, 30);
+    stage.scene = scene;
+    stage.show();
+} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/datepick.js	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,51 @@
+#simple sample to use #javafx8 date picker with #nashorn
+
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+if (! $OPTIONS._fx) {
+    print("Usage: jjs -fx datepick.js");
+    exit(1);
+}
+
+load("fx:controls.js");
+
+function start(stage) {
+    var picker = new DatePicker();
+    picker.onAction = function(evt) {
+        var ld = Object.bindProperties({}, picker.value);
+        print(JSON.stringify(ld));
+    }
+
+    var scene = new Scene(picker, 100, 30);
+    stage.scene = scene;
+    stage.show();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/fjson.js	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Usage: jjs -scripting flexijson.js fjson.js
+
+var obj = FlexiJSON.parse(<<EOF
+// this is a comment
+{
+    foo: 23,
+    bar: [ 34, 454, 54,],
+    // inline comment here
+
+    /** multi line
+        comments are fine too! */
+
+    # shell style line comment is fine!
+
+    regex: /gdfg/i, // regexp literal
+
+    str: <<END
+Multiple line strings via nashorn 
+-scripting mode extension as well
+END
+}
+EOF)
+
+print(obj.foo);
+print(obj.bar);
+print(obj.regex);
+print(obj.str);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/flexijson.js	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Hjson - "the Human JSON - A configuration file format that 
+ * caters to humans and helps reduce the errors they make"
+ * See also: http://hjson.org/
+ *
+ * I wanted to see if we can use Nashorn Parser API (jdk9) to support
+ * similar flexible JSON extension with #nashorn. In this FlexiJSON.parse
+ * implementation, Nashorn Parser API is used to validate that the 
+ * extendable flexi JSON is "data only" (i.e., no executable code) and
+ * then 'eval'ed to make an object out of it.
+ *
+ * FlexiJSON allows the following:
+ *
+ *   * single and mutliple line comments anywhere
+ *   * non-quoted property names and values
+ *   * regexp literal values
+ *   * omitting trailing comma
+ *
+ * When nashorn -scripting mode is enabled, FlexiJSON supports these
+ * as well:
+ *
+ *   * shell style # comments
+ *   * multiple line (Unix heredoc style) string values
+ */
+
+"use strict";
+
+function FlexiJSON() {}
+
+// helper to locate Nashorn Parser API classes
+FlexiJSON.treeType = function(name) {
+    return Java.type("jdk.nashorn.api.tree." + name);
+}
+
+// Nashorn Parser API classes used
+FlexiJSON.ArrayLiteral = FlexiJSON.treeType("ArrayLiteralTree");
+FlexiJSON.ExpressionStatement = FlexiJSON.treeType("ExpressionStatementTree");
+FlexiJSON.ObjectLiteral = FlexiJSON.treeType("ObjectLiteralTree");
+FlexiJSON.RegExpLiteral = FlexiJSON.treeType("RegExpLiteralTree");
+FlexiJSON.Literal = FlexiJSON.treeType("LiteralTree");
+FlexiJSON.Parser = FlexiJSON.treeType("Parser");
+FlexiJSON.SimpleTreeVisitor = FlexiJSON.treeType("SimpleTreeVisitorES5_1");
+
+// FlexiJSON.parse API
+
+FlexiJSON.parse = function(str) {
+    var parser = (typeof $OPTIONS == "undefined")? 
+        FlexiJSON.Parser.create() :
+        FlexiJSON.Parser.create("-scripting");
+
+    // force the string to be an expression by putting it inside (, )
+    str = "(" + str + ")";
+    var ast = parser.parse("<flexijsondoc>", str, null);
+    // Should not happen. parse would have thrown syntax error
+    if (!ast) {
+        return undefined;
+    }
+
+    // allowed 'literal' values in flexi JSON
+    function isLiteral(node) {
+        return node instanceof FlexiJSON.ArrayLiteral ||
+            node instanceof FlexiJSON.Literal ||
+            node instanceof FlexiJSON.ObjectLiteral ||
+            node instanceof FlexiJSON.RegExpLiteral;
+    }
+
+    var visitor;
+    ast.accept(visitor = new (Java.extend(FlexiJSON.SimpleTreeVisitor)) {
+         lineMap: null,
+
+         throwError: function(msg, node) {
+             if (this.lineMap) {
+                 var pos = node.startPosition;
+                 var line = this.lineMap.getLineNumber(pos);
+                 var column = this.lineMap.getColumnNumber(pos);
+                 // we introduced extra '(' at start. So, adjust column number
+                 msg = msg + " @ " + line + ":" + (column - 1);
+             }
+             throw new TypeError(msg);
+         },
+
+         visitLiteral: function(node, extra) {
+             print(node.value);
+         },
+
+         visitExpressionStatement: function(node, extra) {
+             var expr = node.expression;
+             if (isLiteral(expr)) {
+                 expr.accept(visitor, extra);
+             } else {
+                 this.throwError("only literals can occur", expr);
+             }
+         },
+
+         visitArrayLiteral: function(node, extra) {
+             for each (var elem in node.elements) {
+                 if (isLiteral(elem)) {
+                     elem.accept(visitor, extra);
+                 } else {
+                     this.throwError("only literal array element value allowed", elem);
+                 }
+             }
+         },
+
+         visitObjectLiteral: function(node, extra) {
+             for each (var prop in node.properties) {
+                 if (prop.getter != null || prop.setter != null) {
+                     this.throwError("getter/setter property not allowed", node);
+                 }
+
+                 var value = prop.value;
+                 if (isLiteral(value)) {
+                     value.accept(visitor, extra);
+                 } else {
+                     this.throwError("only literal property value allowed", value);
+                 }
+             }
+         },
+
+         visitCompilationUnit: function(node, extra) {
+             this.lineMap = node.lineMap;
+             var elements = node.sourceElements;
+             if (elements.length > 1) {
+                 this.throwError("more than one top level expression", node.sourceElements[1]);
+             } 
+             var stat = node.sourceElements[0];
+             if (! (stat instanceof FlexiJSON.ExpressionStatement)) {
+                 this.throwError("only one top level expresion allowed", stat);
+             }
+             stat.accept(visitor, extra);
+         },
+    }, null);
+
+    // safe to eval given string as flexi JSON!
+    return eval(str);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/fxml_example.js	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,86 @@
+#Usage: jjs -fx fxml_example.js
+#nashorn simple example using FXML with #javafx
+
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ 
+// See also https://docs.oracle.com/javase/8/javafx/api/javafx/fxml/doc-files/introduction_to_fxml.html
+ 
+if (! $OPTIONS._fx) {
+    print("Usage: jjs -fx fxml_example.js");
+    exit(1);
+}
+ 
+// inline FXML document here
+var fxml = <<EOF
+ 
+<?import javafx.scene.*?>
+<?import javafx.scene.control.*?>
+<?import javafx.scene.layout.*?>
+ 
+<VBox xmlns:fx="http://javafx.com/fxml">
+    <children>
+    <!-- ids will be used script later -->
+    <HBox>
+        <Label text="Your name please:"/>
+        <TextField fx:id="nameText" text="Nashorn"/>
+    </HBox>
+    <Button fx:id="clickButton" text="Click!"/>
+    </children>
+</VBox>
+ 
+EOF
+ 
+// Java and FX classes used
+var ByteArrayInputStream = Java.type("java.io.ByteArrayInputStream");
+var FXMLLoader = Java.type("javafx.fxml.FXMLLoader");
+var Scene = Java.type("javafx.scene.Scene");
+ 
+function start(stage) {
+    var loader = new FXMLLoader();
+    // load FXML from a string
+    var root = loader.load(new ByteArrayInputStream(fxml.getBytes("UTF-8")));
+ 
+    // get the button and the text field controls
+    var button = root.lookup("#clickButton");
+    var textField = root.lookup("#nameText");
+ 
+    // event handler for button
+    var clickCount = 0;
+    button.onAction = function() {
+        print(textField.text + ", you clicked me: " + ++clickCount + " time(s)");
+    }
+ 
+    var scene = new Scene(root, 300, 275);
+    stage.title = "FXML Example";
+    stage.scene = scene;
+    stage.show();
+} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/fxmlrunner.js	Wed Jul 05 20:30:08 2017 +0200
@@ -0,0 +1,64 @@
+#Usage: jjs -fx fxmlrunner.js -- <.fxml file>
+
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ 
+// See also https://docs.oracle.com/javase/8/javafx/api/javafx/fxml/doc-files/introduction_to_fxml.html
+
+// Simple script to "run" a .FXML file specified in
+// command line. FXML file is expected to have inline
+// fx:script to handle GUI events. i.e., self-contained
+// FXML file is assumed.
+ 
+var file = arguments[0];
+var File = Java.type("java.io.File"); 
+if (!$OPTIONS._fx || !file || !new File(file).isFile()) {
+    print("Usage: jjs -fx fxmlrunner.js -- <.fxml file> [width] [height]");
+    exit(1);
+}
+
+// optional stage width and height from command line
+var width = arguments[1]? parseInt(arguments[1]) : 400;
+var height = arguments[2]? parseInt(arguments[2]) : 300;
+
+// JavaFX classes used
+var FXMLLoader = Java.type("javafx.fxml.FXMLLoader");
+var Scene = Java.type("javafx.scene.Scene");
+ 
+function start(stage) {
+    // load FXML
+    var root = FXMLLoader.load(new File(file).toURL());
+    // show it in a scene
+    var scene = new Scene(root, width, height);
+    stage.title = file;
+    stage.scene = scene;
+    stage.show();
+} 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8071928.js	Wed Jul 05 20:30:08 2017 +0200
@@ -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.
+ */
+
+/**
+ * JDK-8071928: Instance properties with getters returning wrong values
+ *
+ * @test
+ * @run
+ */
+
+
+var types = {};
+
+function Type() {}
+
+Type.prototype.getName = function() {
+    return this._name;
+};
+
+function defineType(init) {
+    return Object.create(Type.prototype, {
+        _name: { get: function() { return init.name; } }
+    });
+}
+
+types.A = defineType({ name: 'A' });
+types.B = defineType({ name: 'B' });
+types.C = defineType({ name: 'C' });
+types.D = defineType({ name: 'D' });
+
+var keys = Object.keys(types);
+for (var i = 0; i < keys.length; i++) {
+    var t = types[keys[i]];
+    if (t.getName() != keys[i]) {
+        throw 'wrong name for ' + keys[i] + ': ' + t.getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8073846.js	Wed Jul 05 20:30:08 2017 +0200
@@ -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.
+ */
+
+/**
+ * JDK-8073846: Javascript for-in loop returned extra keys
+ *
+ * @test
+ * @run
+ */
+
+var obj = {};
+
+var list = [
+    '2100000',
+    '420000',
+    '430000'
+];
+
+for (var i = 0; i < list.length; i++) {
+    if (obj[list[i]]) print("duplicate: " + list[i]);
+    obj[list[i]] = 'obj' + list[i]
+}
+
+var count = 0;
+for (var a in obj) {
+    count++;
+    if ('obj' + a !== obj[a]) {
+        throw 'wrong key or value: ' + a + ', ' + obj[a];
+    }
+}
+
+if (count !== 3) {
+    throw 'wrong entry count: ' + count;
+}