changeset 32159:d7ceb031217f

Merge
author duke
date Wed, 05 Jul 2017 20:45:41 +0200
parents 11ac73b4eea0 2f4e33b3de4e
children 9f31e37d6204
files
diffstat 312 files changed, 7473 insertions(+), 4521 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags-top-repo	Thu Aug 13 14:15:58 2015 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 20:45:41 2017 +0200
@@ -319,3 +319,4 @@
 57f3134853ecdd4a3ee2d4d26f22ba981d653d79 jdk9-b74
 8fd6eeb878606e39c908f12535f34ebbfd225a4a jdk9-b75
 d82072b699b880a1f647a5e2d7c0f86cec958941 jdk9-b76
+7972dc8f2a47f0c4cd8f02fa5662af41f028aa14 jdk9-b77
--- a/corba/.hgtags	Thu Aug 13 14:15:58 2015 -0700
+++ b/corba/.hgtags	Wed Jul 05 20:45:41 2017 +0200
@@ -319,3 +319,4 @@
 622fe934e351e89107edf3c667d6b57f543f58f1 jdk9-b74
 960b56805abd8460598897481820bd6a75f979e7 jdk9-b75
 d8126bc88fa5cd1ae4e44d86a4b1280ca1c9e2aa jdk9-b76
+8bb2441c0fec8b28f7bf11a0ca3ec1642e7ef457 jdk9-b77
--- a/hotspot/.hgtags	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/.hgtags	Wed Jul 05 20:45:41 2017 +0200
@@ -479,3 +479,4 @@
 fff6b54e9770ac4c12c2fb4cab5aa7672affa4bd jdk9-b74
 2f354281e9915275693c4e519a959b8a6f22d3a3 jdk9-b75
 0bc8d1656d6f2b1fdfe803c1305a108bb9939f35 jdk9-b76
+e66c3813789debfc06f206afde1bf7a84cb08451 jdk9-b77
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad	Wed Jul 05 20:45:41 2017 +0200
@@ -2389,9 +2389,11 @@
   // Note that the code buffer's insts_mark is always relative to insts.
   // That's why we must use the macroassembler to generate a handler.
   MacroAssembler _masm(&cbuf);
-  address base =
-  __ start_a_stub(size_exception_handler());
-  if (base == NULL)  return 0;  // CodeBuffer::expand failed
+  address base = __ start_a_stub(size_exception_handler());
+  if (base == NULL) {
+    ciEnv::current()->record_failure("CodeCache is full");
+    return 0;  // CodeBuffer::expand failed
+  }
   int offset = __ offset();
   __ far_jump(RuntimeAddress(OptoRuntime::exception_blob()->entry_point()));
   assert(__ offset() - offset <= (int) size_exception_handler(), "overflow");
@@ -2405,9 +2407,11 @@
   // Note that the code buffer's insts_mark is always relative to insts.
   // That's why we must use the macroassembler to generate a handler.
   MacroAssembler _masm(&cbuf);
-  address base =
-  __ start_a_stub(size_deopt_handler());
-  if (base == NULL)  return 0;  // CodeBuffer::expand failed
+  address base = __ start_a_stub(size_deopt_handler());
+  if (base == NULL) {
+    ciEnv::current()->record_failure("CodeCache is full");
+    return 0;  // CodeBuffer::expand failed
+  }
   int offset = __ offset();
 
   __ adr(lr, __ pc());
@@ -3657,24 +3661,37 @@
     MacroAssembler _masm(&cbuf);
 
     address addr = (address)$meth$$method;
+    address call;
     if (!_method) {
       // A call to a runtime wrapper, e.g. new, new_typeArray_Java, uncommon_trap.
-      __ trampoline_call(Address(addr, relocInfo::runtime_call_type), &cbuf);
+      call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type), &cbuf);
     } else if (_optimized_virtual) {
-      __ trampoline_call(Address(addr, relocInfo::opt_virtual_call_type), &cbuf);
+      call = __ trampoline_call(Address(addr, relocInfo::opt_virtual_call_type), &cbuf);
     } else {
-      __ trampoline_call(Address(addr, relocInfo::static_call_type), &cbuf);
+      call = __ trampoline_call(Address(addr, relocInfo::static_call_type), &cbuf);
+    }
+    if (call == NULL) {
+      ciEnv::current()->record_failure("CodeCache is full"); 
+      return;
     }
 
     if (_method) {
       // Emit stub for static call
-      CompiledStaticCall::emit_to_interp_stub(cbuf);
+      address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
+      if (stub == NULL) {
+        ciEnv::current()->record_failure("CodeCache is full"); 
+        return;
+      }
     }
   %}
 
   enc_class aarch64_enc_java_dynamic_call(method meth) %{
     MacroAssembler _masm(&cbuf);
-    __ ic_call((address)$meth$$method);
+    address call = __ ic_call((address)$meth$$method);
+    if (call == NULL) {
+      ciEnv::current()->record_failure("CodeCache is full"); 
+      return;
+    }
   %}
 
   enc_class aarch64_enc_call_epilog() %{
@@ -3695,7 +3712,11 @@
     address entry = (address)$meth$$method;
     CodeBlob *cb = CodeCache::find_blob(entry);
     if (cb) {
-      __ trampoline_call(Address(entry, relocInfo::runtime_call_type));
+      address call = __ trampoline_call(Address(entry, relocInfo::runtime_call_type));
+      if (call == NULL) {
+        ciEnv::current()->record_failure("CodeCache is full"); 
+        return;
+      }
     } else {
       int gpcnt;
       int fpcnt;
--- a/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -327,9 +327,16 @@
   ce->align_call(lir_static_call);
 
   ce->emit_static_call_stub();
+  if (ce->compilation()->bailed_out()) {
+    return; // CodeCache is full
+  }
   Address resolve(SharedRuntime::get_resolve_static_call_stub(),
                   relocInfo::static_call_type);
-  __ trampoline_call(resolve);
+  address call = __ trampoline_call(resolve);
+  if (call == NULL) {
+    ce->bailout("trampoline stub overflow");
+    return;
+  }
   ce->add_call_info_here(info());
 
 #ifndef PRODUCT
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1996,13 +1996,21 @@
 
 
 void LIR_Assembler::call(LIR_OpJavaCall* op, relocInfo::relocType rtype) {
-  __ trampoline_call(Address(op->addr(), rtype));
+  address call = __ trampoline_call(Address(op->addr(), rtype));
+  if (call == NULL) {
+    bailout("trampoline stub overflow");
+    return;
+  }
   add_call_info(code_offset(), op->info());
 }
 
 
 void LIR_Assembler::ic_call(LIR_OpJavaCall* op) {
-  __ ic_call(op->addr());
+  address call = __ ic_call(op->addr());
+  if (call == NULL) {
+    bailout("trampoline stub overflow");
+    return;
+  }
   add_call_info(code_offset(), op->info());
 }
 
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -26,6 +26,9 @@
 #ifndef CPU_X86_VM_C1_LIRASSEMBLER_X86_HPP
 #define CPU_X86_VM_C1_LIRASSEMBLER_X86_HPP
 
+// ArrayCopyStub needs access to bailout
+friend class ArrayCopyStub;
+
  private:
 
   int array_element_size(BasicType type) const;
--- a/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -51,7 +51,7 @@
 // ----------------------------------------------------------------------------
 
 #define __ _masm.
-void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
+address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
   // Stub is fixed up when the corresponding call is converted from
   // calling compiled code to calling interpreted code.
   // mov rmethod, 0
@@ -63,10 +63,11 @@
   // That's why we must use the macroassembler to generate a stub.
   MacroAssembler _masm(&cbuf);
 
-  address base = __ start_a_stub(to_interp_stub_size()*2);
-
+  address base = __ start_a_stub(to_interp_stub_size());
   int offset = __ offset();
-  if (base == NULL)  return;  // CodeBuffer::expand failed
+  if (base == NULL) {
+    return NULL;  // CodeBuffer::expand failed
+  }
   // static stub relocation stores the instruction address of the call
   __ relocate(static_stub_Relocation::spec(mark));
   // static stub relocation also tags the Method* in the code-stream.
@@ -76,6 +77,7 @@
 
   assert((__ offset() - offset) <= (int)to_interp_stub_size(), "stub too big");
   __ end_a_stub();
+  return base;
 }
 #undef __
 
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -664,7 +664,7 @@
 // Maybe emit a call via a trampoline.  If the code cache is small
 // trampolines won't be emitted.
 
-void MacroAssembler::trampoline_call(Address entry, CodeBuffer *cbuf) {
+address MacroAssembler::trampoline_call(Address entry, CodeBuffer *cbuf) {
   assert(entry.rspec().type() == relocInfo::runtime_call_type
          || entry.rspec().type() == relocInfo::opt_virtual_call_type
          || entry.rspec().type() == relocInfo::static_call_type
@@ -672,7 +672,10 @@
 
   unsigned int start_offset = offset();
   if (far_branches() && !Compile::current()->in_scratch_emit_size()) {
-    emit_trampoline_stub(offset(), entry.target());
+    address stub = emit_trampoline_stub(start_offset, entry.target());
+    if (stub == NULL) {
+      return NULL; // CodeCache is full
+    }
   }
 
   if (cbuf) cbuf->set_insts_mark();
@@ -682,6 +685,8 @@
   } else {
     bl(pc());
   }
+  // just need to return a non-null address
+  return pc();
 }
 
 
@@ -696,13 +701,11 @@
 //   load the call target from the constant pool
 //   branch (LR still points to the call site above)
 
-void MacroAssembler::emit_trampoline_stub(int insts_call_instruction_offset,
+address MacroAssembler::emit_trampoline_stub(int insts_call_instruction_offset,
                                              address dest) {
   address stub = start_a_stub(Compile::MAX_stubs_size/2);
   if (stub == NULL) {
-    start_a_stub(Compile::MAX_stubs_size/2);
-    Compile::current()->env()->record_out_of_memory_failure();
-    return;
+    return NULL;  // CodeBuffer::expand failed
   }
 
   // Create a trampoline stub relocation which relates this trampoline stub
@@ -729,15 +732,16 @@
   assert(is_NativeCallTrampolineStub_at(stub_start_addr), "doesn't look like a trampoline");
 
   end_a_stub();
+  return stub;
 }
 
-void MacroAssembler::ic_call(address entry) {
+address MacroAssembler::ic_call(address entry) {
   RelocationHolder rh = virtual_call_Relocation::spec(pc());
   // address const_ptr = long_constant((jlong)Universe::non_oop_word());
   // unsigned long offset;
   // ldr_constant(rscratch2, const_ptr);
   movptr(rscratch2, (uintptr_t)Universe::non_oop_word());
-  trampoline_call(Address(entry, rh));
+  return trampoline_call(Address(entry, rh));
 }
 
 // Implementation of call_VM versions
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -539,7 +539,7 @@
 
   static int patch_oop(address insn_addr, address o);
 
-  void emit_trampoline_stub(int insts_call_instruction_offset, address target);
+  address emit_trampoline_stub(int insts_call_instruction_offset, address target);
 
   // The following 4 methods return the offset of the appropriate move instruction
 
@@ -942,7 +942,7 @@
 
   // Calls
 
-  void trampoline_call(Address entry, CodeBuffer *cbuf = NULL);
+  address trampoline_call(Address entry, CodeBuffer *cbuf = NULL);
 
   static bool far_branches() {
     return ReservedCodeCacheSize > branch_range;
@@ -962,7 +962,7 @@
   }
 
   // Emit the CompiledIC call idiom
-  void ic_call(address entry);
+  address ic_call(address entry);
 
 public:
 
--- a/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -94,7 +94,7 @@
 
 const int IC_pos_in_java_to_interp_stub = 8;
 #define __ _masm.
-void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
+address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
 #ifdef COMPILER2
   // Get the mark within main instrs section which is set to the address of the call.
   address call_addr = cbuf.insts_mark();
@@ -106,8 +106,7 @@
   // Start the stub.
   address stub = __ start_a_stub(CompiledStaticCall::to_interp_stub_size());
   if (stub == NULL) {
-    Compile::current()->env()->record_out_of_memory_failure();
-    return;
+    return NULL; // CodeCache is full
   }
 
   // For java_to_interp stubs we use R11_scratch1 as scratch register
@@ -149,6 +148,7 @@
 
  // End the stub.
   __ end_a_stub();
+  return stub;
 #else
   ShouldNotReachHere();
 #endif
--- a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -2187,7 +2187,7 @@
 }
 
 void InterpreterMacroAssembler::increment_invocation_counter(Register Rcounters, Register iv_be_count, Register Rtmp_r0) {
-  assert(UseCompiler, "incrementing must be useful");
+  assert(UseCompiler || LogTouchedMethods, "incrementing must be useful");
   Register invocation_count = iv_be_count;
   Register backedge_count   = Rtmp_r0;
   int delta = InvocationCounter::count_increment;
--- a/hotspot/src/cpu/ppc/vm/ppc.ad	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/ppc/vm/ppc.ad	Wed Jul 05 20:45:41 2017 +0200
@@ -1082,7 +1082,7 @@
   // Start the stub.
   address stub = __ start_a_stub(Compile::MAX_stubs_size/2);
   if (stub == NULL) {
-    Compile::current()->env()->record_out_of_memory_failure();
+    ciEnv::current()->record_failure("CodeCache is full");
     return;
   }
 
@@ -1160,7 +1160,7 @@
 
     // Emit the trampoline stub which will be related to the branch-and-link below.
     CallStubImpl::emit_trampoline_stub(_masm, entry_point_toc_offset, offsets.insts_call_instruction_offset);
-    if (Compile::current()->env()->failing()) { return offsets; } // Code cache may be full.
+    if (ciEnv::current()->failing()) { return offsets; } // Code cache may be full.
     __ relocate(rtype);
   }
 
@@ -3397,7 +3397,7 @@
 
         // Emit the trampoline stub which will be related to the branch-and-link below.
         CallStubImpl::emit_trampoline_stub(_masm, entry_point_toc_offset, start_offset);
-        if (Compile::current()->env()->failing()) { return; } // Code cache may be full.
+        if (ciEnv::current()->failing()) { return; } // Code cache may be full.
         __ relocate(_optimized_virtual ?
                     relocInfo::opt_virtual_call_type : relocInfo::static_call_type);
       }
@@ -3410,7 +3410,11 @@
       __ bl(__ pc());  // Emits a relocation.
 
       // The stub for call to interpreter.
-      CompiledStaticCall::emit_to_interp_stub(cbuf);
+      address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
+      if (stub == NULL) {
+        ciEnv::current()->record_failure("CodeCache is full"); 
+        return;
+      }
     }
   %}
 
@@ -3455,7 +3459,11 @@
 
     assert(_method, "execute next statement conditionally");
     // The stub for call to interpreter.
-    CompiledStaticCall::emit_to_interp_stub(cbuf);
+    address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
+    if (stub == NULL) {
+      ciEnv::current()->record_failure("CodeCache is full"); 
+      return;
+    }
 
     // Restore original sp.
     __ ld(R11_scratch1, 0, R1_SP); // Load caller sp.
--- a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -432,6 +432,9 @@
   __ mov(length()->as_register(),  O4);
 
   ce->emit_static_call_stub();
+  if (ce->compilation()->bailed_out()) {
+    return; // CodeCache is full
+  }
 
   __ call(SharedRuntime::get_resolve_static_call_stub(), relocInfo::static_call_type);
   __ delayed()->nop();
--- a/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -53,7 +53,7 @@
 // ----------------------------------------------------------------------------
 
 #define __ _masm.
-void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
+address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
 #ifdef COMPILER2
   // Stub is fixed up when the corresponding call is converted from calling
   // compiled code to calling interpreted code.
@@ -64,9 +64,10 @@
 
   MacroAssembler _masm(&cbuf);
 
-  address base =
-  __ start_a_stub(to_interp_stub_size()*2);
-  if (base == NULL) return;  // CodeBuffer::expand failed.
+  address base = __ start_a_stub(to_interp_stub_size());
+  if (base == NULL) {
+    return NULL;  // CodeBuffer::expand failed.
+  }
 
   // Static stub relocation stores the instruction address of the call.
   __ relocate(static_stub_Relocation::spec(mark));
@@ -81,6 +82,7 @@
 
   // Update current stubs pointer and restore code_end.
   __ end_a_stub();
+  return base;
 #else
   ShouldNotReachHere();
 #endif
--- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -2314,7 +2314,7 @@
 }
 
 void InterpreterMacroAssembler::increment_invocation_counter( Register Rcounters, Register Rtmp, Register Rtmp2 ) {
-  assert(UseCompiler, "incrementing must be useful");
+  assert(UseCompiler || LogTouchedMethods, "incrementing must be useful");
   assert_different_registers(Rcounters, Rtmp, Rtmp2);
 
   Address inv_counter(Rcounters, MethodCounters::invocation_counter_offset() +
--- a/hotspot/src/cpu/sparc/vm/sparc.ad	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad	Wed Jul 05 20:45:41 2017 +0200
@@ -1773,9 +1773,11 @@
   AddressLiteral exception_blob(OptoRuntime::exception_blob()->entry_point());
   MacroAssembler _masm(&cbuf);
 
-  address base =
-  __ start_a_stub(size_exception_handler());
-  if (base == NULL)  return 0;  // CodeBuffer::expand failed
+  address base = __ start_a_stub(size_exception_handler());
+  if (base == NULL) {
+    ciEnv::current()->record_failure("CodeCache is full");
+    return 0;  // CodeBuffer::expand failed
+  }
 
   int offset = __ offset();
 
@@ -1796,9 +1798,11 @@
   AddressLiteral deopt_blob(SharedRuntime::deopt_blob()->unpack());
   MacroAssembler _masm(&cbuf);
 
-  address base =
-  __ start_a_stub(size_deopt_handler());
-  if (base == NULL)  return 0;  // CodeBuffer::expand failed
+  address base = __ start_a_stub(size_deopt_handler());
+  if (base == NULL) {
+    ciEnv::current()->record_failure("CodeCache is full");
+    return 0;  // CodeBuffer::expand failed
+  }
 
   int offset = __ offset();
   __ save_frame(0);
@@ -2599,7 +2603,12 @@
       emit_call_reloc(cbuf, $meth$$method, relocInfo::static_call_type);
     }
     if (_method) {  // Emit stub for static call.
-      CompiledStaticCall::emit_to_interp_stub(cbuf);
+      address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
+      // Stub does not fit into scratch buffer if TraceJumps is enabled
+      if (stub == NULL && !(TraceJumps && Compile::current()->in_scratch_emit_size())) {
+        ciEnv::current()->record_failure("CodeCache is full");
+        return;
+      } 
     }
   %}
 
--- a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -503,6 +503,9 @@
   ce->align_call(lir_static_call);
 
   ce->emit_static_call_stub();
+  if (ce->compilation()->bailed_out()) {
+    return; // CodeCache is full
+  }
   AddressLiteral resolve(SharedRuntime::get_resolve_static_call_stub(),
                          relocInfo::static_call_type);
   __ call(resolve);
--- a/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -50,7 +50,7 @@
 // ----------------------------------------------------------------------------
 
 #define __ _masm.
-void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
+address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
   // Stub is fixed up when the corresponding call is converted from
   // calling compiled code to calling interpreted code.
   // movq rbx, 0
@@ -62,9 +62,10 @@
   // That's why we must use the macroassembler to generate a stub.
   MacroAssembler _masm(&cbuf);
 
-  address base =
-  __ start_a_stub(to_interp_stub_size()*2);
-  if (base == NULL) return;  // CodeBuffer::expand failed.
+  address base = __ start_a_stub(to_interp_stub_size());
+  if (base == NULL) {
+    return NULL;  // CodeBuffer::expand failed.
+  }
   // Static stub relocation stores the instruction address of the call.
   __ relocate(static_stub_Relocation::spec(mark), Assembler::imm_operand);
   // Static stub relocation also tags the Method* in the code-stream.
@@ -74,6 +75,7 @@
 
   // Update current stubs pointer and restore insts_end.
   __ end_a_stub();
+  return base;
 }
 #undef __
 
--- a/hotspot/src/cpu/x86/vm/x86.ad	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/x86/vm/x86.ad	Wed Jul 05 20:45:41 2017 +0200
@@ -1594,7 +1594,10 @@
   // That's why we must use the macroassembler to generate a handler.
   MacroAssembler _masm(&cbuf);
   address base = __ start_a_stub(size_exception_handler());
-  if (base == NULL)  return 0;  // CodeBuffer::expand failed
+  if (base == NULL) {
+    ciEnv::current()->record_failure("CodeCache is full");
+    return 0;  // CodeBuffer::expand failed
+  }
   int offset = __ offset();
   __ jump(RuntimeAddress(OptoRuntime::exception_blob()->entry_point()));
   assert(__ offset() - offset <= (int) size_exception_handler(), "overflow");
@@ -1609,7 +1612,10 @@
   // That's why we must use the macroassembler to generate a handler.
   MacroAssembler _masm(&cbuf);
   address base = __ start_a_stub(size_deopt_handler());
-  if (base == NULL)  return 0;  // CodeBuffer::expand failed
+  if (base == NULL) {
+    ciEnv::current()->record_failure("CodeCache is full");
+    return 0;  // CodeBuffer::expand failed
+  }
   int offset = __ offset();
 
 #ifdef _LP64
--- a/hotspot/src/cpu/x86/vm/x86_32.ad	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad	Wed Jul 05 20:45:41 2017 +0200
@@ -1907,7 +1907,11 @@
                      static_call_Relocation::spec(), RELOC_IMM32 );
     }
     if (_method) {  // Emit stub for static call.
-      CompiledStaticCall::emit_to_interp_stub(cbuf);
+      address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
+      if (stub == NULL) {
+        ciEnv::current()->record_failure("CodeCache is full");
+        return;
+      } 
     }
   %}
 
--- a/hotspot/src/cpu/x86/vm/x86_64.ad	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad	Wed Jul 05 20:45:41 2017 +0200
@@ -2137,7 +2137,11 @@
     }
     if (_method) {
       // Emit stub for static call.
-      CompiledStaticCall::emit_to_interp_stub(cbuf);
+      address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
+      if (stub == NULL) {
+        ciEnv::current()->record_failure("CodeCache is full");
+        return;
+      } 
     }
   %}
 
--- a/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -60,8 +60,9 @@
 
 // ----------------------------------------------------------------------------
 
-void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
+address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
   ShouldNotReachHere(); // Only needed for COMPILER2.
+  return NULL;
 }
 
 int CompiledStaticCall::to_interp_stub_size() {
--- a/hotspot/src/os/aix/vm/os_aix.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os/aix/vm/os_aix.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -971,34 +971,32 @@
   guarantee(pthread_attr_setsuspendstate_np(&attr, PTHREAD_CREATE_SUSPENDED_NP) == 0, "???");
 
   // calculate stack size if it's not specified by caller
-  if (os::Aix::supports_variable_stack_size()) {
-    if (stack_size == 0) {
-      stack_size = os::Aix::default_stack_size(thr_type);
-
-      switch (thr_type) {
-      case os::java_thread:
-        // Java threads use ThreadStackSize whose default value can be changed with the flag -Xss.
-        assert(JavaThread::stack_size_at_create() > 0, "this should be set");
-        stack_size = JavaThread::stack_size_at_create();
+  if (stack_size == 0) {
+    stack_size = os::Aix::default_stack_size(thr_type);
+
+    switch (thr_type) {
+    case os::java_thread:
+      // Java threads use ThreadStackSize whose default value can be changed with the flag -Xss.
+      assert(JavaThread::stack_size_at_create() > 0, "this should be set");
+      stack_size = JavaThread::stack_size_at_create();
+      break;
+    case os::compiler_thread:
+      if (CompilerThreadStackSize > 0) {
+        stack_size = (size_t)(CompilerThreadStackSize * K);
         break;
-      case os::compiler_thread:
-        if (CompilerThreadStackSize > 0) {
-          stack_size = (size_t)(CompilerThreadStackSize * K);
-          break;
-        } // else fall through:
-          // use VMThreadStackSize if CompilerThreadStackSize is not defined
-      case os::vm_thread:
-      case os::pgc_thread:
-      case os::cgc_thread:
-      case os::watcher_thread:
-        if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
-        break;
-      }
+      } // else fall through:
+        // use VMThreadStackSize if CompilerThreadStackSize is not defined
+    case os::vm_thread:
+    case os::pgc_thread:
+    case os::cgc_thread:
+    case os::watcher_thread:
+      if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
+      break;
     }
-
-    stack_size = MAX2(stack_size, os::Aix::min_stack_allowed);
-    pthread_attr_setstacksize(&attr, stack_size);
-  } //else let thread_create() pick the default value (96 K on AIX)
+  }
+
+  stack_size = MAX2(stack_size, os::Aix::min_stack_allowed);
+  pthread_attr_setstacksize(&attr, stack_size);
 
   pthread_t tid;
   int ret = pthread_create(&tid, &attr, (void* (*)(void*)) java_start, thread);
--- a/hotspot/src/os/aix/vm/os_aix.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os/aix/vm/os_aix.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -131,8 +131,6 @@
   static void initialize_libo4();
   static void initialize_libperfstat();
 
-  static bool supports_variable_stack_size();
-
  public:
   static void init_thread_fpu_state();
   static pthread_t main_thread(void)                                { return _main_thread; }
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -739,40 +739,35 @@
   pthread_attr_init(&attr);
   pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 
-  // stack size
-  if (os::Bsd::supports_variable_stack_size()) {
-    // calculate stack size if it's not specified by caller
-    if (stack_size == 0) {
-      stack_size = os::Bsd::default_stack_size(thr_type);
-
-      switch (thr_type) {
-      case os::java_thread:
-        // Java threads use ThreadStackSize which default value can be
-        // changed with the flag -Xss
-        assert(JavaThread::stack_size_at_create() > 0, "this should be set");
-        stack_size = JavaThread::stack_size_at_create();
+  // calculate stack size if it's not specified by caller
+  if (stack_size == 0) {
+    stack_size = os::Bsd::default_stack_size(thr_type);
+
+    switch (thr_type) {
+    case os::java_thread:
+      // Java threads use ThreadStackSize which default value can be
+      // changed with the flag -Xss
+      assert(JavaThread::stack_size_at_create() > 0, "this should be set");
+      stack_size = JavaThread::stack_size_at_create();
+      break;
+    case os::compiler_thread:
+      if (CompilerThreadStackSize > 0) {
+        stack_size = (size_t)(CompilerThreadStackSize * K);
         break;
-      case os::compiler_thread:
-        if (CompilerThreadStackSize > 0) {
-          stack_size = (size_t)(CompilerThreadStackSize * K);
-          break;
-        } // else fall through:
-          // use VMThreadStackSize if CompilerThreadStackSize is not defined
-      case os::vm_thread:
-      case os::pgc_thread:
-      case os::cgc_thread:
-      case os::watcher_thread:
-        if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
-        break;
-      }
+      } // else fall through:
+        // use VMThreadStackSize if CompilerThreadStackSize is not defined
+    case os::vm_thread:
+    case os::pgc_thread:
+    case os::cgc_thread:
+    case os::watcher_thread:
+      if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
+      break;
     }
-
-    stack_size = MAX2(stack_size, os::Bsd::min_stack_allowed);
-    pthread_attr_setstacksize(&attr, stack_size);
-  } else {
-    // let pthread_create() pick the default value.
   }
 
+  stack_size = MAX2(stack_size, os::Bsd::min_stack_allowed);
+  pthread_attr_setstacksize(&attr, stack_size);
+
   ThreadState state;
 
   {
--- a/hotspot/src/os/bsd/vm/os_bsd.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os/bsd/vm/os_bsd.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,8 +75,6 @@
   static julong physical_memory() { return _physical_memory; }
   static void initialize_system_info();
 
-  static bool supports_variable_stack_size();
-
   static void rebuild_cpu_to_node_map();
   static GrowableArray<int>* cpu_to_node()    { return _cpu_to_node; }
 
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -653,8 +653,7 @@
   OSThread* osthread = thread->osthread();
   Monitor* sync = osthread->startThread_lock();
 
-  // thread_id is kernel thread id (similar to Solaris LWP id)
-  osthread->set_thread_id(os::Linux::gettid());
+  osthread->set_thread_id(os::current_thread_id());
 
   if (UseNUMA) {
     int lgrp_id = os::numa_get_group_id();
@@ -712,38 +711,34 @@
   pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 
   // stack size
-  if (os::Linux::supports_variable_stack_size()) {
-    // calculate stack size if it's not specified by caller
-    if (stack_size == 0) {
-      stack_size = os::Linux::default_stack_size(thr_type);
-
-      switch (thr_type) {
-      case os::java_thread:
-        // Java threads use ThreadStackSize which default value can be
-        // changed with the flag -Xss
-        assert(JavaThread::stack_size_at_create() > 0, "this should be set");
-        stack_size = JavaThread::stack_size_at_create();
+  // calculate stack size if it's not specified by caller
+  if (stack_size == 0) {
+    stack_size = os::Linux::default_stack_size(thr_type);
+
+    switch (thr_type) {
+    case os::java_thread:
+      // Java threads use ThreadStackSize which default value can be
+      // changed with the flag -Xss
+      assert(JavaThread::stack_size_at_create() > 0, "this should be set");
+      stack_size = JavaThread::stack_size_at_create();
+      break;
+    case os::compiler_thread:
+      if (CompilerThreadStackSize > 0) {
+        stack_size = (size_t)(CompilerThreadStackSize * K);
         break;
-      case os::compiler_thread:
-        if (CompilerThreadStackSize > 0) {
-          stack_size = (size_t)(CompilerThreadStackSize * K);
-          break;
-        } // else fall through:
-          // use VMThreadStackSize if CompilerThreadStackSize is not defined
-      case os::vm_thread:
-      case os::pgc_thread:
-      case os::cgc_thread:
-      case os::watcher_thread:
-        if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
-        break;
-      }
+      } // else fall through:
+        // use VMThreadStackSize if CompilerThreadStackSize is not defined
+    case os::vm_thread:
+    case os::pgc_thread:
+    case os::cgc_thread:
+    case os::watcher_thread:
+      if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);
+      break;
     }
-
-    stack_size = MAX2(stack_size, os::Linux::min_stack_allowed);
-    pthread_attr_setstacksize(&attr, stack_size);
-  } else {
-    // let pthread_create() pick the default value.
-  }
+  }
+
+  stack_size = MAX2(stack_size, os::Linux::min_stack_allowed);
+  pthread_attr_setstacksize(&attr, stack_size);
 
   // glibc guard page
   pthread_attr_setguardsize(&attr, os::Linux::default_guard_size(thr_type));
@@ -1424,7 +1419,8 @@
   return n;
 }
 
-intx os::current_thread_id() { return (intx)pthread_self(); }
+// thread_id is kernel thread id (similar to Solaris LWP id)
+intx os::current_thread_id() { return os::Linux::gettid(); }
 int os::current_process_id() {
   return ::getpid();
 }
--- a/hotspot/src/os/linux/vm/os_linux.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -83,8 +83,6 @@
   static void set_glibc_version(const char *s)      { _glibc_version = s; }
   static void set_libpthread_version(const char *s) { _libpthread_version = s; }
 
-  static bool supports_variable_stack_size();
-
   static void rebuild_cpu_to_node_map();
   static GrowableArray<int>* cpu_to_node()    { return _cpu_to_node; }
 
--- a/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012, 2014 SAP AG. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -489,10 +489,6 @@
 
 size_t os::Aix::min_stack_allowed = 128*K;
 
-// Aix is always in floating stack mode. The stack size for a new
-// thread can be set via pthread_attr_setstacksize().
-bool os::Aix::supports_variable_stack_size() { return true; }
-
 // return default stack size for thr_type
 size_t os::Aix::default_stack_size(os::ThreadType thr_type) {
   // default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -780,9 +780,6 @@
 
 #ifdef AMD64
 size_t os::Bsd::min_stack_allowed  = 64 * K;
-
-// amd64: pthread on amd64 is always in floating stack mode
-bool os::Bsd::supports_variable_stack_size() {  return true; }
 #else
 size_t os::Bsd::min_stack_allowed  =  (48 DEBUG_ONLY(+4))*K;
 
@@ -790,7 +787,6 @@
 #define GET_GS() ({int gs; __asm__ volatile("movw %%gs, %w0":"=q"(gs)); gs&0xffff;})
 #endif
 
-bool os::Bsd::supports_variable_stack_size() { return true; }
 #endif // AMD64
 
 // return default stack size for thr_type
--- a/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -290,10 +290,6 @@
 
 size_t os::Bsd::min_stack_allowed = 64 * K;
 
-bool os::Bsd::supports_variable_stack_size() {
-  return true;
-}
-
 size_t os::Bsd::default_stack_size(os::ThreadType thr_type) {
 #ifdef _LP64
   size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
--- a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -496,9 +496,6 @@
 
 size_t os::Linux::min_stack_allowed  = 64 * K;
 
-// aarch64: pthread on aarch64 is always in floating stack mode
-bool os::Linux::supports_variable_stack_size() {  return true; }
-
 // return default stack size for thr_type
 size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
   // default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -467,8 +467,6 @@
 
 size_t os::Linux::min_stack_allowed = 128*K;
 
-bool os::Linux::supports_variable_stack_size() { return true; }
-
 // return default stack size for thr_type
 size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
   // default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -733,9 +733,6 @@
 
 size_t os::Linux::min_stack_allowed  = 128 * K;
 
-// pthread on Ubuntu is always in floating stack mode
-bool os::Linux::supports_variable_stack_size() {  return true; }
-
 // return default stack size for thr_type
 size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
   // default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -623,11 +623,6 @@
 size_t os::Linux::min_stack_allowed  =  (48 DEBUG_ONLY(+4))*K;
 #endif // AMD64
 
-// Test if pthread library can support variable thread stack size.
-bool os::Linux::supports_variable_stack_size() {
-  return true;
-}
-
 // return default stack size for thr_type
 size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
   // default stack size (compiler thread needs larger stack)
--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -305,10 +305,6 @@
 
 size_t os::Linux::min_stack_allowed = 64 * K;
 
-bool os::Linux::supports_variable_stack_size() {
-  return true;
-}
-
 size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
 #ifdef _LP64
   size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
--- a/hotspot/src/share/vm/c1/c1_Compiler.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_Compiler.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -239,25 +239,6 @@
   return true;
 }
 
-bool Compiler::is_intrinsic_disabled_by_flag(methodHandle method) {
-  vmIntrinsics::ID id = method->intrinsic_id();
-  assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
-
-  if (vmIntrinsics::is_disabled_by_flags(id)) {
-    return true;
-  }
-
-  if (!InlineNatives && id != vmIntrinsics::_Reference_get) {
-    return true;
-  }
-
-  if (!InlineClassNatives && id == vmIntrinsics::_getClass) {
-    return true;
-  }
-
-  return false;
-}
-
 void Compiler::compile_method(ciEnv* env, ciMethod* method, int entry_bci) {
   BufferBlob* buffer_blob = CompilerThread::current()->get_buffer_blob();
   assert(buffer_blob != NULL, "Must exist");
@@ -275,7 +256,3 @@
 void Compiler::print_timers() {
   Compilation::print_timers();
 }
-
-bool Compiler::is_intrinsic_available(methodHandle method, methodHandle compilation_context) {
-  return is_intrinsic_supported(method) && !is_intrinsic_disabled_by_flag(method);
-}
--- a/hotspot/src/share/vm/c1/c1_Compiler.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_Compiler.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -55,18 +55,9 @@
   // Print compilation timers and statistics
   virtual void print_timers();
 
-  // Check the availability of an intrinsic for 'method' given a compilation context.
-  // The compilation context is needed to support per-method usage of the
-  // DisableIntrinsic flag. However, as C1 ignores the DisableIntrinsic flag, it
-  // ignores the compilation context.
-  virtual bool is_intrinsic_available(methodHandle method, methodHandle compilation_context);
-
   // Check if the C1 compiler supports an intrinsic for 'method'.
   virtual bool is_intrinsic_supported(methodHandle method);
 
-  // Processing of command-line flags specific to the C1 compiler.
-  virtual bool is_intrinsic_disabled_by_flag(methodHandle method);
-
   // Size of the code buffer
   static int code_buffer_size();
 };
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -3491,8 +3491,16 @@
 bool GraphBuilder::try_inline_intrinsics(ciMethod* callee) {
   // For calling is_intrinsic_available we need to transition to
   // the '_thread_in_vm' state because is_intrinsic_available()
-  // does not accesses critical VM-internal data.
-  if (!_compilation->compiler()->is_intrinsic_available(callee->get_Method(), NULL)) {
+  // accesses critical VM-internal data.
+  bool is_available = false;
+  {
+    VM_ENTRY_MARK;
+    methodHandle mh(THREAD, callee->get_Method());
+    methodHandle ct(THREAD, method()->get_Method());
+    is_available = _compilation->compiler()->is_intrinsic_available(mh, ct);
+  }
+
+  if (!is_available) {
     if (!InlineNatives) {
       // Return false and also set message that the inlining of
       // intrinsics has been disabled in general.
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -443,6 +443,7 @@
 
   // emit the static call stub stuff out of line
   emit_static_call_stub();
+  CHECK_BAILOUT();
 
   switch (op->code()) {
   case lir_static_call:
--- a/hotspot/src/share/vm/classfile/imageDecompressor.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/classfile/imageDecompressor.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -22,8 +22,8 @@
  *
  */
 
+#include "precompiled.hpp"
 #include "runtime/thread.inline.hpp"
-#include "precompiled.hpp"
 #include "classfile/imageDecompressor.hpp"
 #include "runtime/thread.hpp"
 #include "utilities/bytes.hpp"
--- a/hotspot/src/share/vm/classfile/imageDecompressor.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/classfile/imageDecompressor.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -26,7 +26,6 @@
 #define SHARE_VM_CLASSFILE_IMAGEDECOMPRESSOR_HPP
 
 #include "runtime/thread.inline.hpp"
-#include "precompiled.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/imageFile.hpp"
 #include "classfile/symbolTable.hpp"
--- a/hotspot/src/share/vm/classfile/vmSymbols.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/classfile/vmSymbols.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -417,8 +417,59 @@
   }
 }
 
-bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) {
+bool vmIntrinsics::is_disabled_by_flags(methodHandle method, methodHandle compilation_context) {
+  vmIntrinsics::ID id = method->intrinsic_id();
   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
+
+  // Check if the intrinsic corresponding to 'method' has been disabled on
+  // the command line by using the DisableIntrinsic flag (either globally
+  // or on a per-method level, see src/share/vm/compiler/abstractCompiler.hpp
+  // for details).
+  // Usually, the compilation context is the caller of the method 'method'.
+  // The only case when for a non-recursive method 'method' the compilation context
+  // is not the caller of the 'method' (but it is the method itself) is
+  // java.lang.ref.Referene::get.
+  // For java.lang.ref.Reference::get, the intrinsic version is used
+  // instead of the compiled version so that the value in the referent
+  // field can be registered by the G1 pre-barrier code. The intrinsified
+  // version of Reference::get also adds a memory barrier to prevent
+  // commoning reads from the referent field across safepoint since GC
+  // can change the referent field's value. See Compile::Compile()
+  // in src/share/vm/opto/compile.cpp or
+  // GraphBuilder::GraphBuilder() in src/share/vm/c1/c1_GraphBuilder.cpp
+  // for more details.
+  ccstr disable_intr = NULL;
+  if ((DisableIntrinsic[0] != '\0' && strstr(DisableIntrinsic, vmIntrinsics::name_at(id)) != NULL) ||
+      (!compilation_context.is_null() &&
+       CompilerOracle::has_option_value(compilation_context, "DisableIntrinsic", disable_intr) &&
+       strstr(disable_intr, vmIntrinsics::name_at(id)) != NULL)
+  ) {
+    return true;
+  }
+
+  // -XX:-InlineNatives disables nearly all intrinsics except the ones listed in
+  // the following switch statement.
+  if (!InlineNatives) {
+    switch (id) {
+    case vmIntrinsics::_indexOf:
+    case vmIntrinsics::_compareTo:
+    case vmIntrinsics::_equals:
+    case vmIntrinsics::_equalsC:
+    case vmIntrinsics::_getAndAddInt:
+    case vmIntrinsics::_getAndAddLong:
+    case vmIntrinsics::_getAndSetInt:
+    case vmIntrinsics::_getAndSetLong:
+    case vmIntrinsics::_getAndSetObject:
+    case vmIntrinsics::_loadFence:
+    case vmIntrinsics::_storeFence:
+    case vmIntrinsics::_fullFence:
+    case vmIntrinsics::_Reference_get:
+      break;
+    default:
+      return true;
+    }
+  }
+
   switch (id) {
   case vmIntrinsics::_isInstance:
   case vmIntrinsics::_isAssignableFrom:
@@ -430,6 +481,7 @@
   case vmIntrinsics::_Class_cast:
   case vmIntrinsics::_getLength:
   case vmIntrinsics::_newArray:
+  case vmIntrinsics::_getClass:
     if (!InlineClassNatives) return true;
     break;
   case vmIntrinsics::_currentThread:
@@ -522,6 +574,12 @@
   case vmIntrinsics::_getAndSetInt:
   case vmIntrinsics::_getAndSetLong:
   case vmIntrinsics::_getAndSetObject:
+  case vmIntrinsics::_loadFence:
+  case vmIntrinsics::_storeFence:
+  case vmIntrinsics::_fullFence:
+  case vmIntrinsics::_compareAndSwapObject:
+  case vmIntrinsics::_compareAndSwapLong:
+  case vmIntrinsics::_compareAndSwapInt:
     if (!InlineUnsafeOps) return true;
     break;
   case vmIntrinsics::_getShortUnaligned:
@@ -584,8 +642,8 @@
     if (!InlineObjectCopy || !InlineArrayCopy) return true;
     break;
   case vmIntrinsics::_compareTo:
-     if (!SpecialStringCompareTo) return true;
-     break;
+    if (!SpecialStringCompareTo) return true;
+    break;
   case vmIntrinsics::_indexOf:
     if (!SpecialStringIndexOf) return true;
     break;
@@ -602,8 +660,8 @@
     if (!InlineReflectionGetCallerClass) return true;
     break;
   case vmIntrinsics::_multiplyToLen:
-      if (!UseMultiplyToLenIntrinsic) return true;
-      break;
+    if (!UseMultiplyToLenIntrinsic) return true;
+    break;
   case vmIntrinsics::_squareToLen:
     if (!UseSquareToLenIntrinsic) return true;
     break;
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -568,6 +568,11 @@
   template(java_lang_management_ThreadInfo_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;)V") \
   template(java_lang_management_ThreadInfo_with_locks_constructor_signature, "(Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;[Ljava/lang/Object;[I[Ljava/lang/Object;)V") \
   template(long_long_long_long_void_signature,         "(JJJJ)V")                                                 \
+  template(finalizer_histogram_klass,                  "java/lang/ref/FinalizerHistogram")                        \
+  template(void_finalizer_histogram_entry_array_signature,  "()[Ljava/lang/ref/FinalizerHistogram$Entry;")                        \
+  template(get_finalizer_histogram_name,               "getFinalizerHistogram")                                   \
+  template(finalizer_histogram_entry_name_field,       "className")                                               \
+  template(finalizer_histogram_entry_count_field,      "instanceCount")                                           \
                                                                                                                   \
   template(java_lang_management_MemoryPoolMXBean,      "java/lang/management/MemoryPoolMXBean")                   \
   template(java_lang_management_MemoryManagerMXBean,   "java/lang/management/MemoryManagerMXBean")                \
@@ -1384,10 +1389,9 @@
   // 'method' requires predicated logic.
   static int predicates_needed(vmIntrinsics::ID id);
 
-  // Returns true if an intrinsic is disabled by command-line flags and
-  // false otherwise. Implements functionality common to the C1
-  // and the C2 compiler.
-  static bool is_disabled_by_flags(vmIntrinsics::ID id);
+  // Returns true if a compiler intrinsic is disabled by command-line flags
+  // and false otherwise.
+  static bool is_disabled_by_flags(methodHandle method, methodHandle compilation_context);
 };
 
 #endif // SHARE_VM_CLASSFILE_VMSYMBOLS_HPP
--- a/hotspot/src/share/vm/code/compiledIC.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/code/compiledIC.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -306,7 +306,7 @@
   friend CompiledStaticCall* compiledStaticCall_at(Relocation* call_site);
 
   // Code
-  static void emit_to_interp_stub(CodeBuffer &cbuf);
+  static address emit_to_interp_stub(CodeBuffer &cbuf);
   static int to_interp_stub_size();
   static int reloc_to_interp_stub();
 
--- a/hotspot/src/share/vm/compiler/abstractCompiler.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/compiler/abstractCompiler.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -75,8 +75,8 @@
   //
   // The second parameter, 'compilation_context', is needed to implement functionality
   // related to the DisableIntrinsic command-line flag. The DisableIntrinsic flag can
-  // be used to prohibit the C2 compiler (but not the C1 compiler) to use an intrinsic.
-  // There are three ways to disable an intrinsic using the DisableIntrinsic flag:
+  // be used to prohibit the compilers to use an intrinsic. There are three ways to
+  // disable an intrinsic using the DisableIntrinsic flag:
   //
   // (1) -XX:DisableIntrinsic=_hashCode,_getClass
   //     Disables intrinsification of _hashCode and _getClass globally
@@ -96,7 +96,8 @@
   // compilation context is aClass::aMethod and java.lang.ref.Reference::get,
   // respectively.
   virtual bool is_intrinsic_available(methodHandle method, methodHandle compilation_context) {
-    return false;
+    return is_intrinsic_supported(method) &&
+           !vmIntrinsics::is_disabled_by_flags(method, compilation_context);
   }
 
   // Determines if an intrinsic is supported by the compiler, that is,
@@ -111,13 +112,6 @@
     return false;
   }
 
-  // Implements compiler-specific processing of command-line flags.
-  // Processing of command-line flags common to all compilers is implemented
-  // in vmIntrinsicss::is_disabled_by_flag.
-  virtual bool is_intrinsic_disabled_by_flag(methodHandle method) {
-    return false;
-  }
-
   // Compiler type queries.
   bool is_c1()                                   { return _type == c1; }
   bool is_c2()                                   { return _type == c2; }
--- a/hotspot/src/share/vm/opto/arraycopynode.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/arraycopynode.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -79,10 +79,15 @@
 
 #ifndef PRODUCT
 const char* ArrayCopyNode::_kind_names[] = {"arraycopy", "arraycopy, validated arguments", "clone", "oop array clone", "CopyOf", "CopyOfRange"};
+
 void ArrayCopyNode::dump_spec(outputStream *st) const {
   CallNode::dump_spec(st);
   st->print(" (%s%s)", _kind_names[_kind], _alloc_tightly_coupled ? ", tightly coupled allocation" : "");
 }
+
+void ArrayCopyNode::dump_compact_spec(outputStream* st) const {
+  st->print("%s%s", _kind_names[_kind], _alloc_tightly_coupled ? ",tight" : "");
+}
 #endif
 
 intptr_t ArrayCopyNode::get_length_if_constant(PhaseGVN *phase) const {
--- a/hotspot/src/share/vm/opto/arraycopynode.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/arraycopynode.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -164,6 +164,7 @@
 
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
+  virtual void dump_compact_spec(outputStream* st) const;
 #endif
 };
 #endif // SHARE_VM_OPTO_ARRAYCOPYNODE_HPP
--- a/hotspot/src/share/vm/opto/c2_globals.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/c2_globals.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -623,9 +623,6 @@
   diagnostic(bool, PrintIntrinsics, false,                                  \
           "prints attempted and successful inlining of intrinsics")         \
                                                                             \
-  diagnostic(ccstrlist, DisableIntrinsic, "",                               \
-          "do not expand intrinsics whose (internal) names appear here")    \
-                                                                            \
   develop(bool, StressReflectiveCode, false,                                \
           "Use inexact types at allocations, etc., to test reflection")     \
                                                                             \
--- a/hotspot/src/share/vm/opto/c2compiler.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -157,14 +157,6 @@
   Compile::print_timers();
 }
 
-bool C2Compiler::is_intrinsic_available(methodHandle method, methodHandle compilation_context) {
-  // Assume a non-virtual dispatch. A virtual dispatch is
-  // possible for only a limited set of available intrinsics whereas
-  // a non-virtual dispatch is possible for all available intrinsics.
-  return is_intrinsic_supported(method, false) &&
-         !is_intrinsic_disabled_by_flag(method, compilation_context);
-}
-
 bool C2Compiler::is_intrinsic_supported(methodHandle method, bool is_virtual) {
   vmIntrinsics::ID id = method->intrinsic_id();
   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
@@ -436,78 +428,6 @@
   return true;
 }
 
-bool C2Compiler::is_intrinsic_disabled_by_flag(methodHandle method, methodHandle compilation_context) {
-  vmIntrinsics::ID id = method->intrinsic_id();
-  assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
-
-  if (vmIntrinsics::is_disabled_by_flags(method->intrinsic_id())) {
-    return true;
-  }
-
-  // Check if the intrinsic corresponding to 'method' has been disabled on
-  // the command line by using the DisableIntrinsic flag (either globally
-  // or on a per-method level, see src/share/vm/compiler/abstractCompiler.hpp
-  // for details).
-  // Usually, the compilation context is the caller of the method 'method'.
-  // The only case when for a non-recursive method 'method' the compilation context
-  // is not the caller of the 'method' (but it is the method itself) is
-  // java.lang.ref.Referene::get.
-  // For java.lang.ref.Reference::get, the intrinsic version is used
-  // instead of the C2-compiled version so that the value in the referent
-  // field can be registered by the G1 pre-barrier code. The intrinsified
-  // version of Reference::get also adds a memory barrier to prevent
-  // commoning reads from the referent field across safepoint since GC
-  // can change the referent field's value. See Compile::Compile()
-  // in src/share/vm/opto/compile.cpp for more details.
-  ccstr disable_intr = NULL;
-  if ((DisableIntrinsic[0] != '\0' && strstr(DisableIntrinsic, vmIntrinsics::name_at(id)) != NULL) ||
-      (!compilation_context.is_null() &&
-       CompilerOracle::has_option_value(compilation_context, "DisableIntrinsic", disable_intr) &&
-       strstr(disable_intr, vmIntrinsics::name_at(id)) != NULL)
-  ) {
-    return true;
-  }
-
-  // -XX:-InlineNatives disables nearly all intrinsics except the ones listed in
-  // the following switch statement.
-  if (!InlineNatives) {
-    switch (id) {
-    case vmIntrinsics::_indexOf:
-    case vmIntrinsics::_compareTo:
-    case vmIntrinsics::_equals:
-    case vmIntrinsics::_equalsC:
-    case vmIntrinsics::_getAndAddInt:
-    case vmIntrinsics::_getAndAddLong:
-    case vmIntrinsics::_getAndSetInt:
-    case vmIntrinsics::_getAndSetLong:
-    case vmIntrinsics::_getAndSetObject:
-    case vmIntrinsics::_loadFence:
-    case vmIntrinsics::_storeFence:
-    case vmIntrinsics::_fullFence:
-    case vmIntrinsics::_Reference_get:
-      break;
-    default:
-      return true;
-    }
-  }
-
-  if (!InlineUnsafeOps) {
-    switch (id) {
-    case vmIntrinsics::_loadFence:
-    case vmIntrinsics::_storeFence:
-    case vmIntrinsics::_fullFence:
-    case vmIntrinsics::_compareAndSwapObject:
-    case vmIntrinsics::_compareAndSwapLong:
-    case vmIntrinsics::_compareAndSwapInt:
-      return true;
-    default:
-      return false;
-    }
-  }
-
-  return false;
-}
-
 int C2Compiler::initial_code_buffer_size() {
   assert(SegmentedCodeCache, "Should be only used with a segmented code cache");
   return Compile::MAX_inst_size + Compile::MAX_locs_size + initial_const_capacity;
--- a/hotspot/src/share/vm/opto/c2compiler.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/c2compiler.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -51,11 +51,11 @@
   // Print compilation timers and statistics
   void print_timers();
 
-  // Check the availability of an intrinsic for 'method' given a compilation context.
-  virtual bool is_intrinsic_available(methodHandle method, methodHandle compilation_context);
-
   // Return true if the intrinsification of a method supported by the compiler
-  // assuming a non-virtual dispatch. Return false otherwise.
+  // assuming a non-virtual dispatch. (A virtual dispatch is
+  // possible for only a limited set of available intrinsics whereas
+  // a non-virtual dispatch is possible for all available intrinsics.)
+  // Return false otherwise.
   virtual bool is_intrinsic_supported(methodHandle method) {
     return is_intrinsic_supported(method, false);
   }
@@ -64,13 +64,6 @@
   // the dispatch mode specified by the 'is_virtual' parameter.
   virtual bool is_intrinsic_supported(methodHandle method, bool is_virtual);
 
-  // Processing of command-line flags specific to the C2 compiler.
-  virtual bool is_intrinsic_disabled_by_flag(methodHandle method) {
-    return is_intrinsic_disabled_by_flag(method, NULL);
-  }
-
-  virtual bool is_intrinsic_disabled_by_flag(methodHandle method, methodHandle compilation_context);
-
   // Initial size of the code buffer (may be increased at runtime)
   static int initial_code_buffer_size();
 };
--- a/hotspot/src/share/vm/opto/callnode.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/callnode.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -52,6 +52,7 @@
 const Type *StartNode::Value(PhaseTransform *phase) const { return _domain; }
 #ifndef PRODUCT
 void StartNode::dump_spec(outputStream *st) const { st->print(" #"); _domain->dump_on(st);}
+void StartNode::dump_compact_spec(outputStream *st) const { /* empty */ }
 #endif
 
 //------------------------------Ideal------------------------------------------
@@ -121,6 +122,23 @@
     if( !Verbose && !WizardMode )   bottom_type()->dump_on(st);
   }
 }
+
+void ParmNode::dump_compact_spec(outputStream *st) const {
+  if (_con < TypeFunc::Parms) {
+    st->print("%s", names[_con]);
+  } else {
+    st->print("%d:", _con-TypeFunc::Parms);
+    // unconditionally dump bottom_type
+    bottom_type()->dump_on(st);
+  }
+}
+
+// For a ParmNode, all immediate inputs and outputs are considered relevant
+// both in compact and standard representation.
+void ParmNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  this->collect_nodes(in_rel, 1, false, false);
+  this->collect_nodes(out_rel, -1, false, false);
+}
 #endif
 
 uint ParmNode::ideal_reg() const {
@@ -948,6 +966,14 @@
   if( _method ) _method->print_short_name(st);
   CallNode::dump_spec(st);
 }
+
+void CallJavaNode::dump_compact_spec(outputStream* st) const {
+  if (_method) {
+    _method->print_short_name(st);
+  } else {
+    st->print("<?>");
+  }
+}
 #endif
 
 //=============================================================================
@@ -995,6 +1021,16 @@
   }
   CallJavaNode::dump_spec(st);
 }
+
+void CallStaticJavaNode::dump_compact_spec(outputStream* st) const {
+  if (_method) {
+    _method->print_short_name(st);
+  } else if (_name) {
+    st->print("%s", _name);
+  } else {
+    st->print("<?>");
+  }
+}
 #endif
 
 //=============================================================================
@@ -1130,6 +1166,19 @@
   st->print(" SafePoint ");
   _replaced_nodes.dump(st);
 }
+
+// The related nodes of a SafepointNode are all data inputs, excluding the
+// control boundary, as well as all outputs till level 2 (to include projection
+// nodes and targets). In compact mode, just include inputs till level 1 and
+// outputs as before.
+void SafePointNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  if (compact) {
+    this->collect_nodes(in_rel, 1, false, false);
+  } else {
+    this->collect_nodes_in_all_data(in_rel, false);
+  }
+  this->collect_nodes(out_rel, -2, false, false);
+}
 #endif
 
 const RegMask &SafePointNode::in_RegMask(uint idx) const {
@@ -1676,6 +1725,27 @@
     _counter->set_tag(NamedCounter::EliminatedLockCounter);
   }
 }
+
+const char* AbstractLockNode::_kind_names[] = {"Regular", "NonEscObj", "Coarsened", "Nested"};
+
+void AbstractLockNode::dump_spec(outputStream* st) const {
+  st->print("%s ", _kind_names[_kind]);
+  CallNode::dump_spec(st);
+}
+
+void AbstractLockNode::dump_compact_spec(outputStream* st) const {
+  st->print("%s", _kind_names[_kind]);
+}
+
+// The related set of lock nodes includes the control boundary.
+void AbstractLockNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  if (compact) {
+      this->collect_nodes(in_rel, 1, false, false);
+    } else {
+      this->collect_nodes_in_all_data(in_rel, true);
+    }
+    this->collect_nodes(out_rel, -2, false, false);
+}
 #endif
 
 //=============================================================================
--- a/hotspot/src/share/vm/opto/callnode.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/callnode.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -84,6 +84,7 @@
   virtual uint ideal_reg() const { return 0; }
 #ifndef PRODUCT
   virtual void  dump_spec(outputStream *st) const;
+  virtual void  dump_compact_spec(outputStream *st) const;
 #endif
 };
 
@@ -110,6 +111,8 @@
   virtual uint ideal_reg() const;
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
+  virtual void dump_compact_spec(outputStream *st) const;
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
 #endif
 };
 
@@ -476,6 +479,7 @@
 
 #ifndef PRODUCT
   virtual void           dump_spec(outputStream *st) const;
+  virtual void           related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
 #endif
 };
 
@@ -675,6 +679,7 @@
 
 #ifndef PRODUCT
   virtual void  dump_spec(outputStream *st) const;
+  virtual void  dump_compact_spec(outputStream *st) const;
 #endif
 };
 
@@ -730,6 +735,7 @@
   virtual int         Opcode() const;
 #ifndef PRODUCT
   virtual void        dump_spec(outputStream *st) const;
+  virtual void        dump_compact_spec(outputStream *st) const;
 #endif
 };
 
@@ -951,6 +957,7 @@
   } _kind;
 #ifndef PRODUCT
   NamedCounter* _counter;
+  static const char* _kind_names[Nested+1];
 #endif
 
 protected:
@@ -1005,6 +1012,9 @@
 #ifndef PRODUCT
   void create_lock_counter(JVMState* s);
   NamedCounter* counter() const { return _counter; }
+  virtual void dump_spec(outputStream* st) const;
+  virtual void dump_compact_spec(outputStream* st) const;
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
 #endif
 };
 
--- a/hotspot/src/share/vm/opto/cfgnode.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/cfgnode.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -2023,6 +2023,14 @@
 }
 
 #ifndef PRODUCT
+void PhiNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  // For a PhiNode, the set of related nodes includes all inputs till level 2,
+  // and all outputs till level 1. In compact mode, inputs till level 1 are
+  // collected.
+  this->collect_nodes(in_rel, compact ? 1 : 2, false, false);
+  this->collect_nodes(out_rel, -1, false, false);
+}
+
 void PhiNode::dump_spec(outputStream *st) const {
   TypeNode::dump_spec(st);
   if (is_tripcount()) {
@@ -2047,11 +2055,33 @@
   return RegMask::Empty;
 }
 
+#ifndef PRODUCT
+//-----------------------------related-----------------------------------------
+// The related nodes of a GotoNode are all inputs at level 1, as well as the
+// outputs at level 1. This is regardless of compact mode.
+void GotoNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  this->collect_nodes(in_rel, 1, false, false);
+  this->collect_nodes(out_rel, -1, false, false);
+}
+#endif
+
+
 //=============================================================================
 const RegMask &JumpNode::out_RegMask() const {
   return RegMask::Empty;
 }
 
+#ifndef PRODUCT
+//-----------------------------related-----------------------------------------
+// The related nodes of a JumpNode are all inputs at level 1, as well as the
+// outputs at level 2 (to include actual jump targets beyond projection nodes).
+// This is regardless of compact mode.
+void JumpNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  this->collect_nodes(in_rel, 1, false, false);
+  this->collect_nodes(out_rel, -2, false, false);
+}
+#endif
+
 //=============================================================================
 const RegMask &JProjNode::out_RegMask() const {
   return RegMask::Empty;
@@ -2105,7 +2135,18 @@
 #ifndef PRODUCT
 void JumpProjNode::dump_spec(outputStream *st) const {
   ProjNode::dump_spec(st);
-   st->print("@bci %d ",_dest_bci);
+  st->print("@bci %d ",_dest_bci);
+}
+
+void JumpProjNode::dump_compact_spec(outputStream *st) const {
+  ProjNode::dump_compact_spec(st);
+  st->print("(%d)%d@%d", _switch_val, _proj_no, _dest_bci);
+}
+
+void JumpProjNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  // The related nodes of a JumpProjNode are its inputs and outputs at level 1.
+  this->collect_nodes(in_rel, 1, false, false);
+  this->collect_nodes(out_rel, -1, false, false);
 }
 #endif
 
--- a/hotspot/src/share/vm/opto/cfgnode.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/cfgnode.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -204,6 +204,7 @@
   virtual const RegMask &out_RegMask() const;
   virtual const RegMask &in_RegMask(uint) const;
 #ifndef PRODUCT
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
   virtual void dump_spec(outputStream *st) const;
 #endif
 #ifdef ASSERT
@@ -229,6 +230,10 @@
   virtual const Type *Value( PhaseTransform *phase ) const;
   virtual Node *Identity( PhaseTransform *phase );
   virtual const RegMask &out_RegMask() const;
+
+#ifndef PRODUCT
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
 };
 
 //------------------------------CProjNode--------------------------------------
@@ -382,6 +387,7 @@
 
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
+  virtual void related(GrowableArray <Node *> *in_rel, GrowableArray <Node *> *out_rel, bool compact) const;
 #endif
 };
 
@@ -393,6 +399,11 @@
 protected:
   // Type of If input when this branch is always taken
   virtual bool always_taken(const TypeTuple* t) const = 0;
+
+#ifndef PRODUCT
+public:
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
 };
 
 class IfTrueNode : public IfProjNode {
@@ -455,6 +466,9 @@
   virtual int   Opcode() const;
   virtual const RegMask& out_RegMask() const;
   virtual const Node* is_block_proj() const { return this; }
+#ifndef PRODUCT
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
 };
 
 class JumpProjNode : public JProjNode {
@@ -479,6 +493,8 @@
   uint proj_no()     const { return _proj_no; }
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
+  virtual void dump_compact_spec(outputStream *st) const;
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
 #endif
 };
 
--- a/hotspot/src/share/vm/opto/compile.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/compile.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -594,6 +594,10 @@
     n->as_MachBranch()->label_set(&fakeL, 0);
   }
   n->emit(buf, this->regalloc());
+
+  // Emitting into the scratch buffer should not fail
+  assert (!failing(), err_msg_res("Must not have pending failure. Reason is: %s", failure_reason()));
+
   if (is_branch) // Restore label.
     n->as_MachBranch()->label_set(saveL, save_bnum);
 
--- a/hotspot/src/share/vm/opto/ifnode.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/ifnode.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -1601,11 +1601,41 @@
   return this;
 }
 
+#ifndef PRODUCT
+//-------------------------------related---------------------------------------
+// An IfProjNode's related node set consists of its input (an IfNode) including
+// the IfNode's condition, plus all of its outputs at level 1. In compact mode,
+// the restrictions for IfNode apply (see IfNode::rel).
+void IfProjNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  Node* ifNode = this->in(0);
+  in_rel->append(ifNode);
+  if (compact) {
+    ifNode->collect_nodes(in_rel, 3, false, true);
+  } else {
+    ifNode->collect_nodes_in_all_data(in_rel, false);
+  }
+  this->collect_nodes(out_rel, -1, false, false);
+}
+
 //------------------------------dump_spec--------------------------------------
-#ifndef PRODUCT
 void IfNode::dump_spec(outputStream *st) const {
   st->print("P=%f, C=%f",_prob,_fcnt);
 }
+
+//-------------------------------related---------------------------------------
+// For an IfNode, the set of related output nodes is just the output nodes till
+// depth 2, i.e, the IfTrue/IfFalse projection nodes plus the nodes they refer.
+// The related input nodes contain no control nodes, but all data nodes
+// pertaining to the condition. In compact mode, the input nodes are collected
+// up to a depth of 3.
+void IfNode::related(GrowableArray <Node *> *in_rel, GrowableArray <Node *> *out_rel, bool compact) const {
+  if (compact) {
+    this->collect_nodes(in_rel, 3, false, true);
+  } else {
+    this->collect_nodes_in_all_data(in_rel, false);
+  }
+  this->collect_nodes(out_rel, -2, false, false);
+}
 #endif
 
 //------------------------------idealize_test----------------------------------
--- a/hotspot/src/share/vm/opto/library_call.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -327,7 +327,7 @@
     methodHandle mh(THREAD, m->get_Method());
     methodHandle ct(THREAD, method()->get_Method());
     is_available = compiler->is_intrinsic_supported(mh, is_virtual) &&
-                   !compiler->is_intrinsic_disabled_by_flag(mh, ct);
+                   !vmIntrinsics::is_disabled_by_flags(mh, ct);
   }
 
   if (is_available) {
--- a/hotspot/src/share/vm/opto/movenode.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/movenode.cpp	Wed Jul 05 20:45:41 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
@@ -396,3 +396,17 @@
   return TypeLong::make( v.get_jlong() );
 }
 
+#ifndef PRODUCT
+//----------------------------BinaryNode---------------------------------------
+// The set of related nodes for a BinaryNode is all data inputs and all outputs
+// till level 2 (i.e., one beyond the associated CMoveNode). In compact mode,
+// it's the inputs till level 1 and the outputs till level 2.
+void BinaryNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  if (compact) {
+    this->collect_nodes(in_rel, 1, false, true);
+  } else {
+    this->collect_nodes_in_all_data(in_rel, false);
+  }
+  this->collect_nodes(out_rel, -2, false, false);
+}
+#endif
--- a/hotspot/src/share/vm/opto/movenode.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/movenode.hpp	Wed Jul 05 20:45:41 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
@@ -145,6 +145,10 @@
   BinaryNode( Node *n1, Node *n2 ) : Node(0,n1,n2) { }
   virtual int Opcode() const;
   virtual uint ideal_reg() const { return 0; }
+
+#ifndef PRODUCT
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
 };
 
 
--- a/hotspot/src/share/vm/opto/multnode.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/multnode.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -118,6 +118,20 @@
 bool ProjNode::pinned() const { return in(0)->pinned(); }
 #ifndef PRODUCT
 void ProjNode::dump_spec(outputStream *st) const { st->print("#%d",_con); if(_is_io_use) st->print(" (i_o_use)");}
+
+void ProjNode::dump_compact_spec(outputStream *st) const {
+  for (DUIterator i = this->outs(); this->has_out(i); i++) {
+    Node* o = this->out(i);
+    if (NotANode(o)) {
+      st->print("[?]");
+    } else if (o == NULL) {
+      st->print("[_]");
+    } else {
+      st->print("[%d]", o->_idx);
+    }
+  }
+  st->print("#%d", _con);
+}
 #endif
 
 //----------------------------check_con----------------------------------------
--- a/hotspot/src/share/vm/opto/multnode.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/multnode.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -87,6 +87,7 @@
 
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
+  virtual void dump_compact_spec(outputStream *st) const;
 #endif
 
   // Return uncommon trap call node if proj is for "proj->[region->..]call_uct"
--- a/hotspot/src/share/vm/opto/node.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/node.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1489,16 +1489,6 @@
 
 #ifndef PRODUCT
 
-//----------------------------NotANode----------------------------------------
-// Used in debugging code to avoid walking across dead or uninitialized edges.
-static inline bool NotANode(const Node* n) {
-  if (n == NULL)                   return true;
-  if (((intptr_t)n & 1) != 0)      return true;  // uninitialized, etc.
-  if (*(address*)n == badAddress)  return true;  // kill by Node::destruct
-  return false;
-}
-
-
 //------------------------------find------------------------------------------
 // Find a neighbor of this Node with the given _idx
 // If idx is negative, find its absolute value, following both _in and _out.
@@ -1636,11 +1626,11 @@
 
 //------------------------------dump------------------------------------------
 // Dump a Node
-void Node::dump(const char* suffix, outputStream *st) const {
+void Node::dump(const char* suffix, bool mark, outputStream *st) const {
   Compile* C = Compile::current();
   bool is_new = C->node_arena()->contains(this);
   C->_in_dump_cnt++;
-  st->print("%c%d\t%s\t=== ", is_new ? ' ' : 'o', _idx, Name());
+  st->print("%c%d%s\t%s\t=== ", is_new ? ' ' : 'o', _idx, mark ? " >" : "", Name());
 
   // Dump the required and precedence inputs
   dump_req(st);
@@ -1760,42 +1750,60 @@
   st->print("]] ");
 }
 
-//------------------------------dump_nodes-------------------------------------
-static void dump_nodes(const Node* start, int d, bool only_ctrl) {
-  Node* s = (Node*)start; // remove const
-  if (NotANode(s)) return;
-
-  uint depth = (uint)ABS(d);
-  int direction = d;
-  Compile* C = Compile::current();
-  GrowableArray <Node *> nstack(C->unique());
-
-  nstack.append(s);
+//----------------------------collect_nodes_i----------------------------------
+// Collects nodes from an Ideal graph, starting from a given start node and
+// moving in a given direction until a certain depth (distance from the start
+// node) is reached. Duplicates are ignored.
+// Arguments:
+//   nstack:        the nodes are collected into this array.
+//   start:         the node at which to start collecting.
+//   direction:     if this is a positive number, collect input nodes; if it is
+//                  a negative number, collect output nodes.
+//   depth:         collect nodes up to this distance from the start node.
+//   include_start: whether to include the start node in the result collection.
+//   only_ctrl:     whether to regard control edges only during traversal.
+//   only_data:     whether to regard data edges only during traversal.
+static void collect_nodes_i(GrowableArray<Node*> *nstack, const Node* start, int direction, uint depth, bool include_start, bool only_ctrl, bool only_data) {
+  Node* s = (Node*) start; // remove const
+  nstack->append(s);
   int begin = 0;
   int end = 0;
   for(uint i = 0; i < depth; i++) {
-    end = nstack.length();
+    end = nstack->length();
     for(int j = begin; j < end; j++) {
-      Node* tp  = nstack.at(j);
+      Node* tp  = nstack->at(j);
       uint limit = direction > 0 ? tp->len() : tp->outcnt();
       for(uint k = 0; k < limit; k++) {
         Node* n = direction > 0 ? tp->in(k) : tp->raw_out(k);
 
         if (NotANode(n))  continue;
         // do not recurse through top or the root (would reach unrelated stuff)
-        if (n->is_Root() || n->is_top())  continue;
+        if (n->is_Root() || n->is_top()) continue;
         if (only_ctrl && !n->is_CFG()) continue;
+        if (only_data && n->is_CFG()) continue;
 
-        bool on_stack = nstack.contains(n);
+        bool on_stack = nstack->contains(n);
         if (!on_stack) {
-          nstack.append(n);
+          nstack->append(n);
         }
       }
     }
     begin = end;
   }
-  end = nstack.length();
-  if (direction > 0) {
+  if (!include_start) {
+    nstack->remove(s);
+  }
+}
+
+//------------------------------dump_nodes-------------------------------------
+static void dump_nodes(const Node* start, int d, bool only_ctrl) {
+  if (NotANode(start)) return;
+
+  GrowableArray <Node *> nstack(Compile::current()->unique());
+  collect_nodes_i(&nstack, start, d, (uint) ABS(d), true, only_ctrl, false);
+
+  int end = nstack.length();
+  if (d > 0) {
     for(int j = end-1; j >= 0; j--) {
       nstack.at(j)->dump();
     }
@@ -1817,6 +1825,221 @@
   dump_nodes(this, d, true);
 }
 
+//-----------------------------dump_compact------------------------------------
+void Node::dump_comp() const {
+  this->dump_comp("\n");
+}
+
+//-----------------------------dump_compact------------------------------------
+// Dump a Node in compact representation, i.e., just print its name and index.
+// Nodes can specify additional specifics to print in compact representation by
+// implementing dump_compact_spec.
+void Node::dump_comp(const char* suffix, outputStream *st) const {
+  Compile* C = Compile::current();
+  C->_in_dump_cnt++;
+  st->print("%s(%d)", Name(), _idx);
+  this->dump_compact_spec(st);
+  if (suffix) {
+    st->print("%s", suffix);
+  }
+  C->_in_dump_cnt--;
+}
+
+//----------------------------dump_related-------------------------------------
+// Dump a Node's related nodes - the notion of "related" depends on the Node at
+// hand and is determined by the implementation of the virtual method rel.
+void Node::dump_related() const {
+  Compile* C = Compile::current();
+  GrowableArray <Node *> in_rel(C->unique());
+  GrowableArray <Node *> out_rel(C->unique());
+  this->related(&in_rel, &out_rel, false);
+  for (int i = in_rel.length() - 1; i >= 0; i--) {
+    in_rel.at(i)->dump();
+  }
+  this->dump("\n", true);
+  for (int i = 0; i < out_rel.length(); i++) {
+    out_rel.at(i)->dump();
+  }
+}
+
+//----------------------------dump_related-------------------------------------
+// Dump a Node's related nodes up to a given depth (distance from the start
+// node).
+// Arguments:
+//   d_in:  depth for input nodes.
+//   d_out: depth for output nodes (note: this also is a positive number).
+void Node::dump_related(uint d_in, uint d_out) const {
+  Compile* C = Compile::current();
+  GrowableArray <Node *> in_rel(C->unique());
+  GrowableArray <Node *> out_rel(C->unique());
+
+  // call collect_nodes_i directly
+  collect_nodes_i(&in_rel, this, 1, d_in, false, false, false);
+  collect_nodes_i(&out_rel, this, -1, d_out, false, false, false);
+
+  for (int i = in_rel.length() - 1; i >= 0; i--) {
+    in_rel.at(i)->dump();
+  }
+  this->dump("\n", true);
+  for (int i = 0; i < out_rel.length(); i++) {
+    out_rel.at(i)->dump();
+  }
+}
+
+//------------------------dump_related_compact---------------------------------
+// Dump a Node's related nodes in compact representation. The notion of
+// "related" depends on the Node at hand and is determined by the implementation
+// of the virtual method rel.
+void Node::dump_related_compact() const {
+  Compile* C = Compile::current();
+  GrowableArray <Node *> in_rel(C->unique());
+  GrowableArray <Node *> out_rel(C->unique());
+  this->related(&in_rel, &out_rel, true);
+  int n_in = in_rel.length();
+  int n_out = out_rel.length();
+
+  this->dump_comp(n_in == 0 ? "\n" : "  ");
+  for (int i = 0; i < n_in; i++) {
+    in_rel.at(i)->dump_comp(i == n_in - 1 ? "\n" : "  ");
+  }
+  for (int i = 0; i < n_out; i++) {
+    out_rel.at(i)->dump_comp(i == n_out - 1 ? "\n" : "  ");
+  }
+}
+
+//------------------------------related----------------------------------------
+// Collect a Node's related nodes. The default behaviour just collects the
+// inputs and outputs at depth 1, including both control and data flow edges,
+// regardless of whether the presentation is compact or not. For data nodes,
+// the default is to collect all data inputs (till level 1 if compact), and
+// outputs till level 1.
+void Node::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  if (this->is_CFG()) {
+    collect_nodes_i(in_rel, this, 1, 1, false, false, false);
+    collect_nodes_i(out_rel, this, -1, 1, false, false, false);
+  } else {
+    if (compact) {
+      this->collect_nodes(in_rel, 1, false, true);
+    } else {
+      this->collect_nodes_in_all_data(in_rel, false);
+    }
+    this->collect_nodes(out_rel, -1, false, false);
+  }
+}
+
+//---------------------------collect_nodes-------------------------------------
+// An entry point to the low-level node collection facility, to start from a
+// given node in the graph. The start node is by default not included in the
+// result.
+// Arguments:
+//   ns:   collect the nodes into this data structure.
+//   d:    the depth (distance from start node) to which nodes should be
+//         collected. A value >0 indicates input nodes, a value <0, output
+//         nodes.
+//   ctrl: include only control nodes.
+//   data: include only data nodes.
+void Node::collect_nodes(GrowableArray<Node*> *ns, int d, bool ctrl, bool data) const {
+  if (ctrl && data) {
+    // ignore nonsensical combination
+    return;
+  }
+  collect_nodes_i(ns, this, d, (uint) ABS(d), false, ctrl, data);
+}
+
+//--------------------------collect_nodes_in-----------------------------------
+static void collect_nodes_in(Node* start, GrowableArray<Node*> *ns, bool primary_is_data, bool collect_secondary) {
+  // The maximum depth is determined using a BFS that visits all primary (data
+  // or control) inputs and increments the depth at each level.
+  uint d_in = 0;
+  GrowableArray<Node*> nodes(Compile::current()->unique());
+  nodes.push(start);
+  int nodes_at_current_level = 1;
+  int n_idx = 0;
+  while (nodes_at_current_level > 0) {
+    // Add all primary inputs reachable from the current level to the list, and
+    // increase the depth if there were any.
+    int nodes_at_next_level = 0;
+    bool nodes_added = false;
+    while (nodes_at_current_level > 0) {
+      nodes_at_current_level--;
+      Node* current = nodes.at(n_idx++);
+      for (uint i = 0; i < current->len(); i++) {
+        Node* n = current->in(i);
+        if (NotANode(n)) {
+          continue;
+        }
+        if ((primary_is_data && n->is_CFG()) || (!primary_is_data && !n->is_CFG())) {
+          continue;
+        }
+        if (!nodes.contains(n)) {
+          nodes.push(n);
+          nodes_added = true;
+          nodes_at_next_level++;
+        }
+      }
+    }
+    if (nodes_added) {
+      d_in++;
+    }
+    nodes_at_current_level = nodes_at_next_level;
+  }
+  start->collect_nodes(ns, d_in, !primary_is_data, primary_is_data);
+  if (collect_secondary) {
+    // Now, iterate over the secondary nodes in ns and add the respective
+    // boundary reachable from them.
+    GrowableArray<Node*> sns(Compile::current()->unique());
+    for (GrowableArrayIterator<Node*> it = ns->begin(); it != ns->end(); ++it) {
+      Node* n = *it;
+      n->collect_nodes(&sns, 1, primary_is_data, !primary_is_data);
+      for (GrowableArrayIterator<Node*> d = sns.begin(); d != sns.end(); ++d) {
+        ns->append_if_missing(*d);
+      }
+      sns.clear();
+    }
+  }
+}
+
+//---------------------collect_nodes_in_all_data-------------------------------
+// Collect the entire data input graph. Include the control boundary if
+// requested.
+// Arguments:
+//   ns:   collect the nodes into this data structure.
+//   ctrl: if true, include the control boundary.
+void Node::collect_nodes_in_all_data(GrowableArray<Node*> *ns, bool ctrl) const {
+  collect_nodes_in((Node*) this, ns, true, ctrl);
+}
+
+//--------------------------collect_nodes_in_all_ctrl--------------------------
+// Collect the entire control input graph. Include the data boundary if
+// requested.
+//   ns:   collect the nodes into this data structure.
+//   data: if true, include the control boundary.
+void Node::collect_nodes_in_all_ctrl(GrowableArray<Node*> *ns, bool data) const {
+  collect_nodes_in((Node*) this, ns, false, data);
+}
+
+//------------------collect_nodes_out_all_ctrl_boundary------------------------
+// Collect the entire output graph until hitting control node boundaries, and
+// include those.
+void Node::collect_nodes_out_all_ctrl_boundary(GrowableArray<Node*> *ns) const {
+  // Perform a BFS and stop at control nodes.
+  GrowableArray<Node*> nodes(Compile::current()->unique());
+  nodes.push((Node*) this);
+  while (nodes.length() > 0) {
+    Node* current = nodes.pop();
+    if (NotANode(current)) {
+      continue;
+    }
+    ns->append_if_missing(current);
+    if (!current->is_CFG()) {
+      for (DUIterator i = current->outs(); current->has_out(i); i++) {
+        nodes.push(current->out(i));
+      }
+    }
+  }
+  ns->remove((Node*) this);
+}
+
 // VERIFICATION CODE
 // For each input edge to a node (ie - for each Use-Def edge), verify that
 // there is a corresponding Def-Use edge.
@@ -2173,6 +2396,11 @@
     st->print(" #"); _type->dump_on(st);
   }
 }
+
+void TypeNode::dump_compact_spec(outputStream *st) const {
+  st->print("#");
+  _type->dump_on(st);
+}
 #endif
 uint TypeNode::hash() const {
   return Node::hash() + _type->hash();
--- a/hotspot/src/share/vm/opto/node.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/node.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1038,13 +1038,35 @@
   Node* find(int idx) const;         // Search the graph for the given idx.
   Node* find_ctrl(int idx) const;    // Search control ancestors for the given idx.
   void dump() const { dump("\n"); }  // Print this node.
-  void dump(const char* suffix, outputStream *st = tty) const;// Print this node.
+  void dump(const char* suffix, bool mark = false, outputStream *st = tty) const; // Print this node.
   void dump(int depth) const;        // Print this node, recursively to depth d
   void dump_ctrl(int depth) const;   // Print control nodes, to depth d
-  virtual void dump_req(outputStream *st = tty) const;     // Print required-edge info
-  virtual void dump_prec(outputStream *st = tty) const;    // Print precedence-edge info
-  virtual void dump_out(outputStream *st = tty) const;     // Print the output edge info
-  virtual void dump_spec(outputStream *st) const {}; // Print per-node info
+  void dump_comp() const;            // Print this node in compact representation.
+  // Print this node in compact representation.
+  void dump_comp(const char* suffix, outputStream *st = tty) const;
+  virtual void dump_req(outputStream *st = tty) const;    // Print required-edge info
+  virtual void dump_prec(outputStream *st = tty) const;   // Print precedence-edge info
+  virtual void dump_out(outputStream *st = tty) const;    // Print the output edge info
+  virtual void dump_spec(outputStream *st) const {};      // Print per-node info
+  // Print compact per-node info
+  virtual void dump_compact_spec(outputStream *st) const { dump_spec(st); }
+  void dump_related() const;             // Print related nodes (depends on node at hand).
+  // Print related nodes up to given depths for input and output nodes.
+  void dump_related(uint d_in, uint d_out) const;
+  void dump_related_compact() const;     // Print related nodes in compact representation.
+  // Collect related nodes.
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+  // Collect nodes starting from this node, explicitly including/excluding control and data links.
+  void collect_nodes(GrowableArray<Node*> *ns, int d, bool ctrl, bool data) const;
+
+  // Node collectors, to be used in implementations of Node::rel().
+  // Collect the entire data input graph. Include control inputs if requested.
+  void collect_nodes_in_all_data(GrowableArray<Node*> *ns, bool ctrl) const;
+  // Collect the entire control input graph. Include data inputs if requested.
+  void collect_nodes_in_all_ctrl(GrowableArray<Node*> *ns, bool data) const;
+  // Collect the entire output graph until hitting and including control nodes.
+  void collect_nodes_out_all_ctrl_boundary(GrowableArray<Node*> *ns) const;
+
   void verify_edges(Unique_Node_List &visited); // Verify bi-directional edges
   void verify() const;               // Check Def-Use info for my subgraph
   static void verify_recur(const Node *n, int verify_depth, VectorSet &old_space, VectorSet &new_space);
@@ -1091,6 +1113,20 @@
 #endif
 };
 
+
+#ifndef PRODUCT
+
+// Used in debugging code to avoid walking across dead or uninitialized edges.
+inline bool NotANode(const Node* n) {
+  if (n == NULL)                   return true;
+  if (((intptr_t)n & 1) != 0)      return true;  // uninitialized, etc.
+  if (*(address*)n == badAddress)  return true;  // kill by Node::destruct
+  return false;
+}
+
+#endif
+
+
 //-----------------------------------------------------------------------------
 // Iterators over DU info, and associated Node functions.
 
@@ -1618,6 +1654,7 @@
   virtual       uint  ideal_reg() const;
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
+  virtual void dump_compact_spec(outputStream *st) const;
 #endif
 };
 
--- a/hotspot/src/share/vm/opto/output.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/output.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1504,6 +1504,13 @@
       n->emit(*cb, _regalloc);
       current_offset  = cb->insts_size();
 
+      // Above we only verified that there is enough space in the instruction section.
+      // However, the instruction may emit stubs that cause code buffer expansion.
+      // Bail out here if expansion failed due to a lack of code cache space.
+      if (failing()) {
+        return;
+      }
+
 #ifdef ASSERT
       if (n->size(_regalloc) < (current_offset-instr_offset)) {
         n->dump();
@@ -1632,11 +1639,14 @@
   if (_method) {
     // Emit the exception handler code.
     _code_offsets.set_value(CodeOffsets::Exceptions, HandlerImpl::emit_exception_handler(*cb));
+    if (failing()) {
+      return; // CodeBuffer::expand failed
+    }
     // Emit the deopt handler code.
     _code_offsets.set_value(CodeOffsets::Deopt, HandlerImpl::emit_deopt_handler(*cb));
 
     // Emit the MethodHandle deopt handler code (if required).
-    if (has_method_handle_invokes()) {
+    if (has_method_handle_invokes() && !failing()) {
       // We can use the same code as for the normal deopt handler, we
       // just need a different entry point address.
       _code_offsets.set_value(CodeOffsets::DeoptMH, HandlerImpl::emit_deopt_handler(*cb));
--- a/hotspot/src/share/vm/opto/rootnode.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/rootnode.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,3 +88,18 @@
 const RegMask &HaltNode::out_RegMask() const {
   return RegMask::Empty;
 }
+
+#ifndef PRODUCT
+//-----------------------------related-----------------------------------------
+// Include all control inputs in the related set, and also the input data
+// boundary. In compact mode, include all inputs till level 2. Also include
+// all outputs at level 1.
+void HaltNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  if (compact) {
+    this->collect_nodes(in_rel, 2, false, false);
+  } else {
+    this->collect_nodes_in_all_ctrl(in_rel, true);
+  }
+  this->collect_nodes(out_rel, -1, false, false);
+}
+#endif
--- a/hotspot/src/share/vm/opto/rootnode.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/rootnode.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,6 +64,10 @@
   virtual const RegMask &out_RegMask() const;
   virtual uint ideal_reg() const { return NotAMachineReg; }
   virtual uint match_edge(uint idx) const { return 0; }
+
+#ifndef PRODUCT
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
 };
 
 #endif // SHARE_VM_OPTO_ROOTNODE_HPP
--- a/hotspot/src/share/vm/opto/subnode.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/subnode.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -498,6 +498,37 @@
   return this;
 }
 
+#ifndef PRODUCT
+//----------------------------related------------------------------------------
+// Related nodes of comparison nodes include all data inputs (until hitting a
+// control boundary) as well as all outputs until and including control nodes
+// as well as their projections. In compact mode, data inputs till depth 1 and
+// all outputs till depth 1 are considered.
+void CmpNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  if (compact) {
+    this->collect_nodes(in_rel, 1, false, true);
+    this->collect_nodes(out_rel, -1, false, false);
+  } else {
+    this->collect_nodes_in_all_data(in_rel, false);
+    this->collect_nodes_out_all_ctrl_boundary(out_rel);
+    // Now, find all control nodes in out_rel, and include their projections
+    // and projection targets (if any) in the result.
+    GrowableArray<Node*> proj(Compile::current()->unique());
+    for (GrowableArrayIterator<Node*> it = out_rel->begin(); it != out_rel->end(); ++it) {
+      Node* n = *it;
+      if (n->is_CFG() && !n->is_Proj()) {
+        // Assume projections and projection targets are found at levels 1 and 2.
+        n->collect_nodes(&proj, -2, false, false);
+        for (GrowableArrayIterator<Node*> p = proj.begin(); p != proj.end(); ++p) {
+          out_rel->append_if_missing(*p);
+        }
+        proj.clear();
+      }
+    }
+  }
+}
+#endif
+
 //=============================================================================
 //------------------------------cmp--------------------------------------------
 // Simplify a CmpI (compare 2 integers) node, based on local information.
@@ -1396,17 +1427,31 @@
   return _test.cc2logical( phase->type( in(1) ) );
 }
 
+#ifndef PRODUCT
 //------------------------------dump_spec--------------------------------------
 // Dump special per-node info
-#ifndef PRODUCT
 void BoolNode::dump_spec(outputStream *st) const {
   st->print("[");
   _test.dump_on(st);
   st->print("]");
 }
+
+//-------------------------------related---------------------------------------
+// A BoolNode's related nodes are all of its data inputs, and all of its
+// outputs until control nodes are hit, which are included. In compact
+// representation, inputs till level 3 and immediate outputs are included.
+void BoolNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
+  if (compact) {
+    this->collect_nodes(in_rel, 3, false, true);
+    this->collect_nodes(out_rel, -1, false, false);
+  } else {
+    this->collect_nodes_in_all_data(in_rel, false);
+    this->collect_nodes_out_all_ctrl_boundary(out_rel);
+  }
+}
 #endif
 
-//------------------------------is_counted_loop_exit_test--------------------------------------
+//----------------------is_counted_loop_exit_test------------------------------
 // Returns true if node is used by a counted loop node.
 bool BoolNode::is_counted_loop_exit_test() {
   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
--- a/hotspot/src/share/vm/opto/subnode.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/opto/subnode.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,7 +60,6 @@
   // Supplied function to return the additive identity type.
   // This is returned whenever the subtracts inputs are the same.
   virtual const Type *add_id() const = 0;
-
 };
 
 
@@ -140,6 +139,13 @@
   const Type *add_id() const { return TypeInt::ZERO; }
   const Type *bottom_type() const { return TypeInt::CC; }
   virtual uint ideal_reg() const { return Op_RegFlags; }
+
+#ifndef PRODUCT
+  // CmpNode and subclasses include all data inputs (until hitting a control
+  // boundary) in their related node set, as well as all outputs until and
+  // including eventual control nodes and their projections.
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
 };
 
 //------------------------------CmpINode---------------------------------------
@@ -311,6 +317,7 @@
   bool is_counted_loop_exit_test();
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
+  virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
 #endif
 };
 
--- a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -70,7 +70,10 @@
 #endif
 
   // The default CICompilerCount's value is CI_COMPILER_COUNT.
-  assert(min_number_of_compiler_threads <= CI_COMPILER_COUNT, "minimum should be less or equal default number");
+  // With a client VM, -XX:+TieredCompilation causes TieredCompilation
+  // to be true here (the option is validated later) and
+  // min_number_of_compiler_threads to exceed CI_COMPILER_COUNT.
+  min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT);
 
   if (*value < (intx)min_number_of_compiler_threads) {
     if (verbose == true) {
--- a/hotspot/src/share/vm/runtime/globals.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -848,6 +848,9 @@
   product(bool, UseCRC32CIntrinsics, false,                                 \
           "use intrinsics for java.util.zip.CRC32C")                        \
                                                                             \
+  diagnostic(ccstrlist, DisableIntrinsic, "",                               \
+         "do not expand intrinsics whose (internal) names appear here")     \
+                                                                            \
   develop(bool, TraceCallFixup, false,                                      \
           "Trace all call fixups")                                          \
                                                                             \
@@ -3913,7 +3916,7 @@
   product(bool, PerfDisableSharedMem, false,                                \
           "Store performance data in standard memory")                      \
                                                                             \
-  product(intx, PerfDataMemorySize, 32*K,                                   \
+  product(intx, PerfDataMemorySize, 64*K,                                   \
           "Size of performance data memory region. Will be rounded "        \
           "up to a multiple of the native os page size.")                   \
                                                                             \
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp	Wed Jul 05 20:45:41 2017 +0200
@@ -37,6 +37,7 @@
 #include "services/management.hpp"
 #include "services/writeableFlags.hpp"
 #include "utilities/macros.hpp"
+#include "oops/objArrayOop.inline.hpp"
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
 
@@ -57,6 +58,8 @@
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(full_export, true, false));
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(full_export, true, false));
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(full_export, true, false));
+  DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapInfoDCmd>(full_export, true, false));
+  DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<FinalizerInfoDCmd>(full_export, true, false));
 #if INCLUDE_SERVICES // Heap dumping/inspection supported
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false));
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(full_export, true, false));
@@ -333,6 +336,60 @@
                          vmSymbols::void_method_signature(), CHECK);
 }
 
+void HeapInfoDCmd::execute(DCmdSource source, TRAPS) {
+  Universe::heap()->print_on(output());
+}
+
+void FinalizerInfoDCmd::execute(DCmdSource source, TRAPS) {
+  ResourceMark rm;
+
+
+  Klass* k = SystemDictionary::resolve_or_null(
+    vmSymbols::finalizer_histogram_klass(), THREAD);
+  assert(k != NULL, "FinalizerHistogram class is not accessible");
+
+  instanceKlassHandle klass(THREAD, k);
+  JavaValue result(T_ARRAY);
+
+  // We are calling lang.ref.FinalizerHistogram.getFinalizerHistogram() method
+  // and expect it to return array of FinalizerHistogramEntry as Object[]
+
+  JavaCalls::call_static(&result, klass,
+                         vmSymbols::get_finalizer_histogram_name(),
+                         vmSymbols::void_finalizer_histogram_entry_array_signature(), CHECK);
+
+  objArrayOop result_oop = (objArrayOop) result.get_jobject();
+  if (result_oop->length() == 0) {
+    output()->print_cr("No instances waiting for finalization found");
+    return;
+  }
+
+  oop foop = result_oop->obj_at(0);
+  InstanceKlass* ik = InstanceKlass::cast(foop->klass());
+
+  fieldDescriptor count_fd, name_fd;
+
+  Klass* count_res = ik->find_field(
+    vmSymbols::finalizer_histogram_entry_count_field(), vmSymbols::int_signature(), &count_fd);
+
+  Klass* name_res = ik->find_field(
+    vmSymbols::finalizer_histogram_entry_name_field(), vmSymbols::string_signature(), &name_fd);
+
+  assert(count_res != NULL && name_res != NULL, "Unexpected layout of FinalizerHistogramEntry");
+
+  output()->print_cr("Unreachable instances waiting for finalization");
+  output()->print_cr("#instances  class name");
+  output()->print_cr("-----------------------");
+
+  for (int i = 0; i < result_oop->length(); ++i) {
+    oop element_oop = result_oop->obj_at(i);
+    oop str_oop = element_oop->obj_field(name_fd.offset());
+    char *name = java_lang_String::as_utf8_string(str_oop);
+    int count = element_oop->int_field(count_fd.offset());
+    output()->print_cr("%10d  %s", count, name);
+  }
+}
+
 #if INCLUDE_SERVICES // Heap dumping/inspection supported
 HeapDumpDCmd::HeapDumpDCmd(outputStream* output, bool heap) :
                            DCmdWithParser(output, heap),
--- a/hotspot/src/share/vm/services/diagnosticCommand.hpp	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/src/share/vm/services/diagnosticCommand.hpp	Wed Jul 05 20:45:41 2017 +0200
@@ -241,6 +241,46 @@
     virtual void execute(DCmdSource source, TRAPS);
 };
 
+class HeapInfoDCmd : public DCmd {
+public:
+  HeapInfoDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
+  static const char* name() { return "GC.heap_info"; }
+  static const char* description() {
+    return "Provide generic Java heap information.";
+  }
+  static const char* impact() {
+    return "Medium";
+  }
+  static int num_arguments() { return 0; }
+  static const JavaPermission permission() {
+    JavaPermission p = {"java.lang.management.ManagementPermission",
+      "monitor", NULL};
+      return p;
+  }
+
+  virtual void execute(DCmdSource source, TRAPS);
+};
+
+class FinalizerInfoDCmd : public DCmd {
+public:
+  FinalizerInfoDCmd(outputStream* output, bool heap) : DCmd(output, heap) { }
+  static const char* name() { return "GC.finalizer_info"; }
+  static const char* description() {
+    return "Provide information about Java finalization queue.";
+  }
+  static const char* impact() {
+    return "Medium";
+  }
+  static int num_arguments() { return 0; }
+  static const JavaPermission permission() {
+    JavaPermission p = {"java.lang.management.ManagementPermission",
+      "monitor", NULL};
+      return p;
+  }
+
+  virtual void execute(DCmdSource source, TRAPS);
+};
+
 #if INCLUDE_SERVICES   // Heap dumping supported
 // See also: dump_heap in attachListener.cpp
 class HeapDumpDCmd : public DCmdWithParser {
--- a/hotspot/test/compiler/arguments/CheckCICompilerCount.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/test/compiler/arguments/CheckCICompilerCount.java	Wed Jul 05 20:45:41 2017 +0200
@@ -26,6 +26,7 @@
 /*
  * @test CheckCheckCICompilerCount
  * @bug 8130858
+ * @bug 8132525
  * @summary Check that correct range of values for CICompilerCount are allowed depending on whether tiered is enabled or not
  * @library /testlibrary
  * @modules java.base/sun.misc
@@ -36,12 +37,28 @@
 public class CheckCICompilerCount {
     private static final String[][] NON_TIERED_ARGUMENTS = {
         {
+            "-server",
             "-XX:-TieredCompilation",
             "-XX:+PrintFlagsFinal",
             "-XX:CICompilerCount=0",
             "-version"
         },
         {
+            "-server",
+            "-XX:-TieredCompilation",
+            "-XX:+PrintFlagsFinal",
+            "-XX:CICompilerCount=1",
+            "-version"
+        },
+        {
+            "-client",
+            "-XX:-TieredCompilation",
+            "-XX:+PrintFlagsFinal",
+            "-XX:CICompilerCount=0",
+            "-version"
+        },
+        {
+            "-client",
             "-XX:-TieredCompilation",
             "-XX:+PrintFlagsFinal",
             "-XX:CICompilerCount=1",
@@ -56,22 +73,47 @@
         },
         {
             "intx CICompilerCount                          := 1                                   {product}"
+        },
+        {
+            "CICompilerCount=0 must be at least 1",
+            "Improperly specified VM option 'CICompilerCount=0'"
+        },
+        {
+            "intx CICompilerCount                          := 1                                   {product}"
         }
     };
 
     private static final int[] NON_TIERED_EXIT = {
         1,
+        0,
+        1,
         0
     };
 
     private static final String[][] TIERED_ARGUMENTS = {
         {
+            "-server",
             "-XX:+TieredCompilation",
             "-XX:+PrintFlagsFinal",
             "-XX:CICompilerCount=1",
             "-version"
         },
         {
+            "-server",
+            "-XX:+TieredCompilation",
+            "-XX:+PrintFlagsFinal",
+            "-XX:CICompilerCount=2",
+            "-version"
+        },
+        {
+            "-client",
+            "-XX:+TieredCompilation",
+            "-XX:+PrintFlagsFinal",
+            "-XX:CICompilerCount=1",
+            "-version"
+        },
+        {
+            "-client",
             "-XX:+TieredCompilation",
             "-XX:+PrintFlagsFinal",
             "-XX:CICompilerCount=2",
@@ -86,11 +128,20 @@
         },
         {
             "intx CICompilerCount                          := 2                                   {product}"
+        },
+        {
+            "CICompilerCount=1 must be at least 2",
+            "Improperly specified VM option 'CICompilerCount=1'"
+        },
+        {
+            "intx CICompilerCount                          := 2                                   {product}"
         }
     };
 
     private static final int[] TIERED_EXIT = {
         1,
+        0,
+        1,
         0
     };
 
--- a/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java	Wed Jul 05 20:45:41 2017 +0200
@@ -87,6 +87,24 @@
       output.shouldNotContain("TestLogTouchedMethods.methodB:()V");
       output.shouldHaveExitValue(0);
 
+      String[] javaArgs4 = {"-XX:+UnlockDiagnosticVMOptions", "-Xint", "-XX:+LogTouchedMethods", "-XX:+PrintTouchedMethodsAtExit", "-XX:-TieredCompilation", "TestLogTouchedMethods"};
+      pb = ProcessTools.createJavaProcessBuilder(javaArgs4);
+      output = new OutputAnalyzer(pb.start());
+      lines = output.asLines();
+
+      if (lines.size() < 1) {
+        throw new Exception("Empty output");
+      }
+
+      first = lines.get(0);
+      if (!first.equals("# Method::print_touched_methods version 1")) {
+        throw new Exception("First line mismatch");
+      }
+
+      output.shouldContain("TestLogTouchedMethods.methodA:()V");
+      output.shouldNotContain("TestLogTouchedMethods.methodB:()V");
+      output.shouldHaveExitValue(0);
+
       // Test jcmd PrintTouchedMethods VM.print_touched_methods
       String pid = Integer.toString(ProcessTools.getProcessId());
       pb = new ProcessBuilder();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java	Wed Jul 05 20:45:41 2017 +0200
@@ -0,0 +1,87 @@
+/*
+ * 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 org.testng.annotations.Test;
+import org.testng.Assert;
+
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.ReentrantLock;
+
+import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.dcmd.CommandExecutor;
+import jdk.test.lib.dcmd.PidJcmdExecutor;
+
+/*
+ * @test
+ * @summary
+ * @library /testlibrary
+ * @build jdk.test.lib.*
+ * @build jdk.test.lib.dcmd.*
+ * @run testng FinalizerInfoTest
+ */
+public class FinalizerInfoTest {
+    static ReentrantLock lock = new ReentrantLock();
+    static volatile int wasInitialized = 0;
+    static volatile int wasTrapped = 0;
+    static final String cmd = "GC.finalizer_info";
+    static final int objectsCount = 1000;
+
+    class MyObject {
+        public MyObject() {
+            // Make sure object allocation/deallocation is not optimized out
+            wasInitialized += 1;
+        }
+
+        protected void finalize() {
+            // Trap the object in a finalization queue
+            wasTrapped += 1;
+            lock.lock();
+        }
+    }
+
+    public void run(CommandExecutor executor) {
+        try {
+            lock.lock();
+            for(int i = 0; i < objectsCount; ++i) {
+                new MyObject();
+            }
+            System.out.println("Objects initialized: " + objectsCount);
+            System.gc();
+
+            while(wasTrapped < 1) {
+                // Waiting for gc thread.
+            }
+
+            OutputAnalyzer output = executor.execute(cmd);
+            output.shouldContain("MyObject");
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    @Test
+    public void pid() {
+        run(new PidJcmdExecutor());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java	Wed Jul 05 20:45:41 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.
+ */
+
+import org.testng.annotations.Test;
+import org.testng.Assert;
+
+import java.io.IOException;
+
+import jdk.test.lib.dcmd.CommandExecutor;
+import jdk.test.lib.dcmd.PidJcmdExecutor;
+import jdk.test.lib.OutputAnalyzer;
+
+
+/*
+ * @test
+ * @summary Test of diagnostic command GC.heap_info
+ * @library /testlibrary
+ * @build jdk.test.lib.*
+ * @build jdk.test.lib.dcmd.*
+ * @run testng HeapInfoTest
+ */
+public class HeapInfoTest {
+    public void run(CommandExecutor executor) {
+        String cmd = "GC.heap_info";
+        OutputAnalyzer output = executor.execute(cmd);
+        output.shouldContain("Metaspace");
+    }
+
+    @Test
+    public void pid() {
+        run(new PidJcmdExecutor());
+    }
+}
+
--- a/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java	Wed Jul 05 20:45:41 2017 +0200
@@ -21,15 +21,13 @@
  * questions.
  */
 
-import org.testng.annotations.Test;
-import org.testng.Assert;
-
+import java.util.concurrent.Phaser;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.TimeoutException;
 
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
+import jdk.test.lib.Utils;
 
 /*
  * @test
@@ -41,62 +39,71 @@
  *          jdk.jvmstat/sun.jvmstat.monitor
  * @build jdk.test.lib.*
  * @build jdk.test.lib.dcmd.*
- * @run testng RunFinalizationTest
+ * @run main/othervm RunFinalizationTest
  */
 public class RunFinalizationTest {
-    static ReentrantLock lock = new ReentrantLock();
-    static Condition cond = lock.newCondition();
+    private static final long TIMEOUT = Utils.adjustTimeout(15000); // 15s
+    private static final Phaser ph = new Phaser(3);
     static volatile boolean wasFinalized = false;
     static volatile boolean wasInitialized = false;
 
-    class MyObject {
+    static class MyObject {
         public MyObject() {
             /* Make sure object allocation/deallocation is not optimized out */
             wasInitialized = true;
         }
 
         protected void finalize() {
-            lock.lock();
-            wasFinalized = true;
-            cond.signalAll();
-            lock.unlock();
+            if (!Thread.currentThread().getName().equals("Finalizer")) {
+                wasFinalized = true;
+                ph.arrive();
+            } else {
+                ph.arriveAndAwaitAdvance();
+            }
         }
     }
 
     public static MyObject o;
 
-    public void run(CommandExecutor executor) {
-        lock.lock();
+    private static void run(CommandExecutor executor) {
         o = new MyObject();
         o = null;
         System.gc();
         executor.execute("GC.run_finalization");
 
-        int waited = 0;
-        int waitTime = 15;
+        System.out.println("Waiting for signal from finalizer");
 
-        try {
-            System.out.println("Waiting for signal from finalizer");
-
-            while (!cond.await(waitTime, TimeUnit.SECONDS)) {
-                waited += waitTime;
-                System.out.println(String.format("Waited %d seconds", waited));
+        long targetTime = System.currentTimeMillis() + TIMEOUT;
+        while (System.currentTimeMillis() < targetTime) {
+            try {
+                ph.awaitAdvanceInterruptibly(ph.arrive(), 200, TimeUnit.MILLISECONDS);
+                System.out.println("Received signal");
+                break;
+            } catch (InterruptedException e) {
+                fail("Test error: Interrupted while waiting for signal from finalizer", e);
+            } catch (TimeoutException e) {
+                System.out.println("Haven't received signal in 200ms. Retrying ...");
             }
-
-            System.out.println("Received signal");
-        } catch (InterruptedException e) {
-            Assert.fail("Test error: Interrupted while waiting for signal from finalizer", e);
-        } finally {
-            lock.unlock();
         }
 
         if (!wasFinalized) {
-            Assert.fail("Test failure: Object was not finalized");
+            fail("Test failure: Object was not finalized");
         }
     }
 
-    @Test
-    public void jmx() {
-        run(new JMXExecutor());
+    public static void main(String ... args) {
+        MyObject o = new MyObject();
+        o = null;
+        Runtime.getRuntime().addShutdownHook(new Thread(()->{
+            run(new JMXExecutor());
+        }));
+    }
+
+    private static void fail(String msg, Exception e) {
+        throw new Error(msg, e);
+    }
+
+    private static void fail(String msg) {
+        throw new Error(msg);
     }
 }
--- a/hotspot/test/testlibrary/jdk/test/lib/Utils.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/hotspot/test/testlibrary/jdk/test/lib/Utils.java	Wed Jul 05 20:45:41 2017 +0200
@@ -314,9 +314,8 @@
      */
     public static String fileAsString(String filename) throws IOException {
         Path filePath = Paths.get(filename);
-        return Files.exists(filePath)
-            ? Files.lines(filePath).collect(Collectors.joining(NEW_LINE))
-            : null;
+        if (!Files.exists(filePath)) return null;
+        return new String(Files.readAllBytes(filePath));
     }
 
     /**
--- a/jdk/.hgtags	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/.hgtags	Wed Jul 05 20:45:41 2017 +0200
@@ -319,3 +319,4 @@
 6dd82d2e4a104f4d204b2890f33ef11ec3e3f8d0 jdk9-b74
 4dd09cb5f7c2a2a23a9958ea7a602dd74d5709b2 jdk9-b75
 4526c0da8fb362eebd7e88f4d44e86858cf9b80b jdk9-b76
+7fd081100f48828431e7c1bff65c906ee759069b jdk9-b77
--- a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk	Wed Jul 05 20:45:41 2017 +0200
@@ -26,5 +26,5 @@
 include LauncherCommon.gmk
 
 $(eval $(call SetupLauncher,jjs, \
-    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
+    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.jjs.Main"$(COMMA) }'))
 
--- a/jdk/make/lib/NioLibraries.gmk	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/make/lib/NioLibraries.gmk	Wed Jul 05 20:45:41 2017 +0200
@@ -24,6 +24,7 @@
 #
 
 BUILD_LIBNIO_SRC := \
+    $(JDK_TOPDIR)/src/java.base/share/native/libnio \
     $(JDK_TOPDIR)/src/java.base/share/native/libnio/ch \
     $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio \
     $(sort $(wildcard \
--- a/jdk/make/lib/SoundLibraries.gmk	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/make/lib/SoundLibraries.gmk	Wed Jul 05 20:45:41 2017 +0200
@@ -123,9 +123,6 @@
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(LIBJSOUND_CFLAGS), \
     CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
-    DISABLED_WARNINGS_clang := implicit-function-declaration \
-        deprecated-writable-strings, \
-    WARNINGS_AS_ERRORS_clang := false, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -171,7 +168,6 @@
           -DUSE_PORTS=TRUE \
           -DUSE_PLATFORM_MIDI_OUT=TRUE \
           -DUSE_PLATFORM_MIDI_IN=TRUE, \
-      DISABLED_WARNINGS_gcc := parentheses, \
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsoundalsa/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/jdk/make/mapfiles/libnio/mapfile-linux	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/make/mapfiles/libnio/mapfile-linux	Wed Jul 05 20:45:41 2017 +0200
@@ -25,6 +25,7 @@
 
 SUNWprivate_1.1 {
 	global:
+                JNI_OnLoad;
                 Java_java_nio_MappedByteBuffer_force0;
                 Java_java_nio_MappedByteBuffer_isLoaded0;
                 Java_java_nio_MappedByteBuffer_load0;
--- a/jdk/make/mapfiles/libnio/mapfile-macosx	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/make/mapfiles/libnio/mapfile-macosx	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 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,6 +25,7 @@
 
 SUNWprivate_1.1 {
 	global:
+                JNI_OnLoad;
                 Java_java_nio_MappedByteBuffer_force0;
                 Java_java_nio_MappedByteBuffer_isLoaded0;
                 Java_java_nio_MappedByteBuffer_load0;
--- a/jdk/make/mapfiles/libnio/mapfile-solaris	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/make/mapfiles/libnio/mapfile-solaris	Wed Jul 05 20:45:41 2017 +0200
@@ -25,6 +25,7 @@
 
 SUNWprivate_1.1 {
 	global:
+                JNI_OnLoad;
                 Java_java_nio_MappedByteBuffer_force0;
                 Java_java_nio_MappedByteBuffer_isLoaded0;
                 Java_java_nio_MappedByteBuffer_load0;
--- a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java	Wed Jul 05 20:45:41 2017 +0200
@@ -31,22 +31,19 @@
 import java.util.StringTokenizer;
 
 /**
- * This class is for runtime permissions. A RuntimePermission
- * contains a name (also referred to as a "target name") but
- * no actions list; you either have the named permission
- * or you don't.
- *
- * <P>
+ * This class is for runtime permissions. A {@code RuntimePermission}
+ * contains a name (also referred to as a "target name") but no actions
+ * list; you either have the named permission or you don't.
+ * <p>
  * The target name is the name of the runtime permission (see below). The
  * naming convention follows the  hierarchical property naming convention.
- * Also, an asterisk
- * may appear at the end of the name, following a ".", or by itself, to
- * signify a wildcard match. For example: "loadLibrary.*" and "*" signify a
- * wildcard match, while "*loadLibrary" and "a*b" do not.
- * <P>
- * The following table lists all the possible RuntimePermission target names,
- * and for each provides a description of what the permission allows
- * and a discussion of the risks of granting code the permission.
+ * Also, an asterisk may appear at the end of the name, following a ".",
+ * or by itself, to signify a wildcard match. For example: "loadLibrary.*"
+ * and "*" signify a wildcard match, while "*loadLibrary" and "a*b" do not.
+ * <p>
+ * The following table lists the standard {@code RuntimePermission}
+ * target names, and for each provides a description of what the permission
+ * allows and a discussion of the risks of granting code the permission.
  *
  * <table border=1 cellpadding=5 summary="permission target name,
  *  what the target allows,and associated risks">
@@ -353,6 +350,10 @@
  * </tr>
  * </table>
  *
+ * @implNote
+ * Implementations may define additional target names, but should use naming
+ * conventions such as reverse domain name notation to avoid name clashes.
+ *
  * @see java.security.BasicPermission
  * @see java.security.Permission
  * @see java.security.Permissions
--- a/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,6 +83,10 @@
         add();
     }
 
+    static ReferenceQueue<Object> getQueue() {
+        return queue;
+    }
+
     /* Invoked by VM */
     static void register(Object finalizee) {
         new Finalizer(finalizee);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/ref/FinalizerHistogram.java	Wed Jul 05 20:45:41 2017 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.ref;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Arrays;
+import java.util.Comparator;
+
+/**
+ * This FinalizerHistogram class is for GC.finalizer_info diagnostic command support.
+ * It is invoked by the VM.
+ */
+
+final class FinalizerHistogram {
+
+    private static final class Entry {
+        private int instanceCount;
+        private final String className;
+
+        int getInstanceCount() {
+            return instanceCount;
+        }
+
+        void increment() {
+            instanceCount += 1;
+        }
+
+        Entry(String className) {
+            this.className = className;
+        }
+    }
+
+    // Method below is called by VM and VM expect certain
+    // entry class layout.
+
+    static Entry[] getFinalizerHistogram() {
+        Map<String, Entry> countMap = new HashMap<>();
+        ReferenceQueue<Object> queue = Finalizer.getQueue();
+        queue.forEach(r -> {
+            Object referent = r.get();
+            if (referent != null) {
+                countMap.computeIfAbsent(
+                    referent.getClass().getName(), Entry::new).increment();
+                /* Clear stack slot containing this variable, to decrease
+                   the chances of false retention with a conservative GC */
+                referent = null;
+            }
+        });
+
+        Entry fhe[] = countMap.values().toArray(new Entry[countMap.size()]);
+        Arrays.sort(fhe,
+                Comparator.comparingInt(Entry::getInstanceCount).reversed());
+        return fhe;
+    }
+}
--- a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -101,7 +101,7 @@
      *    Inactive:   this
      */
     @SuppressWarnings("rawtypes")
-    Reference next;
+    volatile Reference next;
 
     /* When active:   next element in a discovered reference list maintained by GC (or this if last)
      *     pending:   next element in the pending list (or null if last)
--- a/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
 
 package java.lang.ref;
 
+import java.util.function.Consumer;
+
 /**
  * Reference queues, to which registered reference objects are appended by the
  * garbage collector after the appropriate reachability changes are detected.
@@ -75,13 +77,12 @@
         }
     }
 
-    @SuppressWarnings("unchecked")
     private Reference<? extends T> reallyPoll() {       /* Must hold lock */
         Reference<? extends T> r = head;
         if (r != null) {
-            head = (r.next == r) ?
-                null :
-                r.next; // Unchecked due to the next field having a raw type in Reference
+            @SuppressWarnings("unchecked")
+            Reference<? extends T> rn = r.next;
+            head = (rn == r) ? null : rn;
             r.queue = NULL;
             r.next = r;
             queueLength--;
@@ -164,4 +165,32 @@
         return remove(0);
     }
 
+    /**
+     * Iterate queue and invoke given action with each Reference.
+     * Suitable for diagnostic purposes.
+     * WARNING: any use of this method should make sure to not
+     * retain the referents of iterated references (in case of
+     * FinalReference(s)) so that their life is not prolonged more
+     * than necessary.
+     */
+    void forEach(Consumer<? super Reference<? extends T>> action) {
+        for (Reference<? extends T> r = head; r != null;) {
+            action.accept(r);
+            @SuppressWarnings("unchecked")
+            Reference<? extends T> rn = r.next;
+            if (rn == r) {
+                if (r.queue == ENQUEUED) {
+                    // still enqueued -> we reached end of chain
+                    r = null;
+                } else {
+                    // already dequeued: r.queue == NULL; ->
+                    // restart from head when overtaken by queue poller(s)
+                    r = head;
+                }
+            } else {
+                // next in chain
+                r = rn;
+            }
+        }
+    }
 }
--- a/jdk/src/java.base/share/classes/java/nio/Buffer.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/Buffer.java	Wed Jul 05 20:45:41 2017 +0200
@@ -96,10 +96,10 @@
  * capacity values:
  *
  * <blockquote>
- *     <tt>0</tt> <tt>&lt;=</tt>
- *     <i>mark</i> <tt>&lt;=</tt>
- *     <i>position</i> <tt>&lt;=</tt>
- *     <i>limit</i> <tt>&lt;=</tt>
+ *     {@code 0} {@code <=}
+ *     <i>mark</i> {@code <=}
+ *     <i>position</i> {@code <=}
+ *     <i>limit</i> {@code <=}
  *     <i>capacity</i>
  * </blockquote>
  *
@@ -229,7 +229,7 @@
      *         The new buffer's capacity, in $type$s
      *
      * @throws  IllegalArgumentException
-     *          If the <tt>capacity</tt> is a negative integer
+     *          If the {@code capacity} is a negative integer
      */
     static IllegalArgumentException createCapacityException(int capacity) {
         assert capacity < 0 : "capacity expected to be negative";
@@ -266,7 +266,7 @@
      * @return  This buffer
      *
      * @throws  IllegalArgumentException
-     *          If the preconditions on <tt>newPosition</tt> do not hold
+     *          If the preconditions on {@code newPosition} do not hold
      */
     public Buffer position(int newPosition) {
         if (newPosition > limit | newPosition < 0)
@@ -319,7 +319,7 @@
      * @return  This buffer
      *
      * @throws  IllegalArgumentException
-     *          If the preconditions on <tt>newLimit</tt> do not hold
+     *          If the preconditions on {@code newLimit} do not hold
      */
     public Buffer limit(int newLimit) {
         if (newLimit > capacity | newLimit < 0)
@@ -468,7 +468,7 @@
      * Tells whether there are any elements between the current position and
      * the limit.
      *
-     * @return  <tt>true</tt> if, and only if, there is at least one element
+     * @return  {@code true} if, and only if, there is at least one element
      *          remaining in this buffer
      */
     public final boolean hasRemaining() {
@@ -478,7 +478,7 @@
     /**
      * Tells whether or not this buffer is read-only.
      *
-     * @return  <tt>true</tt> if, and only if, this buffer is read-only
+     * @return  {@code true} if, and only if, this buffer is read-only
      */
     public abstract boolean isReadOnly();
 
@@ -486,11 +486,11 @@
      * Tells whether or not this buffer is backed by an accessible
      * array.
      *
-     * <p> If this method returns <tt>true</tt> then the {@link #array() array}
+     * <p> If this method returns {@code true} then the {@link #array() array}
      * and {@link #arrayOffset() arrayOffset} methods may safely be invoked.
      * </p>
      *
-     * @return  <tt>true</tt> if, and only if, this buffer
+     * @return  {@code true} if, and only if, this buffer
      *          is backed by an array and is not read-only
      *
      * @since 1.6
@@ -529,7 +529,7 @@
      * element of the buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
      * <p> If this buffer is backed by an array then buffer position <i>p</i>
-     * corresponds to array index <i>p</i>&nbsp;+&nbsp;<tt>arrayOffset()</tt>.
+     * corresponds to array index <i>p</i>&nbsp;+&nbsp;{@code arrayOffset()}.
      *
      * <p> Invoke the {@link #hasArray hasArray} method before invoking this
      * method in order to ensure that this buffer has an accessible backing
@@ -552,7 +552,7 @@
      * Tells whether or not this buffer is
      * <a href="ByteBuffer.html#direct"><i>direct</i></a>.
      *
-     * @return  <tt>true</tt> if, and only if, this buffer is direct
+     * @return  {@code true} if, and only if, this buffer is direct
      *
      * @since 1.6
      */
--- a/jdk/src/java.base/share/classes/java/nio/ByteOrder.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/ByteOrder.java	Wed Jul 05 20:45:41 2017 +0200
@@ -75,9 +75,9 @@
     /**
      * Constructs a string describing this object.
      *
-     * <p> This method returns the string <tt>"BIG_ENDIAN"</tt> for {@link
-     * #BIG_ENDIAN} and <tt>"LITTLE_ENDIAN"</tt> for {@link #LITTLE_ENDIAN}.
-     * </p>
+     * <p> This method returns the string
+     * {@code "BIG_ENDIAN"} for {@link #BIG_ENDIAN} and
+     * {@code "LITTLE_ENDIAN"} for {@link #LITTLE_ENDIAN}.
      *
      * @return  The specified string
      */
--- a/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java	Wed Jul 05 20:45:41 2017 +0200
@@ -116,10 +116,10 @@
      * Tells whether or not this buffer's content is resident in physical
      * memory.
      *
-     * <p> A return value of <tt>true</tt> implies that it is highly likely
+     * <p> A return value of {@code true} implies that it is highly likely
      * that all of the data in this buffer is resident in physical memory and
      * may therefore be accessed without incurring any virtual-memory page
-     * faults or I/O operations.  A return value of <tt>false</tt> does not
+     * faults or I/O operations.  A return value of {@code false} does not
      * necessarily imply that the buffer's content is not resident in physical
      * memory.
      *
@@ -127,7 +127,7 @@
      * underlying operating system may have paged out some of the buffer's data
      * by the time that an invocation of this method returns.  </p>
      *
-     * @return  <tt>true</tt> if it is likely that this buffer's content
+     * @return  {@code true} if it is likely that this buffer's content
      *          is resident in physical memory
      */
     public final boolean isLoaded() {
--- a/jdk/src/java.base/share/classes/java/nio/X-Buffer-bin.java.template	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/X-Buffer-bin.java.template	Wed Jul 05 20:45:41 2017 +0200
@@ -78,7 +78,7 @@
      * @return  The $type$ value at the given index
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>index</tt> is negative
+     *          If {@code index} is negative
      *          or not smaller than the buffer's limit,
      *          minus $nbytesButOne$
      */
@@ -100,7 +100,7 @@
      * @return  This buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>index</tt> is negative
+     *          If {@code index} is negative
      *          or not smaller than the buffer's limit,
      *          minus $nbytesButOne$
      *
--- a/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template	Wed Jul 05 20:45:41 2017 +0200
@@ -133,7 +133,7 @@
  * <h2> Access to binary data </h2>
  *
  * <p> This class defines methods for reading and writing values of all other
- * primitive types, except <tt>boolean</tt>.  Primitive values are translated
+ * primitive types, except {@code boolean}.  Primitive values are translated
  * to (or from) sequences of bytes according to the buffer's current byte
  * order, which may be retrieved and modified via the {@link #order order}
  * methods.  Specific byte orders are represented by instances of the {@link
@@ -151,8 +151,8 @@
  *  void  {@link #putFloat(float) putFloat(float f)}
  *  void  {@link #putFloat(int,float) putFloat(int index, float f)}</pre></blockquote>
  *
- * <p> Corresponding methods are defined for the types <tt>char</tt>,
- * <tt>short</tt>, <tt>int</tt>, <tt>long</tt>, and <tt>double</tt>.  The index
+ * <p> Corresponding methods are defined for the types {@code char,
+ * short, int, long}, and {@code double}.  The index
  * parameters of the absolute <i>get</i> and <i>put</i> methods are in terms of
  * bytes rather than of the type being read or written.
  *
@@ -167,8 +167,7 @@
  * #asFloatBuffer() asFloatBuffer} method, for example, creates an instance of
  * the {@link FloatBuffer} class that is backed by the byte buffer upon which
  * the method is invoked.  Corresponding view-creation methods are defined for
- * the types <tt>char</tt>, <tt>short</tt>, <tt>int</tt>, <tt>long</tt>, and
- * <tt>double</tt>.
+ * the types {@code char, short, int, long}, and {@code double}.
  *
  * <p> View buffers have three important advantages over the families of
  * type-specific <i>get</i> and <i>put</i> methods described above:
@@ -196,7 +195,7 @@
  *
  * <p> Like a byte buffer, $a$ $type$ buffer is either <a
  * href="ByteBuffer.html#direct"><i>direct</i> or <i>non-direct</i></a>.  A
- * $type$ buffer created via the <tt>wrap</tt> methods of this class will
+ * $type$ buffer created via the {@code wrap} methods of this class will
  * be non-direct.  $A$ $type$ buffer created as a view of a byte buffer will
  * be direct if, and only if, the byte buffer itself is direct.  Whether or not
  * $a$ $type$ buffer is direct may be determined by invoking the {@link
@@ -208,7 +207,7 @@
  *
  * <p> This class implements the {@link CharSequence} interface so that
  * character buffers may be used wherever character sequences are accepted, for
- * example in the regular-expression package <tt>{@link java.util.regex}</tt>.
+ * example in the regular-expression package {@link java.util.regex}.
  * </p>
  *
 #end[char]
@@ -306,7 +305,7 @@
      * @return  The new $type$ buffer
      *
      * @throws  IllegalArgumentException
-     *          If the <tt>capacity</tt> is a negative integer
+     *          If the {@code capacity} is a negative integer
      */
     public static $Type$Buffer allocateDirect(int capacity) {
         return new Direct$Type$Buffer(capacity);
@@ -335,7 +334,7 @@
      * @return  The new $type$ buffer
      *
      * @throws  IllegalArgumentException
-     *          If the <tt>capacity</tt> is a negative integer
+     *          If the {@code capacity} is a negative integer
      */
     public static $Type$Buffer allocate(int capacity) {
         if (capacity < 0)
@@ -349,8 +348,8 @@
      * <p> The new buffer will be backed by the given $type$ array;
      * that is, modifications to the buffer will cause the array to be modified
      * and vice versa.  The new buffer's capacity will be
-     * <tt>array.length</tt>, its position will be <tt>offset</tt>, its limit
-     * will be <tt>offset + length</tt>, its mark will be undefined, and its
+     * {@code array.length}, its position will be {@code offset}, its limit
+     * will be {@code offset + length}, its mark will be undefined, and its
      * byte order will be
 #if[byte]
      * {@link ByteOrder#BIG_ENDIAN BIG_ENDIAN}.
@@ -366,19 +365,19 @@
      *
      * @param  offset
      *         The offset of the subarray to be used; must be non-negative and
-     *         no larger than <tt>array.length</tt>.  The new buffer's position
+     *         no larger than {@code array.length}.  The new buffer's position
      *         will be set to this value.
      *
      * @param  length
      *         The length of the subarray to be used;
      *         must be non-negative and no larger than
-     *         <tt>array.length - offset</tt>.
-     *         The new buffer's limit will be set to <tt>offset + length</tt>.
+     *         {@code array.length - offset}.
+     *         The new buffer's limit will be set to {@code offset + length}.
      *
      * @return  The new $type$ buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on the <tt>offset</tt> and <tt>length</tt>
+     *          If the preconditions on the {@code offset} and {@code length}
      *          parameters do not hold
      */
     public static $Type$Buffer wrap($type$[] array,
@@ -397,7 +396,7 @@
      * <p> The new buffer will be backed by the given $type$ array;
      * that is, modifications to the buffer will cause the array to be modified
      * and vice versa.  The new buffer's capacity and limit will be
-     * <tt>array.length</tt>, its position will be zero, its mark will be
+     * {@code array.length}, its position will be zero, its mark will be
      * undefined, and its byte order will be
 #if[byte]
      * {@link ByteOrder#BIG_ENDIAN BIG_ENDIAN}.
@@ -458,8 +457,8 @@
      *
      * <p> The content of the new, read-only buffer will be the content of the
      * given character sequence.  The buffer's capacity will be
-     * <tt>csq.length()</tt>, its position will be <tt>start</tt>, its limit
-     * will be <tt>end</tt>, and its mark will be undefined.  </p>
+     * {@code csq.length()}, its position will be {@code start}, its limit
+     * will be {@code end}, and its mark will be undefined.  </p>
      *
      * @param  csq
      *         The character sequence from which the new character buffer is to
@@ -467,19 +466,19 @@
      *
      * @param  start
      *         The index of the first character to be used;
-     *         must be non-negative and no larger than <tt>csq.length()</tt>.
+     *         must be non-negative and no larger than {@code csq.length()}.
      *         The new buffer's position will be set to this value.
      *
      * @param  end
      *         The index of the character following the last character to be
-     *         used; must be no smaller than <tt>start</tt> and no larger
-     *         than <tt>csq.length()</tt>.
+     *         used; must be no smaller than {@code start} and no larger
+     *         than {@code csq.length()}.
      *         The new buffer's limit will be set to this value.
      *
      * @return  The new character buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on the <tt>start</tt> and <tt>end</tt>
+     *          If the preconditions on the {@code start} and {@code end}
      *          parameters do not hold
      */
     public static CharBuffer wrap(CharSequence csq, int start, int end) {
@@ -495,7 +494,7 @@
      *
      * <p> The content of the new, read-only buffer will be the content of the
      * given character sequence.  The new buffer's capacity and limit will be
-     * <tt>csq.length()</tt>, its position will be zero, and its mark will be
+     * {@code csq.length()}, its position will be zero, and its mark will be
      * undefined.  </p>
      *
      * @param  csq
@@ -624,7 +623,7 @@
      * @return  The $type$ at the given index
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>index</tt> is negative
+     *          If {@code index} is negative
      *          or not smaller than the buffer's limit
      */
     public abstract $type$ get(int index);
@@ -657,7 +656,7 @@
      * @return  This buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>index</tt> is negative
+     *          If {@code index} is negative
      *          or not smaller than the buffer's limit
      *
      * @throws  ReadOnlyBufferException
@@ -674,17 +673,17 @@
      * <p> This method transfers $type$s from this buffer into the given
      * destination array.  If there are fewer $type$s remaining in the
      * buffer than are required to satisfy the request, that is, if
-     * <tt>length</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>, then no
+     * {@code length}&nbsp;{@code >}&nbsp;{@code remaining()}, then no
      * $type$s are transferred and a {@link BufferUnderflowException} is
      * thrown.
      *
-     * <p> Otherwise, this method copies <tt>length</tt> $type$s from this
+     * <p> Otherwise, this method copies {@code length} $type$s from this
      * buffer into the given array, starting at the current position of this
      * buffer and at the given offset in the array.  The position of this
-     * buffer is then incremented by <tt>length</tt>.
+     * buffer is then incremented by {@code length}.
      *
      * <p> In other words, an invocation of this method of the form
-     * <tt>src.get(dst,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as
+     * <code>src.get(dst,&nbsp;off,&nbsp;len)</code> has exactly the same effect as
      * the loop
      *
      * <pre>{@code
@@ -701,21 +700,21 @@
      * @param  offset
      *         The offset within the array of the first $type$ to be
      *         written; must be non-negative and no larger than
-     *         <tt>dst.length</tt>
+     *         {@code dst.length}
      *
      * @param  length
      *         The maximum number of $type$s to be written to the given
      *         array; must be non-negative and no larger than
-     *         <tt>dst.length - offset</tt>
+     *         {@code dst.length - offset}
      *
      * @return  This buffer
      *
      * @throws  BufferUnderflowException
-     *          If there are fewer than <tt>length</tt> $type$s
+     *          If there are fewer than {@code length} $type$s
      *          remaining in this buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on the <tt>offset</tt> and <tt>length</tt>
+     *          If the preconditions on the {@code offset} and {@code length}
      *          parameters do not hold
      */
     public $Type$Buffer get($type$[] dst, int offset, int length) {
@@ -733,7 +732,7 @@
      *
      * <p> This method transfers $type$s from this buffer into the given
      * destination array.  An invocation of this method of the form
-     * <tt>src.get(a)</tt> behaves in exactly the same way as the invocation
+     * {@code src.get(a)} behaves in exactly the same way as the invocation
      *
      * <pre>
      *     src.get(a, 0, a.length) </pre>
@@ -744,7 +743,7 @@
      * @return  This buffer
      *
      * @throws  BufferUnderflowException
-     *          If there are fewer than <tt>length</tt> $type$s
+     *          If there are fewer than {@code length} $type$s
      *          remaining in this buffer
      */
     public $Type$Buffer get($type$[] dst) {
@@ -760,17 +759,17 @@
      * <p> This method transfers the $type$s remaining in the given source
      * buffer into this buffer.  If there are more $type$s remaining in the
      * source buffer than in this buffer, that is, if
-     * <tt>src.remaining()</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>,
+     * {@code src.remaining()}&nbsp;{@code >}&nbsp;{@code remaining()},
      * then no $type$s are transferred and a {@link
      * BufferOverflowException} is thrown.
      *
      * <p> Otherwise, this method copies
-     * <i>n</i>&nbsp;=&nbsp;<tt>src.remaining()</tt> $type$s from the given
+     * <i>n</i>&nbsp;=&nbsp;{@code src.remaining()} $type$s from the given
      * buffer into this buffer, starting at each buffer's current position.
      * The positions of both buffers are then incremented by <i>n</i>.
      *
      * <p> In other words, an invocation of this method of the form
-     * <tt>dst.put(src)</tt> has exactly the same effect as the loop
+     * {@code dst.put(src)} has exactly the same effect as the loop
      *
      * <pre>
      *     while (src.hasRemaining())
@@ -814,17 +813,17 @@
      * <p> This method transfers $type$s into this buffer from the given
      * source array.  If there are more $type$s to be copied from the array
      * than remain in this buffer, that is, if
-     * <tt>length</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>, then no
+     * {@code length}&nbsp;{@code >}&nbsp;{@code remaining()}, then no
      * $type$s are transferred and a {@link BufferOverflowException} is
      * thrown.
      *
-     * <p> Otherwise, this method copies <tt>length</tt> $type$s from the
+     * <p> Otherwise, this method copies {@code length} $type$s from the
      * given array into this buffer, starting at the given offset in the array
      * and at the current position of this buffer.  The position of this buffer
-     * is then incremented by <tt>length</tt>.
+     * is then incremented by {@code length}.
      *
      * <p> In other words, an invocation of this method of the form
-     * <tt>dst.put(src,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as
+     * <code>dst.put(src,&nbsp;off,&nbsp;len)</code> has exactly the same effect as
      * the loop
      *
      * <pre>{@code
@@ -840,12 +839,12 @@
      *
      * @param  offset
      *         The offset within the array of the first $type$ to be read;
-     *         must be non-negative and no larger than <tt>array.length</tt>
+     *         must be non-negative and no larger than {@code array.length}
      *
      * @param  length
      *         The number of $type$s to be read from the given array;
      *         must be non-negative and no larger than
-     *         <tt>array.length - offset</tt>
+     *         {@code array.length - offset}
      *
      * @return  This buffer
      *
@@ -853,7 +852,7 @@
      *          If there is insufficient space in this buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on the <tt>offset</tt> and <tt>length</tt>
+     *          If the preconditions on the {@code offset} and {@code length}
      *          parameters do not hold
      *
      * @throws  ReadOnlyBufferException
@@ -874,7 +873,7 @@
      *
      * <p> This method transfers the entire content of the given source
      * $type$ array into this buffer.  An invocation of this method of the
-     * form <tt>dst.put(a)</tt> behaves in exactly the same way as the
+     * form {@code dst.put(a)} behaves in exactly the same way as the
      * invocation
      *
      * <pre>
@@ -903,18 +902,18 @@
      * <p> This method transfers $type$s from the given string into this
      * buffer.  If there are more $type$s to be copied from the string than
      * remain in this buffer, that is, if
-     * <tt>end&nbsp;-&nbsp;start</tt>&nbsp;<tt>&gt;</tt>&nbsp;<tt>remaining()</tt>,
+     * <code>end&nbsp;-&nbsp;start</code>&nbsp;{@code >}&nbsp;{@code remaining()},
      * then no $type$s are transferred and a {@link
      * BufferOverflowException} is thrown.
      *
      * <p> Otherwise, this method copies
-     * <i>n</i>&nbsp;=&nbsp;<tt>end</tt>&nbsp;-&nbsp;<tt>start</tt> $type$s
+     * <i>n</i>&nbsp;=&nbsp;{@code end}&nbsp;-&nbsp;{@code start} $type$s
      * from the given string into this buffer, starting at the given
-     * <tt>start</tt> index and at the current position of this buffer.  The
+     * {@code start} index and at the current position of this buffer.  The
      * position of this buffer is then incremented by <i>n</i>.
      *
      * <p> In other words, an invocation of this method of the form
-     * <tt>dst.put(src,&nbsp;start,&nbsp;end)</tt> has exactly the same effect
+     * <code>dst.put(src,&nbsp;start,&nbsp;end)</code> has exactly the same effect
      * as the loop
      *
      * <pre>{@code
@@ -931,12 +930,12 @@
      * @param  start
      *         The offset within the string of the first $type$ to be read;
      *         must be non-negative and no larger than
-     *         <tt>string.length()</tt>
+     *         {@code string.length()}
      *
      * @param  end
      *         The offset within the string of the last $type$ to be read,
      *         plus one; must be non-negative and no larger than
-     *         <tt>string.length()</tt>
+     *         {@code string.length()}
      *
      * @return  This buffer
      *
@@ -944,7 +943,7 @@
      *          If there is insufficient space in this buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on the <tt>start</tt> and <tt>end</tt>
+     *          If the preconditions on the {@code start} and {@code end}
      *          parameters do not hold
      *
      * @throws  ReadOnlyBufferException
@@ -966,7 +965,7 @@
      *
      * <p> This method transfers the entire content of the given source string
      * into this buffer.  An invocation of this method of the form
-     * <tt>dst.put(s)</tt> behaves in exactly the same way as the invocation
+     * {@code dst.put(s)} behaves in exactly the same way as the invocation
      *
      * <pre>
      *     dst.put(s, 0, s.length()) </pre>
@@ -995,11 +994,11 @@
      * Tells whether or not this buffer is backed by an accessible $type$
      * array.
      *
-     * <p> If this method returns <tt>true</tt> then the {@link #array() array}
+     * <p> If this method returns {@code true} then the {@link #array() array}
      * and {@link #arrayOffset() arrayOffset} methods may safely be invoked.
      * </p>
      *
-     * @return  <tt>true</tt> if, and only if, this buffer
+     * @return  {@code true} if, and only if, this buffer
      *          is backed by an array and is not read-only
      */
     public final boolean hasArray() {
@@ -1038,7 +1037,7 @@
      * element of the buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
      * <p> If this buffer is backed by an array then buffer position <i>p</i>
-     * corresponds to array index <i>p</i>&nbsp;+&nbsp;<tt>arrayOffset()</tt>.
+     * corresponds to array index <i>p</i>&nbsp;+&nbsp;{@code arrayOffset()}.
      *
      * <p> Invoke the {@link #hasArray hasArray} method before invoking this
      * method in order to ensure that this buffer has an accessible backing
@@ -1166,11 +1165,11 @@
      *
      * <p> The $type$s between the buffer's current position and its limit,
      * if any, are copied to the beginning of the buffer.  That is, the
-     * $type$ at index <i>p</i>&nbsp;=&nbsp;<tt>position()</tt> is copied
+     * $type$ at index <i>p</i>&nbsp;=&nbsp;{@code position()} is copied
      * to index zero, the $type$ at index <i>p</i>&nbsp;+&nbsp;1 is copied
      * to index one, and so forth until the $type$ at index
-     * <tt>limit()</tt>&nbsp;-&nbsp;1 is copied to index
-     * <i>n</i>&nbsp;=&nbsp;<tt>limit()</tt>&nbsp;-&nbsp;<tt>1</tt>&nbsp;-&nbsp;<i>p</i>.
+     * {@code limit()}&nbsp;-&nbsp;1 is copied to index
+     * <i>n</i>&nbsp;=&nbsp;{@code limit()}&nbsp;-&nbsp;{@code 1}&nbsp;-&nbsp;<i>p</i>.
      * The buffer's position is then set to <i>n+1</i> and its limit is set to
      * its capacity.  The mark, if defined, is discarded.
      *
@@ -1183,7 +1182,7 @@
      *
      * <p> Invoke this method after writing data from a buffer in case the
      * write was incomplete.  The following loop, for example, copies bytes
-     * from one channel to another via the buffer <tt>buf</tt>:
+     * from one channel to another via the buffer {@code buf}:
      *
      * <blockquote><pre>{@code
      *   buf.clear();          // Prepare buffer for use
@@ -1206,7 +1205,7 @@
     /**
      * Tells whether or not this $type$ buffer is direct.
      *
-     * @return  <tt>true</tt> if, and only if, this buffer is direct
+     * @return  {@code true} if, and only if, this buffer is direct
      */
     public abstract boolean isDirect();
 
@@ -1239,8 +1238,8 @@
      * Returns the current hash code of this buffer.
      *
      * <p> The hash code of a $type$ buffer depends only upon its remaining
-     * elements; that is, upon the elements from <tt>position()</tt> up to, and
-     * including, the element at <tt>limit()</tt>&nbsp;-&nbsp;<tt>1</tt>.
+     * elements; that is, upon the elements from {@code position()} up to, and
+     * including, the element at {@code limit()}&nbsp;-&nbsp;{@code 1}.
      *
      * <p> Because buffer hash codes are content-dependent, it is inadvisable
      * to use buffers as keys in hash maps or similar data structures unless it
@@ -1289,7 +1288,7 @@
      *
      * @param  ob  The object to which this buffer is to be compared
      *
-     * @return  <tt>true</tt> if, and only if, this buffer is equal to the
+     * @return  {@code true} if, and only if, this buffer is equal to the
      *           given object
      */
     public boolean equals(Object ob) {
@@ -1368,7 +1367,7 @@
      *
      * <p> The first character of the resulting string will be the character at
      * this buffer's position, while the last character will be the character
-     * at index <tt>limit()</tt>&nbsp;-&nbsp;1.  Invoking this method does not
+     * at index {@code limit()}&nbsp;-&nbsp;1.  Invoking this method does not
      * change the buffer's position. </p>
      *
      * @return  The specified string
@@ -1388,7 +1387,7 @@
      * <p> When viewed as a character sequence, the length of a character
      * buffer is simply the number of characters between the position
      * (inclusive) and the limit (exclusive); that is, it is equivalent to
-     * <tt>remaining()</tt>. </p>
+     * {@code remaining()}. </p>
      *
      * @return  The length of this character buffer
      */
@@ -1402,13 +1401,13 @@
      *
      * @param  index
      *         The index of the character to be read, relative to the position;
-     *         must be non-negative and smaller than <tt>remaining()</tt>
+     *         must be non-negative and smaller than {@code remaining()}
      *
      * @return  The character at index
-     *          <tt>position()&nbsp;+&nbsp;index</tt>
+     *          <code>position()&nbsp;+&nbsp;index</code>
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on <tt>index</tt> do not hold
+     *          If the preconditions on {@code index} do not hold
      */
     public final char charAt(int index) {
         return get(position() + checkIndex(index, 1));
@@ -1422,26 +1421,26 @@
      * content of this buffer is mutable then modifications to one buffer will
      * cause the other to be modified.  The new buffer's capacity will be that
      * of this buffer, its position will be
-     * <tt>position()</tt>&nbsp;+&nbsp;<tt>start</tt>, and its limit will be
-     * <tt>position()</tt>&nbsp;+&nbsp;<tt>end</tt>.  The new buffer will be
+     * {@code position()}&nbsp;+&nbsp;{@code start}, and its limit will be
+     * {@code position()}&nbsp;+&nbsp;{@code end}.  The new buffer will be
      * direct if, and only if, this buffer is direct, and it will be read-only
      * if, and only if, this buffer is read-only.  </p>
      *
      * @param  start
      *         The index, relative to the current position, of the first
      *         character in the subsequence; must be non-negative and no larger
-     *         than <tt>remaining()</tt>
+     *         than {@code remaining()}
      *
      * @param  end
      *         The index, relative to the current position, of the character
      *         following the last character in the subsequence; must be no
-     *         smaller than <tt>start</tt> and no larger than
-     *         <tt>remaining()</tt>
+     *         smaller than {@code start} and no larger than
+     *         {@code remaining()}
      *
      * @return  The new character buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on <tt>start</tt> and <tt>end</tt>
+     *          If the preconditions on {@code start} and {@code end}
      *          do not hold
      */
     public abstract CharBuffer subSequence(int start, int end);
@@ -1453,21 +1452,21 @@
      * Appends the specified character sequence  to this
      * buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
-     * <p> An invocation of this method of the form <tt>dst.append(csq)</tt>
+     * <p> An invocation of this method of the form {@code dst.append(csq)}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
      *     dst.put(csq.toString()) </pre>
      *
-     * <p> Depending on the specification of <tt>toString</tt> for the
-     * character sequence <tt>csq</tt>, the entire sequence may not be
+     * <p> Depending on the specification of {@code toString} for the
+     * character sequence {@code csq}, the entire sequence may not be
      * appended.  For instance, invoking the {@link $Type$Buffer#toString()
      * toString} method of a character buffer will return a subsequence whose
      * content depends upon the buffer's position and limit.
      *
      * @param  csq
-     *         The character sequence to append.  If <tt>csq</tt> is
-     *         <tt>null</tt>, then the four characters <tt>"null"</tt> are
+     *         The character sequence to append.  If {@code csq} is
+     *         {@code null}, then the four characters {@code "null"} are
      *         appended to this character buffer.
      *
      * @return  This buffer
@@ -1491,8 +1490,8 @@
      * Appends a subsequence of the  specified character sequence  to this
      * buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
-     * <p> An invocation of this method of the form <tt>dst.append(csq, start,
-     * end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in exactly the
+     * <p> An invocation of this method of the form {@code dst.append(csq, start,
+     * end)} when {@code csq} is not {@code null}, behaves in exactly the
      * same way as the invocation
      *
      * <pre>
@@ -1500,9 +1499,9 @@
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If <tt>csq</tt> is <tt>null</tt>, then characters
-     *         will be appended as if <tt>csq</tt> contained the four
-     *         characters <tt>"null"</tt>.
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters {@code "null"}.
      *
      * @return  This buffer
      *
@@ -1510,9 +1509,9 @@
      *          If there is insufficient space in this buffer
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt>
-     *          is greater than <tt>end</tt>, or <tt>end</tt> is greater than
-     *          <tt>csq.length()</tt>
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @throws  ReadOnlyBufferException
      *          If this buffer is read-only
@@ -1528,7 +1527,7 @@
      * Appends the specified $type$  to this
      * buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
-     * <p> An invocation of this method of the form <tt>dst.append($x$)</tt>
+     * <p> An invocation of this method of the form {@code dst.append($x$)}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
@@ -1562,7 +1561,7 @@
      * Retrieves this buffer's byte order.
      *
      * <p> The byte order of $a$ $type$ buffer created by allocation or by
-     * wrapping an existing <tt>$type$</tt> array is the {@link
+     * wrapping an existing {@code $type$} array is the {@link
      * ByteOrder#nativeOrder native order} of the underlying
      * hardware.  The byte order of $a$ $type$ buffer created as a <a
      * href="ByteBuffer.html#views">view</a> of a byte buffer is that of the
--- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -70,13 +70,13 @@
      * {@code 0} without initiating an I/O operation.
      *
      * <p> Suppose that a byte sequence of length <i>n</i> is read, where
-     * <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
+     * {@code 0}&nbsp;{@code <}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
      * This byte sequence will be transferred into the buffer so that the first
      * byte in the sequence is at index <i>p</i> and the last byte is at index
-     * <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>,
+     * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>&nbsp;{@code -}&nbsp;{@code 1},
      * where <i>p</i> is the buffer's position at the moment the read is
      * performed. Upon completion the buffer's position will be equal to
-     * <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed.
+     * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>; its limit will not have changed.
      *
      * <p> Buffers are not safe for use by multiple concurrent threads so care
      * should be taken to not access the buffer until the operation has
@@ -151,13 +151,13 @@
      * {@code 0} without initiating an I/O operation.
      *
      * <p> Suppose that a byte sequence of length <i>n</i> is written, where
-     * <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
+     * {@code 0}&nbsp;{@code <}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
      * This byte sequence will be transferred from the buffer starting at index
      * <i>p</i>, where <i>p</i> is the buffer's position at the moment the
      * write is performed; the index of the last byte written will be
-     * <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>.
+     * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>&nbsp;{@code -}&nbsp;{@code 1}.
      * Upon completion the buffer's position will be equal to
-     * <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed.
+     * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>; its limit will not have changed.
      *
      * <p> Buffers are not safe for use by multiple concurrent threads so care
      * should be taken to not access the buffer until the operation has
--- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -41,7 +41,7 @@
  * by invoking the {@link #bind(SocketAddress,int) bind} method. Once bound,
  * the {@link #accept(Object,CompletionHandler) accept} method
  * is used to initiate the accepting of connections to the channel's socket.
- * An attempt to invoke the <tt>accept</tt> method on an unbound channel will
+ * An attempt to invoke the {@code accept} method on an unbound channel will
  * cause a {@link NotYetBoundException} to be thrown.
  *
  * <p> Channels of this type are safe for use by multiple concurrent threads
@@ -122,13 +122,13 @@
      * java.nio.channels.spi.AsynchronousChannelProvider#openAsynchronousServerSocketChannel
      * openAsynchronousServerSocketChannel} method on the {@link
      * java.nio.channels.spi.AsynchronousChannelProvider} object that created
-     * the given group. If the group parameter is <tt>null</tt> then the
+     * the given group. If the group parameter is {@code null} then the
      * resulting channel is created by the system-wide default provider, and
      * bound to the <em>default group</em>.
      *
      * @param   group
      *          The group to which the newly constructed channel should be bound,
-     *          or <tt>null</tt> for the default group
+     *          or {@code null} for the default group
      *
      * @return  A new asynchronous server socket channel
      *
@@ -176,7 +176,7 @@
      * </pre></blockquote>
      *
      * @param   local
-     *          The local address to bind the socket, or <tt>null</tt> to bind
+     *          The local address to bind the socket, or {@code null} to bind
      *          to an automatically assigned socket address
      *
      * @return  This channel
--- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -452,11 +452,11 @@
      * at the moment that the read is attempted.
      *
      * <p> Suppose that a byte sequence of length <i>n</i> is read, where
-     * <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
-     * Up to the first <tt>dsts[offset].remaining()</tt> bytes of this sequence
-     * are transferred into buffer <tt>dsts[offset]</tt>, up to the next
-     * <tt>dsts[offset+1].remaining()</tt> bytes are transferred into buffer
-     * <tt>dsts[offset+1]</tt>, and so forth, until the entire byte sequence
+     * {@code 0}&nbsp;{@code <}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
+     * Up to the first {@code dsts[offset].remaining()} bytes of this sequence
+     * are transferred into buffer {@code dsts[offset]}, up to the next
+     * {@code dsts[offset+1].remaining()} bytes are transferred into buffer
+     * {@code dsts[offset+1]}, and so forth, until the entire byte sequence
      * is transferred into the given buffers.  As many bytes as possible are
      * transferred into each buffer, hence the final position of each updated
      * buffer, except the last updated buffer, is guaranteed to be equal to
@@ -606,11 +606,11 @@
      * at the moment that the write is attempted.
      *
      * <p> Suppose that a byte sequence of length <i>n</i> is written, where
-     * <tt>0</tt>&nbsp;<tt>&lt;</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
-     * Up to the first <tt>srcs[offset].remaining()</tt> bytes of this sequence
-     * are written from buffer <tt>srcs[offset]</tt>, up to the next
-     * <tt>srcs[offset+1].remaining()</tt> bytes are written from buffer
-     * <tt>srcs[offset+1]</tt>, and so forth, until the entire byte sequence is
+     * {@code 0}&nbsp;{@code <}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
+     * Up to the first {@code srcs[offset].remaining()} bytes of this sequence
+     * are written from buffer {@code srcs[offset]}, up to the next
+     * {@code srcs[offset+1].remaining()} bytes are written from buffer
+     * {@code srcs[offset+1]}, and so forth, until the entire byte sequence is
      * written.  As many bytes as possible are written from each buffer, hence
      * the final position of each updated buffer, except the last updated
      * buffer, is guaranteed to be equal to that buffer's limit. The underlying
--- a/jdk/src/java.base/share/classes/java/nio/channels/Channel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/Channel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -58,7 +58,7 @@
     /**
      * Tells whether or not this channel is open.
      *
-     * @return <tt>true</tt> if, and only if, this channel is open
+     * @return {@code true} if, and only if, this channel is open
      */
     public boolean isOpen();
 
--- a/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -187,8 +187,8 @@
      * operations.
      *
      * <p> Datagram channels support reading and writing, so this method
-     * returns <tt>(</tt>{@link SelectionKey#OP_READ} <tt>|</tt>&nbsp;{@link
-     * SelectionKey#OP_WRITE}<tt>)</tt>.  </p>
+     * returns {@code (}{@link SelectionKey#OP_READ} {@code |}&nbsp;{@link
+     * SelectionKey#OP_WRITE}{@code )}.
      *
      * @return  The valid-operation set
      */
@@ -341,7 +341,7 @@
      * copied into the given byte buffer and its source address is returned.
      * If this channel is in non-blocking mode and a datagram is not
      * immediately available then this method immediately returns
-     * <tt>null</tt>.
+     * {@code null}.
      *
      * <p> The datagram is transferred into the given byte buffer starting at
      * its current position, as if by a regular {@link
@@ -371,7 +371,7 @@
      *         The buffer into which the datagram is to be transferred
      *
      * @return  The datagram's source address,
-     *          or <tt>null</tt> if this channel is in non-blocking mode
+     *          or {@code null} if this channel is in non-blocking mode
      *          and no datagram was immediately available
      *
      * @throws  ClosedChannelException
--- a/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -63,7 +63,7 @@
  *
  *   <li><p> A region of a file may be {@link #map <i>mapped</i>}
  *   directly into memory; for large files this is often much more efficient
- *   than invoking the usual <tt>read</tt> or <tt>write</tt> methods.
+ *   than invoking the usual {@code read} or {@code write} methods.
  *   </p></li>
  *
  *   <li><p> Updates made to a file may be {@link #force <i>forced
@@ -107,10 +107,10 @@
  * existing {@link java.io.FileInputStream#getChannel FileInputStream}, {@link
  * java.io.FileOutputStream#getChannel FileOutputStream}, or {@link
  * java.io.RandomAccessFile#getChannel RandomAccessFile} object by invoking
- * that object's <tt>getChannel</tt> method, which returns a file channel that
+ * that object's {@code getChannel} method, which returns a file channel that
  * is connected to the same underlying file. Where the file channel is obtained
  * from an existing stream or random access file then the state of the file
- * channel is intimately connected to that of the object whose <tt>getChannel</tt>
+ * channel is intimately connected to that of the object whose {@code getChannel}
  * method returned the channel.  Changing the channel's position, whether
  * explicitly or by reading or writing bytes, will change the file position of
  * the originating object, and vice versa. Changing the file's length via the
@@ -128,14 +128,14 @@
  * writing.  Finally, a channel obtained via the {@link
  * java.io.RandomAccessFile#getChannel getChannel} method of a {@link
  * java.io.RandomAccessFile} instance will be open for reading if the instance
- * was created with mode <tt>"r"</tt> and will be open for reading and writing
- * if the instance was created with mode <tt>"rw"</tt>.
+ * was created with mode {@code "r"} and will be open for reading and writing
+ * if the instance was created with mode {@code "rw"}.
  *
  * <a name="append-mode"></a><p> A file channel that is open for writing may be in
  * <i>append mode</i>, for example if it was obtained from a file-output stream
  * that was created by invoking the {@link
  * java.io.FileOutputStream#FileOutputStream(java.io.File,boolean)
- * FileOutputStream(File,boolean)} constructor and passing <tt>true</tt> for
+ * FileOutputStream(File,boolean)} constructor and passing {@code true} for
  * the second parameter.  In this mode each invocation of a relative write
  * operation first advances the position to the end of the file and then writes
  * the requested data.  Whether the advancement of the position and the writing
@@ -516,10 +516,10 @@
      * <p> If the file does not reside on a local device then no such guarantee
      * is made.
      *
-     * <p> The <tt>metaData</tt> parameter can be used to limit the number of
+     * <p> The {@code metaData} parameter can be used to limit the number of
      * I/O operations that this method is required to perform.  Passing
-     * <tt>false</tt> for this parameter indicates that only updates to the
-     * file's content need be written to storage; passing <tt>true</tt>
+     * {@code false} for this parameter indicates that only updates to the
+     * file's content need be written to storage; passing {@code true}
      * indicates that updates to both the file's content and metadata must be
      * written, which generally requires at least one more I/O operation.
      * Whether this parameter actually has any effect is dependent upon the
@@ -540,7 +540,7 @@
      * force changes made to the buffer's content to be written.  </p>
      *
      * @param   metaData
-     *          If <tt>true</tt> then this method is required to force changes
+     *          If {@code true} then this method is required to force changes
      *          to both the file's content and metadata to be written to
      *          storage; otherwise, it need only force content changes to be
      *          written
@@ -557,14 +557,14 @@
      * Transfers bytes from this channel's file to the given writable byte
      * channel.
      *
-     * <p> An attempt is made to read up to <tt>count</tt> bytes starting at
-     * the given <tt>position</tt> in this channel's file and write them to the
+     * <p> An attempt is made to read up to {@code count} bytes starting at
+     * the given {@code position} in this channel's file and write them to the
      * target channel.  An invocation of this method may or may not transfer
      * all of the requested bytes; whether or not it does so depends upon the
      * natures and states of the channels.  Fewer than the requested number of
      * bytes are transferred if this channel's file contains fewer than
-     * <tt>count</tt> bytes starting at the given <tt>position</tt>, or if the
-     * target channel is non-blocking and it has fewer than <tt>count</tt>
+     * {@code count} bytes starting at the given {@code position}, or if the
+     * target channel is non-blocking and it has fewer than {@code count}
      * bytes free in its output buffer.
      *
      * <p> This method does not modify this channel's position.  If the given
@@ -624,14 +624,14 @@
      * Transfers bytes into this channel's file from the given readable byte
      * channel.
      *
-     * <p> An attempt is made to read up to <tt>count</tt> bytes from the
+     * <p> An attempt is made to read up to {@code count} bytes from the
      * source channel and write them to this channel's file starting at the
-     * given <tt>position</tt>.  An invocation of this method may or may not
+     * given {@code position}.  An invocation of this method may or may not
      * transfer all of the requested bytes; whether or not it does so depends
      * upon the natures and states of the channels.  Fewer than the requested
      * number of bytes will be transferred if the source channel has fewer than
-     * <tt>count</tt> bytes remaining, or if the source channel is non-blocking
-     * and has fewer than <tt>count</tt> bytes immediately available in its
+     * {@code count} bytes remaining, or if the source channel is non-blocking
+     * and has fewer than {@code count} bytes immediately available in its
      * input buffer.
      *
      * <p> This method does not modify this channel's position.  If the given
@@ -704,7 +704,7 @@
      *         The file position at which the transfer is to begin;
      *         must be non-negative
      *
-     * @return  The number of bytes read, possibly zero, or <tt>-1</tt> if the
+     * @return  The number of bytes read, possibly zero, or {@code -1} if the
      *          given position is greater than or equal to the file's current
      *          size
      *
@@ -855,7 +855,7 @@
      *
      * <p> The {@link MappedByteBuffer <i>mapped byte buffer</i>}
      * returned by this method will have a position of zero and a limit and
-     * capacity of <tt>size</tt>; its mark will be undefined.  The buffer and
+     * capacity of {@code size}; its mark will be undefined.  The buffer and
      * the mapping that it represents will remain valid until the buffer itself
      * is garbage-collected.
      *
@@ -895,11 +895,11 @@
      * @return  The mapped byte buffer
      *
      * @throws NonReadableChannelException
-     *         If the <tt>mode</tt> is {@link MapMode#READ_ONLY READ_ONLY} but
+     *         If the {@code mode} is {@link MapMode#READ_ONLY READ_ONLY} but
      *         this channel was not opened for reading
      *
      * @throws NonWritableChannelException
-     *         If the <tt>mode</tt> is {@link MapMode#READ_WRITE READ_WRITE} or
+     *         If the {@code mode} is {@link MapMode#READ_WRITE READ_WRITE} or
      *         {@link MapMode#PRIVATE PRIVATE} but this channel was not opened
      *         for both reading and writing
      *
@@ -936,7 +936,7 @@
      * will be thrown immediately; the thread's interrupt status will not be
      * changed.
      *
-     * <p> The region specified by the <tt>position</tt> and <tt>size</tt>
+     * <p> The region specified by the {@code position} and {@code size}
      * parameters need not be contained within, or even overlap, the actual
      * underlying file.  Lock regions are fixed in size; if a locked region
      * initially contains the end of the file and the file grows beyond the
@@ -963,12 +963,12 @@
      *
      * @param  size
      *         The size of the locked region; must be non-negative, and the sum
-     *         <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative
+     *         {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
      *
      * @param  shared
-     *         <tt>true</tt> to request a shared lock, in which case this
+     *         {@code true} to request a shared lock, in which case this
      *         channel must be open for reading (and possibly writing);
-     *         <tt>false</tt> to request an exclusive lock, in which case this
+     *         {@code false} to request an exclusive lock, in which case this
      *         channel must be open for writing (and possibly reading)
      *
      * @return  A lock object representing the newly-acquired lock
@@ -994,11 +994,11 @@
      *          region
      *
      * @throws  NonReadableChannelException
-     *          If <tt>shared</tt> is <tt>true</tt> this channel was not
+     *          If {@code shared} is {@code true} this channel was not
      *          opened for reading
      *
      * @throws  NonWritableChannelException
-     *          If <tt>shared</tt> is <tt>false</tt> but this channel was not
+     *          If {@code shared} is {@code false} but this channel was not
      *          opened for writing
      *
      * @throws  IOException
@@ -1014,7 +1014,7 @@
     /**
      * Acquires an exclusive lock on this channel's file.
      *
-     * <p> An invocation of this method of the form <tt>fc.lock()</tt> behaves
+     * <p> An invocation of this method of the form {@code fc.lock()} behaves
      * in exactly the same way as the invocation
      *
      * <pre>
@@ -1060,10 +1060,10 @@
      * immediately, either having acquired a lock on the requested region or
      * having failed to do so.  If it fails to acquire a lock because an
      * overlapping lock is held by another program then it returns
-     * <tt>null</tt>.  If it fails to acquire a lock for any other reason then
+     * {@code null}.  If it fails to acquire a lock for any other reason then
      * an appropriate exception is thrown.
      *
-     * <p> The region specified by the <tt>position</tt> and <tt>size</tt>
+     * <p> The region specified by the {@code position} and {@code size}
      * parameters need not be contained within, or even overlap, the actual
      * underlying file.  Lock regions are fixed in size; if a locked region
      * initially contains the end of the file and the file grows beyond the
@@ -1090,14 +1090,14 @@
      *
      * @param  size
      *         The size of the locked region; must be non-negative, and the sum
-     *         <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative
+     *         {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
      *
      * @param  shared
-     *         <tt>true</tt> to request a shared lock,
-     *         <tt>false</tt> to request an exclusive lock
+     *         {@code true} to request a shared lock,
+     *         {@code false} to request an exclusive lock
      *
      * @return  A lock object representing the newly-acquired lock,
-     *          or <tt>null</tt> if the lock could not be acquired
+     *          or {@code null} if the lock could not be acquired
      *          because another program holds an overlapping lock
      *
      * @throws  IllegalArgumentException
@@ -1125,14 +1125,14 @@
     /**
      * Attempts to acquire an exclusive lock on this channel's file.
      *
-     * <p> An invocation of this method of the form <tt>fc.tryLock()</tt>
+     * <p> An invocation of this method of the form {@code fc.tryLock()}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
      *     fc.{@link #tryLock(long,long,boolean) tryLock}(0L, Long.MAX_VALUE, false) </pre>
      *
      * @return  A lock object representing the newly-acquired lock,
-     *          or <tt>null</tt> if the lock could not be acquired
+     *          or {@code null} if the lock could not be acquired
      *          because another program holds an overlapping lock
      *
      * @throws  ClosedChannelException
--- a/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java	Wed Jul 05 20:45:41 2017 +0200
@@ -136,11 +136,11 @@
      *
      * @param  size
      *         The size of the locked region; must be non-negative, and the sum
-     *         <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative
+     *         {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
      *
      * @param  shared
-     *         <tt>true</tt> if this lock is shared,
-     *         <tt>false</tt> if it is exclusive
+     *         {@code true} if this lock is shared,
+     *         {@code false} if it is exclusive
      *
      * @throws IllegalArgumentException
      *         If the preconditions on the parameters do not hold
@@ -173,11 +173,11 @@
      *
      * @param  size
      *         The size of the locked region; must be non-negative, and the sum
-     *         <tt>position</tt>&nbsp;+&nbsp;<tt>size</tt> must be non-negative
+     *         {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
      *
      * @param  shared
-     *         <tt>true</tt> if this lock is shared,
-     *         <tt>false</tt> if it is exclusive
+     *         {@code true} if this lock is shared,
+     *         {@code false} if it is exclusive
      *
      * @throws IllegalArgumentException
      *         If the preconditions on the parameters do not hold
@@ -254,8 +254,8 @@
     /**
      * Tells whether this lock is shared.
      *
-     * @return <tt>true</tt> if lock is shared,
-     *         <tt>false</tt> if it is exclusive
+     * @return {@code true} if lock is shared,
+     *         {@code false} if it is exclusive
      */
     public final boolean isShared() {
         return shared;
@@ -269,7 +269,7 @@
      * @param   size
      *          The size of the lock range
      *
-     * @return  <tt>true</tt> if, and only if, this lock and the given lock
+     * @return  {@code true} if, and only if, this lock and the given lock
      *          range overlap by at least one byte
      */
     public final boolean overlaps(long position, long size) {
@@ -286,7 +286,7 @@
      * <p> A lock object remains valid until it is released or the associated
      * file channel is closed, whichever comes first.  </p>
      *
-     * @return  <tt>true</tt> if, and only if, this lock is valid
+     * @return  {@code true} if, and only if, this lock is valid
      */
     public abstract boolean isValid();
 
--- a/jdk/src/java.base/share/classes/java/nio/channels/GatheringByteChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/GatheringByteChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -66,11 +66,11 @@
      * at the moment that this method is invoked.
      *
      * <p> Suppose that a byte sequence of length <i>n</i> is written, where
-     * <tt>0</tt>&nbsp;<tt>&lt;=</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
-     * Up to the first <tt>srcs[offset].remaining()</tt> bytes of this sequence
-     * are written from buffer <tt>srcs[offset]</tt>, up to the next
-     * <tt>srcs[offset+1].remaining()</tt> bytes are written from buffer
-     * <tt>srcs[offset+1]</tt>, and so forth, until the entire byte sequence is
+     * {@code 0}&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
+     * Up to the first {@code srcs[offset].remaining()} bytes of this sequence
+     * are written from buffer {@code srcs[offset]}, up to the next
+     * {@code srcs[offset+1].remaining()} bytes are written from buffer
+     * {@code srcs[offset+1]}, and so forth, until the entire byte sequence is
      * written.  As many bytes as possible are written from each buffer, hence
      * the final position of each updated buffer, except the last updated
      * buffer, is guaranteed to be equal to that buffer's limit.
@@ -92,17 +92,17 @@
      * @param  offset
      *         The offset within the buffer array of the first buffer from
      *         which bytes are to be retrieved; must be non-negative and no
-     *         larger than <tt>srcs.length</tt>
+     *         larger than {@code srcs.length}
      *
      * @param  length
      *         The maximum number of buffers to be accessed; must be
      *         non-negative and no larger than
-     *         <tt>srcs.length</tt>&nbsp;-&nbsp;<tt>offset</tt>
+     *         {@code srcs.length}&nbsp;-&nbsp;{@code offset}
      *
      * @return  The number of bytes written, possibly zero
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on the <tt>offset</tt> and <tt>length</tt>
+     *          If the preconditions on the {@code offset} and {@code length}
      *          parameters do not hold
      *
      * @throws  NonWritableChannelException
@@ -131,7 +131,7 @@
     /**
      * Writes a sequence of bytes to this channel from the given buffers.
      *
-     * <p> An invocation of this method of the form <tt>c.write(srcs)</tt>
+     * <p> An invocation of this method of the form {@code c.write(srcs)}
      * behaves in exactly the same manner as the invocation
      *
      * <blockquote><pre>
--- a/jdk/src/java.base/share/classes/java/nio/channels/InterruptibleChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/InterruptibleChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -54,7 +54,7 @@
  *
  * <p> A channel supports asynchronous closing and interruption if, and only
  * if, it implements this interface.  This can be tested at runtime, if
- * necessary, via the <tt>instanceof</tt> operator.
+ * necessary, via the {@code instanceof} operator.
  *
  *
  * @author Mark Reinhold
--- a/jdk/src/java.base/share/classes/java/nio/channels/ReadableByteChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/ReadableByteChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -52,16 +52,16 @@
      *
      * <p> An attempt is made to read up to <i>r</i> bytes from the channel,
      * where <i>r</i> is the number of bytes remaining in the buffer, that is,
-     * <tt>dst.remaining()</tt>, at the moment this method is invoked.
+     * {@code dst.remaining()}, at the moment this method is invoked.
      *
      * <p> Suppose that a byte sequence of length <i>n</i> is read, where
-     * <tt>0</tt>&nbsp;<tt>&lt;=</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
+     * {@code 0}&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
      * This byte sequence will be transferred into the buffer so that the first
      * byte in the sequence is at index <i>p</i> and the last byte is at index
-     * <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>,
+     * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>&nbsp;{@code -}&nbsp;{@code 1},
      * where <i>p</i> is the buffer's position at the moment this method is
      * invoked.  Upon return the buffer's position will be equal to
-     * <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed.
+     * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>; its limit will not have changed.
      *
      * <p> A read operation might not fill the buffer, and in fact it might not
      * read any bytes at all.  Whether or not it does so depends upon the
@@ -81,7 +81,7 @@
      * @param  dst
      *         The buffer into which bytes are to be transferred
      *
-     * @return  The number of bytes read, possibly zero, or <tt>-1</tt> if the
+     * @return  The number of bytes read, possibly zero, or {@code -1} if the
      *          channel has reached end-of-stream
      *
      * @throws  NonReadableChannelException
--- a/jdk/src/java.base/share/classes/java/nio/channels/ScatteringByteChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/ScatteringByteChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -66,11 +66,11 @@
      * at the moment that this method is invoked.
      *
      * <p> Suppose that a byte sequence of length <i>n</i> is read, where
-     * <tt>0</tt>&nbsp;<tt>&lt;=</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
-     * Up to the first <tt>dsts[offset].remaining()</tt> bytes of this sequence
-     * are transferred into buffer <tt>dsts[offset]</tt>, up to the next
-     * <tt>dsts[offset+1].remaining()</tt> bytes are transferred into buffer
-     * <tt>dsts[offset+1]</tt>, and so forth, until the entire byte sequence
+     * {@code 0}&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
+     * Up to the first {@code dsts[offset].remaining()} bytes of this sequence
+     * are transferred into buffer {@code dsts[offset]}, up to the next
+     * {@code dsts[offset+1].remaining()} bytes are transferred into buffer
+     * {@code dsts[offset+1]}, and so forth, until the entire byte sequence
      * is transferred into the given buffers.  As many bytes as possible are
      * transferred into each buffer, hence the final position of each updated
      * buffer, except the last updated buffer, is guaranteed to be equal to
@@ -87,18 +87,18 @@
      * @param  offset
      *         The offset within the buffer array of the first buffer into
      *         which bytes are to be transferred; must be non-negative and no
-     *         larger than <tt>dsts.length</tt>
+     *         larger than {@code dsts.length}
      *
      * @param  length
      *         The maximum number of buffers to be accessed; must be
      *         non-negative and no larger than
-     *         <tt>dsts.length</tt>&nbsp;-&nbsp;<tt>offset</tt>
+     *         {@code dsts.length}&nbsp;-&nbsp;{@code offset}
      *
      * @return The number of bytes read, possibly zero,
-     *         or <tt>-1</tt> if the channel has reached end-of-stream
+     *         or {@code -1} if the channel has reached end-of-stream
      *
      * @throws  IndexOutOfBoundsException
-     *          If the preconditions on the <tt>offset</tt> and <tt>length</tt>
+     *          If the preconditions on the {@code offset} and {@code length}
      *          parameters do not hold
      *
      * @throws  NonReadableChannelException
@@ -126,7 +126,7 @@
     /**
      * Reads a sequence of bytes from this channel into the given buffers.
      *
-     * <p> An invocation of this method of the form <tt>c.read(dsts)</tt>
+     * <p> An invocation of this method of the form {@code c.read(dsts)}
      * behaves in exactly the same manner as the invocation
      *
      * <blockquote><pre>
@@ -136,7 +136,7 @@
      *         The buffers into which bytes are to be transferred
      *
      * @return The number of bytes read, possibly zero,
-     *         or <tt>-1</tt> if the channel has reached end-of-stream
+     *         or {@code -1} if the channel has reached end-of-stream
      *
      * @throws  NonReadableChannelException
      *          If this channel was not opened for reading
--- a/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -132,7 +132,7 @@
      * of its keys have been cancelled.  A channel may also remain registered
      * for some time after it is closed.  </p>
      *
-     * @return <tt>true</tt> if, and only if, this channel is registered
+     * @return {@code true} if, and only if, this channel is registered
      */
     public abstract boolean isRegistered();
     //
@@ -146,7 +146,7 @@
      *          The selector
      *
      * @return  The key returned when this channel was last registered with the
-     *          given selector, or <tt>null</tt> if this channel is not
+     *          given selector, or {@code null} if this channel is not
      *          currently registered with that selector
      */
     public abstract SelectionKey keyFor(Selector sel);
@@ -159,16 +159,16 @@
      *
      * <p> If this channel is currently registered with the given selector then
      * the selection key representing that registration is returned.  The key's
-     * interest set will have been changed to <tt>ops</tt>, as if by invoking
+     * interest set will have been changed to {@code ops}, as if by invoking
      * the {@link SelectionKey#interestOps(int) interestOps(int)} method.  If
-     * the <tt>att</tt> argument is not <tt>null</tt> then the key's attachment
+     * the {@code att} argument is not {@code null} then the key's attachment
      * will have been set to that value.  A {@link CancelledKeyException} will
      * be thrown if the key has already been cancelled.
      *
      * <p> Otherwise this channel has not yet been registered with the given
      * selector, so it is registered and the resulting new key is returned.
-     * The key's initial interest set will be <tt>ops</tt> and its attachment
-     * will be <tt>att</tt>.
+     * The key's initial interest set will be {@code ops} and its attachment
+     * will be {@code att}.
      *
      * <p> This method may be invoked at any time.  If this method is invoked
      * while another invocation of this method or of the {@link
@@ -189,7 +189,7 @@
      *         The interest set for the resulting key
      *
      * @param  att
-     *         The attachment for the resulting key; may be <tt>null</tt>
+     *         The attachment for the resulting key; may be {@code null}
      *
      * @throws  ClosedChannelException
      *          If this channel is closed
@@ -209,7 +209,7 @@
      *          but the corresponding key has already been cancelled
      *
      * @throws  IllegalArgumentException
-     *          If a bit in the <tt>ops</tt> set does not correspond to an
+     *          If a bit in the {@code ops} set does not correspond to an
      *          operation that is supported by this channel, that is, if
      *          {@code set & ~validOps() != 0}
      *
@@ -235,13 +235,13 @@
      *
      * <p> An invocation of this convenience method of the form
      *
-     * <blockquote><tt>sc.register(sel, ops)</tt></blockquote>
+     * <blockquote>{@code sc.register(sel, ops)}</blockquote>
      *
      * behaves in exactly the same way as the invocation
      *
-     * <blockquote><tt>sc.{@link
+     * <blockquote>{@code sc.}{@link
      * #register(java.nio.channels.Selector,int,java.lang.Object)
-     * register}(sel, ops, null)</tt></blockquote>
+     * register(sel, ops, null)}</blockquote>
      *
      * @param  sel
      *         The selector with which this channel is to be registered
@@ -267,7 +267,7 @@
      *          but the corresponding key has already been cancelled
      *
      * @throws  IllegalArgumentException
-     *          If a bit in <tt>ops</tt> does not correspond to an operation
+     *          If a bit in {@code ops} does not correspond to an operation
      *          that is supported by this channel, that is, if {@code set &
      *          ~validOps() != 0}
      *
@@ -296,8 +296,8 @@
      * of the {@link #register(Selector, int) register} method is in progress
      * then it will first block until the other operation is complete. </p>
      *
-     * @param  block  If <tt>true</tt> then this channel will be placed in
-     *                blocking mode; if <tt>false</tt> then it will be placed
+     * @param  block  If {@code true} then this channel will be placed in
+     *                blocking mode; if {@code false} then it will be placed
      *                non-blocking mode
      *
      * @return  This selectable channel
@@ -306,7 +306,7 @@
      *          If this channel is closed
      *
      * @throws  IllegalBlockingModeException
-     *          If <tt>block</tt> is <tt>true</tt> and this channel is
+     *          If {@code block} is {@code true} and this channel is
      *          registered with one or more selectors
      *
      * @throws IOException
@@ -327,7 +327,7 @@
      * <p> If this channel is closed then the value returned by this method is
      * not specified. </p>
      *
-     * @return <tt>true</tt> if, and only if, this channel is in blocking mode
+     * @return {@code true} if, and only if, this channel is in blocking mode
      */
     public abstract boolean isBlocking();
 
--- a/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java	Wed Jul 05 20:45:41 2017 +0200
@@ -139,7 +139,7 @@
      * <p> A key is valid upon creation and remains so until it is cancelled,
      * its channel is closed, or its selector is closed.  </p>
      *
-     * @return  <tt>true</tt> if, and only if, this key is valid
+     * @return  {@code true} if, and only if, this key is valid
      */
     public abstract boolean isValid();
 
@@ -218,11 +218,11 @@
      * Operation-set bit for read operations.
      *
      * <p> Suppose that a selection key's interest set contains
-     * <tt>OP_READ</tt> at the start of a <a
+     * {@code OP_READ} at the start of a <a
      * href="Selector.html#selop">selection operation</a>.  If the selector
      * detects that the corresponding channel is ready for reading, has reached
      * end-of-stream, has been remotely shut down for further reading, or has
-     * an error pending, then it will add <tt>OP_READ</tt> to the key's
+     * an error pending, then it will add {@code OP_READ} to the key's
      * ready-operation set and add the key to its selected-key&nbsp;set.  </p>
      */
     public static final int OP_READ = 1 << 0;
@@ -231,11 +231,11 @@
      * Operation-set bit for write operations.
      *
      * <p> Suppose that a selection key's interest set contains
-     * <tt>OP_WRITE</tt> at the start of a <a
+     * {@code OP_WRITE} at the start of a <a
      * href="Selector.html#selop">selection operation</a>.  If the selector
      * detects that the corresponding channel is ready for writing, has been
      * remotely shut down for further writing, or has an error pending, then it
-     * will add <tt>OP_WRITE</tt> to the key's ready set and add the key to its
+     * will add {@code OP_WRITE} to the key's ready set and add the key to its
      * selected-key&nbsp;set.  </p>
      */
     public static final int OP_WRITE = 1 << 2;
@@ -244,11 +244,11 @@
      * Operation-set bit for socket-connect operations.
      *
      * <p> Suppose that a selection key's interest set contains
-     * <tt>OP_CONNECT</tt> at the start of a <a
+     * {@code OP_CONNECT} at the start of a <a
      * href="Selector.html#selop">selection operation</a>.  If the selector
      * detects that the corresponding socket channel is ready to complete its
      * connection sequence, or has an error pending, then it will add
-     * <tt>OP_CONNECT</tt> to the key's ready set and add the key to its
+     * {@code OP_CONNECT} to the key's ready set and add the key to its
      * selected-key&nbsp;set.  </p>
      */
     public static final int OP_CONNECT = 1 << 3;
@@ -257,11 +257,11 @@
      * Operation-set bit for socket-accept operations.
      *
      * <p> Suppose that a selection key's interest set contains
-     * <tt>OP_ACCEPT</tt> at the start of a <a
+     * {@code OP_ACCEPT} at the start of a <a
      * href="Selector.html#selop">selection operation</a>.  If the selector
      * detects that the corresponding server-socket channel is ready to accept
      * another connection, or has an error pending, then it will add
-     * <tt>OP_ACCEPT</tt> to the key's ready set and add the key to its
+     * {@code OP_ACCEPT} to the key's ready set and add the key to its
      * selected-key&nbsp;set.  </p>
      */
     public static final int OP_ACCEPT = 1 << 4;
@@ -269,7 +269,7 @@
     /**
      * Tests whether this key's channel is ready for reading.
      *
-     * <p> An invocation of this method of the form <tt>k.isReadable()</tt>
+     * <p> An invocation of this method of the form {@code k.isReadable()}
      * behaves in exactly the same way as the expression
      *
      * <blockquote><pre>{@code
@@ -277,9 +277,9 @@
      * }</pre></blockquote>
      *
      * <p> If this key's channel does not support read operations then this
-     * method always returns <tt>false</tt>.  </p>
+     * method always returns {@code false}.  </p>
      *
-     * @return  <tt>true</tt> if, and only if,
+     * @return  {@code true} if, and only if,
                 {@code readyOps() & OP_READ} is nonzero
      *
      * @throws  CancelledKeyException
@@ -292,7 +292,7 @@
     /**
      * Tests whether this key's channel is ready for writing.
      *
-     * <p> An invocation of this method of the form <tt>k.isWritable()</tt>
+     * <p> An invocation of this method of the form {@code k.isWritable()}
      * behaves in exactly the same way as the expression
      *
      * <blockquote><pre>{@code
@@ -300,9 +300,9 @@
      * }</pre></blockquote>
      *
      * <p> If this key's channel does not support write operations then this
-     * method always returns <tt>false</tt>.  </p>
+     * method always returns {@code false}.  </p>
      *
-     * @return  <tt>true</tt> if, and only if,
+     * @return  {@code true} if, and only if,
      *          {@code readyOps() & OP_WRITE} is nonzero
      *
      * @throws  CancelledKeyException
@@ -316,7 +316,7 @@
      * Tests whether this key's channel has either finished, or failed to
      * finish, its socket-connection operation.
      *
-     * <p> An invocation of this method of the form <tt>k.isConnectable()</tt>
+     * <p> An invocation of this method of the form {@code k.isConnectable()}
      * behaves in exactly the same way as the expression
      *
      * <blockquote><pre>{@code
@@ -324,9 +324,9 @@
      * }</pre></blockquote>
      *
      * <p> If this key's channel does not support socket-connect operations
-     * then this method always returns <tt>false</tt>.  </p>
+     * then this method always returns {@code false}.  </p>
      *
-     * @return  <tt>true</tt> if, and only if,
+     * @return  {@code true} if, and only if,
      *          {@code readyOps() & OP_CONNECT} is nonzero
      *
      * @throws  CancelledKeyException
@@ -340,7 +340,7 @@
      * Tests whether this key's channel is ready to accept a new socket
      * connection.
      *
-     * <p> An invocation of this method of the form <tt>k.isAcceptable()</tt>
+     * <p> An invocation of this method of the form {@code k.isAcceptable()}
      * behaves in exactly the same way as the expression
      *
      * <blockquote><pre>{@code
@@ -348,9 +348,9 @@
      * }</pre></blockquote>
      *
      * <p> If this key's channel does not support socket-accept operations then
-     * this method always returns <tt>false</tt>.  </p>
+     * this method always returns {@code false}.  </p>
      *
-     * @return  <tt>true</tt> if, and only if,
+     * @return  {@code true} if, and only if,
      *          {@code readyOps() & OP_ACCEPT} is nonzero
      *
      * @throws  CancelledKeyException
@@ -376,13 +376,13 @@
      * <p> An attached object may later be retrieved via the {@link #attachment()
      * attachment} method.  Only one object may be attached at a time; invoking
      * this method causes any previous attachment to be discarded.  The current
-     * attachment may be discarded by attaching <tt>null</tt>.  </p>
+     * attachment may be discarded by attaching {@code null}.  </p>
      *
      * @param  ob
-     *         The object to be attached; may be <tt>null</tt>
+     *         The object to be attached; may be {@code null}
      *
      * @return  The previously-attached object, if any,
-     *          otherwise <tt>null</tt>
+     *          otherwise {@code null}
      */
     public final Object attach(Object ob) {
         return attachmentUpdater.getAndSet(this, ob);
@@ -392,7 +392,7 @@
      * Retrieves the current attachment.
      *
      * @return  The object currently attached to this key,
-     *          or <tt>null</tt> if there is no attachment
+     *          or {@code null} if there is no attachment
      */
     public final Object attachment() {
         return attachment;
--- a/jdk/src/java.base/share/classes/java/nio/channels/Selector.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/Selector.java	Wed Jul 05 20:45:41 2017 +0200
@@ -230,7 +230,7 @@
     /**
      * Tells whether or not this selector is open.
      *
-     * @return <tt>true</tt> if, and only if, this selector is open
+     * @return {@code true} if, and only if, this selector is open
      */
     public abstract boolean isOpen();
 
@@ -309,7 +309,7 @@
      * <p> This method does not offer real-time guarantees: It schedules the
      * timeout as if by invoking the {@link Object#wait(long)} method. </p>
      *
-     * @param  timeout  If positive, block for up to <tt>timeout</tt>
+     * @param  timeout  If positive, block for up to {@code timeout}
      *                  milliseconds, more or less, while waiting for a
      *                  channel to become ready; if zero, block indefinitely;
      *                  must not be negative
--- a/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -223,7 +223,7 @@
      * Accepts a connection made to this channel's socket.
      *
      * <p> If this channel is in non-blocking mode then this method will
-     * immediately return <tt>null</tt> if there are no pending connections.
+     * immediately return {@code null} if there are no pending connections.
      * Otherwise it will block indefinitely until a new connection is available
      * or an I/O error occurs.
      *
@@ -239,7 +239,7 @@
      * java.lang.SecurityManager#checkAccept checkAccept} method.  </p>
      *
      * @return  The socket channel for the new connection,
-     *          or <tt>null</tt> if this channel is in non-blocking mode
+     *          or {@code null} if this channel is in non-blocking mode
      *          and no connection is available to be accepted
      *
      * @throws  ClosedChannelException
--- a/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -58,7 +58,7 @@
  * If the input side of a socket is shut down by one thread while another
  * thread is blocked in a read operation on the socket's channel, then the read
  * operation in the blocked thread will complete without reading any bytes and
- * will return <tt>-1</tt>.  If the output side of a socket is shut down by one
+ * will return {@code -1}.  If the output side of a socket is shut down by one
  * thread while another thread is blocked in a write operation on the socket's
  * channel, then the blocked thread will receive an {@link
  * AsynchronousCloseException}.
@@ -150,7 +150,7 @@
      *
      * <p> This convenience method works as if by invoking the {@link #open()}
      * method, invoking the {@link #connect(SocketAddress) connect} method upon
-     * the resulting socket channel, passing it <tt>remote</tt>, and then
+     * the resulting socket channel, passing it {@code remote}, and then
      * returning that channel.  </p>
      *
      * @param  remote
@@ -204,9 +204,9 @@
      * operations.
      *
      * <p> Socket channels support connecting, reading, and writing, so this
-     * method returns <tt>(</tt>{@link SelectionKey#OP_CONNECT}
-     * <tt>|</tt>&nbsp;{@link SelectionKey#OP_READ} <tt>|</tt>&nbsp;{@link
-     * SelectionKey#OP_WRITE}<tt>)</tt>.  </p>
+     * method returns {@code (}{@link SelectionKey#OP_CONNECT}
+     * {@code |}&nbsp;{@link SelectionKey#OP_READ} {@code |}&nbsp;{@link
+     * SelectionKey#OP_WRITE}{@code )}.
      *
      * @return  The valid-operation set
      */
@@ -304,7 +304,7 @@
     /**
      * Tells whether or not this channel's network socket is connected.
      *
-     * @return  <tt>true</tt> if, and only if, this channel's network socket
+     * @return  {@code true} if, and only if, this channel's network socket
      *          is {@link #isOpen open} and connected
      */
     public abstract boolean isConnected();
@@ -313,7 +313,7 @@
      * Tells whether or not a connection operation is in progress on this
      * channel.
      *
-     * @return  <tt>true</tt> if, and only if, a connection operation has been
+     * @return  {@code true} if, and only if, a connection operation has been
      *          initiated on this channel but not yet completed by invoking the
      *          {@link #finishConnect finishConnect} method
      */
@@ -325,8 +325,8 @@
      * <p> If this channel is in non-blocking mode then an invocation of this
      * method initiates a non-blocking connection operation.  If the connection
      * is established immediately, as can happen with a local connection, then
-     * this method returns <tt>true</tt>.  Otherwise this method returns
-     * <tt>false</tt> and the connection operation must later be completed by
+     * this method returns {@code true}.  Otherwise this method returns
+     * {@code false} and the connection operation must later be completed by
      * invoking the {@link #finishConnect finishConnect} method.
      *
      * <p> If this channel is in blocking mode then an invocation of this
@@ -349,8 +349,8 @@
      * @param  remote
      *         The remote address to which this channel is to be connected
      *
-     * @return  <tt>true</tt> if a connection was established,
-     *          <tt>false</tt> if this channel is in non-blocking mode
+     * @return  {@code true} if a connection was established,
+     *          {@code false} if this channel is in non-blocking mode
      *          and the connection operation is in progress
      *
      * @throws  AlreadyConnectedException
@@ -400,11 +400,11 @@
      * {@link java.io.IOException} to be thrown.
      *
      * <p> If this channel is already connected then this method will not block
-     * and will immediately return <tt>true</tt>.  If this channel is in
-     * non-blocking mode then this method will return <tt>false</tt> if the
+     * and will immediately return {@code true}.  If this channel is in
+     * non-blocking mode then this method will return {@code false} if the
      * connection process is not yet complete.  If this channel is in blocking
      * mode then this method will block until the connection either completes
-     * or fails, and will always either return <tt>true</tt> or throw a checked
+     * or fails, and will always either return {@code true} or throw a checked
      * exception describing the failure.
      *
      * <p> This method may be invoked at any time.  If a read or write
@@ -414,7 +414,7 @@
      * invocation of this method throws a checked exception, then the channel
      * will be closed.  </p>
      *
-     * @return  <tt>true</tt> if, and only if, this channel's socket is now
+     * @return  {@code true} if, and only if, this channel's socket is now
      *          connected
      *
      * @throws  NoConnectionPendingException
--- a/jdk/src/java.base/share/classes/java/nio/channels/WritableByteChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/WritableByteChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -54,16 +54,16 @@
      *
      * <p> An attempt is made to write up to <i>r</i> bytes to the channel,
      * where <i>r</i> is the number of bytes remaining in the buffer, that is,
-     * <tt>src.remaining()</tt>, at the moment this method is invoked.
+     * {@code src.remaining()}, at the moment this method is invoked.
      *
      * <p> Suppose that a byte sequence of length <i>n</i> is written, where
-     * <tt>0</tt>&nbsp;<tt>&lt;=</tt>&nbsp;<i>n</i>&nbsp;<tt>&lt;=</tt>&nbsp;<i>r</i>.
+     * {@code 0}&nbsp;{@code <=}&nbsp;<i>n</i>&nbsp;{@code <=}&nbsp;<i>r</i>.
      * This byte sequence will be transferred from the buffer starting at index
      * <i>p</i>, where <i>p</i> is the buffer's position at the moment this
      * method is invoked; the index of the last byte written will be
-     * <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>&nbsp;<tt>-</tt>&nbsp;<tt>1</tt>.
+     * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>&nbsp;{@code -}&nbsp;{@code 1}.
      * Upon return the buffer's position will be equal to
-     * <i>p</i>&nbsp;<tt>+</tt>&nbsp;<i>n</i>; its limit will not have changed.
+     * <i>p</i>&nbsp;{@code +}&nbsp;<i>n</i>; its limit will not have changed.
      *
      * <p> Unless otherwise specified, a write operation will return only after
      * writing all of the <i>r</i> requested bytes.  Some types of channels,
--- a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java	Wed Jul 05 20:45:41 2017 +0200
@@ -32,29 +32,29 @@
  *
  * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists channels and their descriptions">
  * <tr><th align="left">Channels</th><th align="left">Description</th></tr>
- * <tr><td valign=top><tt><i>{@link java.nio.channels.Channel}</i></tt></td>
+ * <tr><td valign=top><i>{@link java.nio.channels.Channel}</i></td>
  *     <td>A nexus for I/O operations</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></td>
  *     <td>Can read into a buffer</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></td>
  *     <td>Can read into a sequence of&nbsp;buffers</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></td>
  *     <td>Can write from a buffer</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></td>
  *     <td>Can write from a sequence of&nbsp;buffers</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></td>
  *     <td>Can read/write to/from a&nbsp;buffer</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></td>
  *     <td>A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></td>
  *     <td>Supports asynchronous I/O operations.</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
  *     <td>Can read and write bytes asynchronously</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></td>
  *     <td>A channel to a network socket</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></td>
  *     <td>Can join Internet Protocol (IP) multicast groups</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.Channels}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.Channels}</td>
  *     <td>Utility methods for channel/stream interoperation</td></tr>
  * </table></blockquote>
  *
@@ -99,8 +99,8 @@
  * Internet Protocol (IP) multicast groups.
  *
  * <p> The {@link java.nio.channels.Channels} utility class defines static methods
- * that support the interoperation of the stream classes of the <tt>{@link
- * java.io}</tt> package with the channel classes of this package.  An appropriate
+ * that support the interoperation of the stream classes of the {@link
+ * java.io} package with the channel classes of this package.  An appropriate
  * channel can be constructed from an {@link java.io.InputStream} or an {@link
  * java.io.OutputStream}, and conversely an {@link java.io.InputStream} or an
  * {@link java.io.OutputStream} can be constructed from a channel.  A {@link
@@ -111,11 +111,11 @@
  *
  * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists file channels and their descriptions">
  * <tr><th align="left">File channels</th><th align="left">Description</th></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.FileChannel}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.FileChannel}</td>
  *     <td>Reads, writes, maps, and manipulates files</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.FileLock}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.FileLock}</td>
  *     <td>A lock on a (region of a) file</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</tt></td>
+ * <tr><td valign=top>{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
  *     <td>A direct byte buffer mapped to a region of a&nbsp;file</td></tr>
  * </table></blockquote>
  *
@@ -133,30 +133,30 @@
  * java.nio.channels.FileChannel#open open} methods, or by invoking the {@code
  * getChannel} method of a {@link java.io.FileInputStream}, {@link
  * java.io.FileOutputStream}, or {@link java.io.RandomAccessFile} to return a
- * file channel connected to the same underlying file as the <tt>{@link java.io}</tt>
+ * file channel connected to the same underlying file as the {@link java.io}
  * class.
  *
  * <a name="multiplex"></a>
  * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists multiplexed, non-blocking channels and their descriptions">
  * <tr><th align="left">Multiplexed, non-blocking I/O</th><th align="left"><p>Description</th></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.SelectableChannel}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.SelectableChannel}</td>
  *     <td>A channel that can be multiplexed</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</td>
  *     <td>A channel to a datagram-oriented socket</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</td>
  *     <td>The write end of a pipe</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</td>
  *     <td>The read end of a pipe</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</td>
  *     <td>A channel to a stream-oriented listening socket</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</td>
  *     <td>A channel for a stream-oriented connecting socket</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.Selector}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.Selector}</td>
  *     <td>A multiplexor of selectable channels</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.SelectionKey}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.SelectionKey}</td>
  *     <td>A token representing the registration <br> of a channel
  *     with&nbsp;a&nbsp;selector</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.Pipe}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.Pipe}</td>
  *     <td>Two channels that form a unidirectional&nbsp;pipe</td></tr>
  * </table></blockquote>
  *
@@ -194,18 +194,18 @@
  *
  * <p> This package defines selectable-channel classes corresponding to the {@link
  * java.net.DatagramSocket}, {@link java.net.ServerSocket}, and {@link
- * java.net.Socket} classes defined in the <tt>{@link java.net}</tt> package.
+ * java.net.Socket} classes defined in the {@link java.net} package.
  * Minor changes to these classes have been made in order to support sockets that
  * are associated with channels.  This package also defines a simple class that
  * implements unidirectional pipes.  In all cases, a new selectable channel is
- * created by invoking the static <tt>open</tt> method of the corresponding class.
+ * created by invoking the static {@code open} method of the corresponding class.
  * If a channel needs an associated socket then a socket will be created as a side
  * effect of this operation.
  *
  * <p> The implementation of selectors, selectable channels, and selection keys
  * can be replaced by "plugging in" an alternative definition or instance of the
- * {@link java.nio.channels.spi.SelectorProvider} class defined in the <tt>{@link
- * java.nio.channels.spi}</tt> package.  It is not expected that many developers
+ * {@link java.nio.channels.spi.SelectorProvider} class defined in the {@link
+ * java.nio.channels.spi} package.  It is not expected that many developers
  * will actually make use of this facility; it is provided primarily so that
  * sophisticated users can take advantage of operating-system-specific
  * I/O-multiplexing mechanisms when very high performance is required.
@@ -215,8 +215,8 @@
  * java.nio.channels.spi.AbstractInterruptibleChannel}, {@link
  * java.nio.channels.spi.AbstractSelectableChannel}, {@link
  * java.nio.channels.spi.AbstractSelectionKey}, and {@link
- * java.nio.channels.spi.AbstractSelector} classes in the <tt>{@link
- * java.nio.channels.spi}</tt> package.  When defining a custom selector provider,
+ * java.nio.channels.spi.AbstractSelector} classes in the {@link
+ * java.nio.channels.spi} package.  When defining a custom selector provider,
  * only the {@link java.nio.channels.spi.AbstractSelector} and {@link
  * java.nio.channels.spi.AbstractSelectionKey} classes should be subclassed
  * directly; custom channel classes should extend the appropriate {@link
@@ -226,15 +226,15 @@
  *
  * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists asynchronous channels and their descriptions">
  * <tr><th align="left">Asynchronous I/O</th><th align="left">Description</th></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.AsynchronousFileChannel}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.AsynchronousFileChannel}</td>
  *     <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.AsynchronousSocketChannel}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.AsynchronousSocketChannel}</td>
  *     <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</td>
  *     <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.CompletionHandler}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.CompletionHandler}</td>
  *     <td>A handler for consuming the result of an asynchronous operation</td></tr>
- * <tr><td valign=top><tt>{@link java.nio.channels.AsynchronousChannelGroup}</tt></td>
+ * <tr><td valign=top>{@link java.nio.channels.AsynchronousChannelGroup}</td>
  *     <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr>
  * </table></blockquote>
  *
@@ -272,13 +272,13 @@
  * <p> As with selectors, the implementation of asynchronous channels can be
  * replaced by "plugging in" an alternative definition or instance of the {@link
  * java.nio.channels.spi.AsynchronousChannelProvider} class defined in the
- * <tt>{@link java.nio.channels.spi}</tt> package.  It is not expected that many
+ * {@link java.nio.channels.spi} package.  It is not expected that many
  * developers will actually make use of this facility; it is provided primarily
  * so that sophisticated users can take advantage of operating-system-specific
  * asynchronous I/O mechanisms when very high performance is required.
  *
  * <hr width="80%">
- * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor
+ * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method in any class or interface in this package will cause a {@link
  * java.lang.NullPointerException NullPointerException} to be thrown.
  *
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -46,7 +46,7 @@
  * before and after, respectively, invoking an I/O operation that might block
  * indefinitely.  In order to ensure that the {@link #end end} method is always
  * invoked, these methods should be used within a
- * <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block:
+ * {@code try}&nbsp;...&nbsp;{@code finally} block:
  *
  * <blockquote><pre>
  * boolean completed = false;
@@ -58,11 +58,11 @@
  *     end(completed);
  * }</pre></blockquote>
  *
- * <p> The <tt>completed</tt> argument to the {@link #end end} method tells
+ * <p> The {@code completed} argument to the {@link #end end} method tells
  * whether or not the I/O operation actually completed, that is, whether it had
  * any effect that would be visible to the invoker.  In the case of an
  * operation that reads bytes, for example, this argument should be
- * <tt>true</tt> if, and only if, some bytes were actually transferred into the
+ * {@code true} if, and only if, some bytes were actually transferred into the
  * invoker's target buffer.
  *
  * <p> A concrete channel class must also implement the {@link
@@ -148,7 +148,7 @@
      * Marks the beginning of an I/O operation that might block indefinitely.
      *
      * <p> This method should be invoked in tandem with the {@link #end end}
-     * method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block as
+     * method, using a {@code try}&nbsp;...&nbsp;{@code finally} block as
      * shown <a href="#be">above</a>, in order to implement asynchronous
      * closing and interruption for this channel.  </p>
      */
@@ -177,12 +177,12 @@
      * Marks the end of an I/O operation that might block indefinitely.
      *
      * <p> This method should be invoked in tandem with the {@link #begin
-     * begin} method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block
+     * begin} method, using a {@code try}&nbsp;...&nbsp;{@code finally} block
      * as shown <a href="#be">above</a>, in order to implement asynchronous
      * closing and interruption for this channel.  </p>
      *
      * @param  completed
-     *         <tt>true</tt> if, and only if, the I/O operation completed
+     *         {@code true} if, and only if, the I/O operation completed
      *         successfully, that is, had some effect that would be visible to
      *         the operation's invoker
      *
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java	Wed Jul 05 20:45:41 2017 +0200
@@ -305,8 +305,8 @@
      * changing the blocking mode.  This method is only invoked if the new mode
      * is different from the current mode.  </p>
      *
-     * @param  block  If <tt>true</tt> then this channel will be placed in
-     *                blocking mode; if <tt>false</tt> then it will be placed
+     * @param  block  If {@code true} then this channel will be placed in
+     *                blocking mode; if {@code false} then it will be placed
      *                non-blocking mode
      *
      * @throws IOException
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelector.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelector.java	Wed Jul 05 20:45:41 2017 +0200
@@ -43,7 +43,7 @@
  * after, respectively, invoking an I/O operation that might block
  * indefinitely.  In order to ensure that the {@link #end end} method is always
  * invoked, these methods should be used within a
- * <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block:
+ * {@code try}&nbsp;...&nbsp;{@code finally} block:
  *
  * <blockquote><pre>
  * try {
@@ -197,7 +197,7 @@
      * Marks the beginning of an I/O operation that might block indefinitely.
      *
      * <p> This method should be invoked in tandem with the {@link #end end}
-     * method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block as
+     * method, using a {@code try}&nbsp;...&nbsp;{@code finally} block as
      * shown <a href="#be">above</a>, in order to implement interruption for
      * this selector.
      *
@@ -223,7 +223,7 @@
      * Marks the end of an I/O operation that might block indefinitely.
      *
      * <p> This method should be invoked in tandem with the {@link #begin begin}
-     * method, using a <tt>try</tt>&nbsp;...&nbsp;<tt>finally</tt> block as
+     * method, using a {@code try}&nbsp;...&nbsp;{@code finally} block as
      * shown <a href="#be">above</a>, in order to implement interruption for
      * this selector.  </p>
      */
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java	Wed Jul 05 20:45:41 2017 +0200
@@ -64,7 +64,7 @@
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("asynchronousChannelProvider")</tt>
+     *          {@link RuntimePermission}{@code ("asynchronousChannelProvider")}
      */
     protected AsynchronousChannelProvider() {
         this(checkPermission());
@@ -137,7 +137,7 @@
      * <ol>
      *
      *   <li><p> If the system property
-     *   <tt>java.nio.channels.spi.AsynchronousChannelProvider</tt> is defined
+     *   {@code java.nio.channels.spi.AsynchronousChannelProvider} is defined
      *   then it is taken to be the fully-qualified name of a concrete provider class.
      *   The class is loaded and instantiated; if this process fails then an
      *   unspecified error is thrown.  </p></li>
@@ -145,8 +145,8 @@
      *   <li><p> If a provider class has been installed in a jar file that is
      *   visible to the system class loader, and that jar file contains a
      *   provider-configuration file named
-     *   <tt>java.nio.channels.spi.AsynchronousChannelProvider</tt> in the resource
-     *   directory <tt>META-INF/services</tt>, then the first class name
+     *   {@code java.nio.channels.spi.AsynchronousChannelProvider} in the resource
+     *   directory {@code META-INF/services}, then the first class name
      *   specified in that file is taken.  The class is loaded and
      *   instantiated; if this process fails then an unspecified error is
      *   thrown.  </p></li>
--- a/jdk/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java	Wed Jul 05 20:45:41 2017 +0200
@@ -46,7 +46,7 @@
  * #provider() provider} method.  The first invocation of that method will locate
  * the default provider as specified below.
  *
- * <p> The system-wide default provider is used by the static <tt>open</tt>
+ * <p> The system-wide default provider is used by the static {@code open}
  * methods of the {@link java.nio.channels.DatagramChannel#open
  * DatagramChannel}, {@link java.nio.channels.Pipe#open Pipe}, {@link
  * java.nio.channels.Selector#open Selector}, {@link
@@ -54,7 +54,7 @@
  * java.nio.channels.SocketChannel#open SocketChannel} classes.  It is also
  * used by the {@link java.lang.System#inheritedChannel System.inheritedChannel()}
  * method. A program may make use of a provider other than the default provider
- * by instantiating that provider and then directly invoking the <tt>open</tt>
+ * by instantiating that provider and then directly invoking the {@code open}
  * methods defined in this class.
  *
  * <p> All of the methods in this class are safe for use by multiple concurrent
@@ -84,7 +84,7 @@
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("selectorProvider")</tt>
+     *          {@link RuntimePermission}{@code ("selectorProvider")}
      */
     protected SelectorProvider() {
         this(checkPermission());
@@ -142,7 +142,7 @@
      * <ol>
      *
      *   <li><p> If the system property
-     *   <tt>java.nio.channels.spi.SelectorProvider</tt> is defined then it is
+     *   {@code java.nio.channels.spi.SelectorProvider} is defined then it is
      *   taken to be the fully-qualified name of a concrete provider class.
      *   The class is loaded and instantiated; if this process fails then an
      *   unspecified error is thrown.  </p></li>
@@ -150,8 +150,8 @@
      *   <li><p> If a provider class has been installed in a jar file that is
      *   visible to the system class loader, and that jar file contains a
      *   provider-configuration file named
-     *   <tt>java.nio.channels.spi.SelectorProvider</tt> in the resource
-     *   directory <tt>META-INF/services</tt>, then the first class name
+     *   {@code java.nio.channels.spi.SelectorProvider} in the resource
+     *   directory {@code META-INF/services}, then the first class name
      *   specified in that file is taken.  The class is loaded and
      *   instantiated; if this process fails then an unspecified error is
      *   thrown.  </p></li>
@@ -305,14 +305,14 @@
      * returned. Subsequent invocations of this method return the same
      * channel. </p>
      *
-     * @return  The inherited channel, if any, otherwise <tt>null</tt>.
+     * @return  The inherited channel, if any, otherwise {@code null}.
      *
      * @throws  IOException
      *          If an I/O error occurs
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("inheritedChannel")</tt>
+     *          {@link RuntimePermission}{@code ("inheritedChannel")}
      *
      * @since 1.5
      */
--- a/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template	Wed Jul 05 20:45:41 2017 +0200
@@ -55,12 +55,12 @@
  *   has not been used before; </p></li>
  *
  *   <li><p> Invoke the {@link #$code$ $code$} method zero or more times, as
- *   long as additional input may be available, passing <tt>false</tt> for the
- *   <tt>endOfInput</tt> argument and filling the input buffer and flushing the
+ *   long as additional input may be available, passing {@code false} for the
+ *   {@code endOfInput} argument and filling the input buffer and flushing the
  *   output buffer between invocations; </p></li>
  *
  *   <li><p> Invoke the {@link #$code$ $code$} method one final time, passing
- *   <tt>true</tt> for the <tt>endOfInput</tt> argument; and then </p></li>
+ *   {@code true} for the {@code endOfInput} argument; and then </p></li>
  *
  *   <li><p> Invoke the {@link #flush flush} method so that the $coder$ can
  *   flush any internal state to the output buffer. </p></li>
@@ -175,7 +175,7 @@
      *         $otype$s that will be produced for each input $itype$
      *
      * @param  replacement
-     *         The initial replacement; must not be <tt>null</tt>, must have
+     *         The initial replacement; must not be {@code null}, must have
      *         non-zero length, must not be longer than max$ItypesPerOtype$,
      *         and must be {@linkplain #isLegalReplacement legal}
      *
@@ -248,7 +248,7 @@
      * Returns this $coder$'s replacement value.
      *
      * @return  This $coder$'s current replacement,
-     *          which is never <tt>null</tt> and is never empty
+     *          which is never {@code null} and is never empty
      */
     public final $replType$ replacement() {
 #if[decoder]
@@ -267,7 +267,7 @@
      * replacement is acceptable.  </p>
      *
      * @param  newReplacement  The new replacement; must not be
-     *         <tt>null</tt>, must have non-zero length,
+     *         {@code null}, must have non-zero length,
 #if[decoder]
      *         and must not be longer than the value returned by the
      *         {@link #max$ItypesPerOtype$() max$ItypesPerOtype$} method
@@ -332,7 +332,7 @@
      *
      * @param  repl  The byte array to be tested
      *
-     * @return  <tt>true</tt> if, and only if, the given byte array
+     * @return  {@code true} if, and only if, the given byte array
      *          is a legal replacement value for this encoder
      */
     public boolean isLegalReplacement(byte[] repl) {
@@ -358,7 +358,7 @@
     /**
      * Returns this $coder$'s current action for malformed-input errors.
      *
-     * @return The current malformed-input action, which is never <tt>null</tt>
+     * @return The current malformed-input action, which is never {@code null}
      */
     public CodingErrorAction malformedInputAction() {
         return malformedInputAction;
@@ -370,7 +370,7 @@
      * <p> This method invokes the {@link #implOnMalformedInput
      * implOnMalformedInput} method, passing the new action.  </p>
      *
-     * @param  newAction  The new action; must not be <tt>null</tt>
+     * @param  newAction  The new action; must not be {@code null}
      *
      * @return  This $coder$
      *
@@ -400,7 +400,7 @@
      * Returns this $coder$'s current action for unmappable-character errors.
      *
      * @return The current unmappable-character action, which is never
-     *         <tt>null</tt>
+     *         {@code null}
      */
     public CodingErrorAction unmappableCharacterAction() {
         return unmappableCharacterAction;
@@ -412,7 +412,7 @@
      * <p> This method invokes the {@link #implOnUnmappableCharacter
      * implOnUnmappableCharacter} method, passing the new action.  </p>
      *
-     * @param  newAction  The new action; must not be <tt>null</tt>
+     * @param  newAction  The new action; must not be {@code null}
      *
      * @return  This $coder$
      *
@@ -521,16 +521,16 @@
      * operation then care should be taken to preserve any $itype$s remaining
      * in the input buffer so that they are available to the next invocation.
      *
-     * <p> The <tt>endOfInput</tt> parameter advises this method as to whether
+     * <p> The {@code endOfInput} parameter advises this method as to whether
      * the invoker can provide further input beyond that contained in the given
      * input buffer.  If there is a possibility of providing additional input
-     * then the invoker should pass <tt>false</tt> for this parameter; if there
+     * then the invoker should pass {@code false} for this parameter; if there
      * is no possibility of providing further input then the invoker should
-     * pass <tt>true</tt>.  It is not erroneous, and in fact it is quite
-     * common, to pass <tt>false</tt> in one invocation and later discover that
+     * pass {@code true}.  It is not erroneous, and in fact it is quite
+     * common, to pass {@code false} in one invocation and later discover that
      * no further input was actually available.  It is critical, however, that
      * the final invocation of this method in a sequence of invocations always
-     * pass <tt>true</tt> so that any remaining un$code$d input will be treated
+     * pass {@code true} so that any remaining un$code$d input will be treated
      * as being malformed.
      *
      * <p> This method works by invoking the {@link #$code$Loop $code$Loop}
@@ -545,7 +545,7 @@
      *         The output $otype$ buffer
      *
      * @param  endOfInput
-     *         <tt>true</tt> if, and only if, the invoker can provide no
+     *         {@code true} if, and only if, the invoker can provide no
      *         additional input $itype$s beyond those in the given buffer
      *
      * @return  A coder-result object describing the reason for termination
@@ -553,9 +553,9 @@
      * @throws  IllegalStateException
      *          If $a$ $coding$ operation is already in progress and the previous
      *          step was an invocation neither of the {@link #reset reset}
-     *          method, nor of this method with a value of <tt>false</tt> for
-     *          the <tt>endOfInput</tt> parameter, nor of this method with a
-     *          value of <tt>true</tt> for the <tt>endOfInput</tt> parameter
+     *          method, nor of this method with a value of {@code false} for
+     *          the {@code endOfInput} parameter, nor of this method with a
+     *          value of {@code true} for the {@code endOfInput} parameter
      *          but a return value indicating an incomplete $coding$ operation
      *
      * @throws  CoderMalfunctionError
@@ -659,7 +659,7 @@
      *          invocation neither of the {@link #flush flush} method nor of
      *          the three-argument {@link
      *          #$code$($Itype$Buffer,$Otype$Buffer,boolean) $code$} method
-     *          with a value of <tt>true</tt> for the <tt>endOfInput</tt>
+     *          with a value of {@code true} for the {@code endOfInput}
      *          parameter
      */
     public final CoderResult flush($Otype$Buffer out) {
@@ -824,10 +824,10 @@
      * Tells whether or not this decoder implements an auto-detecting charset.
      *
      * <p> The default implementation of this method always returns
-     * <tt>false</tt>; it should be overridden by auto-detecting decoders to
-     * return <tt>true</tt>.  </p>
+     * {@code false}; it should be overridden by auto-detecting decoders to
+     * return {@code true}.  </p>
      *
-     * @return  <tt>true</tt> if, and only if, this decoder implements an
+     * @return  {@code true} if, and only if, this decoder implements an
      *          auto-detecting charset
      */
     public boolean isAutoDetecting() {
@@ -840,21 +840,21 @@
      *
      * <p> If this decoder implements an auto-detecting charset then at a
      * single point during a decoding operation this method may start returning
-     * <tt>true</tt> to indicate that a specific charset has been detected in
+     * {@code true} to indicate that a specific charset has been detected in
      * the input byte sequence.  Once this occurs, the {@link #detectedCharset
      * detectedCharset} method may be invoked to retrieve the detected charset.
      *
-     * <p> That this method returns <tt>false</tt> does not imply that no bytes
+     * <p> That this method returns {@code false} does not imply that no bytes
      * have yet been decoded.  Some auto-detecting decoders are capable of
      * decoding some, or even all, of an input byte sequence without fixing on
      * a particular charset.
      *
      * <p> The default implementation of this method always throws an {@link
      * UnsupportedOperationException}; it should be overridden by
-     * auto-detecting decoders to return <tt>true</tt> once the input charset
+     * auto-detecting decoders to return {@code true} once the input charset
      * has been determined.  </p>
      *
-     * @return  <tt>true</tt> if, and only if, this decoder has detected a
+     * @return  {@code true} if, and only if, this decoder has detected a
      *          specific charset
      *
      * @throws  UnsupportedOperationException
@@ -880,7 +880,7 @@
      * auto-detecting decoders to return the appropriate value.  </p>
      *
      * @return  The charset detected by this auto-detecting decoder,
-     *          or <tt>null</tt> if the charset has not yet been determined
+     *          or {@code null} if the charset has not yet been determined
      *
      * @throws  IllegalStateException
      *          If insufficient bytes have been read to determine a charset
@@ -920,7 +920,7 @@
     /**
      * Tells whether or not this encoder can encode the given character.
      *
-     * <p> This method returns <tt>false</tt> if the given character is a
+     * <p> This method returns {@code false} if the given character is a
      * surrogate character; such characters can be interpreted only when they
      * are members of a pair consisting of a high surrogate followed by a low
      * surrogate.  The {@link #canEncode(java.lang.CharSequence)
@@ -937,7 +937,7 @@
      * @param   c
      *          The given character
      *
-     * @return  <tt>true</tt> if, and only if, this encoder can encode
+     * @return  {@code true} if, and only if, this encoder can encode
      *          the given character
      *
      * @throws  IllegalStateException
@@ -954,7 +954,7 @@
      * Tells whether or not this encoder can encode the given character
      * sequence.
      *
-     * <p> If this method returns <tt>false</tt> for a particular character
+     * <p> If this method returns {@code false} for a particular character
      * sequence then more information about why the sequence cannot be encoded
      * may be obtained by performing a full <a href="#steps">encoding
      * operation</a>.
@@ -968,7 +968,7 @@
      * @param   cs
      *          The given character sequence
      *
-     * @return  <tt>true</tt> if, and only if, this encoder can encode
+     * @return  {@code true} if, and only if, this encoder can encode
      *          the given character without throwing any exceptions and without
      *          performing any replacements
      *
--- a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java	Wed Jul 05 20:45:41 2017 +0200
@@ -73,29 +73,29 @@
  *
  * <ul>
  *
- *   <li> The uppercase letters <tt>'A'</tt> through <tt>'Z'</tt>
- *        (<tt>'&#92;u0041'</tt>&nbsp;through&nbsp;<tt>'&#92;u005a'</tt>),
+ *   <li> The uppercase letters {@code 'A'} through {@code 'Z'}
+ *        (<code>'&#92;u0041'</code>&nbsp;through&nbsp;<code>'&#92;u005a'</code>),
  *
- *   <li> The lowercase letters <tt>'a'</tt> through <tt>'z'</tt>
- *        (<tt>'&#92;u0061'</tt>&nbsp;through&nbsp;<tt>'&#92;u007a'</tt>),
+ *   <li> The lowercase letters {@code 'a'} through {@code 'z'}
+ *        (<code>'&#92;u0061'</code>&nbsp;through&nbsp;<code>'&#92;u007a'</code>),
  *
- *   <li> The digits <tt>'0'</tt> through <tt>'9'</tt>
- *        (<tt>'&#92;u0030'</tt>&nbsp;through&nbsp;<tt>'&#92;u0039'</tt>),
+ *   <li> The digits {@code '0'} through {@code '9'}
+ *        (<code>'&#92;u0030'</code>&nbsp;through&nbsp;<code>'&#92;u0039'</code>),
  *
- *   <li> The dash character <tt>'-'</tt>
- *        (<tt>'&#92;u002d'</tt>,&nbsp;<small>HYPHEN-MINUS</small>),
+ *   <li> The dash character {@code '-'}
+ *        (<code>'&#92;u002d'</code>,&nbsp;<small>HYPHEN-MINUS</small>),
  *
- *   <li> The plus character <tt>'+'</tt>
- *        (<tt>'&#92;u002b'</tt>,&nbsp;<small>PLUS SIGN</small>),
+ *   <li> The plus character {@code '+'}
+ *        (<code>'&#92;u002b'</code>,&nbsp;<small>PLUS SIGN</small>),
  *
- *   <li> The period character <tt>'.'</tt>
- *        (<tt>'&#92;u002e'</tt>,&nbsp;<small>FULL STOP</small>),
+ *   <li> The period character {@code '.'}
+ *        (<code>'&#92;u002e'</code>,&nbsp;<small>FULL STOP</small>),
  *
- *   <li> The colon character <tt>':'</tt>
- *        (<tt>'&#92;u003a'</tt>,&nbsp;<small>COLON</small>), and
+ *   <li> The colon character {@code ':'}
+ *        (<code>'&#92;u003a'</code>,&nbsp;<small>COLON</small>), and
  *
- *   <li> The underscore character <tt>'_'</tt>
- *        (<tt>'&#92;u005f'</tt>,&nbsp;<small>LOW&nbsp;LINE</small>).
+ *   <li> The underscore character {@code '_'}
+ *        (<code>'&#92;u005f'</code>,&nbsp;<small>LOW&nbsp;LINE</small>).
  *
  * </ul>
  *
@@ -115,7 +115,7 @@
  * <p><a name="hn">Some charsets have an <i>historical name</i> that is defined for
  * compatibility with previous versions of the Java platform.</a>  A charset's
  * historical name is either its canonical name or one of its aliases.  The
- * historical name is returned by the <tt>getEncoding()</tt> methods of the
+ * historical name is returned by the {@code getEncoding()} methods of the
  * {@link java.io.InputStreamReader#getEncoding InputStreamReader} and {@link
  * java.io.OutputStreamWriter#getEncoding OutputStreamWriter} classes.
  *
@@ -128,7 +128,7 @@
  * than one registry name then its canonical name must be the MIME-preferred
  * name and the other names in the registry must be valid aliases.  If a
  * supported charset is not listed in the IANA registry then its canonical name
- * must begin with one of the strings <tt>"X-"</tt> or <tt>"x-"</tt>.
+ * must begin with one of the strings {@code "X-"} or {@code "x-"}.
  *
  * <p> The IANA charset registry does change over time, and so the canonical
  * name and the aliases of a particular charset may also change over time.  To
@@ -148,53 +148,53 @@
  *
  * <blockquote><table width="80%" summary="Description of standard charsets">
  * <tr><th align="left">Charset</th><th align="left">Description</th></tr>
- * <tr><td valign=top><tt>US-ASCII</tt></td>
- *     <td>Seven-bit ASCII, a.k.a. <tt>ISO646-US</tt>,
+ * <tr><td valign=top>{@code US-ASCII}</td>
+ *     <td>Seven-bit ASCII, a.k.a. {@code ISO646-US},
  *         a.k.a. the Basic Latin block of the Unicode character set</td></tr>
- * <tr><td valign=top><tt>ISO-8859-1&nbsp;&nbsp;</tt></td>
- *     <td>ISO Latin Alphabet No. 1, a.k.a. <tt>ISO-LATIN-1</tt></td></tr>
- * <tr><td valign=top><tt>UTF-8</tt></td>
+ * <tr><td valign=top><code>ISO-8859-1&nbsp;&nbsp;</code></td>
+ *     <td>ISO Latin Alphabet No. 1, a.k.a. {@code ISO-LATIN-1}</td></tr>
+ * <tr><td valign=top>{@code UTF-8}</td>
  *     <td>Eight-bit UCS Transformation Format</td></tr>
- * <tr><td valign=top><tt>UTF-16BE</tt></td>
+ * <tr><td valign=top>{@code UTF-16BE}</td>
  *     <td>Sixteen-bit UCS Transformation Format,
  *         big-endian byte&nbsp;order</td></tr>
- * <tr><td valign=top><tt>UTF-16LE</tt></td>
+ * <tr><td valign=top>{@code UTF-16LE}</td>
  *     <td>Sixteen-bit UCS Transformation Format,
  *         little-endian byte&nbsp;order</td></tr>
- * <tr><td valign=top><tt>UTF-16</tt></td>
+ * <tr><td valign=top>{@code UTF-16}</td>
  *     <td>Sixteen-bit UCS Transformation Format,
  *         byte&nbsp;order identified by an optional byte-order mark</td></tr>
  * </table></blockquote>
  *
- * <p> The <tt>UTF-8</tt> charset is specified by <a
+ * <p> The {@code UTF-8} charset is specified by <a
  * href="http://www.ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279</i></a>; the
  * transformation format upon which it is based is specified in
  * Amendment&nbsp;2 of ISO&nbsp;10646-1 and is also described in the <a
  * href="http://www.unicode.org/unicode/standard/standard.html"><i>Unicode
  * Standard</i></a>.
  *
- * <p> The <tt>UTF-16</tt> charsets are specified by <a
+ * <p> The {@code UTF-16} charsets are specified by <a
  * href="http://www.ietf.org/rfc/rfc2781.txt"><i>RFC&nbsp;2781</i></a>; the
  * transformation formats upon which they are based are specified in
  * Amendment&nbsp;1 of ISO&nbsp;10646-1 and are also described in the <a
  * href="http://www.unicode.org/unicode/standard/standard.html"><i>Unicode
  * Standard</i></a>.
  *
- * <p> The <tt>UTF-16</tt> charsets use sixteen-bit quantities and are
+ * <p> The {@code UTF-16} charsets use sixteen-bit quantities and are
  * therefore sensitive to byte order.  In these encodings the byte order of a
  * stream may be indicated by an initial <i>byte-order mark</i> represented by
- * the Unicode character <tt>'&#92;uFEFF'</tt>.  Byte-order marks are handled
+ * the Unicode character <code>'&#92;uFEFF'</code>.  Byte-order marks are handled
  * as follows:
  *
  * <ul>
  *
- *   <li><p> When decoding, the <tt>UTF-16BE</tt> and <tt>UTF-16LE</tt>
+ *   <li><p> When decoding, the {@code UTF-16BE} and {@code UTF-16LE}
  *   charsets interpret the initial byte-order marks as a <small>ZERO-WIDTH
  *   NON-BREAKING SPACE</small>; when encoding, they do not write
  *   byte-order marks. </p></li>
 
  *
- *   <li><p> When decoding, the <tt>UTF-16</tt> charset interprets the
+ *   <li><p> When decoding, the {@code UTF-16} charset interprets the
  *   byte-order mark at the beginning of the input stream to indicate the
  *   byte-order of the stream but defaults to big-endian if there is no
  *   byte-order mark; when encoding, it uses big-endian byte order and writes
@@ -247,9 +247,9 @@
  * character-encoding scheme then the corresponding charset is usually
  * named for the coded character set; otherwise a charset is usually named
  * for the encoding scheme and, possibly, the locale of the coded
- * character sets that it supports.  Hence <tt>US-ASCII</tt> is both the
+ * character sets that it supports.  Hence {@code US-ASCII} is both the
  * name of a coded character set and of the charset that encodes it, while
- * <tt>EUC-JP</tt> is the name of the charset that encodes the
+ * {@code EUC-JP} is the name of the charset that encodes the
  * JIS&nbsp;X&nbsp;0201, JIS&nbsp;X&nbsp;0208, and JIS&nbsp;X&nbsp;0212
  * coded character sets for the Japanese language.
  *
@@ -495,14 +495,14 @@
      *         The name of the requested charset; may be either
      *         a canonical name or an alias
      *
-     * @return  <tt>true</tt> if, and only if, support for the named charset
+     * @return  {@code true} if, and only if, support for the named charset
      *          is available in the current Java virtual machine
      *
      * @throws IllegalCharsetNameException
      *         If the given charset name is illegal
      *
      * @throws  IllegalArgumentException
-     *          If the given <tt>charsetName</tt> is null
+     *          If the given {@code charsetName} is null
      */
     public static boolean isSupported(String charsetName) {
         return (lookup(charsetName) != null);
@@ -521,7 +521,7 @@
      *          If the given charset name is illegal
      *
      * @throws  IllegalArgumentException
-     *          If the given <tt>charsetName</tt> is null
+     *          If the given {@code charsetName} is null
      *
      * @throws  UnsupportedCharsetException
      *          If no support for the named charset is available
@@ -692,7 +692,7 @@
      * href="http://www.iana.org/assignments/character-sets">IANA Charset
      * Registry</a>.
      *
-     * @return  <tt>true</tt> if, and only if, this charset is known by its
+     * @return  {@code true} if, and only if, this charset is known by its
      *          implementor to be registered with the IANA
      */
     public final boolean isRegistered() {
@@ -732,15 +732,15 @@
      * <p> Every charset contains itself.
      *
      * <p> This method computes an approximation of the containment relation:
-     * If it returns <tt>true</tt> then the given charset is known to be
-     * contained by this charset; if it returns <tt>false</tt>, however, then
+     * If it returns {@code true} then the given charset is known to be
+     * contained by this charset; if it returns {@code false}, however, then
      * it is not necessarily the case that the given charset is not contained
      * in this charset.
      *
      * @param   cs
      *          The given charset
      *
-     * @return  <tt>true</tt> if the given charset is contained in this charset
+     * @return  {@code true} if the given charset is contained in this charset
      */
     public abstract boolean contains(Charset cs);
 
@@ -770,9 +770,9 @@
      * input byte sequence.  Such charsets do not support encoding because
      * there is no way to determine which encoding should be used on output.
      * Implementations of such charsets should override this method to return
-     * <tt>false</tt>. </p>
+     * {@code false}. </p>
      *
-     * @return  <tt>true</tt> if, and only if, this charset supports encoding
+     * @return  {@code true} if, and only if, this charset supports encoding
      */
     public boolean canEncode() {
         return true;
@@ -782,7 +782,7 @@
      * Convenience method that decodes bytes in this charset into Unicode
      * characters.
      *
-     * <p> An invocation of this method upon a charset <tt>cs</tt> returns the
+     * <p> An invocation of this method upon a charset {@code cs} returns the
      * same result as the expression
      *
      * <pre>
@@ -818,7 +818,7 @@
      * Convenience method that encodes Unicode characters into bytes in this
      * charset.
      *
-     * <p> An invocation of this method upon a charset <tt>cs</tt> returns the
+     * <p> An invocation of this method upon a charset {@code cs} returns the
      * same result as the expression
      *
      * <pre>
@@ -853,7 +853,7 @@
     /**
      * Convenience method that encodes a string into bytes in this charset.
      *
-     * <p> An invocation of this method upon a charset <tt>cs</tt> returns the
+     * <p> An invocation of this method upon a charset {@code cs} returns the
      * same result as the expression
      *
      * <pre>
@@ -898,7 +898,7 @@
      * <p> Two charsets are equal if, and only if, they have the same canonical
      * names.  A charset is never equal to any other type of object.  </p>
      *
-     * @return  <tt>true</tt> if, and only if, this charset is equal to the
+     * @return  {@code true} if, and only if, this charset is equal to the
      *          given object
      */
     public final boolean equals(Object ob) {
--- a/jdk/src/java.base/share/classes/java/nio/charset/CoderResult.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/charset/CoderResult.java	Wed Jul 05 20:45:41 2017 +0200
@@ -46,24 +46,24 @@
  *   processed, or there is insufficient input and additional input is
  *   required.  This condition is represented by the unique result object
  *   {@link #UNDERFLOW}, whose {@link #isUnderflow() isUnderflow} method
- *   returns <tt>true</tt>.  </p></li>
+ *   returns {@code true}.  </p></li>
  *
  *   <li><p> <i>Overflow</i> is reported when there is insufficient room
  *   remaining in the output buffer.  This condition is represented by the
  *   unique result object {@link #OVERFLOW}, whose {@link #isOverflow()
- *   isOverflow} method returns <tt>true</tt>.  </p></li>
+ *   isOverflow} method returns {@code true}.  </p></li>
  *
  *   <li><p> A <i>malformed-input error</i> is reported when a sequence of
  *   input units is not well-formed.  Such errors are described by instances of
  *   this class whose {@link #isMalformed() isMalformed} method returns
- *   <tt>true</tt> and whose {@link #length() length} method returns the length
+ *   {@code true} and whose {@link #length() length} method returns the length
  *   of the malformed sequence.  There is one unique instance of this class for
  *   all malformed-input errors of a given length.  </p></li>
  *
  *   <li><p> An <i>unmappable-character error</i> is reported when a sequence
  *   of input units denotes a character that cannot be represented in the
  *   output charset.  Such errors are described by instances of this class
- *   whose {@link #isUnmappable() isUnmappable} method returns <tt>true</tt> and
+ *   whose {@link #isUnmappable() isUnmappable} method returns {@code true} and
  *   whose {@link #length() length} method returns the length of the input
  *   sequence denoting the unmappable character.  There is one unique instance
  *   of this class for all unmappable-character errors of a given length.
@@ -71,9 +71,9 @@
  *
  * </ul>
  *
- * <p> For convenience, the {@link #isError() isError} method returns <tt>true</tt>
+ * <p> For convenience, the {@link #isError() isError} method returns {@code true}
  * for result objects that describe malformed-input and unmappable-character
- * errors but <tt>false</tt> for those that describe underflow or overflow
+ * errors but {@code false} for those that describe underflow or overflow
  * conditions.  </p>
  *
  *
@@ -114,7 +114,7 @@
     /**
      * Tells whether or not this object describes an underflow condition.
      *
-     * @return  <tt>true</tt> if, and only if, this object denotes underflow
+     * @return  {@code true} if, and only if, this object denotes underflow
      */
     public boolean isUnderflow() {
         return (type == CR_UNDERFLOW);
@@ -123,7 +123,7 @@
     /**
      * Tells whether or not this object describes an overflow condition.
      *
-     * @return  <tt>true</tt> if, and only if, this object denotes overflow
+     * @return  {@code true} if, and only if, this object denotes overflow
      */
     public boolean isOverflow() {
         return (type == CR_OVERFLOW);
@@ -132,7 +132,7 @@
     /**
      * Tells whether or not this object describes an error condition.
      *
-     * @return  <tt>true</tt> if, and only if, this object denotes either a
+     * @return  {@code true} if, and only if, this object denotes either a
      *          malformed-input error or an unmappable-character error
      */
     public boolean isError() {
@@ -142,7 +142,7 @@
     /**
      * Tells whether or not this object describes a malformed-input error.
      *
-     * @return  <tt>true</tt> if, and only if, this object denotes a
+     * @return  {@code true} if, and only if, this object denotes a
      *          malformed-input error
      */
     public boolean isMalformed() {
@@ -153,7 +153,7 @@
      * Tells whether or not this object describes an unmappable-character
      * error.
      *
-     * @return  <tt>true</tt> if, and only if, this object denotes an
+     * @return  {@code true} if, and only if, this object denotes an
      *          unmappable-character error
      */
     public boolean isUnmappable() {
@@ -168,7 +168,7 @@
      *
      * @throws  UnsupportedOperationException
      *          If this object does not describe an error condition, that is,
-     *          if the {@link #isError() isError} does not return <tt>true</tt>
+     *          if the {@link #isError() isError} does not return {@code true}
      */
     public int length() {
         if (!isError())
--- a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java	Wed Jul 05 20:45:41 2017 +0200
@@ -74,10 +74,10 @@
  *
  * <p> Support for new charsets can be made available via the
  * interface defined in the {@link
- * java.nio.charset.spi.CharsetProvider} class in the <tt>{@link
- * java.nio.charset.spi}</tt> package.
+ * java.nio.charset.spi.CharsetProvider} class in the {@link
+ * java.nio.charset.spi} package.
  *
- * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a
+ * <p> Unless otherwise noted, passing a {@code null} argument to a
  * constructor or method in any class or interface in this package
  * will cause a {@link java.lang.NullPointerException
  * NullPointerException} to be thrown.
--- a/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java	Wed Jul 05 20:45:41 2017 +0200
@@ -42,13 +42,13 @@
  * loader}.
  *
  * <p> A charset provider identifies itself with a provider-configuration file
- * named <tt>java.nio.charset.spi.CharsetProvider</tt> in the resource
- * directory <tt>META-INF/services</tt>.  The file should contain a list of
+ * named {@code java.nio.charset.spi.CharsetProvider} in the resource
+ * directory {@code META-INF/services}.  The file should contain a list of
  * fully-qualified concrete charset-provider class names, one per line.  A line
- * is terminated by any one of a line feed (<tt>'\n'</tt>), a carriage return
- * (<tt>'\r'</tt>), or a carriage return followed immediately by a line feed.
+ * is terminated by any one of a line feed ({@code '\n'}), a carriage return
+ * ({@code '\r'}), or a carriage return followed immediately by a line feed.
  * Space and tab characters surrounding each name, as well as blank lines, are
- * ignored.  The comment character is <tt>'#'</tt> (<tt>'&#92;u0023'</tt>); on
+ * ignored.  The comment character is {@code '#'} (<code>'&#92;u0023'</code>); on
  * each line all characters following the first comment character are ignored.
  * The file must be encoded in UTF-8.
  *
@@ -83,7 +83,7 @@
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("charsetProvider")</tt>
+     *          {@link RuntimePermission}{@code ("charsetProvider")}
      */
     protected CharsetProvider() {
         this(checkPermission());
@@ -107,7 +107,7 @@
      *         a canonical name or an alias
      *
      * @return  A charset object for the named charset,
-     *          or <tt>null</tt> if the named charset
+     *          or {@code null} if the named charset
      *          is not supported by this provider
      */
     public abstract Charset charsetForName(String charsetName);
--- a/jdk/src/java.base/share/classes/java/nio/exceptions	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/exceptions	Wed Jul 05 20:45:41 2017 +0200
@@ -56,5 +56,5 @@
 
 gen ReadOnlyBufferException "
  * Unchecked exception thrown when a content-mutation method such as
- * <tt>put</tt> or <tt>compact</tt> is invoked upon a read-only buffer." \
+ * <code>put</code> or <code>compact</code> is invoked upon a read-only buffer." \
  -1210063976496234090L
--- a/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java	Wed Jul 05 20:45:41 2017 +0200
@@ -202,7 +202,7 @@
      *
      * <p> In the case of the default provider, and a security manager is
      * installed, the security manager is invoked to check {@link
-     * RuntimePermission}<tt>("getFileStoreAttributes")</tt>. If denied, then
+     * RuntimePermission}{@code ("getFileStoreAttributes")}. If denied, then
      * no file stores are returned by the iterator. In addition, the security
      * manager's {@link SecurityManager#checkRead(String)} method is invoked to
      * check read access to the file store's <em>top-most</em> directory. If
@@ -334,19 +334,19 @@
      *   character extension</td>
      * </tr>
      * <tr>
-     *   <td><tt>&#47;home&#47;*&#47;*</tt>
-     *   <td>Matches <tt>&#47;home&#47;gus&#47;data</tt> on UNIX platforms</td>
+     *   <td><code>&#47;home&#47;*&#47;*</code>
+     *   <td>Matches <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td>
      * </tr>
      * <tr>
-     *   <td><tt>&#47;home&#47;**</tt>
-     *   <td>Matches <tt>&#47;home&#47;gus</tt> and
-     *   <tt>&#47;home&#47;gus&#47;data</tt> on UNIX platforms</td>
+     *   <td><code>&#47;home&#47;**</code>
+     *   <td>Matches <code>&#47;home&#47;gus</code> and
+     *   <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td>
      * </tr>
      * <tr>
-     *   <td><tt>C:&#92;&#92;*</tt>
-     *   <td>Matches <tt>C:&#92;foo</tt> and <tt>C:&#92;bar</tt> on the Windows
+     *   <td><code>C:&#92;&#92;*</code>
+     *   <td>Matches <code>C:&#92;foo</code> and <code>C:&#92;bar</code> on the Windows
      *   platform (note that the backslash is escaped; as a string literal in the
-     *   Java Language the pattern would be <tt>"C:&#92;&#92;&#92;&#92;*"</tt>) </td>
+     *   Java Language the pattern would be <code>"C:&#92;&#92;&#92;&#92;*"</code>) </td>
      * </tr>
      *
      * </table>
@@ -390,7 +390,7 @@
      *   character is used to separate the subpatterns. Groups cannot be nested.
      *   </p></li>
      *
-     *   <li><p> Leading period<tt>&#47;</tt>dot characters in file name are
+     *   <li><p> Leading period<code>&#47;</code>dot characters in file name are
      *   treated as regular characters in match operations. For example,
      *   the {@code "*"} glob pattern matches file name {@code ".login"}.
      *   The {@link Files#isHidden} method may be used to test whether a file
--- a/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystems.java	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -321,9 +321,12 @@
         String scheme = uri.getScheme();
 
         // check installed providers
-        for (FileSystemProvider provider: FileSystemProvider.installedProviders()) {
+        for (FileSystemProvider provider : FileSystemProvider.installedProviders()) {
             if (scheme.equalsIgnoreCase(provider.getScheme())) {
-                return provider.newFileSystem(uri, env);
+                try {
+                    return provider.newFileSystem(uri, env);
+                } catch (UnsupportedOperationException uoe) {
+                }
             }
         }
 
@@ -331,9 +334,12 @@
         if (loader != null) {
             ServiceLoader<FileSystemProvider> sl = ServiceLoader
                 .load(FileSystemProvider.class, loader);
-            for (FileSystemProvider provider: sl) {
+            for (FileSystemProvider provider : sl) {
                 if (scheme.equalsIgnoreCase(provider.getScheme())) {
-                    return provider.newFileSystem(uri, env);
+                    try {
+                        return provider.newFileSystem(uri, env);
+                    } catch (UnsupportedOperationException uoe) {
+                    }
                 }
             }
         }
--- a/jdk/src/java.base/share/classes/java/nio/file/Files.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java	Wed Jul 05 20:45:41 2017 +0200
@@ -1033,7 +1033,7 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager
-     *          is installed, it denies {@link LinkPermission}<tt>("symbolic")</tt>
+     *          is installed, it denies {@link LinkPermission}{@code ("symbolic")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the path of the symbolic link.
      */
@@ -1078,7 +1078,7 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager
-     *          is installed, it denies {@link LinkPermission}<tt>("hard")</tt>
+     *          is installed, it denies {@link LinkPermission}{@code ("hard")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to either the link or the
      *          existing file.
@@ -1455,8 +1455,8 @@
      *          In the case of the default provider, and a security manager is
      *          installed, the {@link SecurityManager#checkRead(String) checkRead}
      *          method is invoked to check read access to the file, and in
-     *          addition it checks {@link RuntimePermission}<tt>
-     *          ("getFileStoreAttributes")</tt>
+     *          addition it checks
+     *          {@link RuntimePermission}{@code ("getFileStoreAttributes")}
      */
     public static FileStore getFileStore(Path path) throws IOException {
         return provider(path).getFileStore(path);
@@ -1995,7 +1995,8 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
-     *          installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, and it denies
+     *          {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkRead(String) checkRead} method
      *          denies read access to the file.
      */
@@ -2032,7 +2033,8 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager is
-     *          installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, it denies
+     *          {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the file.
      */
@@ -2069,7 +2071,8 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager is
-     *          installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, it denies
+     *          {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkRead(String) checkRead} method
      *          denies read access to the file.
      */
@@ -2112,7 +2115,8 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager is
-     *          installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, it denies
+     *          {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the file.
      *
@@ -3835,7 +3839,9 @@
             // Obtaining the size from the FileChannel is much faster
             // than obtaining using path.toFile().length()
             long length = fc.size();
-            if (length <= Integer.MAX_VALUE) {
+            // FileChannel.size() may in certain circumstances return zero
+            // for a non-zero length file so disallow this case.
+            if (length > 0 && length <= Integer.MAX_VALUE) {
                 Spliterator<String> s = new FileChannelLinesSpliterator(fc, cs, 0, (int) length);
                 return StreamSupport.stream(s, false)
                         .onClose(Files.asUncheckedRunnable(fc));
--- a/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java	Wed Jul 05 20:45:41 2017 +0200
@@ -46,13 +46,13 @@
      * @param  input   the input string
      * @param  reason  a string explaining why the input was rejected
      * @param  index   the index at which the error occurred,
-     *                 or <tt>-1</tt> if the index is not known
+     *                 or {@code -1} if the index is not known
      *
      * @throws  NullPointerException
-     *          if either the input or reason strings are <tt>null</tt>
+     *          if either the input or reason strings are {@code null}
      *
      * @throws  IllegalArgumentException
-     *          if the error index is less than <tt>-1</tt>
+     *          if the error index is less than {@code -1}
      */
     public InvalidPathException(String input, String reason, int index) {
         super(reason);
@@ -66,13 +66,13 @@
 
     /**
      * Constructs an instance from the given input string and reason.  The
-     * resulting object will have an error index of <tt>-1</tt>.
+     * resulting object will have an error index of {@code -1}.
      *
      * @param  input   the input string
      * @param  reason  a string explaining why the input was rejected
      *
      * @throws  NullPointerException
-     *          if either the input or reason strings are <tt>null</tt>
+     *          if either the input or reason strings are {@code null}
      */
     public InvalidPathException(String input, String reason) {
         this(input, reason, -1);
@@ -98,7 +98,7 @@
 
     /**
      * Returns an index into the input string of the position at which the
-     * error occurred, or <tt>-1</tt> if this position is not known.
+     * error occurred, or {@code -1} if this position is not known.
      *
      * @return  the error index
      */
@@ -109,8 +109,8 @@
     /**
      * Returns a string describing the error.  The resulting string
      * consists of the reason string followed by a colon character
-     * (<tt>':'</tt>), a space, and the input string.  If the error index is
-     * defined then the string <tt>" at index "</tt> followed by the index, in
+     * ({@code ':'}), a space, and the input string.  If the error index is
+     * defined then the string {@code " at index "} followed by the index, in
      * decimal, is inserted after the reason string and before the colon
      * character.
      *
--- a/jdk/src/java.base/share/classes/java/nio/file/Path.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/Path.java	Wed Jul 05 20:45:41 2017 +0200
@@ -480,7 +480,8 @@
      * <p> For any two {@link #normalize normalized} paths <i>p</i> and
      * <i>q</i>, where <i>q</i> does not have a root component,
      * <blockquote>
-     *   <i>p</i><tt>.relativize(</tt><i>p</i><tt>.resolve(</tt><i>q</i><tt>)).equals(</tt><i>q</i><tt>)</tt>
+     *   <i>p</i>{@code .relativize(}<i>p</i>
+     *   {@code .resolve(}<i>q</i>{@code )).equals(}<i>q</i>{@code )}
      * </blockquote>
      *
      * <p> When symbolic links are supported, then whether the resulting path,
@@ -525,9 +526,9 @@
      * <p> The default provider provides a similar <em>round-trip</em> guarantee
      * to the {@link java.io.File} class. For a given {@code Path} <i>p</i> it
      * is guaranteed that
-     * <blockquote><tt>
-     * {@link Paths#get(URI) Paths.get}(</tt><i>p</i><tt>.toUri()).equals(</tt><i>p</i>
-     * <tt>.{@link #toAbsolutePath() toAbsolutePath}())</tt>
+     * <blockquote>
+     * {@link Paths#get(URI) Paths.get}{@code (}<i>p</i>{@code .toUri()).equals(}<i>p</i>
+     * {@code .}{@link #toAbsolutePath() toAbsolutePath}{@code ())}
      * </blockquote>
      * so long as the original {@code Path}, the {@code URI}, and the new {@code
      * Path} are all created in (possibly different invocations of) the same
--- a/jdk/src/java.base/share/classes/java/nio/file/Paths.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/Paths.java	Wed Jul 05 20:45:41 2017 +0200
@@ -103,9 +103,9 @@
      * <p> The default provider provides a similar <em>round-trip</em> guarantee
      * to the {@link java.io.File} class. For a given {@code Path} <i>p</i> it
      * is guaranteed that
-     * <blockquote><tt>
-     * Paths.get(</tt><i>p</i><tt>.{@link Path#toUri() toUri}()).equals(</tt>
-     * <i>p</i><tt>.{@link Path#toAbsolutePath() toAbsolutePath}())</tt>
+     * <blockquote>{@code
+     * Paths.get(}<i>p</i>{@code .}{@link Path#toUri() toUri}{@code ()).equals(}
+     * <i>p</i>{@code .}{@link Path#toAbsolutePath() toAbsolutePath}{@code ())}
      * </blockquote>
      * so long as the original {@code Path}, the {@code URI}, and the new {@code
      * Path} are all created in (possibly different invocations of) the same
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java	Wed Jul 05 20:45:41 2017 +0200
@@ -165,7 +165,7 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
-     *          installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, and it denies {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkRead(String) checkRead} method
      *          denies read access to the file.
      */
@@ -201,7 +201,7 @@
      *          if an I/O error occurs or the ACL is invalid
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
-     *          installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, it denies {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the file.
      */
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java	Wed Jul 05 20:45:41 2017 +0200
@@ -69,7 +69,7 @@
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
      *          installed, and it denies {@link
-     *          RuntimePermission}<tt>("accessUserInformation")</tt> or its
+     *          RuntimePermission}{@code ("accessUserInformation")} or its
      *          {@link SecurityManager#checkRead(String) checkRead} method
      *          denies read access to the file.
      */
@@ -93,7 +93,7 @@
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
      *          installed, and it denies {@link
-     *          RuntimePermission}<tt>("accessUserInformation")</tt> or its
+     *          RuntimePermission}{@code ("accessUserInformation")} or its
      *          {@link SecurityManager#checkWrite(String) checkWrite} method
      *          denies write access to the file.
      */
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java	Wed Jul 05 20:45:41 2017 +0200
@@ -149,7 +149,8 @@
      * @throws  IOException                {@inheritDoc}
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
-     *          installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, and it denies
+     *          {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkRead(String) checkRead} method
      *          denies read access to the file.
      */
@@ -169,7 +170,8 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
-     *          installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, and it denies
+     *          {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the file.
      */
@@ -185,7 +187,8 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager is
-     *          installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
+     *          installed, it denies
+     *          {@link RuntimePermission}{@code ("accessUserInformation")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the file.
      */
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java	Wed Jul 05 20:45:41 2017 +0200
@@ -89,7 +89,7 @@
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
      *          installed, and it denies {@link
-     *          RuntimePermission}<tt>("accessUserDefinedAttributes")</tt>
+     *          RuntimePermission}{@code ("accessUserDefinedAttributes")}
      *          or its {@link SecurityManager#checkRead(String) checkRead} method
      *          denies read access to the file.
      */
@@ -110,7 +110,7 @@
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
      *          installed, and it denies {@link
-     *          RuntimePermission}<tt>("accessUserDefinedAttributes")</tt>
+     *          RuntimePermission}{@code ("accessUserDefinedAttributes")}
      *          or its {@link SecurityManager#checkRead(String) checkRead} method
      *          denies read access to the file.
      */
@@ -156,7 +156,7 @@
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
      *          installed, and it denies {@link
-     *          RuntimePermission}<tt>("accessUserDefinedAttributes")</tt>
+     *          RuntimePermission}{@code ("accessUserDefinedAttributes")}
      *          or its {@link SecurityManager#checkRead(String) checkRead} method
      *          denies read access to the file.
      *
@@ -206,7 +206,7 @@
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
      *          installed, and it denies {@link
-     *          RuntimePermission}<tt>("accessUserDefinedAttributes")</tt>
+     *          RuntimePermission}{@code ("accessUserDefinedAttributes")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the file.
      */
@@ -223,7 +223,7 @@
      * @throws  SecurityException
      *          In the case of the default provider, a security manager is
      *          installed, and it denies {@link
-     *          RuntimePermission}<tt>("accessUserDefinedAttributes")</tt>
+     *          RuntimePermission}{@code ("accessUserDefinedAttributes")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the file.
      */
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java	Wed Jul 05 20:45:41 2017 +0200
@@ -72,7 +72,8 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager is
-     *          installed, it checks {@link RuntimePermission}<tt>("lookupUserInformation")</tt>
+     *          installed, it checks
+     *          {@link RuntimePermission}{@code ("lookupUserInformation")}
      */
     public abstract UserPrincipal lookupPrincipalByName(String name)
         throws IOException;
@@ -97,7 +98,8 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager is
-     *          installed, it checks {@link RuntimePermission}<tt>("lookupUserInformation")</tt>
+     *          installed, it checks
+     *          {@link RuntimePermission}{@code ("lookupUserInformation")}
      */
     public abstract GroupPrincipal lookupPrincipalByGroupName(String group)
         throws IOException;
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java	Wed Jul 05 20:45:41 2017 +0200
@@ -54,7 +54,7 @@
 
     /**
      * Returns the user principal name if this exception was created with the
-     * user principal name that was not found, otherwise <tt>null</tt>.
+     * user principal name that was not found, otherwise {@code null}.
      *
      * @return  the user principal name or {@code null}
      */
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java	Wed Jul 05 20:45:41 2017 +0200
@@ -28,23 +28,23 @@
  *
  * <blockquote><table cellspacing=1 cellpadding=0 summary="Attribute views">
  * <tr><th align="left">Attribute views</th><th align="left">Description</th></tr>
- * <tr><td valign=top><tt><i>{@link java.nio.file.attribute.AttributeView}</i></tt></td>
+ * <tr><td valign=top><i>{@link java.nio.file.attribute.AttributeView}</i></td>
  *     <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
  *     <td>Can read or update file attributes</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update a basic set of file attributes</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update POSIX defined file attributes</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update FAT file attributes</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update the owner of a file</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update Access Control Lists</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update user-defined file attributes</td></tr>
- * <tr><td valign=top><tt>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></tt></td>
+ * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
  *     <td>Can read or update file system attributes</td></tr>
  * </table></blockquote>
  *
@@ -100,7 +100,7 @@
  * </ul>
  *
  *
- * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor
+ * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method in any class or interface in this package will cause a {@link
  * java.lang.NullPointerException NullPointerException} to be thrown.
  *
--- a/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Wed Jul 05 20:45:41 2017 +0200
@@ -102,7 +102,7 @@
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("fileSystemProvider")</tt>
+     *          {@link RuntimePermission}{@code ("fileSystemProvider")}
      */
     protected FileSystemProvider() {
         this(checkPermission());
@@ -644,7 +644,7 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager
-     *          is installed, it denies {@link LinkPermission}<tt>("symbolic")</tt>
+     *          is installed, it denies {@link LinkPermission}{@code ("symbolic")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to the path of the symbolic link.
      */
@@ -677,7 +677,7 @@
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, and a security manager
-     *          is installed, it denies {@link LinkPermission}<tt>("hard")</tt>
+     *          is installed, it denies {@link LinkPermission}{@code ("hard")}
      *          or its {@link SecurityManager#checkWrite(String) checkWrite}
      *          method denies write access to either the  link or the
      *          existing file.
@@ -902,8 +902,8 @@
      *          In the case of the default provider, and a security manager is
      *          installed, the {@link SecurityManager#checkRead(String) checkRead}
      *          method is invoked to check read access to the file, and in
-     *          addition it checks {@link RuntimePermission}<tt>
-     *          ("getFileStoreAttributes")</tt>
+     *          addition it checks
+     *          {@link RuntimePermission}{@code ("getFileStoreAttributes")}
      */
     public abstract FileStore getFileStore(Path path) throws IOException;
 
--- a/jdk/src/java.base/share/classes/java/nio/file/spi/FileTypeDetector.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/spi/FileTypeDetector.java	Wed Jul 05 20:45:41 2017 +0200
@@ -62,7 +62,7 @@
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("fileTypeDetector")</tt>
+     *          {@link RuntimePermission}{@code ("fileTypeDetector")}
      */
     protected FileTypeDetector() {
         this(checkPermission());
--- a/jdk/src/java.base/share/classes/java/nio/file/spi/package-info.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/file/spi/package-info.java	Wed Jul 05 20:45:41 2017 +0200
@@ -24,12 +24,12 @@
  */
 
 /**
- * Service-provider classes for the <tt>{@link java.nio.file}</tt> package.
+ * Service-provider classes for the {@link java.nio.file} package.
  *
  * <p> Only developers who are defining new file system providers or file type
  * detectors should need to make direct use of this package.  </p>
  *
- * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor
+ * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method in any class or interface in this package will cause a {@link
  * java.lang.NullPointerException NullPointerException} to be thrown.
  *
--- a/jdk/src/java.base/share/classes/java/nio/package-info.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/nio/package-info.java	Wed Jul 05 20:45:41 2017 +0200
@@ -52,7 +52,7 @@
  *
  *  </ul>
  *
- * <p> The <tt>java.nio</tt> package defines the buffer classes, which
+ * <p> The {@code java.nio} package defines the buffer classes, which
  * are used throughout the NIO APIs.  The charset API is defined in
  * the {@link java.nio.charset} package, and the channel and selector
  * APIs are defined in the {@link java.nio.channels} package.  Each of
@@ -64,26 +64,26 @@
  *
  * <blockquote><table cellspacing=1 cellpadding=0 summary="Description of the various buffers">
  *   <tr><th align="left">Buffers</th><th align="left">Description</th></tr>
- *   <tr><td valign=top><tt>{@link java.nio.Buffer}</tt></td>
+ *   <tr><td valign=top>{@link java.nio.Buffer}</td>
  *       <td>Position, limit, and capacity;
  *           <br>clear, flip, rewind, and mark/reset</td></tr>
- *   <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.ByteBuffer}</tt></td>
+ *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.ByteBuffer}</td>
  *       <td>Get/put, compact, views; allocate,&nbsp;wrap</td></tr>
- *   <tr><td valign=top><tt>&nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</tt></td>
+ *   <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
  *       <td>A byte buffer mapped to a file</td></tr>
- *   <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.CharBuffer}</tt></td>
+ *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.CharBuffer}</td>
  *       <td>Get/put, compact; allocate,&nbsp;wrap</td></tr>
- *   <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</tt></td>
+ *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.FloatBuffer}</tt></td>
+ *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.FloatBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.IntBuffer}</tt></td>
+ *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.IntBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.LongBuffer}</tt></td>
+ *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.LongBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top><tt>&nbsp;&nbsp;{@link java.nio.ShortBuffer}</tt></td>
+ *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.ShortBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top><tt>{@link java.nio.ByteOrder}</tt></td>
+ *   <tr><td valign=top>{@link java.nio.ByteOrder}</td>
  *       <td>Typesafe enumeration for&nbsp;byte&nbsp;orders</td></tr>
  * </table></blockquote>
  *
@@ -129,7 +129,7 @@
  *
  * </ul>
  *
- * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a
+ * <p> Unless otherwise noted, passing a {@code null} argument to a
  * constructor or method in any class or interface in this package
  * will cause a {@link java.lang.NullPointerException
  * NullPointerException} to be thrown.
--- a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java	Wed Jul 05 20:45:41 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,19 +31,19 @@
 import java.util.StringTokenizer;
 
 /**
- * This class is for security permissions.
- * A SecurityPermission contains a name (also referred to as a "target name")
- * but no actions list; you either have the named permission
- * or you don't.
- * <P>
- * The target name is the name of a security configuration parameter (see below).
- * Currently the SecurityPermission object is used to guard access
- * to the Policy, Security, Provider, Signer, and Identity
+ * This class is for security permissions. A {@code SecurityPermission}
+ * contains a name (also referred to as a "target name") but no actions list;
+ * you either have the named permission or you don't.
+ * <p>
+ * The target name is the name of a security configuration parameter
+ * (see below). Currently the {@code SecurityPermission} object is used to
+ * guard access to the {@link AccessControlContext}, {@link Policy},
+ * {@link Provider}, {@link Security}, {@link Signer}, and {@link Identity}
  * objects.
- * <P>
- * The following table lists all the possible SecurityPermission 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>
+ * The following table lists the standard {@code SecurityPermission}
+ * target names, and for each provides a description of what the permission
+ * allows and a discussion of the risks of granting code the permission.
  *
  * <table border=1 cellpadding=5 summary="target name,what the permission allows, and associated risks">
  * <tr>
@@ -299,6 +299,10 @@
  *
  * </table>
  *
+ * @implNote
+ * Implementations may define additional target names, but should use naming
+ * conventions such as reverse domain name notation to avoid name clashes.
+ *
  * @see java.security.BasicPermission
  * @see java.security.Permission
  * @see java.security.Permissions
--- a/jdk/src/java.base/share/classes/java/util/AbstractCollection.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/AbstractCollection.java	Wed Jul 05 20:45:41 2017 +0200
@@ -26,23 +26,23 @@
 package java.util;
 
 /**
- * This class provides a skeletal implementation of the <tt>Collection</tt>
+ * This class provides a skeletal implementation of the {@code Collection}
  * interface, to minimize the effort required to implement this interface. <p>
  *
  * To implement an unmodifiable collection, the programmer needs only to
- * extend this class and provide implementations for the <tt>iterator</tt> and
- * <tt>size</tt> methods.  (The iterator returned by the <tt>iterator</tt>
- * method must implement <tt>hasNext</tt> and <tt>next</tt>.)<p>
+ * extend this class and provide implementations for the {@code iterator} and
+ * {@code size} methods.  (The iterator returned by the {@code iterator}
+ * method must implement {@code hasNext} and {@code next}.)<p>
  *
  * To implement a modifiable collection, the programmer must additionally
- * override this class's <tt>add</tt> method (which otherwise throws an
- * <tt>UnsupportedOperationException</tt>), and the iterator returned by the
- * <tt>iterator</tt> method must additionally implement its <tt>remove</tt>
+ * override this class's {@code add} method (which otherwise throws an
+ * {@code UnsupportedOperationException}), and the iterator returned by the
+ * {@code iterator} method must additionally implement its {@code remove}
  * method.<p>
  *
  * The programmer should generally provide a void (no argument) and
- * <tt>Collection</tt> constructor, as per the recommendation in the
- * <tt>Collection</tt> interface specification.<p>
+ * {@code Collection} constructor, as per the recommendation in the
+ * {@code Collection} interface specification.<p>
  *
  * The documentation for each non-abstract method in this class describes its
  * implementation in detail.  Each of these methods may be overridden if
@@ -81,7 +81,7 @@
      * {@inheritDoc}
      *
      * @implSpec
-     * This implementation returns <tt>size() == 0</tt>.
+     * This implementation returns {@code size() == 0}.
      */
     public boolean isEmpty() {
         return size() == 0;
@@ -255,7 +255,7 @@
      *
      * @implSpec
      * This implementation always throws an
-     * <tt>UnsupportedOperationException</tt>.
+     * {@code UnsupportedOperationException}.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
      * @throws ClassCastException            {@inheritDoc}
@@ -276,8 +276,8 @@
      * from the collection using the iterator's remove method.
      *
      * <p>Note that this implementation throws an
-     * <tt>UnsupportedOperationException</tt> if the iterator returned by this
-     * collection's iterator method does not implement the <tt>remove</tt>
+     * {@code UnsupportedOperationException} if the iterator returned by this
+     * collection's iterator method does not implement the {@code remove}
      * method and this collection contains the specified object.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
@@ -314,7 +314,7 @@
      * This implementation iterates over the specified collection,
      * checking each element returned by the iterator in turn to see
      * if it's contained in this collection.  If all elements are so
-     * contained <tt>true</tt> is returned, otherwise <tt>false</tt>.
+     * contained {@code true} is returned, otherwise {@code false}.
      *
      * @throws ClassCastException            {@inheritDoc}
      * @throws NullPointerException          {@inheritDoc}
@@ -335,7 +335,7 @@
      * each object returned by the iterator to this collection, in turn.
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> unless <tt>add</tt> is
+     * {@code UnsupportedOperationException} unless {@code add} is
      * overridden (assuming the specified collection is non-empty).
      *
      * @throws UnsupportedOperationException {@inheritDoc}
@@ -361,11 +361,11 @@
      * This implementation iterates over this collection, checking each
      * element returned by the iterator in turn to see if it's contained
      * in the specified collection.  If it's so contained, it's removed from
-     * this collection with the iterator's <tt>remove</tt> method.
+     * this collection with the iterator's {@code remove} method.
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> if the iterator returned by the
-     * <tt>iterator</tt> method does not implement the <tt>remove</tt> method
+     * {@code UnsupportedOperationException} if the iterator returned by the
+     * {@code iterator} method does not implement the {@code remove} method
      * and this collection contains one or more elements in common with the
      * specified collection.
      *
@@ -396,11 +396,11 @@
      * This implementation iterates over this collection, checking each
      * element returned by the iterator in turn to see if it's contained
      * in the specified collection.  If it's not so contained, it's removed
-     * from this collection with the iterator's <tt>remove</tt> method.
+     * from this collection with the iterator's {@code remove} method.
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> if the iterator returned by the
-     * <tt>iterator</tt> method does not implement the <tt>remove</tt> method
+     * {@code UnsupportedOperationException} if the iterator returned by the
+     * {@code iterator} method does not implement the {@code remove} method
      * and this collection contains one or more elements not present in the
      * specified collection.
      *
@@ -429,14 +429,14 @@
      *
      * @implSpec
      * This implementation iterates over this collection, removing each
-     * element using the <tt>Iterator.remove</tt> operation.  Most
+     * element using the {@code Iterator.remove} operation.  Most
      * implementations will probably choose to override this method for
      * efficiency.
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> if the iterator returned by this
-     * collection's <tt>iterator</tt> method does not implement the
-     * <tt>remove</tt> method and this collection is non-empty.
+     * {@code UnsupportedOperationException} if the iterator returned by this
+     * collection's {@code iterator} method does not implement the
+     * {@code remove} method and this collection is non-empty.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
      */
@@ -455,8 +455,8 @@
      * Returns a string representation of this collection.  The string
      * representation consists of a list of the collection's elements in the
      * order they are returned by its iterator, enclosed in square brackets
-     * (<tt>"[]"</tt>).  Adjacent elements are separated by the characters
-     * <tt>", "</tt> (comma and space).  Elements are converted to strings as
+     * ({@code "[]"}).  Adjacent elements are separated by the characters
+     * {@code ", "} (comma and space).  Elements are converted to strings as
      * by {@link String#valueOf(Object)}.
      *
      * @return a string representation of this collection
--- a/jdk/src/java.base/share/classes/java/util/AbstractMap.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/AbstractMap.java	Wed Jul 05 20:45:41 2017 +0200
@@ -27,24 +27,24 @@
 import java.util.Map.Entry;
 
 /**
- * This class provides a skeletal implementation of the <tt>Map</tt>
+ * This class provides a skeletal implementation of the {@code Map}
  * interface, to minimize the effort required to implement this interface.
  *
  * <p>To implement an unmodifiable map, the programmer needs only to extend this
- * class and provide an implementation for the <tt>entrySet</tt> method, which
+ * class and provide an implementation for the {@code entrySet} method, which
  * returns a set-view of the map's mappings.  Typically, the returned set
- * will, in turn, be implemented atop <tt>AbstractSet</tt>.  This set should
- * not support the <tt>add</tt> or <tt>remove</tt> methods, and its iterator
- * should not support the <tt>remove</tt> method.
+ * will, in turn, be implemented atop {@code AbstractSet}.  This set should
+ * not support the {@code add} or {@code remove} methods, and its iterator
+ * should not support the {@code remove} method.
  *
  * <p>To implement a modifiable map, the programmer must additionally override
- * this class's <tt>put</tt> method (which otherwise throws an
- * <tt>UnsupportedOperationException</tt>), and the iterator returned by
- * <tt>entrySet().iterator()</tt> must additionally implement its
- * <tt>remove</tt> method.
+ * this class's {@code put} method (which otherwise throws an
+ * {@code UnsupportedOperationException}), and the iterator returned by
+ * {@code entrySet().iterator()} must additionally implement its
+ * {@code remove} method.
  *
  * <p>The programmer should generally provide a void (no argument) and map
- * constructor, as per the recommendation in the <tt>Map</tt> interface
+ * constructor, as per the recommendation in the {@code Map} interface
  * specification.
  *
  * <p>The documentation for each non-abstract method in this class describes its
@@ -79,7 +79,7 @@
      * {@inheritDoc}
      *
      * @implSpec
-     * This implementation returns <tt>entrySet().size()</tt>.
+     * This implementation returns {@code entrySet().size()}.
      */
     public int size() {
         return entrySet().size();
@@ -89,7 +89,7 @@
      * {@inheritDoc}
      *
      * @implSpec
-     * This implementation returns <tt>size() == 0</tt>.
+     * This implementation returns {@code size() == 0}.
      */
     public boolean isEmpty() {
         return size() == 0;
@@ -99,10 +99,10 @@
      * {@inheritDoc}
      *
      * @implSpec
-     * This implementation iterates over <tt>entrySet()</tt> searching
+     * This implementation iterates over {@code entrySet()} searching
      * for an entry with the specified value.  If such an entry is found,
-     * <tt>true</tt> is returned.  If the iteration terminates without
-     * finding such an entry, <tt>false</tt> is returned.  Note that this
+     * {@code true} is returned.  If the iteration terminates without
+     * finding such an entry, {@code false} is returned.  Note that this
      * implementation requires linear time in the size of the map.
      *
      * @throws ClassCastException   {@inheritDoc}
@@ -130,10 +130,10 @@
      * {@inheritDoc}
      *
      * @implSpec
-     * This implementation iterates over <tt>entrySet()</tt> searching
+     * This implementation iterates over {@code entrySet()} searching
      * for an entry with the specified key.  If such an entry is found,
-     * <tt>true</tt> is returned.  If the iteration terminates without
-     * finding such an entry, <tt>false</tt> is returned.  Note that this
+     * {@code true} is returned.  If the iteration terminates without
+     * finding such an entry, {@code false} is returned.  Note that this
      * implementation requires linear time in the size of the map; many
      * implementations will override this method.
      *
@@ -162,10 +162,10 @@
      * {@inheritDoc}
      *
      * @implSpec
-     * This implementation iterates over <tt>entrySet()</tt> searching
+     * This implementation iterates over {@code entrySet()} searching
      * for an entry with the specified key.  If such an entry is found,
      * the entry's value is returned.  If the iteration terminates without
-     * finding such an entry, <tt>null</tt> is returned.  Note that this
+     * finding such an entry, {@code null} is returned.  Note that this
      * implementation requires linear time in the size of the map; many
      * implementations will override this method.
      *
@@ -198,7 +198,7 @@
      *
      * @implSpec
      * This implementation always throws an
-     * <tt>UnsupportedOperationException</tt>.
+     * {@code UnsupportedOperationException}.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
      * @throws ClassCastException            {@inheritDoc}
@@ -213,18 +213,18 @@
      * {@inheritDoc}
      *
      * @implSpec
-     * This implementation iterates over <tt>entrySet()</tt> searching for an
+     * This implementation iterates over {@code entrySet()} searching for an
      * entry with the specified key.  If such an entry is found, its value is
-     * obtained with its <tt>getValue</tt> operation, the entry is removed
+     * obtained with its {@code getValue} operation, the entry is removed
      * from the collection (and the backing map) with the iterator's
-     * <tt>remove</tt> operation, and the saved value is returned.  If the
-     * iteration terminates without finding such an entry, <tt>null</tt> is
+     * {@code remove} operation, and the saved value is returned.  If the
+     * iteration terminates without finding such an entry, {@code null} is
      * returned.  Note that this implementation requires linear time in the
      * size of the map; many implementations will override this method.
      *
      * <p>Note that this implementation throws an
-     * <tt>UnsupportedOperationException</tt> if the <tt>entrySet</tt>
-     * iterator does not support the <tt>remove</tt> method and this map
+     * {@code UnsupportedOperationException} if the {@code entrySet}
+     * iterator does not support the {@code remove} method and this map
      * contains a mapping for the specified key.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
@@ -264,12 +264,12 @@
      *
      * @implSpec
      * This implementation iterates over the specified map's
-     * <tt>entrySet()</tt> collection, and calls this map's <tt>put</tt>
+     * {@code entrySet()} collection, and calls this map's {@code put}
      * operation once for each entry returned by the iteration.
      *
      * <p>Note that this implementation throws an
-     * <tt>UnsupportedOperationException</tt> if this map does not support
-     * the <tt>put</tt> operation and the specified map is nonempty.
+     * {@code UnsupportedOperationException} if this map does not support
+     * the {@code put} operation and the specified map is nonempty.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
      * @throws ClassCastException            {@inheritDoc}
@@ -285,11 +285,11 @@
      * {@inheritDoc}
      *
      * @implSpec
-     * This implementation calls <tt>entrySet().clear()</tt>.
+     * This implementation calls {@code entrySet().clear()}.
      *
      * <p>Note that this implementation throws an
-     * <tt>UnsupportedOperationException</tt> if the <tt>entrySet</tt>
-     * does not support the <tt>clear</tt> operation.
+     * {@code UnsupportedOperationException} if the {@code entrySet}
+     * does not support the {@code clear} operation.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
      */
@@ -314,10 +314,10 @@
      * @implSpec
      * This implementation returns a set that subclasses {@link AbstractSet}.
      * The subclass's iterator method returns a "wrapper object" over this
-     * map's <tt>entrySet()</tt> iterator.  The <tt>size</tt> method
-     * delegates to this map's <tt>size</tt> method and the
-     * <tt>contains</tt> method delegates to this map's
-     * <tt>containsKey</tt> method.
+     * map's {@code entrySet()} iterator.  The {@code size} method
+     * delegates to this map's {@code size} method and the
+     * {@code contains} method delegates to this map's
+     * {@code containsKey} method.
      *
      * <p>The set is created the first time this method is called,
      * and returned in response to all subsequent calls.  No synchronization
@@ -371,10 +371,10 @@
      * @implSpec
      * This implementation returns a collection that subclasses {@link
      * AbstractCollection}.  The subclass's iterator method returns a
-     * "wrapper object" over this map's <tt>entrySet()</tt> iterator.
-     * The <tt>size</tt> method delegates to this map's <tt>size</tt>
-     * method and the <tt>contains</tt> method delegates to this map's
-     * <tt>containsValue</tt> method.
+     * "wrapper object" over this map's {@code entrySet()} iterator.
+     * The {@code size} method delegates to this map's {@code size}
+     * method and the {@code contains} method delegates to this map's
+     * {@code containsValue} method.
      *
      * <p>The collection is created the first time this method is called, and
      * returned in response to all subsequent calls.  No synchronization is
@@ -429,25 +429,25 @@
 
     /**
      * Compares the specified object with this map for equality.  Returns
-     * <tt>true</tt> if the given object is also a map and the two maps
-     * represent the same mappings.  More formally, two maps <tt>m1</tt> and
-     * <tt>m2</tt> represent the same mappings if
-     * <tt>m1.entrySet().equals(m2.entrySet())</tt>.  This ensures that the
-     * <tt>equals</tt> method works properly across different implementations
-     * of the <tt>Map</tt> interface.
+     * {@code true} if the given object is also a map and the two maps
+     * represent the same mappings.  More formally, two maps {@code m1} and
+     * {@code m2} represent the same mappings if
+     * {@code m1.entrySet().equals(m2.entrySet())}.  This ensures that the
+     * {@code equals} method works properly across different implementations
+     * of the {@code Map} interface.
      *
      * @implSpec
      * This implementation first checks if the specified object is this map;
-     * if so it returns <tt>true</tt>.  Then, it checks if the specified
+     * if so it returns {@code true}.  Then, it checks if the specified
      * object is a map whose size is identical to the size of this map; if
-     * not, it returns <tt>false</tt>.  If so, it iterates over this map's
-     * <tt>entrySet</tt> collection, and checks that the specified map
+     * not, it returns {@code false}.  If so, it iterates over this map's
+     * {@code entrySet} collection, and checks that the specified map
      * contains each mapping that this map contains.  If the specified map
-     * fails to contain such a mapping, <tt>false</tt> is returned.  If the
-     * iteration completes, <tt>true</tt> is returned.
+     * fails to contain such a mapping, {@code false} is returned.  If the
+     * iteration completes, {@code true} is returned.
      *
      * @param o object to be compared for equality with this map
-     * @return <tt>true</tt> if the specified object is equal to this map
+     * @return {@code true} if the specified object is equal to this map
      */
     public boolean equals(Object o) {
         if (o == this)
@@ -483,13 +483,13 @@
     /**
      * Returns the hash code value for this map.  The hash code of a map is
      * defined to be the sum of the hash codes of each entry in the map's
-     * <tt>entrySet()</tt> view.  This ensures that <tt>m1.equals(m2)</tt>
-     * implies that <tt>m1.hashCode()==m2.hashCode()</tt> for any two maps
-     * <tt>m1</tt> and <tt>m2</tt>, as required by the general contract of
+     * {@code entrySet()} view.  This ensures that {@code m1.equals(m2)}
+     * implies that {@code m1.hashCode()==m2.hashCode()} for any two maps
+     * {@code m1} and {@code m2}, as required by the general contract of
      * {@link Object#hashCode}.
      *
      * @implSpec
-     * This implementation iterates over <tt>entrySet()</tt>, calling
+     * This implementation iterates over {@code entrySet()}, calling
      * {@link Map.Entry#hashCode hashCode()} on each element (entry) in the
      * set, and adding up the results.
      *
@@ -508,10 +508,10 @@
     /**
      * Returns a string representation of this map.  The string representation
      * consists of a list of key-value mappings in the order returned by the
-     * map's <tt>entrySet</tt> view's iterator, enclosed in braces
-     * (<tt>"{}"</tt>).  Adjacent mappings are separated by the characters
-     * <tt>", "</tt> (comma and space).  Each key-value mapping is rendered as
-     * the key followed by an equals sign (<tt>"="</tt>) followed by the
+     * map's {@code entrySet} view's iterator, enclosed in braces
+     * ({@code "{}"}).  Adjacent mappings are separated by the characters
+     * {@code ", "} (comma and space).  Each key-value mapping is rendered as
+     * the key followed by an equals sign ({@code "="}) followed by the
      * associated value.  Keys and values are converted to strings as by
      * {@link String#valueOf(Object)}.
      *
@@ -538,7 +538,7 @@
     }
 
     /**
-     * Returns a shallow copy of this <tt>AbstractMap</tt> instance: the keys
+     * Returns a shallow copy of this {@code AbstractMap} instance: the keys
      * and values themselves are not cloned.
      *
      * @return a shallow copy of this map
@@ -570,11 +570,11 @@
 
     /**
      * An Entry maintaining a key and a value.  The value may be
-     * changed using the <tt>setValue</tt> method.  This class
+     * changed using the {@code setValue} method.  This class
      * facilitates the process of building custom map
      * implementations. For example, it may be convenient to return
-     * arrays of <tt>SimpleEntry</tt> instances in method
-     * <tt>Map.entrySet().toArray</tt>.
+     * arrays of {@code SimpleEntry} instances in method
+     * {@code Map.entrySet().toArray}.
      *
      * @since 1.6
      */
@@ -689,7 +689,7 @@
         /**
          * Returns a String representation of this map entry.  This
          * implementation returns the string representation of this
-         * entry's key followed by the equals character ("<tt>=</tt>")
+         * entry's key followed by the equals character ("{@code =}")
          * followed by the string representation of this entry's value.
          *
          * @return a String representation of this map entry
@@ -702,7 +702,7 @@
 
     /**
      * An Entry maintaining an immutable key and value.  This class
-     * does not support method <tt>setValue</tt>.  This class may be
+     * does not support method {@code setValue}.  This class may be
      * convenient in methods that return thread-safe snapshots of
      * key-value mappings.
      *
@@ -760,7 +760,7 @@
         /**
          * Replaces the value corresponding to this entry with the specified
          * value (optional operation).  This implementation simply throws
-         * <tt>UnsupportedOperationException</tt>, as this class implements
+         * {@code UnsupportedOperationException}, as this class implements
          * an <i>immutable</i> map entry.
          *
          * @param value new value to be stored in this entry
@@ -820,7 +820,7 @@
         /**
          * Returns a String representation of this map entry.  This
          * implementation returns the string representation of this
-         * entry's key followed by the equals character ("<tt>=</tt>")
+         * entry's key followed by the equals character ("{@code =}")
          * followed by the string representation of this entry's value.
          *
          * @return a String representation of this map entry
--- a/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java	Wed Jul 05 20:45:41 2017 +0200
@@ -26,31 +26,31 @@
 package java.util;
 
 /**
- * This class provides a skeletal implementation of the <tt>List</tt>
+ * This class provides a skeletal implementation of the {@code List}
  * interface to minimize the effort required to implement this interface
  * backed by a "sequential access" data store (such as a linked list).  For
- * random access data (such as an array), <tt>AbstractList</tt> should be used
+ * random access data (such as an array), {@code AbstractList} should be used
  * in preference to this class.<p>
  *
- * This class is the opposite of the <tt>AbstractList</tt> class in the sense
- * that it implements the "random access" methods (<tt>get(int index)</tt>,
- * <tt>set(int index, E element)</tt>, <tt>add(int index, E element)</tt> and
- * <tt>remove(int index)</tt>) on top of the list's list iterator, instead of
+ * This class is the opposite of the {@code AbstractList} class in the sense
+ * that it implements the "random access" methods ({@code get(int index)},
+ * {@code set(int index, E element)}, {@code add(int index, E element)} and
+ * {@code remove(int index)}) on top of the list's list iterator, instead of
  * the other way around.<p>
  *
  * To implement a list the programmer needs only to extend this class and
- * provide implementations for the <tt>listIterator</tt> and <tt>size</tt>
+ * provide implementations for the {@code listIterator} and {@code size}
  * methods.  For an unmodifiable list, the programmer need only implement the
- * list iterator's <tt>hasNext</tt>, <tt>next</tt>, <tt>hasPrevious</tt>,
- * <tt>previous</tt> and <tt>index</tt> methods.<p>
+ * list iterator's {@code hasNext}, {@code next}, {@code hasPrevious},
+ * {@code previous} and {@code index} methods.<p>
  *
  * For a modifiable list the programmer should additionally implement the list
- * iterator's <tt>set</tt> method.  For a variable-size list the programmer
- * should additionally implement the list iterator's <tt>remove</tt> and
- * <tt>add</tt> methods.<p>
+ * iterator's {@code set} method.  For a variable-size list the programmer
+ * should additionally implement the list iterator's {@code remove} and
+ * {@code add} methods.<p>
  *
  * The programmer should generally provide a void (no argument) and collection
- * constructor, as per the recommendation in the <tt>Collection</tt> interface
+ * constructor, as per the recommendation in the {@code Collection} interface
  * specification.<p>
  *
  * This class is a member of the
@@ -78,8 +78,8 @@
      * Returns the element at the specified position in this list.
      *
      * <p>This implementation first gets a list iterator pointing to the
-     * indexed element (with <tt>listIterator(index)</tt>).  Then, it gets
-     * the element using <tt>ListIterator.next</tt> and returns it.
+     * indexed element (with {@code listIterator(index)}).  Then, it gets
+     * the element using {@code ListIterator.next} and returns it.
      *
      * @throws IndexOutOfBoundsException {@inheritDoc}
      */
@@ -96,13 +96,13 @@
      * specified element (optional operation).
      *
      * <p>This implementation first gets a list iterator pointing to the
-     * indexed element (with <tt>listIterator(index)</tt>).  Then, it gets
-     * the current element using <tt>ListIterator.next</tt> and replaces it
-     * with <tt>ListIterator.set</tt>.
+     * indexed element (with {@code listIterator(index)}).  Then, it gets
+     * the current element using {@code ListIterator.next} and replaces it
+     * with {@code ListIterator.set}.
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> if the list iterator does not
-     * implement the <tt>set</tt> operation.
+     * {@code UnsupportedOperationException} if the list iterator does not
+     * implement the {@code set} operation.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
      * @throws ClassCastException            {@inheritDoc}
@@ -128,12 +128,12 @@
      * indices).
      *
      * <p>This implementation first gets a list iterator pointing to the
-     * indexed element (with <tt>listIterator(index)</tt>).  Then, it
-     * inserts the specified element with <tt>ListIterator.add</tt>.
+     * indexed element (with {@code listIterator(index)}).  Then, it
+     * inserts the specified element with {@code ListIterator.add}.
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> if the list iterator does not
-     * implement the <tt>add</tt> operation.
+     * {@code UnsupportedOperationException} if the list iterator does not
+     * implement the {@code add} operation.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
      * @throws ClassCastException            {@inheritDoc}
@@ -156,12 +156,12 @@
      * list.
      *
      * <p>This implementation first gets a list iterator pointing to the
-     * indexed element (with <tt>listIterator(index)</tt>).  Then, it removes
-     * the element with <tt>ListIterator.remove</tt>.
+     * indexed element (with {@code listIterator(index)}).  Then, it removes
+     * the element with {@code ListIterator.remove}.
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> if the list iterator does not
-     * implement the <tt>remove</tt> operation.
+     * {@code UnsupportedOperationException} if the list iterator does not
+     * implement the {@code remove} operation.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
      * @throws IndexOutOfBoundsException     {@inheritDoc}
@@ -193,14 +193,14 @@
      *
      * <p>This implementation gets an iterator over the specified collection and
      * a list iterator over this list pointing to the indexed element (with
-     * <tt>listIterator(index)</tt>).  Then, it iterates over the specified
+     * {@code listIterator(index)}).  Then, it iterates over the specified
      * collection, inserting the elements obtained from the iterator into this
-     * list, one at a time, using <tt>ListIterator.add</tt> followed by
-     * <tt>ListIterator.next</tt> (to skip over the added element).
+     * list, one at a time, using {@code ListIterator.add} followed by
+     * {@code ListIterator.next} (to skip over the added element).
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> if the list iterator returned by
-     * the <tt>listIterator</tt> method does not implement the <tt>add</tt>
+     * {@code UnsupportedOperationException} if the list iterator returned by
+     * the {@code listIterator} method does not implement the {@code add}
      * operation.
      *
      * @throws UnsupportedOperationException {@inheritDoc}
@@ -243,7 +243,7 @@
      * sequence).
      *
      * @param  index index of first element to be returned from the list
-     *         iterator (by a call to the <code>next</code> method)
+     *         iterator (by a call to the {@code next} method)
      * @return a list iterator over the elements in this list (in proper
      *         sequence)
      * @throws IndexOutOfBoundsException {@inheritDoc}
--- a/jdk/src/java.base/share/classes/java/util/AbstractSet.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/AbstractSet.java	Wed Jul 05 20:45:41 2017 +0200
@@ -26,20 +26,20 @@
 package java.util;
 
 /**
- * This class provides a skeletal implementation of the <tt>Set</tt>
+ * This class provides a skeletal implementation of the {@code Set}
  * interface to minimize the effort required to implement this
  * interface. <p>
  *
  * The process of implementing a set by extending this class is identical
  * to that of implementing a Collection by extending AbstractCollection,
  * except that all of the methods and constructors in subclasses of this
- * class must obey the additional constraints imposed by the <tt>Set</tt>
+ * class must obey the additional constraints imposed by the {@code Set}
  * interface (for instance, the add method must not permit addition of
  * multiple instances of an object to a set).<p>
  *
  * Note that this class does not override any of the implementations from
- * the <tt>AbstractCollection</tt> class.  It merely adds implementations
- * for <tt>equals</tt> and <tt>hashCode</tt>.<p>
+ * the {@code AbstractCollection} class.  It merely adds implementations
+ * for {@code equals} and {@code hashCode}.<p>
  *
  * This class is a member of the
  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
@@ -67,20 +67,20 @@
 
     /**
      * Compares the specified object with this set for equality.  Returns
-     * <tt>true</tt> if the given object is also a set, the two sets have
+     * {@code true} if the given object is also a set, the two sets have
      * the same size, and every member of the given set is contained in
-     * this set.  This ensures that the <tt>equals</tt> method works
-     * properly across different implementations of the <tt>Set</tt>
+     * this set.  This ensures that the {@code equals} method works
+     * properly across different implementations of the {@code Set}
      * interface.<p>
      *
      * This implementation first checks if the specified object is this
-     * set; if so it returns <tt>true</tt>.  Then, it checks if the
+     * set; if so it returns {@code true}.  Then, it checks if the
      * specified object is a set whose size is identical to the size of
      * this set; if not, it returns false.  If so, it returns
-     * <tt>containsAll((Collection) o)</tt>.
+     * {@code containsAll((Collection) o)}.
      *
      * @param o object to be compared for equality with this set
-     * @return <tt>true</tt> if the specified object is equal to this set
+     * @return {@code true} if the specified object is equal to this set
      */
     public boolean equals(Object o) {
         if (o == this)
@@ -103,14 +103,14 @@
     /**
      * Returns the hash code value for this set.  The hash code of a set is
      * defined to be the sum of the hash codes of the elements in the set,
-     * where the hash code of a <tt>null</tt> element is defined to be zero.
-     * This ensures that <tt>s1.equals(s2)</tt> implies that
-     * <tt>s1.hashCode()==s2.hashCode()</tt> for any two sets <tt>s1</tt>
-     * and <tt>s2</tt>, as required by the general contract of
+     * where the hash code of a {@code null} element is defined to be zero.
+     * This ensures that {@code s1.equals(s2)} implies that
+     * {@code s1.hashCode()==s2.hashCode()} for any two sets {@code s1}
+     * and {@code s2}, as required by the general contract of
      * {@link Object#hashCode}.
      *
      * <p>This implementation iterates over the set, calling the
-     * <tt>hashCode</tt> method on each element in the set, and adding up
+     * {@code hashCode} method on each element in the set, and adding up
      * the results.
      *
      * @return the hash code value for this set
@@ -136,24 +136,24 @@
      * the two sets.
      *
      * <p>This implementation determines which is the smaller of this set
-     * and the specified collection, by invoking the <tt>size</tt>
+     * and the specified collection, by invoking the {@code size}
      * method on each.  If this set has fewer elements, then the
      * implementation iterates over this set, checking each element
      * returned by the iterator in turn to see if it is contained in
      * the specified collection.  If it is so contained, it is removed
-     * from this set with the iterator's <tt>remove</tt> method.  If
+     * from this set with the iterator's {@code remove} method.  If
      * the specified collection has fewer elements, then the
      * implementation iterates over the specified collection, removing
      * from this set each element returned by the iterator, using this
-     * set's <tt>remove</tt> method.
+     * set's {@code remove} method.
      *
      * <p>Note that this implementation will throw an
-     * <tt>UnsupportedOperationException</tt> if the iterator returned by the
-     * <tt>iterator</tt> method does not implement the <tt>remove</tt> method.
+     * {@code UnsupportedOperationException} if the iterator returned by the
+     * {@code iterator} method does not implement the {@code remove} method.
      *
      * @param  c collection containing elements to be removed from this set
-     * @return <tt>true</tt> if this set changed as a result of the call
-     * @throws UnsupportedOperationException if the <tt>removeAll</tt> operation
+     * @return {@code true} if this set changed as a result of the call
+     * @throws UnsupportedOperationException if the {@code removeAll} operation
      *         is not supported by this set
      * @throws ClassCastException if the class of an element of this set
      *         is incompatible with the specified collection
--- a/jdk/src/java.base/share/classes/java/util/ArrayList.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/ArrayList.java	Wed Jul 05 20:45:41 2017 +0200
@@ -294,7 +294,7 @@
      * Returns {@code true} if this list contains the specified element.
      * More formally, returns {@code true} if and only if this list contains
      * at least one element {@code e} such that
-     * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
+     * {@code Objects.equals(o, e)}.
      *
      * @param o element whose presence in this list is to be tested
      * @return {@code true} if this list contains the specified element
@@ -307,7 +307,7 @@
      * Returns the index of the first occurrence of the specified element
      * in this list, or -1 if this list does not contain the element.
      * More formally, returns the lowest index {@code i} such that
-     * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
+     * {@code Objects.equals(o, get(i))},
      * or -1 if there is no such index.
      */
     public int indexOf(Object o) {
@@ -327,7 +327,7 @@
      * Returns the index of the last occurrence of the specified element
      * in this list, or -1 if this list does not contain the element.
      * More formally, returns the highest index {@code i} such that
-     * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
+     * {@code Objects.equals(o, get(i))},
      * or -1 if there is no such index.
      */
     public int lastIndexOf(Object o) {
@@ -511,7 +511,7 @@
      * if it is present.  If the list does not contain the element, it is
      * unchanged.  More formally, removes the element with the lowest index
      * {@code i} such that
-     * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>
+     * {@code Objects.equals(o, get(i))}
      * (if such an element exists).  Returns {@code true} if this list
      * contained the specified element (or equivalently, if this list
      * changed as a result of the call).
--- a/jdk/src/java.base/share/classes/java/util/Arrays.java	Thu Aug 13 14:15:58 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/Arrays.java	Wed Jul 05 20:45:41 2017 +0200
@@ -1772,10 +1772,10 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -1802,11 +1802,11 @@
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -1853,10 +1853,10 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -1883,11 +1883,11 @@
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -1934,10 +1934,10 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -1964,11 +1964,11 @@
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2015,10 +2015,10 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2045,11 +2045,11 @@
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2096,10 +2096,10 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2126,11 +2126,11 @@
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2178,10 +2178,10 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2209,11 +2209,11 @@
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2269,10 +2269,10 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>. The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>. The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key. Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2300,11 +2300,11 @@
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>. The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>. The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key. Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2366,10 +2366,10 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2404,11 +2404,11 @@
      * @param key the value to be searched for
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2464,13 +2464,13 @@
      * @param a the array to be searched
      * @param key the value to be searched for
      * @param c the comparator by which the array is ordered.  A
-     *        <tt>null</tt> value indicates that the elements'
+     *        {@code null} value indicates that the elements'
      *        {@linkplain Comparable natural ordering} should be used.
      * @return index of the search key, if it is contained in the array;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
-     *         element greater than the key, or <tt>a.length</tt> if all
+     *         element greater than the key, or {@code a.length} if all
      *         elements in the array are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2503,15 +2503,15 @@
      * @param toIndex the index of the last element (exclusive) to be searched
      * @param key the value to be searched for
      * @param c the comparator by which the array is ordered.  A
-     *        <tt>null</tt> value indicates that the elements'
+     *        {@code null} value indicates that the elements'
      *        {@linkplain Comparable natural ordering} should be used.
      * @return index of the search key, if it is contained in the array
      *         within the specified range;
-     *         otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>.  The
+     *         otherwise, <code>(-(<i>insertion point</i>) - 1)</code>.  The
      *         <i>insertion point</i> is defined as the point at which the
      *         key would be inserted into the array: the index of the first
      *         element in the range greater than the key,
-     *         or <tt>toIndex</tt> if all
+     *         or {@code toIndex} if all
      *         elements in the range are less than the specified key.  Note
      *         that this guarantees that the return value will be &gt;= 0 if
      *         and only if the key is found.
@@ -2557,16 +2557,16 @@
     // Equality Testing
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of longs are
+     * Returns {@code true} if the two specified arrays of longs are
      * <i>equal</i> to one another.  Two arrays are considered equal if both
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.
+     * two array references are considered equal if both are {@code null}.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      */
     public static boolean equals(long[] a, long[] a2) {
         if (a==a2)
@@ -2586,16 +2586,16 @@
     }
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of ints are
+     * Returns {@code true} if the two specified arrays of ints are
      * <i>equal</i> to one another.  Two arrays are considered equal if both
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.
+     * two array references are considered equal if both are {@code null}.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      */
     public static boolean equals(int[] a, int[] a2) {
         if (a==a2)
@@ -2615,16 +2615,16 @@
     }
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of shorts are
+     * Returns {@code true} if the two specified arrays of shorts are
      * <i>equal</i> to one another.  Two arrays are considered equal if both
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.
+     * two array references are considered equal if both are {@code null}.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      */
     public static boolean equals(short[] a, short a2[]) {
         if (a==a2)
@@ -2644,16 +2644,16 @@
     }
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of chars are
+     * Returns {@code true} if the two specified arrays of chars are
      * <i>equal</i> to one another.  Two arrays are considered equal if both
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.
+     * two array references are considered equal if both are {@code null}.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      */
     @HotSpotIntrinsicCandidate
     public static boolean equals(char[] a, char[] a2) {
@@ -2674,16 +2674,16 @@
     }
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of bytes are
+     * Returns {@code true} if the two specified arrays of bytes are
      * <i>equal</i> to one another.  Two arrays are considered equal if both
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.
+     * two array references are considered equal if both are {@code null}.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      */
     public static boolean equals(byte[] a, byte[] a2) {
         if (a==a2)
@@ -2703,16 +2703,16 @@
     }
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of booleans are
+     * Returns {@code true} if the two specified arrays of booleans are
      * <i>equal</i> to one another.  Two arrays are considered equal if both
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.
+     * two array references are considered equal if both are {@code null}.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      */
     public static boolean equals(boolean[] a, boolean[] a2) {
         if (a==a2)
@@ -2732,21 +2732,21 @@
     }
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of doubles are
+     * Returns {@code true} if the two specified arrays of doubles are
      * <i>equal</i> to one another.  Two arrays are considered equal if both
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.
-     *
-     * Two doubles <tt>d1</tt> and <tt>d2</tt> are considered equal if:
-     * <pre>    <tt>new Double(d1).equals(new Double(d2))</tt></pre>
-     * (Unlike the <tt>==</tt> operator, this method considers
-     * <tt>NaN</tt> equals to itself, and 0.0d unequal to -0.0d.)
+     * two array references are considered equal if both are {@code null}.
+     *
+     * Two doubles {@code d1} and {@code d2} are considered equal if:
+     * <pre>    {@code new Double(d1).equals(new Double(d2))}</pre>
+     * (Unlike the {@code ==} operator, this method considers
+     * {@code NaN} equals to itself, and 0.0d unequal to -0.0d.)
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      * @see Double#equals(Object)
      */
     public static boolean equals(double[] a, double[] a2) {
@@ -2767,21 +2767,21 @@
     }
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of floats are
+     * Returns {@code true} if the two specified arrays of floats are
      * <i>equal</i> to one another.  Two arrays are considered equal if both
      * arrays contain the same number of elements, and all corresponding pairs
      * of elements in the two arrays are equal.  In other words, two arrays
      * are equal if they contain the same elements in the same order.  Also,
-     * two array references are considered equal if both are <tt>null</tt>.
-     *
-     * Two floats <tt>f1</tt> and <tt>f2</tt> are considered equal if:
-     * <pre>    <tt>new Float(f1).equals(new Float(f2))</tt></pre>
-     * (Unlike the <tt>==</tt> operator, this method considers
-     * <tt>NaN</tt> equals to itself, and 0.0f unequal to -0.0f.)
+     * two array references are considered equal if both are {@code null}.
+     *
+     * Two floats {@code f1} and {@code f2} are considered equal if:
+     * <pre>    {@code new Float(f1).equals(new Float(f2))}</pre>
+     * (Unlike the {@code ==} operator, this method considers
+     * {@code NaN} equals to itself, and 0.0f unequal to -0.0f.)
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      * @see Float#equals(Object)
      */
     public static boolean equals(float[] a, float[] a2) {
@@ -2802,18 +2802,19 @@
     }
 
     /**
-     * Returns <tt>true</tt> if the two specified arrays of Objects are
+     * Returns {@code true} if the two specified arrays of Objects are
      * <i>equal</i> to one another.  The two arrays are considered equal if
      * both arrays contain the same number of elements, and all corresponding
-     * pairs of elements in the two arrays are equal.  Two objects <tt>e1</tt>
-     * and <tt>e2</tt> are considered <i>equal</i> if <tt>(e1==null ? e2==null
-     * : e1.equals(e2))</tt>.  In other words, the two arrays are equal if
+     * pairs of elements in the two arrays are equal.  Two objects {@code e1}
+     * and {@code e2} are considered <i>equal</i> if
+     * {@code Objects.equals(e1, e2)}.
+     * In other words, the two arrays are equal if
      * they contain the same elements in the same order.  Also, two array
-     * references are considered equal if both are <tt>null</tt>.
+     * references are considered equal if both are {@code null}.
      *
      * @param a one array to be tested for equality
      * @param a2 the other array to be tested for equality
-     * @return <tt>true</tt> if the two arrays are equal
+     * @return {@code true} if the two arrays are equal
      */
     public static boolean equals(Object[] a, Object[] a2) {
         if (a==a2)
@@ -2852,8 +2853,8 @@
     /**
      * Assigns the specified long value to each element of the specified
      * range of the specified array of longs.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -2862,9 +2863,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      */
     public static void fill(long[] a, int fromIndex, int toIndex, long val) {
         rangeCheck(a.length, fromIndex, toIndex);
@@ -2887,8 +2888,8 @@
     /**
      * Assigns the specified int value to each element of the specified
      * range of the specified array of ints.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -2897,9 +2898,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      */
     public static void fill(int[] a, int fromIndex, int toIndex, int val) {
         rangeCheck(a.length, fromIndex, toIndex);
@@ -2922,8 +2923,8 @@
     /**
      * Assigns the specified short value to each element of the specified
      * range of the specified array of shorts.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -2932,9 +2933,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      */
     public static void fill(short[] a, int fromIndex, int toIndex, short val) {
         rangeCheck(a.length, fromIndex, toIndex);
@@ -2957,8 +2958,8 @@
     /**
      * Assigns the specified char value to each element of the specified
      * range of the specified array of chars.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -2967,9 +2968,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      */
     public static void fill(char[] a, int fromIndex, int toIndex, char val) {
         rangeCheck(a.length, fromIndex, toIndex);
@@ -2992,8 +2993,8 @@
     /**
      * Assigns the specified byte value to each element of the specified
      * range of the specified array of bytes.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -3002,9 +3003,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      */
     public static void fill(byte[] a, int fromIndex, int toIndex, byte val) {
         rangeCheck(a.length, fromIndex, toIndex);
@@ -3027,8 +3028,8 @@
     /**
      * Assigns the specified boolean value to each element of the specified
      * range of the specified array of booleans.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -3037,9 +3038,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      */
     public static void fill(boolean[] a, int fromIndex, int toIndex,
                             boolean val) {
@@ -3063,8 +3064,8 @@
     /**
      * Assigns the specified double value to each element of the specified
      * range of the specified array of doubles.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -3073,9 +3074,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      */
     public static void fill(double[] a, int fromIndex, int toIndex,double val){
         rangeCheck(a.length, fromIndex, toIndex);
@@ -3098,8 +3099,8 @@
     /**
      * Assigns the specified float value to each element of the specified
      * range of the specified array of floats.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -3108,9 +3109,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      */
     public static void fill(float[] a, int fromIndex, int toIndex, float val) {
         rangeCheck(a.length, fromIndex, toIndex);
@@ -3135,8 +3136,8 @@
     /**
      * Assigns the specified Object reference to each element of the specified
      * range of the specified array of Objects.  The range to be filled
-     * extends from index <tt>fromIndex</tt>, inclusive, to index
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex==toIndex</tt>, the
+     * extends from index {@code fromIndex}, inclusive, to index
+     * {@code toIndex}, exclusive.  (If {@code fromIndex==toIndex}, the
      * range to be filled is empty.)
      *
      * @param a the array to be filled
@@ -3145,9 +3146,9 @@
      * @param toIndex the index of the last element (exclusive) to be
      *        filled with the specified value
      * @param val the value to be stored in all elements of the array
-     * @throws IllegalArgumentException if <tt>fromIndex &gt; toIndex</tt>
-     * @throws ArrayIndexOutOfBoundsException if <tt>fromIndex &lt; 0</tt> or
-     *         <tt>toIndex &gt; a.length</tt>
+     * @throws IllegalArgumentException if {@code fromIndex > toIndex}
+     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
+     *         {@code toIndex > a.length}
      * @throws ArrayStoreException if the specified value is not of a
      *         runtime type that can be stored in the specified array
      */
@@ -3164,7 +3165,7 @@
      * so the copy has the specified length.  For all indices that are
      * valid in both the original array and the copy, the two arrays will
      * contain identical values.  For any indices that are valid in the
-     * copy but not the original, the copy will contain <tt>null</tt>.
+     * copy but not the original, the copy will contain {@code null}.
      * Such indices will exist if and only if the specified length
      * is greater than that of the original array.
      * The resulting array is of exactly the same class as the original array.
@@ -3174,8 +3175,8 @@
      * @param newLength the length of the copy to be returned
      * @return a copy of the original array, truncated or padded with nulls
      *     to obtain the specified length
-     * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
-     * @throws NullPointerException if <tt>original</tt> is null
+     * @throws NegativeArraySizeException if {@code newLength} is negative
+     * @throws NullPointerException if {@code original} is null
      * @since 1.6
      */
     @SuppressWarnings("unchecked")
@@ -3188,10 +3189,10 @@
      * so the copy has the specified length.  For all indices that are
      * valid in both the original array and the copy, the two arrays will
      * contain identical values.  For any indices that are valid in the
-     * copy but not the original, the copy will contain <tt>null</tt>.
+     * copy but not the original, the copy will contain {@code null}.
      * Such indices will exist if and only if the specified length
      * is greater than that of the original array.
-     * The resulting array is of the class <tt>newType</tt>.
+     * The resulting array is of the class {@code newType}.
      *
      * @param <U> the class of the objects in the original array
      * @param <T> the class of the objects in the returned array
@@ -3200,11 +3201,11 @@
      * @param newType the class of the copy to be returned
      * @return a copy of the original array, truncated or padded with nulls
      *     to obtain the specified length
-     * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
-     * @throws NullPointerException if <tt>original</tt> is null
+     * @throws NegativeArraySizeException if {@code newLength} is negative
+     * @throws NullPointerException if {@code original} is null
      * @throws ArrayStoreException if an element copied from
-     *     <tt>original</tt> is not of a runtime type that can be stored in
-     *     an array of class <tt>newType</tt>
+     *     {@code original} is not of a runtime type that can be stored in
+     *     an array of class {@code newType}
      * @since 1.6
      */
     @HotSpotIntrinsicCandidate
@@ -3223,7 +3224,7 @@
      * so the copy has the specified length.  For all indices that are
      * valid in both the original array and the copy, the two arrays will
      * contain identical values.  For any indices that are valid in the
-     * copy but not the original, the copy will contain <tt>(byte)0</tt>.
+     * copy but not the original, the copy will contain {@code (byte)0}.
      * Such indices will exist if and only if the specified length
      * is greater than that of the original array.
      *
@@ -3231,8 +3232,8 @@
      * @param newLength the length of the copy to be returned
      * @return a copy of the original array, truncated or padded with zeros
      *     to obtain the specified length
-     * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
-     * @throws NullPointerException if <tt>original</tt> is null
+     * @throws NegativeArraySizeException if {@code newLength} is negative
+     * @throws NullPointerException if {@code original} is null
      * @since 1.6
      */
     public static byte[] copyOf(byte[] original, int newLength) {
@@ -3247,7 +3248,7 @@
      * so the copy has the specified length.  For all indices that are
      * valid in both the original array and the copy, the two arrays will
      * contain identical values.  For any indices that are valid in the
-     * copy but not the original, the copy will contain <tt>(short)0</tt>.
+     * copy but not the original, the copy will contain {@code (short)0}.
      * Such indices will exist if and only if the specified length
      * is greater than that of the original array.
      *
@@ -3255,8 +3256,8 @@
      * @param newLength the length of the copy to be returned
      * @return a copy of the original array, truncated or padded with zeros
      *     to obtain the specified length
-     * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
-     * @throws NullPointerException if <tt>original</tt> is null
+     * @throws NegativeArraySizeException if {@code newLength} is negative
+     * @throws NullPointerException if {@code original} is null
      * @since 1.6
      */
     public static short[] copyOf(short[] original, int newLength) {
@@ -3271,7 +3272,7 @@
      * so the copy has the specified length.  For all indices that are
      * valid in both the original array and the copy, the two arrays will
      * contain identical values.  For any indices that are valid in the
-     * copy but not the original, the copy will contain <tt>0</tt>.
+     * copy but not the original, the copy will contain {@code 0}.
      * Such indices will exist if and only if the specified length
      * is greater than that of the original array.
      *
@@ -3279,8 +3280,8 @@
      * @param newLength the length of the copy to be returned
      * @return a copy of the original array, truncated or padded with zeros
      *     to obtain the specified length
-     * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
-     * @throws NullPointerException if <tt>original</tt> is null
+     * @throws NegativeArraySizeException if {@code newLength} is negative
+     * @throws NullPointerException if {@code original} is null
      * @since 1.6
      */
     public static int[] copyOf(int[] original, int newLength) {
@@ -3295,7 +3296,7 @@
      * so the copy has the specified length.  For all indices that are
      * valid in both the original array and the copy, the two arrays will
      * contain identical values.  For any indices that are valid in the
-     * copy but not the original, the copy will contain <tt>0L</tt>.
+     * copy but not the original, the copy will contain {@code 0L}.
      * Such indices will exist if and only if the specified length
      * is greater than that of the original array.
      *
@@ -3303,8 +3304,8 @@
      * @param newLength the length of the copy to be returned
      * @return a copy of the original array, truncated or padded with zeros
      *     to obtain the specified length
-     * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
-     * @throws NullPointerException if <tt>original</tt> is null
+     * @throws NegativeArraySizeException if {@code newLength} is negative
+     * @throws NullPointerException if {@code original} is null
      * @since 1.6
      */
     public static long[] copyOf(long[] original, int newLength) {
@@ -3319,7 +3320,7 @@
      * so the copy h